Theorem 2 — maximum-augmentation paths reach a maximum flow within augmentations
ProvedEdmondsKarp.MaxCapacity.maximum_augmentation_boundLet be a network in which every capacity is an integer. Let be an integer such that, for every partition of the nodes of into two sets and with and , the number of arcs of with one end in and the other in is at most . Let be the value of a maximum flow in .
Consider a run of the labeling method: flows , where is integer-valued (for instance the zero flow) and, for each , is obtained from by augmenting along an augmenting path relative to that gives the maximum possible augmentation. Then:
- the number of augmentations satisfies
- if there is no augmenting path relative to , then is a maximum flow.
Together the two parts say that the labeling method with the largest-augmentation rule stops at a maximum flow after at most augmentations — a bound that depends on the capacities only logarithmically, in contrast with the bound that holds for an arbitrary choice of augmenting paths.
Formalization Note The maximum flow with is taken as a hypothesis; this is not restrictive, since every network has a maximum flow (the set of flows is nonempty and compact). The logarithm is Real.logb (M / (M - 1)) with cast to ; when Lean's Real.logb returns and the bound reads , which is the paper's statement in that case since no augmentation is then possible. The crossing arcs counted by are the arcs of , the return arc included (the literal reading of p. 253). The initial flow must be integer-valued on the arcs of ; the paper starts from the zero flow (p. 250) and uses its integrality (p. 254).
import Mathlib import Definitions.Def_EdmondsKarp_MaxCapacity_Network import Definitions.Def_EdmondsKarp_MaxCapacity_Augmentation import Definitions.Def_EdmondsKarp_MaxCapacity_Run
namespace EdmondsKarp.MaxCapacity
/-- **Theorem 2** (Edmonds–Karp 1972, p. 253). Let `N` be a network with integer capacities and let
`M > 1` be an integer such that every partition of the nodes into `X ∋ s` and `X̄ ∋ t` has at most `M`
arcs of `N` with one end in `X` and the other in `X̄`; let `f*(t, s)` be the value of a maximum flow.
If the labeling method, started from an integer-valued flow `f^0`, performs `K` augmentations, each
along an augmenting path giving the maximum possible augmentation, then
(a) `K ≤ 1 + log_{M/(M−1)} f*(t, s)`, and
(b) if there is no augmenting path relative to `f^K`, then `f^K` is a maximum flow. -/
theorem maximum_augmentation_bound {V : Type} [Fintype V] [DecidableEq V] (N : Network V)
(hcap : IntegralCaps N) (M : ℕ) (hM : 1 < M) (hcross : CrossArcsBounded N M)
(g : V → V → ℝ) (hg : IsMaxFlow N g)
(K : ℕ) (f : ℕ → V → V → ℝ) (P : ℕ → List V) (hrun : IsMaxAugRun N K f P)
(hint : IsIntegralOn N (f 0)) :
(K : ℝ) ≤ 1 + Real.logb ((M : ℝ) / ((M : ℝ) - 1)) (g N.t N.s) ∧
((¬ ∃ Q : List V, IsAugPath N (f K) Q) → IsMaxFlow N (f K)) := by sorry
end EdmondsKarp.MaxCapacity
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let be a finite type of vertices with decidable equality, and let be a network on in the sense of the imported Network structure. The network has a distinguished source vertex and sink vertex . None of the definitions this statement uses are included in the code shown (Network, IntegralCaps, CrossArcsBounded, IsMaxFlow, IsMaxAugRun, IsIntegralOn, IsAugPath). Their meanings are fixed by those imported files, and this read-back refers to them only by name. The theorem makes the following assumptions:
- satisfies the predicate
IntegralCaps. - is a natural number with , so .
- and together satisfy the predicate
CrossArcsBounded. - is a real-valued function on ordered pairs of vertices, and it satisfies
IsMaxFlowfor . - is a natural number.
- is a sequence of functions .
- is a sequence of finite lists of vertices.
- , , and together satisfy
IsMaxAugRun. The code does not show which indices this constrains. - satisfies
IsIntegralOnwith respect to . No such hypothesis is made about any other .
Under these assumptions the theorem asserts both of the following:
- The number , viewed as a real number, satisfies
where is Mathlib's real logarithm to base . The argument is literally the value of at the ordered pair (sink, source), that is and not . No statement here relates to a flow value.
2. If no finite list of vertices satisfies IsAugPath for and the function , then satisfies IsMaxFlow for . This is an implication only: it says nothing when such a list exists. The list ranges over all finite lists, including the empty list.
Degenerate cases:
-
Vertex set. cannot be empty in practice, because names the vertices and . Whether is allowed, and whether may have exactly one element, depends on the unshown definition of
Network. -
Logarithm base. , so the base lies in and has a positive logarithm. For the base is .
-
Junk values of the logarithm. Mathlib's is defined on all reals by and . So:
- If , the bound reads .
- If , the bound is .
- If , the logarithm is negative and the bound is strictly below .
Which of these can happen depends on the unshown predicates
IsMaxFlowandIntegralCaps. -
. Part 1 becomes . Part 2 then concerns itself.
-
Values of beyond . The entries and for appear only through
IsMaxAugRun, and the code does not show how that predicate treats them. -
Vacuous hypotheses. If the hypotheses cannot all hold together, the theorem is vacuously true. Examples: no satisfies
IsMaxFlow,CrossArcsBoundedfails for every , orIsMaxAugRuncannot hold together withIsIntegralOnfor . Nothing in the displayed code rules this out.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.