Lemma 5.4 — routing |N_S(s)| units from each v_s to the sink at cost ≤ cost_s(S) + cost_s(O) + cost_f(O)
ProvedLocalSearchFL.CFL.flow_lemma_5_4Let be a finite set of clients and a set of facilities in a metric instance with distances , integer capacities and facility costs . Let and be two CFL solutions. Consider the directed graph with a node for every copy of , a node for every copy of and a sink, with an edge of length (the distance between the facilities of and ) and an edge of length . Then one can route units of flow from every to the sink at total cost at most the service costs of both solutions plus the facility cost of : there are nonnegative integers (the flow on the path ) with for every and
The lemma needs no local optimality. It compares the two solutions through a flow whose cost is then bounded from below by a shortest-path flow in inequality (10).
Formalization Note The graph is complete bipartite plus a sink, so a flow is determined by the amounts on the two-edge paths; no graph library is used. The flow is required to be integral, which is what the paper's routing (one unit per client) produces. Here ranges over the copies of and , are those of the facility of the copy .
import Mathlib import Definitions.Def_LocalSearchFL_CFL_IsCFLLocalOpt
namespace LocalSearchFL.CFL
/-- **Lemma 5.4**, p. 560: for any two CFL solutions `X` and `O`, in the flow graph with an
edge `(v_s, w_o)` of length `c_{so}` for every copy `s` of `X` and copy `o` of `O`, and an edge
`(w_o, sink)` of length `f_o / u_o`, one can simultaneously route `|N_X(s)|` units of flow
from every `v_s` to the sink at total cost at most `cost_s(X) + cost_s(O) + cost_f(O)`.
Here `x s o` is the (integer-valued) flow on the path `v_s → w_o → sink`. -/
theorem flow_lemma_5_4 {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) :
∃ x : Fin X.n → Fin O.n → ℕ,
(∀ s, ∑ o, x s o = (X.nbhd s).card) ∧
∑ s, ∑ o, (x s o : ℝ) * (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
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. Let be a type of clients. It must be finite. Let be a type of facilities, which is an arbitrary type and need not be finite. The statement takes the following data:
-
, a metric instance on and . This is a structure from the imported definitions file, and its contents are not shown in the code. The statement uses one field of it, . It is applied to two facility locations, so is a real number for facilities .
-
A capacity function , with the hypothesis for every facility .
-
An opening-cost function , with the hypothesis for every facility .
-
Two capacitated facility location solutions and for , and . These are also defined in the imported file, which is not visible. The statement uses three pieces of each solution. For they are:
- a natural number , the number of copies in the solution;
- for each copy , a facility ;
- for each copy , a finite set , the "neighbourhood" of , which enters only through its size .
has the same pieces: , and so on.
-
Three cost quantities from the imported file: , and . They are real numbers. Their definitions are not shown here, and the statement relies on whatever those definitions say. The same goes for any constraints built into the solution type, such as whether copies respect the capacities .
Assertion. There is a function that assigns a natural number to each copy of and each copy of , with both of these properties:
- Row sums. For every copy of ,
- Cost bound.
The division in the cost bound is real division.
No other constraint is placed on . In particular:
- The column sums are not bounded, so nothing limits the total amount assigned to a copy of (for example, by a capacity).
- Nothing mentions a graph, edges or a sink. The accompanying comment describes the result as a flow-routing statement, but the code states only the two conditions above on the numbers .
Edge cases. These follow from the text as written:
- No division by zero. Because for every facility, every denominator is positive.
- (no copies in ). The row-sum condition holds vacuously, and the double sum is empty, so its value is . The statement then says only that .
- but . Each row sum is empty and equals . So the statement can hold only if for every copy . If some is nonempty, the statement is false unless the hidden definitions rule this combination out.
- empty. No copy can have a location, so is forced (assuming locations are total functions, as they appear to be) and the case above applies.
- empty. The code places no constraint that makes this case special. Whether the neighbourhoods must then be empty depends on the hidden definitions.
- Unused hypotheses. Nonnegativity of , positivity of and finiteness of are assumed. Whether the bound actually needs them depends on the hidden definitions of the cost terms.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.