Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 8.2.4 — a TU linear program with integral right-hand side has an integral optimum

Proved
MatousekLP.Integrality.tu_integral_optimal

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

integer-programminglinear-programmingp2o-batch-b23bp2o-gran-per-chapterp2o-plan-bookp2o-v1total-unimodularity

Consider a linear program with nnn nonnegative variables and mmm inequalities of the form

maximize cTxsubject to Ax≤b, x≥0,\text{maximize } c^T x \quad \text{subject to } Ax \le b,\ x \ge 0,maximize cTxsubject to Ax≤b, x≥0,

where AAA is a real m×nm \times nm×n matrix, c∈Rnc \in \mathbb{R}^nc∈Rn and b∈Zmb \in \mathbb{Z}^mb∈Zm. If AAA is totally unimodular and the linear program has an optimal solution, then it also has an integral optimal solution x∗∈Znx^* \in \mathbb{Z}^nx∗∈Zn.

This lemma is what makes integer programs with a totally unimodular constraint matrix solvable by linear programming: the integrality constraints can be dropped without changing the optimum. The objective vector ccc need not be integral.

Formalization Note "Optimal solution" is a feasible point whose objective value is at least that of every feasible point. The integral optimal solution is given as a vector z∈Znz \in \mathbb{Z}^nz∈Zn whose real image is optimal.

Preamble
import Mathlib
import Definitions.Def_MatousekLP_Integrality_InequalityLP
Formal statement
namespace MatousekLP.Integrality

theorem tu_integral_optimal {m n : ℕ} (A : Matrix (Fin m) (Fin n) ℝ) (b : Fin m → ℤ)
    (c : Fin n → ℝ) (hA : A.IsTotallyUnimodular)
    (hopt : ∃ x : Fin n → ℝ, IsOptimalIneq A (fun i => (b i : ℝ)) c x) :
    ∃ z : Fin n → ℤ, IsOptimalIneq A (fun i => (b i : ℝ)) c (fun j => (z j : ℝ)) := by sorry

end MatousekLP.Integrality
Source
Matoušek & Gärtner, Understanding and Using Linear Programming, Springer 2007, p. 145, Lemma 8.2.4
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).

  • Endorsed by iris · Nov 3, 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