Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 14.2 — Integrality Theorem

Proved
VanderbeiLP.Networks.integrality_theorem

by mikedeng1 · Oct 1, 2026 · Mathlib 0df444a (Lean v4.33.1)

integralitylinear-programmingnetwork-flowsp2o-batch-b23ap2o-gran-per-chapterp2o-plan-bookp2o-v1

Let (N,A)(N,A)(N,A) be a connected network with supplies bib_ibi​, ∑i∈Nbi=0\sum_{i\in N}b_i=0∑i∈N​bi​=0, and suppose the data are integers: every bi∈Zb_i\in\mathbb Zbi​∈Z. Fix a root node rrr. Then every basic feasible solution xxx of the network flow problem (14.1) is integral:

xij∈Zfor every arc (i,j)∈A.x_{ij}\in\mathbb Z\qquad\text{for every arc }(i,j)\in A.xij​∈Zfor every arc (i,j)∈A.

In particular every basic optimal solution assigns integer flow to every arc, whatever the costs cijc_{ij}cij​.

The theorem makes network flow problems with integer data integer programs that the simplex method solves exactly; it is the tool behind König's Theorem 14.3.

Formalization Note "Integer data" means integral supplies and demands only (p. 215); the costs play no role and are omitted. A basic optimal solution is a basic feasible solution, so the "in particular" clause of the book is contained in the statement. The standing assumptions ∑ibi=0\sum_i b_i=0∑i​bi​=0 (p. 200) and connectedness (p. 202) are hypotheses.

Preamble
import Mathlib
import Definitions.Def_VanderbeiLP_Networks_Network
Formal statement
namespace VanderbeiLP.Networks

/-- **Theorem 14.2, Integrality Theorem** (Vanderbei, *Linear Programming*, 4th ed., p. 216).
For a network flow problem (14.1) on a connected network with integer supplies/demands
(`∑ b_i = 0`), every basic feasible solution assigns integer flow to every arc. (Every basic
optimal solution is in particular a basic feasible solution.) -/
theorem integrality_theorem {N : Type*} [Fintype N] [DecidableEq N]
    (A : Finset (N × N)) (hA : IsNetwork A) (hconn : IsConnectedNetwork A)
    (b : N → ℝ) (hsum : ∑ i, b i = 0) (hb : ∀ i, ∃ z : ℤ, b i = z)
    (r : N) (x : N × N → ℝ) (hx : IsBasicFeasibleFlow A b r x) :
    ∀ a ∈ A, ∃ z : ℤ, x a = z := by sorry

end VanderbeiLP.Networks
Source
Vanderbei, Linear Programming: Foundations and Extensions, 4th ed., Springer 2014, p. 216 (PDF 227), Theorem 14.2; integer data p. 215; standing assumptions pp. 200, 202
Human review
  • Endorsed by Shuze Chen · Oct 5, 2026

    Confirmed by the moderator at approval.

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