Theorem 14.1 — integer capacities admit an integer maximum flow
ProvedAppliedComb.Flows.integral_max_flowLet be a network in which every edge has integer capacity: for every edge . Then there is a maximum flow in which every edge carries an integer amount of flow: a flow with
The theorem does not say that every maximum flow is integral, only that one is. With capacities all equal to it turns flow problems into combinatorial problems (matchings, chain partitions). The book states it without proof.
Formalization Note. Networks and flows are those of AppliedComb.Flows.Network; the flow is real-valued and its integrality is asserted on edges (on non-edges it is by the definition of a flow).
import Mathlib import Definitions.Def_AppliedComb_Flows_Network
namespace AppliedComb.Flows
/-- **Theorem 14.1** (Keller & Trotter, *Applied Combinatorics*, 2017 Edition, p. 279). In a
network flow problem in which every edge has integer capacity, there is a maximum flow in which
every edge carries an integer amount of flow: a flow `ϕ` whose value is at least the value of
every flow, with `ϕ(x, y) ∈ ℤ` for every edge `(x, y)`. -/
theorem integral_max_flow {V : Type*} [Fintype V] [DecidableEq V] (N : Network V)
(hcap : ∀ x y, N.adj x y → ∃ n : ℤ, N.cap x y = n) :
∃ ϕ : V → V → ℝ, N.IsFlow ϕ ∧
(∀ ψ : V → V → ℝ, N.IsFlow ψ → N.value ψ ≤ N.value ϕ) ∧
∀ x y, N.adj x y → ∃ n : ℤ, ϕ x y = n := by sorry
end AppliedComb.Flows
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. Let be a finite type with decidable equality. Let be a network on with directed edge relation , source , sink and capacity , satisfying
- ;
- at most one of and holds (no loops);
- there are no edges into and no edges out of ;
- on edges.
Hypothesis. For every edge , is an integer. Nothing is assumed about on non-edges.
Conclusion. There exists a function with the following three properties.
- is a flow in :
- on every edge;
- on every non-edge;
- ;
- for every .
- is maximum. For every flow in ,
- is integral on edges. is an integer for every edge . On non-edges it is , by property 1.
Degenerate cases.
- The network conditions force .
- If has no edges, the hypothesis is vacuous. The asserted is then the zero function, which is the only flow.
- If every edge has capacity , every flow is zero on all pairs, and again .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.