Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Inequality (10) — the shortest-path flow is bounded by cost_s(S) + cost_s(O) + cost_f(O)

Proved
LocalSearchFL.CFL.shortest_path_flow_bound_10

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

capacitated-facility-locationfacility-locationnetwork-flowsp2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1

Let CCC be a finite set of clients and FFF a set of facilities in a metric instance with distances ccc, integer capacities ui>0u_i > 0ui​>0 and facility costs fi≥0f_i \ge 0fi​≥0. Let XXX and OOO be CFL solutions, OOO with at least one open copy. Then there is a map τ\tauτ from the copies of XXX to the copies of OOO such that

  1. for every copy sss of XXX, τ(s)\tau(s)τ(s) minimizes cso+fo/uoc_{so} + f_o/u_ocso​+fo​/uo​ over the copies ooo of OOO (so vs→wτ(s)→sinkv_s \to w_{\tau(s)} \to \mathrm{sink}vs​→wτ(s)​→sink is a shortest path), and
  2. writing To={s:τ(s)=o}T_o = \{ s : \tau(s) = o\}To​={s:τ(s)=o},
costs(X)+costs(O)+costf(O) ≥ ∑o∑s∈To∣NX(s)∣(cso+fouo).\mathrm{cost}_s(X) + \mathrm{cost}_s(O) + \mathrm{cost}_f(O) \ \ge\ \sum_{o} \sum_{s \in T_o} |N_X(s)|\left(c_{so} + \frac{f_o}{u_o}\right).costs​(X)+costs​(O)+costf​(O) ≥ o∑​s∈To​∑​∣NX​(s)∣(cso​+uo​fo​​).

This is inequality (10) of the paper: routing all flow of vsv_svs​ along its shortest path gives a minimum-cost flow, whose cost is at most that of the flow of Lemma 5.4. The sets ToT_oTo​ are then used in inequality (11).

Formalization Note Every copy of XXX, including copies serving no client, is assigned to some ToT_oTo​; this requires OOO to have a copy, which holds whenever there is a client. Ties in the minimization are broken arbitrarily (the statement asserts existence of one such τ\tauτ).

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

/-- **Inequality (10)**, p. 560: for any two CFL solutions `X` and `O` (with `O` opening at
least one copy), route the flow of every `v_s` along a shortest path `v_s → w_{τ(s)} → sink`,
i.e. `τ(s)` minimizes `c_{so} + f_o/u_o` over the copies `o` of `O` (ties broken arbitrarily);
writing `T_o = τ⁻¹(o)`, this flow satisfies
`cost_s(X) + cost_s(O) + cost_f(O) ≥ ∑_{o ∈ O} ∑_{s ∈ T_o} |N_X(s)| (c_{so} + f_o/u_o)`. -/
theorem shortest_path_flow_bound_10 {Cl Fa : Type} [Fintype Cl]
    (I : MetricInstance Cl Fa) (u : Fa → ℕ) (hu : ∀ i, 0 < u i) (f : Fa → ℝ) (hf : ∀ i, 0 ≤ f i)
    (X O : CFLSol Cl Fa u) (hO : 0 < O.n) :
    ∃ τ : Fin X.n → Fin O.n,
      (∀ s o, I.cf (X.loc s) (O.loc (τ s)) + f (O.loc (τ s)) / (u (O.loc (τ s)) : ℝ) ≤
        I.cf (X.loc s) (O.loc o) + f (O.loc o) / (u (O.loc o) : ℝ)) ∧
      ∑ o, ∑ s ∈ Finset.univ.filter (fun s => τ s = o),
          ((X.nbhd s).card : ℝ) * (I.cf (X.loc s) (O.loc o) + f (O.loc o) / (u (O.loc o) : ℝ)) ≤
        costS I X + costS I O + costF f 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. 560, eq. (10)
Read-back

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

Setting:

  • Clients and facilities. A finite type CCC of clients (possibly empty) 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) and cii′=d(i,i′)c_{ii'} = d(i,i')cii′​=d(i,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. XXX and OOO are arbitrary solutions. No local optimality is assumed. For a solution ZZZ:

  • the copies are indexed 0,…,nZ−10,\dots,n_Z-10,…,nZ​−1, and each copy sss is a copy of facility ℓZ(s)\ell_Z(s)ℓZ​(s);
  • the assignment is σZ\sigma_ZσZ​, with NZ(s)={j:σZ(j)=s}N_Z(s) = \{j : \sigma_Z(j)=s\}NZ​(s)={j:σZ​(j)=s} and ∣NZ(s)∣≤uℓZ(s)|N_Z(s)| \le u_{\ell_Z(s)}∣NZ​(s)∣≤uℓZ​(s)​;
  • 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))​.

Hypothesis. OOO has at least one copy: nO≥1n_O \ge 1nO​≥1.

Weight notation. For a copy sss of XXX and a copy ooo of OOO, write

w(s,o):=cℓX(s), ℓO(o)+fℓO(o)uℓO(o).w(s,o) := c_{\ell_X(s),\,\ell_O(o)} + \frac{f_{\ell_O(o)}}{u_{\ell_O(o)}}.w(s,o):=cℓX​(s),ℓO​(o)​+uℓO​(o)​fℓO​(o)​​.

Conclusion. There is a map τ\tauτ from the copies of XXX to the copies of OOO such that:

  1. Minimality. For every copy sss of XXX and every copy ooo of OOO, w(s,τ(s))≤w(s,o)w(s,\tau(s)) \le w(s,o)w(s,τ(s))≤w(s,o). In words, τ(s)\tau(s)τ(s) minimizes w(s,⋅)w(s,\cdot)w(s,⋅).
  2. Cost bound.
∑o ∑s : τ(s)=o∣NX(s)∣  w(s,o)  ≤  cost⁡s(X)+cost⁡s(O)+cost⁡f(O).\sum_{o}\ \sum_{s \,:\, \tau(s) = o} |N_X(s)|\; w(s,o) \;\le\; \operatorname{cost}_s(X) + \operatorname{cost}_s(O) + \operatorname{cost}_f(O).o∑​ s:τ(s)=o∑​∣NX​(s)∣w(s,o)≤costs​(X)+costs​(O)+costf​(O).

The double sum on the left equals ∑s∣NX(s)∣ w(s,τ(s))\sum_s |N_X(s)|\, w(s,\tau(s))∑s​∣NX​(s)∣w(s,τ(s)).

Degenerate cases:

  • Empty CCC. The left side of the cost bound is 000 and the right side is cost⁡f(O)≥0\operatorname{cost}_f(O) \ge 0costf​(O)≥0. The substance is then only the existence of a minimizing τ\tauτ.
  • XXX has no copies. τ\tauτ is the empty map and both conditions hold trivially.
  • The hypothesis nO≥1n_O \ge 1nO​≥1. It is automatic when CCC is nonempty. It excludes the case where CCC is empty and OOO opens nothing.
  • Positive self-distances. ciic_{ii}cii​ need not be 000.
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