Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

A flow is maximum if and only if it admits no augmenting path

Proved
EdmondsKarp.MaxCapacity.isMaxFlow_iff_no_augPath

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

augmenting-pathsmaximum-flownetwork-flowsp2o-batch-p100bp2o-gran-per-chapterp2o-plan-paperp2o-v1

Let fff be a flow in a network NNN. Then

f is a maximum flow  ⟺  there is no augmenting path relative to f.f \text{ is a maximum flow} \iff \text{there is no augmenting path relative to } f.f is a maximum flow⟺there is no augmenting path relative to f.

The direction "⇒\Rightarrow⇒" follows from the augmentation step; the direction "⇐\Leftarrow⇐" is the classical Ford–Fulkerson converse, which the paper quotes. It guarantees that the labeling method stops only at a maximum flow.

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

/-- §1.1, pp. 249–250: a flow `f` in `N` is maximum if and only if there is no augmenting path with
respect to `f`. -/
theorem isMaxFlow_iff_no_augPath {V : Type} [Fintype V] [DecidableEq V] (N : Network V)
    (f : V → V → ℝ) (hf : IsFlow N f) :
    IsMaxFlow N f ↔ ¬ ∃ P : List V, IsAugPath N f P := by sorry

end EdmondsKarp.MaxCapacity
Source
Edmonds, Karp, Theoretical Improvements in Algorithmic Efficiency for Network Flow Problems, J. ACM 19(2), 1972, pp. 249–250, §1.1 (unnumbered: "It can be shown that, conversely, a flow f in N is not maximum only if there is an augmenting path with respect to f.")
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 real capacities ccc with c>0c > 0c>0 on AAA. Its arcs are A∪{(t,s)}A \cup \{(t,s)\}A∪{(t,s)}.

Let f:V×V→Rf : V \times V \to \mathbb{R}f:V×V→R be a flow: f≥0f \ge 0f≥0 on every arc of NNN; f≤cf \le cf≤c on AAA; and outflow equals inflow over the arcs of NNN at every node, including sss and ttt. Then

f is a maximum flow  ⟺  there is no augmenting path for f.f \text{ is a maximum flow} \iff \text{there is no augmenting path for } f.f is a maximum flow⟺there is no augmenting path for f.
  • Maximum flow means g(t,s)≤f(t,s)g(t,s) \le f(t,s)g(t,s)≤f(t,s) for every real-valued flow ggg in NNN.
  • Augmenting path means a list of pairwise distinct nodes from sss to ttt in which each consecutive pair (u,v)(u,v)(u,v) satisfies ((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).

Capacities may be arbitrary positive reals. The statement does not assert on its own that a maximum flow exists.

Degenerate cases. VVV has at least two elements. If AAA is empty, there are no residual arcs and hence no augmenting path, since s≠ts \neq ts=t requires at least one step. The statement then says that every flow is maximum. It says nothing about functions fff that are not flows.

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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me