Claim 3.1 — partition of S and O into blocks with B_i = capture(A_i)
ProvedLocalSearchFL.MultiSwap.exists_partition_claim_3_1Let and be two sets of facilities with , and let be client assignments; capture, good and bad are as defined for and . Then there are an integer , a partition of into and a partition of into such that
- for , and ; and ;
- for , the set has exactly one bad facility;
- the set contains only good facilities.
The paper obtains the partition by the procedure of its Figure 8 and proves in Claim 3.1 that the procedure terminates with such partitions. The partition is the skeleton of the swaps used in the -swap analysis.
Formalization Note The claim is stated in existence form: the procedure itself is not formalized. The blocks are a family indexed by Fin m () and , are separate sets, which may be empty (as the procedure allows). "Partition" is stated as: every block is contained in (resp. ), the blocks are pairwise disjoint and cover (resp. ). Capture and goodness are computed against the original and ; since disjoint sets have disjoint captures, this gives the same blocks as the procedure's shrinking .
import Mathlib import Definitions.Def_LocalSearchFL_MultiSwap_capture
namespace LocalSearchFL.MultiSwap
/-- Claim 3.1 (p. 552), in existence form. If `|S| = |O|`, then `S` can be partitioned into
`A_1, …, A_r` and `O` into `B_1, …, B_r` (here `r = m + 1`, `A_i = A (i-1)` and `B_i = B (i-1)`
for `i ≤ m`, and `A_r = Ar`, `B_r = Br`) such that
1. for `1 ≤ i ≤ r − 1`, `|A_i| = |B_i|` and `B_i = capture(A_i)`; and `|A_r| = |B_r|`;
2. for `1 ≤ i ≤ r − 1`, `A_i` has exactly one bad facility;
3. `A_r` contains only good facilities.
Capture, good and bad are taken with respect to the original `S` and `O` (the assignments `σS`,
`σO` and the set `O`). The last blocks `Ar`, `Br` may be empty. -/
theorem exists_partition_claim_3_1 {Cl Fa : Type} [Fintype Cl] [DecidableEq Cl] [DecidableEq Fa]
(σS σO : Cl → Fa) (S O : Finset Fa) (hcard : S.card = O.card) :
∃ (m : ℕ) (A B : Fin m → Finset Fa) (Ar Br : Finset Fa),
-- `A_1, …, A_{r-1}, A_r` partition `S`
(∀ i, A i ⊆ S) ∧ Ar ⊆ S ∧ (∀ s ∈ S, (∃ i, s ∈ A i) ∨ s ∈ Ar) ∧
(∀ i i', i ≠ i' → Disjoint (A i) (A i')) ∧ (∀ i, Disjoint (A i) Ar) ∧
-- `B_1, …, B_{r-1}, B_r` partition `O`
(∀ i, B i ⊆ O) ∧ Br ⊆ O ∧ (∀ o ∈ O, (∃ i, o ∈ B i) ∨ o ∈ Br) ∧
(∀ i i', i ≠ i' → Disjoint (B i) (B i')) ∧ (∀ i, Disjoint (B i) Br) ∧
-- property 1
(∀ i, (A i).card = (B i).card ∧ B i = capture σS σO O (A i)) ∧ Ar.card = Br.card ∧
-- property 2
(∀ i, ∃ b ∈ A i, ¬ IsGood σS σO O b ∧ ∀ s ∈ A i, s ≠ b → IsGood σS σO O s) ∧
-- property 3
(∀ s ∈ Ar, IsGood σS σO O s) := 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 .
Hypothesis. . Nothing else is assumed:
- and may overlap;
- need not map into , and need not map into .
Definitions used.
- , where and .
- A facility is good when , and bad otherwise.
Claim. There exist:
- a natural number (possibly );
- finite sets and of facilities;
- finite sets and of facilities;
such that the following hold.
- -blocks cover disjointly.
- Every and is a subset of .
- Every lies in some or in .
- whenever .
- for every .
- -blocks cover disjointly.
- Every and is a subset of .
- Every lies in some or in .
- whenever .
- for every .
- Sizes and capture.
- For every : and .
- .
- One bad facility per block. For every there is a that is bad, and every other element of is good. So each is nonempty and contains exactly one bad facility, and therefore .
- Last block is good. Every element of is good.
Nonemptiness of the individual blocks is not otherwise required: and may be empty.
Degenerate cases.
- If , the claim is satisfied with and .
- If , the claim reduces to , , and every element of being good.
- If , then as well.
- If is empty, every facility is good. Since each must contain a bad facility, this forces .
- No subtraction, division or other default-valued operations occur.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.