Lemma 3.7 — every distance label stays at most (first-in, first-out algorithm)
ProvedGoldbergTarjan.FIFO.label_le_two_n_sub_oneLet . In every run of the first-in, first-out algorithm, at any time during the execution and for every vertex ,
"At any time" covers the states between consecutive discharges and every configuration between two push/relabel operations inside a discharge.
In particular labels never become infinite. The bound is what limits the number of relabelings (Lemma 3.8) and, through it, the number of passes (Lemma 4.3).
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
namespace GoldbergTarjan.FIFO
/-- Lemma 3.7 (Goldberg–Tarjan 1988, p. 927), for the first-in, first-out algorithm: at any time
during the execution of the algorithm and for any vertex `v ∈ V`, `d(v) ≤ 2n − 1`, where
`n = |V|`. "At any time" covers the states between discharges and the configurations between
the push/relabel operations inside each discharge. -/
theorem label_le_two_n_sub_one {V : Type} [Fintype V] [DecidableEq V]
(N : Network V) (L : V → List V) (K : ℕ) (S : ℕ → State V) (J : ℕ → ℕ)
(hrun : IsFIFORun N L K S J) :
(∀ k ≤ K, ∀ v, (S k).cfg.d v ≤ ((2 * Fintype.card V - 1 : ℕ) : ℕ∞)) ∧
(∀ k < K, ∀ j ≤ J k, ∀ v,
(prIter N L (frontVertex N (S k)) (S k).cfg j).d v
≤ ((2 * Fintype.card V - 1 : ℕ) : ℕ∞)) := by sorry
end GoldbergTarjan.FIFO
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. The theorem fixes:
- a finite type with and decidable equality;
- a network with nonnegative real capacities (with ), source and sink ;
- a list assignment , a natural number , and sequences of states and of natural numbers.
Hypothesis. is a first-in, first-out run of discharges. That is:
- is an edge list: lists without repetition exactly the with or ;
- has the initial flow, the labels and elsewhere, and current positions ;
- the queue of contains each with once, tagged ;
- for each , results from one discharge of the front vertex of using push/relabel operations.
Claim. The theorem asserts both of the following, with inequalities in :
- For every and every , the label in satisfies
- For every , every and every , the label in satisfies the same bound. Here is the front vertex of (the first queue vertex, or if the queue is empty).
In both parts, every label is finite (never ). The bound covers every vertex, including and .
Degenerate cases.
- Since , the natural-number subtraction is not truncated.
- With , only part 1 at has content: it says the initial labels ( at , elsewhere) are . Part 2 is then vacuous.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.