Integrality and finite termination of the Ford–Fulkerson algorithm
ProvedLinearOptimization.max_flow_ford_fulkerson_integer_termination(Bertsimas & Tsitsiklis, Theorem 7.8, p. 305) Suppose that all arc capacities are integer or infinite, and that the Ford–Fulkerson algorithm is initialized with an integer flow vector.
Then, the arc flow variables remain integer throughout the algorithm and, if the optimal value is finite, the algorithm terminates after a finite number of steps.
Encoding: (Formalized over the run predicate: every flow in every admissible Ford–Fulkerson run started at an integer feasible flow is integer, and if the maximum flow value is finite, there is no infinite admissible run — for every augmenting-path selection rule.)
import Definitions.Def_LinearOptimization_AugmentingPath open Matrix open scoped ENNReal /-- **Bertsimas & Tsitsiklis, Theorem 7.8 (p. 305).** For integer-or-infinite capacities and an integer initial feasible flow: every flow produced by the Ford–Fulkerson algorithm is integer, and if the maximum flow value is finite there is no infinite admissible run — under every augmenting-path selection rule. -/
theorem LinearOptimization.max_flow_ford_fulkerson_integer_termination {n m : ℕ}
(arcs : Fin m → Fin n × Fin n) (u : Fin m → ℝ≥0∞) (s t : Fin n)
(hst : s ≠ t) (hloop : HasNoSelfLoops arcs) (hupos : ∀ k, 0 < u k)
(huint : ∀ k, u k = ⊤ ∨ ∃ z : ℕ, u k = (z : ℝ≥0∞))
(f₀ : Fin m → ℝ) (hf₀ : IsFeasibleMaxFlow arcs u s t f₀)
(hint₀ : ∀ k, ∃ z : ℤ, f₀ k = (z : ℝ)) :
(∀ f, Relation.ReflTransGen (IsFordFulkersonStep arcs u s t) f₀ f →
∀ k, ∃ z : ℤ, f k = (z : ℝ)) ∧
(maxFlowValue arcs u s t ≠ ⊤ →
¬∃ g : ℕ → Fin m → ℝ, g 0 = f₀ ∧
∀ i, IsFordFulkersonStep arcs u s t (g i) (g (i + 1))) := by
sorry
Read-back
What the Lean code literally says, in plain math · claude-fable-5
Fix a network of directed arcs on nodes , capacities , and distinct nodes , with: no self-loops; every capacity strictly positive (); every capacity either or equal to the image of a natural number (so integer capacities are nonnegative integers); and an initial flow that is a feasible max-flow (conservation at nodes other than ; ; and ) all of whose coordinates are integers. Conclusion, a conjunction: (a) every flow reachable from by zero or more Ford–Fulkerson steps (the reflexive–transitive closure of the step relation: current flow feasible, an augmenting path exists with finite bottleneck , and the new flow is along the path's membership indicator ) has all coordinates integer; (b) if the max-flow value (supremum in the extended reals), then there is no infinite sequence of flows with and every consecutive pair a Ford–Fulkerson step — i.e. the procedure cannot run forever. Nothing is claimed about which augmenting paths are chosen, and (b) is conditional on finiteness of the sup.
Confirmed by the mission captain (proposal self-audit).