Inequality (8) — the facility cost of a bad facility
ProvedLocalSearchFL.UFL.bad_facility_inequality_8Let 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.
If is bad, and is the set of facilities of that captures, then
It is the counterpart for bad facilities of inequality (5): adding (5) over the good facilities, (8) over the bad ones, and over the facilities of captured by no one yields Lemma 4.2.
import Mathlib import Definitions.Def_LocalSearchFL_UFL_captures
namespace LocalSearchFL.UFL
/-- Inequality (8), p. 556. 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. If `s ∈ S` is bad and `P ⊆ O` is the set of facilities that `s` captures, then
`∑_{o' ∈ P} f_{o'} − f_s + ∑_{j ∈ N_S(s), π(j) ≠ j} (O_j + O_{π(j)} + S_{π(j)} − S_j)
+ 2 ∑_{j ∈ N_S(s), π(j) = j} O_j ≥ 0`. -/
theorem bad_facility_inequality_8 {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 : Fa) (hs : s ∈ S) (hbad : ¬ IsGood σS σO O s) :
0 ≤ ∑ o' ∈ O.filter (fun o' => captures σS σO s o'), 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)) +
2 * ∑ j ∈ (nbhd σS s).filter (fun j => π j = j), I.c j (σO 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 . 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 : with for all ;
- for every : with for all .
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 : .
-
is bad: it is not the case that captures no . In other words, captures at least one .
Conclusion. Let . Then
where and . The first sum ranges over only. The subtraction of and the other two sums lie outside it.
Degenerate cases. Badness forces and some . So and are nonempty, and .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.