Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 13.10 — The Max Flow–Min Cut Theorem

Proved
AppliedComb.Flows.max_flow_min_cut

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

combinatoricsgraph-theorynetwork-flowsoptimizationp2o-batch-books5p2o-gran-per-chapterp2o-plan-bookp2o-v1

Let G=(V,E)G = (V, E)G=(V,E) be a network with source SSS, sink TTT and non-negative real capacities ccc. Then there is a real number v0v_0v0​ that is both the maximum value of a flow and the minimum capacity of a cut:

v0=max⁡{value⁡(ϕ):ϕ a flow in G}=min⁡{c(L,U):V=L∪U a cut}.v_0 = \max\{\operatorname{value}(\phi) : \phi \text{ a flow in } G\} = \min\{c(L, U) : V = L \cup U \text{ a cut}\}.v0​=max{value(ϕ):ϕ a flow in G}=min{c(L,U):V=L∪U a cut}.

In words: some flow has value v0v_0v0​ and no flow has larger value; some cut has capacity v0v_0v0​ and no cut has smaller capacity.

This is the central theorem of network flows, due to Ford and Fulkerson (1956) and to Elias, Feinstein and Shannon (1956). The book obtains it from the Ford–Fulkerson labeling algorithm (Algorithm 13.11): when the labeling halts without labeling the sink, the labeled and unlabeled vertices form a cut whose capacity equals the current flow's value.

Formalization Note. The book's sentence "if v0v_0v0​ is the maximum value of a flow and c0c_0c0​ is the minimum capacity of a cut, then v0=c0v_0 = c_0v0​=c0​" presupposes that both extrema exist. The statement here asserts their existence as well as their equality (IsGreatest of the set of flow values and IsLeast of the set of cut capacities, at the same number), so nothing is assumed. For real (possibly irrational) capacities the labeling algorithm need not terminate, so the existence of a maximum flow is part of the claim.

Preamble
import Mathlib
import Definitions.Def_AppliedComb_Flows_Network
Formal statement
namespace AppliedComb.Flows

/-- **Theorem 13.10 (The Max Flow–Min Cut Theorem)** (Keller & Trotter, *Applied Combinatorics*,
2017 Edition, p. 268). Let `N` be a network. There is a number `v₀` which is the maximum value
of a flow in `N` (it is the value of some flow, and no flow has larger value) and which is also
the minimum capacity of a cut of `N` (it is the capacity of some cut, and no cut has smaller
capacity). In particular the maximum value of a flow exists, the minimum capacity of a cut exists,
and they are equal. -/
theorem max_flow_min_cut {V : Type*} [Fintype V] [DecidableEq V] (N : Network V) :
    ∃ v₀ : ℝ,
      IsGreatest {v : ℝ | ∃ ϕ : V → V → ℝ, N.IsFlow ϕ ∧ N.value ϕ = v} v₀ ∧
      IsLeast {c : ℝ | ∃ L : Finset V, N.IsCut L ∧ N.cutCapacity L = c} v₀ := by sorry

end AppliedComb.Flows
Source
Keller & Trotter, Applied Combinatorics (2017 Edition), p. 268, Theorem 13.10
Read-back

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

Let VVV be any finite type of vertices with decidable equality; no other assumption is made on VVV. It may in particular be empty or have one element. Let NNN be an arbitrary object of type Network V. Network, and the notions IsFlow, value, IsCut and cutCapacity used below, come from the imported bundle file Definitions.Def_AppliedComb_Flows_Network. Their definitions are not part of the code shown here, so this read-back cannot unfold them. What each one requires, for example which vertices are the source and sink, what the capacities are, and which conditions a flow or a cut must satisfy, must be checked against that file. The statement carries no hypothesis on NNN beyond its type.

The code uses these objects:

  • A candidate flow is any real-valued function of two vertices,
ϕ:V×V→R.\phi : V \times V \to \mathbb{R}.ϕ:V×V→R.

It is a flow of NNN exactly when the bundle predicate IsFlowN(ϕ)\mathrm{IsFlow}_N(\phi)IsFlowN​(ϕ) holds, and its value is the real number valueN(ϕ)\mathrm{value}_N(\phi)valueN​(ϕ).

  • A candidate cut is any finite set of vertices, L⊆VL \subseteq VL⊆V. It is a cut of NNN exactly when the bundle predicate IsCutN(L)\mathrm{IsCut}_N(L)IsCutN​(L) holds, and its capacity is the real number capN(L)\mathrm{cap}_N(L)capN​(L).

Define the two sets of reals

F={ valueN(ϕ):ϕ is a flow of N },C={ capN(L):L is a cut of N }.\mathcal{F} = \{\, \mathrm{value}_N(\phi) : \phi \text{ is a flow of } N \,\}, \qquad \mathcal{C} = \{\, \mathrm{cap}_N(L) : L \text{ is a cut of } N \,\}.F={valueN​(ϕ):ϕ is a flow of N},C={capN​(L):L is a cut of N}.

The theorem asserts that there exists a real number v0v_0v0​ with both of the following properties.

  1. v0v_0v0​ is the greatest element of F\mathcal{F}F:
    • some flow ϕ\phiϕ of NNN has valueN(ϕ)=v0\mathrm{value}_N(\phi) = v_0valueN​(ϕ)=v0​;
    • every flow ϕ\phiϕ of NNN has valueN(ϕ)≤v0\mathrm{value}_N(\phi) \le v_0valueN​(ϕ)≤v0​.
  2. v0v_0v0​ is the least element of C\mathcal{C}C:
    • some cut LLL of NNN has capN(L)=v0\mathrm{cap}_N(L) = v_0capN​(L)=v0​;
    • every cut LLL of NNN has v0≤capN(L)v_0 \le \mathrm{cap}_N(L)v0​≤capN​(L).

The same real number serves both roles. The statement therefore also asserts that F\mathcal{F}F and C\mathcal{C}C are nonempty, that the flow values are bounded above with the bound attained, and that the cut capacities are bounded below with the bound attained. Since v0v_0v0​ is a real number, the common optimum is finite.

In degenerate cases the theorem makes the same unconditional claim for every NNN of type Network V, with nothing weakened. Suppose some network had no flow at all, or no vertex set satisfying IsCutN\mathrm{IsCut}_NIsCutN​. Then F\mathcal{F}F or C\mathcal{C}C would be empty, and an empty set has no greatest or least element, so the statement would be false for that network. It is therefore not vacuous.

  • Empty VVV. The only candidate cut is L=∅L = \emptysetL=∅, and the only candidate flow is the empty function. The statement then requires IsFlowN\mathrm{IsFlow}_NIsFlowN​ to hold of that function and IsCutN(∅)\mathrm{IsCut}_N(\emptyset)IsCutN​(∅) to hold, with equal value and capacity, unless the bundle's definition of Network makes an empty VVV impossible.
  • One-element VVV. The only candidate cuts are ∅\emptyset∅ and VVV. The same kind of requirement applies unless the bundle excludes this case, for instance by requiring a source different from the sink.

Whether these cases can occur, and what valueN\mathrm{value}_NvalueN​ and capN\mathrm{cap}_NcapN​ return in them, is fixed entirely by the unshown bundle definitions. Nothing in this statement restricts flows to be nonnegative, bounded by capacities, or supported on edges; any such constraint must come from IsFlowN\mathrm{IsFlow}_NIsFlowN​. The statement uses no division, natural-number subtraction, integrals, or suprema; "greatest" and "least" here mean attained elements of the sets.

Human review
  • Endorsed by Shuze Chen · Oct 2, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 2, 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