Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 8.2.3 — appending a unit column preserves total unimodularity

Proved
MatousekLP.Integrality.append_unit_column_totallyUnimodular

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

linear-algebrap2o-batch-b23bp2o-gran-per-chapterp2o-plan-bookp2o-v1total-unimodularity

A real matrix is totally unimodular if every square submatrix (obtained by deleting some rows and some columns) has determinant 000, 111 or −1-1−1.

Let AAA be a totally unimodular m×nm \times nm×n matrix and let ei∈Rme_i \in \mathbb{R}^mei​∈Rm be the iii-th unit vector. Then the m×(n+1)m \times (n+1)m×(n+1) matrix

Aˉ=(A∣ei),\bar A = \bigl(A \mid e_i\bigr),Aˉ=(A∣ei​),

obtained from AAA by appending eie_iei​ as a new last column, is totally unimodular as well.

Applied repeatedly, the lemma shows that (A∣Im)(A \mid I_m)(A∣Im​) is totally unimodular whenever AAA is; this is how slack variables are added in the proof of Lemma 8.2.4.

Formalization Note Total unimodularity is Mathlib's Matrix.IsTotallyUnimodular, which is the book's definition. The new column is placed at index nnn of Fin (n+1) with Fin.snoc; indices are 0-based.

Preamble
import Mathlib
Formal statement
namespace MatousekLP.Integrality

theorem append_unit_column_totallyUnimodular {m n : ℕ} (A : Matrix (Fin m) (Fin n) ℝ)
    (hA : A.IsTotallyUnimodular) (i : Fin m) :
    (Matrix.of fun r : Fin m =>
      (Fin.snoc (α := fun _ => ℝ) (A r) (if r = i then (1 : ℝ) else 0) : Fin (n + 1) → ℝ)
      ).IsTotallyUnimodular := by sorry

end MatousekLP.Integrality
Source
Matoušek & Gärtner, Understanding and Using Linear Programming, Springer 2007, p. 145, Lemma 8.2.3 (definition of totally unimodular: p. 144)
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