Cut inequality:
ProvedEdmondsKarp.MaxCapacity.cut_boundLet be a network with integer capacities, and let be a set of nodes with and ; write for its complement. For every flow in ,
where and sum over the arcs of from to and over the arcs of from to (the return arc is not in ).
The net flow across any – cut equals the value on the return arc and is bounded by the cut's capacity; applied to a maximum flow it gives , the first step of the proof of Theorem 2.
Formalization Note The integrality of the capacities is the standing assumption of §1.3 and is kept as a hypothesis, although the inequality does not need it.
import Mathlib import Definitions.Def_EdmondsKarp_MaxCapacity_Network import Definitions.Def_EdmondsKarp_MaxCapacity_Augmentation import Definitions.Def_EdmondsKarp_MaxCapacity_Run
namespace EdmondsKarp.MaxCapacity
/-- Proof of Theorem 2, p. 254: for a network `N` with integer capacities, a set of nodes `X` with
`s ∈ X`, `t ∉ X`, and any flow `f`: `c(X, X̄) ≥ f(X, X̄) − f(X̄, X) = f(t, s)`. -/
theorem cut_bound {V : Type} [Fintype V] [DecidableEq V] (N : Network V)
(hcap : IntegralCaps N) (X : Finset V) (hs : N.s ∈ X) (ht : N.t ∉ X)
(f : V → V → ℝ) (hf : IsFlow N f) :
cutFlowOut N f X - cutFlowIn N f X = f N.t N.s ∧
cutFlowOut N f X - cutFlowIn N f X ≤ cutCap N X := by sorry
end EdmondsKarp.MaxCapacity
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let be any finite type with decidable equality, and let be any network on . It has source , sink with , a loop-free finite arc set not containing , and capacities on . Its arcs are .
Hypotheses.
- for every .
- is any subset of with and . Write .
- is a flow: on all arcs of including ; on ; and at every node, outflow equals inflow over the arcs of .
Cut quantities. All three sums range over arcs of only, so the return arc is excluded:
Conclusion.
The integer-capacity hypothesis is assumed, but the conclusion does not mention integrality.
Degenerate cases. If no arc of crosses between and , all three sums are . The statement then asserts and . The integrality hypothesis is vacuous when is empty.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.