Inequality (6) — swapping a bad facility with its nearest captured facility
ProvedLocalSearchFL.UFL.swap_bad_inequality_6Let be facility opening costs on a metric instance, let be a nonempty set of facilities that is locally optimum for the add/drop/swap neighbourhood (4), and let be any solution. Let , be nearest-facility assignments for and , write and , and let be a permutation of the clients satisfying the three conditions of the mapping of the proof of Lemma 4.2.
Let capture , where is nearest to among the facilities of captured by : for every captured by . Then
This is the information extracted from the swap that closes a bad facility and opens ; it is the main ingredient of inequality (8).
Formalization Note The distance between two facilities is I.cf s o. The summand is kept in the paper's unsimplified form.
import Mathlib import Definitions.Def_LocalSearchFL_UFL_captures
namespace LocalSearchFL.UFL
/-- Inequality (6), pp. 555–556: the swap `⟨s, o⟩` for a bad facility. Let `S` be a locally
optimum solution for the neighbourhood (4), `O` any solution, `σS`, `σO` nearest-facility
assignments, `π` the mapping of the proof of Lemma 4.2. Let `s ∈ S` capture `o ∈ O`, where `o`
is a facility nearest to `s` among the facilities of `O` captured by `s`
(`c_{so} ≤ c_{so'}` for every `o' ∈ O` captured by `s`). Then
`f_o − f_s + ∑_{j ∈ N_S(s), π(j) ≠ j} (O_j + O_{π(j)} + S_{π(j)} − S_j)
+ ∑_{j ∈ N_O(o), π(j) = j ∈ N_S(s)} (O_j − S_j)
+ ∑_{j ∉ N_O(o), π(j) = j ∈ N_S(s)} (S_j + S_j + O_j − S_j) ≥ 0`. -/
theorem swap_bad_inequality_6 {Cl Fa : Type} [Fintype Cl] [DecidableEq Cl]
[Fintype Fa] [DecidableEq Fa]
(I : MetricInstance Cl Fa) (f : Fa → ℝ) (hf : ∀ i, 0 ≤ f i)
(S O : Finset Fa) (hS : S.Nonempty) (hloc : IsUFLLocalOpt I f S hS)
(σS σO : Cl → Fa) (hσS : IsNearestAssignment I S σS) (hσO : IsNearestAssignment I O σO)
(π : Equiv.Perm Cl) (hπ : IsRefinedPi σS σO π)
(s o : Fa) (hs : s ∈ S) (ho : o ∈ O) (hcap : captures σS σO s o)
(hnearest : ∀ o' ∈ O, captures σS σO s o' → I.cf s o ≤ I.cf s o') :
0 ≤ f o - f s +
∑ j ∈ (nbhd σS s).filter (fun j => π j ≠ j),
(I.c j (σO j) + I.c (π j) (σO (π j)) + I.c (π j) (σS (π j)) - I.c j (σS j)) +
∑ j ∈ (nbhd σS s).filter (fun j => π j = j ∧ σO j = o),
(I.c j (σO j) - I.c j (σS j)) +
∑ j ∈ (nbhd σS s).filter (fun j => π j = j ∧ σO j ≠ o),
(I.c j (σS j) + I.c j (σS j) + I.c j (σO j) - I.c j (σS j)) := by sorry
end LocalSearchFL.UFL
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. Let (clients) and (facilities) be finite types with decidable equality. Let be a metric instance: on pairs of points of , nonnegative, symmetric, triangle inequality, self-distance not assumed zero. Write for a client and a facility, and for two facilities. Let satisfy for all . For nonempty , write .
Hypotheses.
-
are finite sets of facilities, and is nonempty.
-
is locally optimal:
- for every facility ;
- for every with ;
- for all and all facilities .
-
are nearest-facility assignments:
- for every : and ;
- for every : and .
Write and .
-
Write , and . Say that captures when .
-
is a permutation of satisfying all three of:
- (i) for all ;
- (ii) for all facilities with not capturing : ;
- (iii) for all facilities with capturing : .
-
and , and captures .
-
For every that captures: .
Conclusion.
where and . The summand of the last sum is algebraically .
Degenerate cases.
- Capture forces . So is nonempty, and serves at least one client assigned to .
- If captures only within , the nearest-captured condition holds trivially.
- If as well, the facility cost still appears in the conclusion.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.