Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Maximum augmentation captures a 1/M1/M1/M share of the gap: f∗(t,s)−fk(t,s)≤εkMf^*(t,s) - f^k(t,s) \le \varepsilon^k Mf∗(t,s)−fk(t,s)≤εkM

Proved
EdmondsKarp.MaxCapacity.maxAug_gap_le_eps_mul

by mikedeng1 · Sep 27, 2026 · Mathlib 0df444a (Lean v4.33.1)

augmenting-pathscomplexitynetwork-flowsp2o-batch-p100bp2o-gran-per-chapterp2o-plan-paperp2o-v1

Let NNN be a network with integer capacities and let M>1M > 1M>1 be an integer such that, for every partition of the nodes into X∋sX \ni sX∋s and Xˉ∋t\bar X \ni tXˉ∋t, at most MMM arcs of NNN have one end in XXX and the other in Xˉ\bar XXˉ. Let f∗(t,s)f^*(t,s)f∗(t,s) be the value of a maximum flow. Let f0,…,fKf^0, \dots, f^Kf0,…,fK be a run of the labeling method in which every augmentation is along an augmenting path giving the maximum possible augmentation, and put εk=fk+1(t,s)−fk(t,s)\varepsilon^k = f^{k+1}(t,s) - f^k(t,s)εk=fk+1(t,s)−fk(t,s). Then for every k<Kk < Kk<K,

f∗(t,s)−fk(t,s)  ≤  εkM.f^*(t,s) - f^k(t,s) \;\le\; \varepsilon^k M.f∗(t,s)−fk(t,s)≤εkM.

This is the core estimate of the proof of Theorem 2: a maximum augmentation removes at least a fraction 1/M1/M1/M of the remaining gap to the optimum.

Preamble
import Mathlib
import Definitions.Def_EdmondsKarp_MaxCapacity_Network
import Definitions.Def_EdmondsKarp_MaxCapacity_Augmentation
import Definitions.Def_EdmondsKarp_MaxCapacity_Run
Formal statement
namespace EdmondsKarp.MaxCapacity

/-- Proof of Theorem 2, p. 254: in a run of the labeling method with maximum augmentations, on a
network with integer capacities in which every `s`–`t` cut is crossed by at most `M > 1` arcs, if
`f*(t, s)` is the value of a maximum flow then `f*(t, s) − f^k(t, s) ≤ ε^k M` for every `k < K`,
where `ε^k = f^{k+1}(t, s) − f^k(t, s)`. -/
theorem maxAug_gap_le_eps_mul {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)
    (k : ℕ) (hk : k < K) :
    g N.t N.s - f k N.t N.s ≤ (f (k + 1) N.t N.s - f k N.t N.s) * (M : ℝ) := by sorry

end EdmondsKarp.MaxCapacity
Source
Edmonds, Karp, Theoretical Improvements in Algorithmic Efficiency for Network Flow Problems, J. ACM 19(2), 1972, p. 254, proof of Theorem 2 (unnumbered display "f*(t, s) − f^k(t, s) ≤ ε^k M")
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Let VVV be any finite type with decidable equality, and let NNN be any network on VVV. It has source sss, sink ttt with s≠ts \neq ts=t, a loop-free finite arc set AAA not containing (t,s)(t,s)(t,s), and capacities c>0c > 0c>0 on AAA. Its arcs are A∪{(t,s)}A \cup \{(t,s)\}A∪{(t,s)}.

  • A flow is f≥0f \ge 0f≥0 on arcs of NNN, f≤cf \le cf≤c on AAA, with outflow equal to inflow over the arcs of NNN at every node.
  • An augmenting path for fff is a list of distinct nodes from sss to ttt whose consecutive pairs (u,v)(u,v)(u,v) satisfy ((u,v)∈A(u,v) \in A(u,v)∈A and f(u,v)<c(u,v)f(u,v) < c(u,v)f(u,v)<c(u,v)) or ((v,u)∈A(v,u) \in A(v,u)∈A and f(v,u)>0f(v,u) > 0f(v,u)>0).
  • Its value εf(P)\varepsilon_f(P)εf​(P) is the minimum over its steps of:
    • c(u,v)−f(u,v)+f(v,u)c(u,v) - f(u,v) + f(v,u)c(u,v)−f(u,v)+f(v,u) if both directions are in AAA;
    • c(u,v)−f(u,v)c(u,v) - f(u,v)c(u,v)−f(u,v) if only (u,v)∈A(u,v) \in A(u,v)∈A;
    • f(v,u)f(v,u)f(v,u) if (u,v)∉A(u,v) \notin A(u,v)∈/A.
  • fPf^PfP is the augmented function (defined as in the Augmentation bundle). It adds εf(P)\varepsilon_f(P)εf​(P) on (t,s)(t,s)(t,s).

Hypotheses.

  1. c(u,v)∈Zc(u,v) \in \mathbb{Z}c(u,v)∈Z for all (u,v)∈A(u,v) \in A(u,v)∈A.
  2. M∈NM \in \mathbb{N}M∈N with M>1M > 1M>1.
  3. For every X⊆VX \subseteq VX⊆V with s∈Xs \in Xs∈X and t∉Xt \notin Xt∈/X, at most MMM arcs of NNN (including (t,s)(t,s)(t,s), directions counted separately) have exactly one endpoint in XXX.
  4. ggg is a maximum flow: a flow with h(t,s)≤g(t,s)h(t,s) \le g(t,s)h(t,s)≤g(t,s) for every flow hhh.
  5. K∈NK \in \mathbb{N}K∈N, and sequences f0,f1,…f^0, f^1, \dotsf0,f1,… and P0,P1,…P^0, P^1, \dotsP0,P1,… form a run:
    • f0f^0f0 is a flow;
    • for each k<Kk < Kk<K, PkP^kPk is an augmenting path for fkf^kfk with εfk(Q)≤εfk(Pk)\varepsilon_{f^k}(Q) \le \varepsilon_{f^k}(P^k)εfk​(Q)≤εfk​(Pk) for every augmenting path QQQ for fkf^kfk;
    • fk+1=(fk)Pkf^{k+1} = (f^k)^{P^k}fk+1=(fk)Pk.
  6. k<Kk < Kk<K.

Conclusion.

g(t,s)−fk(t,s)  ≤  (fk+1(t,s)−fk(t,s))⋅M.g(t,s) - f^k(t,s) \;\le\; \big(f^{k+1}(t,s) - f^k(t,s)\big)\cdot M.g(t,s)−fk(t,s)≤(fk+1(t,s)−fk(t,s))⋅M.

Degenerate cases. For K=0K = 0K=0 there is no k<0k < 0k<0, so the statement is vacuous. It is also vacuous if no maximum flow ggg exists or no such run exists. Hypothesis 3 can always be met by taking MMM large, and M≥2M \ge 2M≥2 is forced. No hypothesis requires f0=0f^0 = 0f0=0 or f0f^0f0 to be integer-valued.

Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 27, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me