Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Lemma 3.5 — from a vertex with positive excess the source is reachable in the residual graph

Proved
GoldbergTarjan.FIFO.source_reachable_of_pos_excess

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

network-flowsp2o-batch-p100bp2o-gran-per-chapterp2o-plan-paperp2o-v1preflow

Let fff be a preflow on a flow network with source sss, and let vvv be a vertex with positive excess,

e(v)=∑u∈Vf(u,v)>0.e(v) = \sum_{u \in V} f(u,v) > 0.e(v)=u∈V∑​f(u,v)>0.

Then the source sss is reachable from vvv in the residual graph GfG_fGf​: there is a directed path from vvv to sss all of whose edges (a,b)(a,b)(a,b) have positive residual capacity rf(a,b)=c(a,b)−f(a,b)>0r_f(a,b) = c(a,b) - f(a,b) > 0rf​(a,b)=c(a,b)−f(a,b)>0.

This is what keeps the distance labels finite: Lemma 3.7 bounds the label of an active vertex along such a path.

Formalization Note Reachability is the reflexive–transitive closure of the residual-edge relation, so the case v=sv = sv=s holds with the empty path.

Preamble
import Mathlib
import Definitions.Def_GoldbergTarjan_FIFO_Network
import Definitions.Def_GoldbergTarjan_FIFO_PushRelabel
import Definitions.Def_GoldbergTarjan_FIFO_Algorithm
import Definitions.Def_GoldbergTarjan_FIFO_Counts
Formal statement
namespace GoldbergTarjan.FIFO

/-- Lemma 3.5 (Goldberg–Tarjan 1988, p. 926): if `f` is a preflow and `v` is a vertex with
positive excess, then the source `s` is reachable from `v` in the residual graph `G_f`. -/
theorem source_reachable_of_pos_excess {V : Type} [Fintype V] [DecidableEq V]
    (N : Network V) (f : V → V → ℝ) (hf : IsPreflow N f) (v : V) (hv : 0 < excess f v) :
    ResidualReachable N f v N.s := by sorry

end GoldbergTarjan.FIFO
Source
Goldberg, Tarjan, A New Approach to the Maximum-Flow Problem, J. ACM 35(4), 1988, p. 926, Lemma 3.5
Read-back

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

Setting. The theorem fixes:

  • a finite type VVV with decidable equality;
  • a network NNN with real capacities c(v,w)≥0c(v,w) \ge 0c(v,w)≥0 (with c(v,v)=0c(v,v) = 0c(v,v)=0), source sss and sink t≠st \ne st=s;
  • a function f:V×V→Rf : V \times V \to \mathbb{R}f:V×V→R that is a preflow, meaning f(v,w)≤c(v,w)f(v,w) \le c(v,w)f(v,w)≤c(v,w) and f(v,w)=−f(w,v)f(v,w) = -f(w,v)f(v,w)=−f(w,v) for all v,wv, wv,w, and ∑uf(u,v)≥0\sum_u f(u,v) \ge 0∑u​f(u,v)≥0 for all v≠sv \ne sv=s;
  • a vertex vvv with ef(v)=∑uf(u,v)>0e_f(v) = \sum_{u} f(u,v) > 0ef​(v)=∑u​f(u,v)>0.

Claim. sss is reachable from vvv in the residual graph. That is, there are vertices

v=a0,a1,…,am=s,m≥0,v = a_0, a_1, \dots, a_m = s, \quad m \ge 0,v=a0​,a1​,…,am​=s,m≥0,

with

c(ai−1,ai)−f(ai−1,ai)>0for each i.c(a_{i-1}, a_i) - f(a_{i-1}, a_i) > 0 \quad \text{for each } i.c(ai−1​,ai​)−f(ai−1​,ai​)>0for each i.

Degenerate cases.

  • If v=sv = sv=s, the claim holds with m=0m = 0m=0. So the statement says something only for v≠sv \ne sv=s.
  • vvv may be the sink ttt.
  • No integrality of ccc or fff is assumed.
  • ∣V∣≥2|V| \ge 2∣V∣≥2 is forced by s≠ts \ne ts=t.
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