Theorem 13.10 — The Max Flow–Min Cut Theorem
ProvedAppliedComb.Flows.max_flow_min_cutLet be a network with source , sink and non-negative real capacities . Then there is a real number that is both the maximum value of a flow and the minimum capacity of a cut:
In words: some flow has value and no flow has larger value; some cut has capacity and no cut has smaller capacity.
This is the central theorem of network flows, due to Ford and Fulkerson (1956) and to Elias, Feinstein and Shannon (1956). The book obtains it from the Ford–Fulkerson labeling algorithm (Algorithm 13.11): when the labeling halts without labeling the sink, the labeled and unlabeled vertices form a cut whose capacity equals the current flow's value.
Formalization Note. The book's sentence "if is the maximum value of a flow and is the minimum capacity of a cut, then " presupposes that both extrema exist. The statement here asserts their existence as well as their equality (IsGreatest of the set of flow values and IsLeast of the set of cut capacities, at the same number), so nothing is assumed. For real (possibly irrational) capacities the labeling algorithm need not terminate, so the existence of a maximum flow is part of the claim.
import Mathlib import Definitions.Def_AppliedComb_Flows_Network
namespace AppliedComb.Flows
/-- **Theorem 13.10 (The Max Flow–Min Cut Theorem)** (Keller & Trotter, *Applied Combinatorics*,
2017 Edition, p. 268). Let `N` be a network. There is a number `v₀` which is the maximum value
of a flow in `N` (it is the value of some flow, and no flow has larger value) and which is also
the minimum capacity of a cut of `N` (it is the capacity of some cut, and no cut has smaller
capacity). In particular the maximum value of a flow exists, the minimum capacity of a cut exists,
and they are equal. -/
theorem max_flow_min_cut {V : Type*} [Fintype V] [DecidableEq V] (N : Network V) :
∃ v₀ : ℝ,
IsGreatest {v : ℝ | ∃ ϕ : V → V → ℝ, N.IsFlow ϕ ∧ N.value ϕ = v} v₀ ∧
IsLeast {c : ℝ | ∃ L : Finset V, N.IsCut L ∧ N.cutCapacity L = c} v₀ := by sorry
end AppliedComb.Flows
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let be any finite type of vertices with decidable equality; no other assumption is made on . It may in particular be empty or have one element. Let be an arbitrary object of type Network V. Network, and the notions IsFlow, value, IsCut and cutCapacity used below, come from the imported bundle file Definitions.Def_AppliedComb_Flows_Network. Their definitions are not part of the code shown here, so this read-back cannot unfold them. What each one requires, for example which vertices are the source and sink, what the capacities are, and which conditions a flow or a cut must satisfy, must be checked against that file. The statement carries no hypothesis on beyond its type.
The code uses these objects:
- A candidate flow is any real-valued function of two vertices,
It is a flow of exactly when the bundle predicate holds, and its value is the real number .
- A candidate cut is any finite set of vertices, . It is a cut of exactly when the bundle predicate holds, and its capacity is the real number .
Define the two sets of reals
The theorem asserts that there exists a real number with both of the following properties.
- is the greatest element of :
- some flow of has ;
- every flow of has .
- is the least element of :
- some cut of has ;
- every cut of has .
The same real number serves both roles. The statement therefore also asserts that and are nonempty, that the flow values are bounded above with the bound attained, and that the cut capacities are bounded below with the bound attained. Since is a real number, the common optimum is finite.
In degenerate cases the theorem makes the same unconditional claim for every of type Network V, with nothing weakened. Suppose some network had no flow at all, or no vertex set satisfying . Then or would be empty, and an empty set has no greatest or least element, so the statement would be false for that network. It is therefore not vacuous.
- Empty . The only candidate cut is , and the only candidate flow is the empty function. The statement then requires to hold of that function and to hold, with equal value and capacity, unless the bundle's definition of
Networkmakes an empty impossible. - One-element . The only candidate cuts are and . The same kind of requirement applies unless the bundle excludes this case, for instance by requiring a source different from the sink.
Whether these cases can occur, and what and return in them, is fixed entirely by the unshown bundle definitions. Nothing in this statement restricts flows to be nonnegative, bounded by capacities, or supported on edges; any such constraint must come from . The statement uses no division, natural-number subtraction, integrals, or suprema; "greatest" and "least" here mean attained elements of the sets.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.