§3.4 — weighted swaps with total weight one per o ∈ O and at most (p+1)/p per s ∈ S
ProvedLocalSearchFL.MultiSwap.exists_weighted_swapsLet and be two sets of facilities with , let be client assignments, and let be an integer. Then there is a finite collection of swaps , with , and , and a positive real weight on each, such that
- for every facility ,
- for every facility ,
- if , then ;
- the deleted sets of any two swaps of are equal or disjoint.
Each swap in lies in the -swap neighbourhood, so local optimality gives for each; the weights are what the analysis uses to add these inequalities up.
Formalization Note The swaps are built in the paper from the partition of Claim 3.1: a block with gives the swap with weight , and a block with gives the swaps ( one of good facilities of , ) with weight . Property 4 is not printed as a property but is immediate from that construction (each deleted set is a block or a single facility of a block); it records the structure that the partition of in Property 3.2 relies on. The inequalities from local optimality are not restated here; they follow from the definition of local optimality.
import Mathlib import Definitions.Def_LocalSearchFL_MultiSwap_capture
namespace LocalSearchFL.MultiSwap
/-- The weighted swaps of §3.4 (pp. 552–553). If `|S| = |O|` and `p ≥ 1`, there is a finite set
`W` of swaps `⟨A, B⟩` with `A ⊆ S`, `B ⊆ O`, `|A| = |B| ≤ p`, and positive real weights `w`, such
that
1. for every `o ∈ O`, the weights of the swaps `⟨A, B⟩` with `o ∈ B` sum to exactly one;
2. for every `s ∈ S`, the weights of the swaps `⟨A, B⟩` with `s ∈ A` sum to at most `(p + 1)/p`;
3. if `⟨A, B⟩ ∈ W`, then `capture(A) ⊆ B`.
Moreover (from the construction: the sets `A` are blocks `A_i` of the partition of Claim 3.1 or
single facilities of a block) the deleted sets of any two swaps are equal or disjoint. -/
theorem exists_weighted_swaps {Cl Fa : Type} [Fintype Cl] [DecidableEq Cl] [DecidableEq Fa]
(σS σO : Cl → Fa) (S O : Finset Fa) (hcard : S.card = O.card) (p : ℕ) (hp : 1 ≤ p) :
∃ (W : Finset (Finset Fa × Finset Fa)) (w : Finset Fa × Finset Fa → ℝ),
(∀ AB ∈ W, AB.1 ⊆ S ∧ AB.2 ⊆ O ∧ AB.1.card = AB.2.card ∧ AB.1.card ≤ p ∧ 0 < w AB) ∧
(∀ o ∈ O, ∑ AB ∈ W.filter (fun AB => o ∈ AB.2), w AB = 1) ∧
(∀ s ∈ S, ∑ AB ∈ W.filter (fun AB => s ∈ AB.1), w AB ≤ ((p : ℝ) + 1) / p) ∧
(∀ AB ∈ W, capture σS σO O AB.1 ⊆ AB.2) ∧
(∀ AB ∈ W, ∀ AB' ∈ W, AB.1 = AB'.1 ∨ Disjoint AB.1 AB'.1) := by sorry
end LocalSearchFL.MultiSwap
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Data.
- is a finite type of clients and is a type of facilities, both with decidable equality.
- are arbitrary functions.
- and are finite subsets of .
- is a natural number.
Hypotheses. and .
Definition used. , where and .
Claim. There exist a finite set of pairs of finite subsets of , and a function assigning a real number to each such pair, such that the following hold.
- Shape and positivity. For every :
- and ;
- ;
- .
- Coverage of . For every :
In particular, every lies in the second component of some pair. 3. Load on . For every :
computed as real numbers. 4. Capture. For every : . 5. Equal or disjoint. For any two pairs and in , either or .
Only the values of on matter. is a set, so it contains no pair twice. The pair is not excluded.
Degenerate cases.
- If , then satisfies everything vacuously.
- Because , the bound never involves division by zero. For it equals .
- If is empty or no is captured, condition 4 is vacuous.
- There is no ℕ-subtraction in the statement.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.