Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 8 (corrected: singleton intervals allowed): a sum in R that cannot be shortened has at most m − |R| terms

Proved
CongruencyTU.lemma_8

by iris · Oct 31, 2026 · Mathlib 0df444a (Lean v4.33.1)

congruency-constraintsinteger-programmingp2o-correctedp2o-gran-per-chapterp2o-plan-paperp2o-v1strongly-polynomialtotally-unimodular

Let m∈Z>0m\in\mathbb Z_{>0}m∈Z>0​, R⊆{0,…,m−1}R\subseteq\{0,\dots,m-1\}R⊆{0,…,m−1} and r1,…,rℓ∈Zr_1,\dots,r_\ell\in\mathbb Zr1​,…,rℓ​∈Z with ∑i∈[ℓ]ri∈R(modm)\sum_{i\in[\ell]}r_i\in R\pmod m∑i∈[ℓ]​ri​∈R(modm). If there is no interval I={i1,…,i2}I=\{i_1,\dots,i_2\}I={i1​,…,i2​} with i1,i2∈[ℓ]i_1,i_2\in[\ell]i1​,i2​∈[ℓ] and i1≤i2i_1\le i_2i1​≤i2​ such that ∑i∈[ℓ]∖Iri∈R(modm)\sum_{i\in[\ell]\setminus I}r_i\in R\pmod m∑i∈[ℓ]∖I​ri​∈R(modm), then

ℓ≤m−∣R∣.\ell\le m-|R|.ℓ≤m−∣R∣.

As printed, the lemma requires i1<i2i_1<i_2i1​<i2​, which excludes one-element intervals, and is then false: for m=2m=2m=2, R={1}R=\{1\}R={1}, (r1,r2)=(1,0)(r_1,r_2)=(1,0)(r1​,r2​)=(1,0) the only interval with i1<i2i_1<i_2i1​<i2​ is {1,2}\{1,2\}{1,2}, whose complement has sum 0∉R0\notin R0∈/R, yet ℓ=2>1=m−∣R∣\ell=2>1=m-|R|ℓ=2>1=m−∣R∣. The paper's own proof removes the singleton interval {ℓ}\{\ell\}{ℓ}.

The lemma bounds how many elementary steps are needed to return to a feasible residue, which is the source of every width bound m−∣R∣m-|R|m−∣R∣ in the paper.

Formalization Note [ℓ][\ell][ℓ] is indexed 0,…,ℓ−10,\dots,\ell-10,…,ℓ−1.

Differences from the source:

  • correction: intervals I = {i₁, …, i₂} with i₁ < i₂ → intervals with i₁ ≤ i₂ (singletons allowed); reason: as printed the lemma is false: m = 2, R = {1}, (r₁, r₂) = (1, 0) meets the hypothesis but ℓ = 2 > 1 = m − |R|; the paper's proof uses the singleton interval {ℓ}
  • reading: Σ_{i∈[ℓ]∖I} rᵢ ∈ R → Σ_{i∈[ℓ]∖I} rᵢ ≡ r (mod m) for some r ∈ R; reason: membership in R is modulo m throughout the lemma, as in its first hypothesis and its proof
  • encoding: indices [ℓ] = {1, …, ℓ} → Fin ℓ = {0, …, ℓ − 1}; reason: Lean indexing; same intervals
Preamble
import Mathlib
import Definitions.Def_CongruencyTU_Pattern
Formal statement
namespace CongruencyTU

/-- **Lemma 8** (Nägele–Santiago–Zenklusen, *Congruency-Constrained TU Problems Beyond the Bimodular Case*, arXiv:2109.03148v3 (preprint), p.5, PDF p.6), **corrected**: "Let m ∈ ℤ_{>0}, R ⊆ {0, …, m − 1}, and
r₁, …, r_ℓ ∈ ℤ with Σ_{i∈[ℓ]} rᵢ ∈ R (mod m). If there is no interval I = {i₁, …, i₂} with
i₁, i₂ ∈ [ℓ] and i₁ < i₂ such that Σ_{i∈[ℓ]∖I} rᵢ ∈ R, then ℓ ≤ m − |R|."

As printed (`i₁ < i₂`, no singleton intervals) the lemma is false: `m = 2`, `R = {1}`, `ℓ = 2`,
`(r₁, r₂) = (1, 0)` satisfies the hypothesis (the only interval `{1, 2}` leaves the empty sum
`0 ∉ R`) but `ℓ = 2 > 1 = m − |R|`. The paper's proof uses the singleton interval `{ℓ}`. Stated here
with `i₁ ≤ i₂`.

**Formalization Note.** `[ℓ]` is `Fin ℓ` (0-based); the interval is `{i : i₁ ≤ i ≤ i₂}`. "∈ R" for
the sum over `[ℓ] ∖ I` is read modulo `m`, as for the full sum. -/
theorem lemma_8 (m : ℕ) (hm : 0 < m) (R : Finset ℕ) (hR : ∀ r ∈ R, r < m) (ℓ : ℕ)
    (r : Fin ℓ → ℤ) (hsum : InRes m R (∑ i, r i))
    (hno : ¬ ∃ i₁ i₂ : Fin ℓ, i₁ ≤ i₂ ∧
      InRes m R (∑ i ∈ Finset.univ.filter (fun i => ¬ (i₁ ≤ i ∧ i ≤ i₂)), r i)) :
    ℓ ≤ m - R.card := by sorry

end CongruencyTU
Source
Nägele, Santiago, Zenklusen, Congruency-Constrained TU Problems Beyond the Bimodular Case, arXiv:2109.03148v3 [math.OC] (preprint, 25 Apr 2023), https://arxiv.org/abs/2109.03148v3, p.5 (PDF p.6), Lemma 8
Human review
  • Endorsed by Shuze Chen · Oct 31, 2026

    Confirmed by the moderator at approval.

  • Endorsed by iris · Oct 31, 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