Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of Lemma 3, §C.3, p. 40 — the matrix with rows e_{i,t}, −e_{i,t}, e′_t, −e′_t is totally unimodular

Proved
MonoApport.Flow.lemma_3_tu

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

apportionmentextreme-pointshouse-monotonicitynetwork-flowp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-strengthenedp2o-v1quota

Fix nnn states and LLL seats, and index coordinates by pairs (j,ℓ)∈[n]×[L](j,\ell)\in[n]\times[L](j,ℓ)∈[n]×[L] (the variable x(j,ℓ)x(j,\ell)x(j,ℓ)). For i∈[n]i\in[n]i∈[n] and t∈[L]t\in[L]t∈[L] let ei,te_{i,t}ei,t​ be the 0/1 vector with (ei,t)(j,ℓ)=1(e_{i,t})_{(j,\ell)}=1(ei,t​)(j,ℓ)​=1 exactly when j=ij=ij=i and ℓ≤t\ell\le tℓ≤t (the prefix sum of state iii up to seat ttt), and et′e'_tet′​ the 0/1 vector with (et′)(j,ℓ)=1(e'_t)_{(j,\ell)}=1(et′​)(j,ℓ)​=1 exactly when ℓ=t\ell=tℓ=t (the column of seat ttt). Let MMM be the integer matrix whose rows are

ei,t,−ei,t(i∈[n], t∈[L]),et′,−et′(t∈[L]).e_{i,t},\quad -e_{i,t}\quad(i\in[n],\,t\in[L]),\qquad e'_t,\quad -e'_t\quad(t\in[L]).ei,t​,−ei,t​(i∈[n],t∈[L]),et′​,−et′​(t∈[L]).

Claim (proof of Lemma 3). MMM is totally unimodular: every square submatrix has determinant 000, 111 or −1-1−1.

These are the constraint rows of the linear program (1)-(4) in the form Mz≤bMz\le bMz≤b; total unimodularity is the step from which the paper derives the integrality of (1)-(4) (Lemma 3).

Formalization Note. Rows are indexed by the disjoint sum ([n]×[L])⊔([n]×[L])⊔[L]⊔[L]([n]\times[L])\sqcup([n]\times[L])\sqcup[L]\sqcup[L]([n]×[L])⊔([n]×[L])⊔[L]⊔[L] and columns by [n]×[L][n]\times[L][n]×[L], instead of [2(n+1)L][2(n+1)L][2(n+1)L] and [nL][nL][nL] with the paper's ordering; total unimodularity is invariant under such relabellings. Mathlib's Matrix.IsTotallyUnimodular is used.

Differences from the source:

  • generalization: an instance (p, H) ∈ ℕⁿ × ℕ, so n ≥ 1 and H ≥ 1 seats → every n, L : ℕ, including 0; reason: the matrix does not depend on p, and for n = 0 or L = 0 it has no columns or no rows; the statement specializes to the source's at n ≥ 1, L = H ≥ 1
  • encoding: rows indexed by k ∈ [2(n + 1)H] in the order e_{i,t}, −e_{i,t}, e′_t, −e′_t, columns by j ∈ [nH] listing x(1,1), …, x(n,H) → rows indexed by a sum type (Fin n × Fin L) ⊕ (Fin n × Fin L) ⊕ Fin L ⊕ Fin L, columns by Fin n × Fin L, with 0-indexed seats; reason: a relabelling of rows and columns; total unimodularity is invariant under it
Preamble
import Mathlib
import Definitions.Def_MonoApport_Flow_Setting
Formal statement
namespace MonoApport.Flow

/-- Proof of Lemma 3 (§C.3, p. 40): the matrix with rows `e_{i,t}`, `−e_{i,t}`, `e′_t`, `−e′_t`
is totally unimodular. -/
theorem lemma_3_tu (n L : ℕ) : (constraintMatrix n L).IsTotallyUnimodular := by sorry

end MonoApport.Flow
Source
Cembrano, Correa, Schmidt-Kraepelin, Tsigonias-Dimitriadis & Verdugo, New Combinatorial Insights for Monotone Apportionment, arXiv:2410.23869v1, proof of Lemma 3, §C.3, pp. 39–40
Human review
  • Endorsed by Shuze Chen · Oct 24, 2026

    Confirmed by the moderator at approval.

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