Theorem 8 — optimality conditions (5a)–(5f) for the Hitchcock problem
ProvedEdmondsKarp.Scaling.extreme_iff_potentialsConsider the Hitchcock network of Figure 1 with , positive capacities , satisfying , and nonnegative costs . Let be a maximum flow. Then is extreme (of minimum cost among the maximum flows) if and only if there exist real numbers and such that, for all and ,
This is the specialization to the transportation network of the characterization of minimum-cost flows by labeling functions (, , , ). It is the certificate of optimality that the scaling method maintains.
Formalization Note The page prints the second family as ""; the conditions index by , which is what is stated. "Extreme among maximum flows" is formalized with assumed to be a maximum flow: without that assumption the "if" direction would fail, since the zero flow satisfies (5a)–(5f) for suitable potentials. For a maximum flow, extreme (minimum cost among flows of the same value) is the same as minimum cost among maximum flows. The potentials are real numbers.
import Mathlib import Definitions.Def_EdmondsKarp_Scaling_Transport
namespace EdmondsKarp.Scaling
/-- Theorem 8 (p. 259). For the Hitchcock network of Figure 1 with positive capacities `a_i`, `b_j`,
`∑ a_i = ∑ b_j` and nonnegative costs `d_ij`, a maximum flow `f` is extreme (of minimum cost among
the maximum flows) if and only if there exist real `u_0, u_1, …, u_m` and `v_0, v_1, …, v_n` with
(5a)–(5f). The page prints `v_0, …, v_m`; the index of `v` runs over `0, …, n` as (5a)–(5f) show.
"Extreme among maximum flows" is read with `f` ranging over maximum flows (hypothesis `hx`): the zero
flow satisfies (5a)–(5f) for suitable potentials but is not maximum. -/
theorem extreme_iff_potentials {m n : ℕ} (hm : 1 ≤ m) (hn : 1 ≤ n) (T : Transport m n)
(ha : ∀ i, 0 < T.a i) (hb : ∀ j, 0 < T.b j) (hsum : ∑ i, T.a i = ∑ j, T.b j)
(hd : ∀ i j, 0 ≤ T.d i j) (x : Flow m n) (hx : IsMaxFlow T x) :
IsExtreme T x ↔
∃ (u0 : ℝ) (u : Fin m → ℝ) (v0 : ℝ) (v : Fin n → ℝ),
(∀ i j, 0 ≤ u i - v j + T.d i j) ∧
(∀ i j, 0 < u i - v j + T.d i j → x.fx i j = 0) ∧
(∀ i, u0 > u i → x.f0 i = 0) ∧
(∀ i, u0 < u i → x.f0 i = T.a i) ∧
(∀ j, v j > v0 → x.fz j = 0) ∧
(∀ j, v j < v0 → x.fz j = T.b j) := by sorry
end EdmondsKarp.Scaling
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. Let and . Let be a transport problem.
Hypotheses on the data.
- for all , and for all ;
- ;
- for all .
Hypothesis on . is a maximum flow for . That is, is a flow (nonnegative components, , , conservation at every node) with for every flow .
Conclusion. is extreme if and only if certain potentials exist. Being extreme means for every flow with the same return value as . The potentials are reals , , and such that, for all :
No condition links with , or constrains either one beyond (5c)–(5f).
Degenerate cases. The hypotheses exclude and . The positivity hypotheses exclude zero capacities. The equivalence is asserted only for maximum flows .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.