Theorem 3.2 (Ford–Fulkerson) — a flow is maximum iff t is not reachable from s in the residual graph
ProvedGoldbergTarjan.Generic.max_flow_iff_no_augmenting_pathLet be a flow network with source and sink , and let be a flow (capacity, antisymmetry and conservation constraints). An augmenting path is a simple path from to in the residual graph . Then
This is the classical theorem of Ford and Fulkerson, which the paper cites without proof; together with Lemma 3.3 it yields the correctness of the algorithm (Theorem 3.4).
Formalization Note. Flows here are antisymmetric real functions on all vertex pairs, as in the paper, not nonnegative arc flows.
import Mathlib import Definitions.Def_GoldbergTarjan_Generic_Preflow
namespace GoldbergTarjan.Generic
/-- Theorem 3.2 (Ford–Fulkerson; Goldberg–Tarjan 1988, p. 926). A flow `f` is maximum if and
only if there is no augmenting path, that is, `t` is not reachable from `s` in `G_f`. -/
theorem max_flow_iff_no_augmenting_path {V : Type} [Fintype V]
(N : Network V) (f : V → V → ℝ) (hf : IsFlow N f) :
IsMaxFlow N f ↔ ¬ ResidualReachable N f N.s N.t := by sorry
end GoldbergTarjan.Generic
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
The statement concerns an arbitrary finite type , a network , and a real function on . Recall that has capacities with , a source , and a sink .
Hypothesis. is a flow:
- ;
- ;
- for every .
Conclusion. The following two conditions are equivalent:
- is a maximum flow: for every real-valued flow of .
- is not reachable from in the residual graph: there is no sequence with for all .
Degenerate cases. Since reachability includes the empty path but , condition 2 is not trivially false. If , the only flow is , there are no residual edges, and both sides hold. Capacities and flows are arbitrary nonnegative (respectively real) values, not necessarily integers.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.