Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 5.3 — facility cost of a CFL local optimum is at most 3 cost_f(O) + 2 cost_s(O)

Proved
LocalSearchFL.CFL.facility_cost_lemma_5_3

by mikedeng1 · Sep 26, 2026 · Mathlib 0df444a (Lean v4.33.1)

capacitated-facility-locationfacility-locationlocal-searchp2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1

Let CCC be a nonempty finite set of clients and FFF a set of facilities in a metric instance, with integer capacities ui>0u_i > 0ui​>0 and facility costs fi≥0f_i \ge 0fi​≥0. Let XXX be a locally optimum CFL solution for the neighbourhood (9). Then for every CFL solution OOO,

costf(X)≤3 costf(O)+2 costs(O).\mathrm{cost}_f(X) \le 3\,\mathrm{cost}_f(O) + 2\,\mathrm{cost}_s(O).costf​(X)≤3costf​(O)+2costs​(O).

Added to Lemma 5.1, this gives cost(X)≤4 costf(O)+3 costs(O)≤4 cost(O)\mathrm{cost}(X) \le 4\,\mathrm{cost}_f(O) + 3\,\mathrm{cost}_s(O) \le 4\,\mathrm{cost}(O)cost(X)≤4costf​(O)+3costs​(O)≤4cost(O), the locality gap of Theorem 5.5.

Formalization Note The hypothesis that there is at least one client is added: without clients, a single idle copy of a facility with f=1f = 1f=1, u=1u = 1u=1 is locally optimum, and the empty solution OOO violates the inequality.

Preamble
import Mathlib
import Definitions.Def_LocalSearchFL_CFL_IsCFLLocalOpt
Formal statement
namespace LocalSearchFL.CFL

/-- **Lemma 5.3 (facility cost)**, p. 559: the facility cost of a locally optimum CFL solution
`X` (at least one client) satisfies `cost_f(X) ≤ 3 · cost_f(O) + 2 · cost_s(O)` for every CFL
solution `O`. -/
theorem facility_cost_lemma_5_3 {Cl Fa : Type} [Fintype Cl] [Nonempty Cl]
    (I : MetricInstance Cl Fa) (u : Fa → ℕ) (hu : ∀ i, 0 < u i) (f : Fa → ℝ) (hf : ∀ i, 0 ≤ f i)
    (X : CFLSol Cl Fa u) (hX : IsCFLLocalOpt I f X) (O : CFLSol Cl Fa u) :
    costF f X ≤ 3 * costF f O + 2 * costS I O := by sorry

end LocalSearchFL.CFL
Source
Arya, Garg, Khandekar, Meyerson, Munagala, Pandit, Local Search Heuristics for k-Median and Facility Location Problems, SIAM J. Comput. 33(3), 2004, p. 559, Lemma 5.3 (proof completed p. 560)
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Setting:

  • Clients and facilities. A finite, nonempty type CCC of clients and an arbitrary type FFF of facilities.
  • Metric instance III. A real distance ddd on C⊔FC \sqcup FC⊔F that is nonnegative, symmetric and satisfies the triangle inequality, with d(x,x)=0d(x,x)=0d(x,x)=0 not required. Write cji=d(j,i)c_{ji} = d(j,i)cji​=d(j,i).
  • Capacities. u:F→Nu : F \to \mathbb{N}u:F→N with all ui>0u_i > 0ui​>0.
  • Facility costs. f:F→Rf : F \to \mathbb{R}f:F→R with all fi≥0f_i \ge 0fi​≥0.

Solutions. A solution ZZZ consists of:

  • copies 0,…,nZ−10,\dots,n_Z-10,…,nZ​−1, each a copy of facility ℓZ(s)\ell_Z(s)ℓZ​(s);
  • an assignment σZ\sigma_ZσZ​ with each copy sss serving at most uℓZ(s)u_{\ell_Z(s)}uℓZ​(s)​ clients.

The costs are

cost⁡f(Z)=∑sfℓZ(s),cost⁡s(Z)=∑jcj,ℓZ(σZ(j)),\operatorname{cost}_f(Z) = \sum_s f_{\ell_Z(s)}, \qquad \operatorname{cost}_s(Z) = \sum_j c_{j,\ell_Z(\sigma_Z(j))},costf​(Z)=s∑​fℓZ​(s)​,costs​(Z)=j∑​cj,ℓZ​(σZ​(j))​,

and cost⁡(Z)\operatorname{cost}(Z)cost(Z) is their sum.

Hypothesis on XXX. XXX is locally optimal for (I,f)(I,f)(I,f): cost⁡(X)≤cost⁡(Y)\operatorname{cost}(X) \le \operatorname{cost}(Y)cost(X)≤cost(Y) for every solution YYY whose multiset of facilities is one of the following:

  • XXX's multiset plus one copy of some facility; or
  • { ⁣{ℓX(s):s∉T} ⁣}\{\!\{\ell_X(s): s\notin T\}\!\}{{ℓX​(s):s∈/T}} plus l≥1l\ge1l≥1 copies of some i′i'i′, for some set TTT of copies with ∣{j:σX(j)∈T}∣≤l ui′|\{j:\sigma_X(j)\in T\}| \le l\,u_{i'}∣{j:σX​(j)∈T}∣≤lui′​.

In both cases YYY may use any capacity-feasible assignment.

Conclusion. For every solution OOO:

cost⁡f(X)  ≤  3 cost⁡f(O)+2 cost⁡s(O).\operatorname{cost}_f(X) \;\le\; 3\,\operatorname{cost}_f(O) + 2\,\operatorname{cost}_s(O).costf​(X)≤3costf​(O)+2costs​(O).

Degenerate cases:

  • No empty client set. The empty-client case is excluded by hypothesis. Hence both XXX and OOO have at least one copy.
  • Empty FFF. Then no solution exists, and the statement is vacuous.
  • Positive self-distances. d(x,x)d(x,x)d(x,x) need not be 000, so cost⁡s(O)\operatorname{cost}_s(O)costs​(O) may be positive even for a client "at" its facility.
Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 27, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me