Corollary 4.4 — the first-in, first-out push-relabel algorithm makes at most nonsaturating pushes
ProvedGoldbergTarjan.FIFO.fifo_nonsaturating_pushes_leLet be a flow network with vertices, capacities , no loops, and source . Fix edge lists in any order and an initial queue order. Consider any run of the first-in, first-out algorithm: start from the initial preflow that saturates the edges leaving , the labeling , otherwise, and the queue of vertices with , then apply the discharge operation of Fig. 4 repeatedly. Then the number of nonsaturating pushes performed is at most
Together with the bound on the remaining work of the implementation, this gives the running time of the FIFO algorithm (Theorem 4.5). That bound matches Karzanov's algorithm and improves on the bound on nonsaturating pushes of the generic method.
Formalization Note The bound is stated for every run of any finite number of discharges, so it applies to the whole execution and to every prefix of it. Nonsaturating pushes are counted over all push/relabel operations inside all discharges.
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
/-- Corollary 4.4 (Goldberg–Tarjan 1988, p. 931): the number of nonsaturating pushes during the
first-in, first-out algorithm is at most `4n³`, where `n = |V|`. Stated for every network,
every edge list order, every initial queue order and every run of `K` discharge operations
(Fig. 4) from the initialization of Fig. 2 with the simple labeling. -/
theorem fifo_nonsaturating_pushes_le {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) :
nonsatPushCount N L K S J ≤ 4 * Fintype.card V ^ 3 := by sorry
end GoldbergTarjan.FIFO
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Fix a type of vertices that is finite and has decidable equality, and write for its number of elements. The statement takes these inputs:
- , a value of the type
Network V. This type comes from the imported definition files. Its contents are not shown here, and the statement puts no conditions on beyond its type. - , which gives each vertex a finite ordered list of vertices. Repeats are allowed, and nothing requires the list to relate to .
- , a natural number.
- , an infinite sequence of values of the type
State V. This type is also imported and not shown. - , an infinite sequence of natural numbers.
The only hypothesis is that the predicate holds. This predicate is defined in the imported files, and its definition is not part of the code audited here. From the statement alone, all that can be said is that it is some relation between the network, the lists, the number and the two sequences. The statement does not show:
- whether it pins down any starting state for ;
- how must relate to ;
- what the numbers stand for;
- whether it looks at or for any .
The theorem states that for every such choice of inputs satisfying this hypothesis,
Here is another imported definition whose body is not shown. It returns a natural number computed from the same five inputs, and the comparison is between natural numbers. The comment attached to the declaration describes these objects as a first-in, first-out push–relabel run of discharge operations and a count of nonsaturating pushes. That comment is not part of the formal statement. The formal claim depends entirely on what the two imported definitions actually say.
Degenerate cases:
- Empty vertex type (): the bound is . So the theorem asserts that the count is exactly for every input satisfying the hypothesis.
- One vertex (): the bound is .
- : the statement still only says that the count is at most . Nothing in the visible code forces the count to be in this case.
- The number itself: no constraint links to . The bound does not depend on , , , or , so it is claimed uniformly for runs of any length.
- Default values: the visible statement contains no division, no subtraction in , no integrals and no suprema. Any such default values could only occur inside the hidden definitions.
- Unsatisfiable hypothesis: if cannot be satisfied for some or all inputs (for example, if its definition is contradictory, or impossible when is empty), the theorem says nothing about those inputs.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.