Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proposition 2.2, p. 152 — CT2 has a solution iff column sums are at most p·b_j and row sums at most p·a_i

Proved
Timetabling85.ClassTeacher.prop_2_2

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

bipartite-multigraphedge-coloringp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1timetabling

Let R=(rij)R=(r_{ij})R=(rij​) be an m×nm\times nm×n requirement matrix of nonnegative integers, ppp a number of days, and a1,…,ama_1,\dots,a_ma1​,…,am​, b1,…,bnb_1,\dots,b_nb1​,…,bn​ positive integers (the maximum daily loads of the classes and the teachers). Problem CT2 — find nonnegative integers xijkx_{ijk}xijk​ with ∑kxijk=rij\sum_k x_{ijk}=r_{ij}∑k​xijk​=rij​ for all i,ji,ji,j, ∑jxijk≤ai\sum_j x_{ijk}\le a_i∑j​xijk​≤ai​ for all i,ki,ki,k and ∑ixijk≤bj\sum_i x_{ijk}\le b_j∑i​xijk​≤bj​ for all j,kj,kj,k — has a solution if and only if

∑i=1mrij≤p bj(j=1,…,n)and∑j=1nrij≤p ai(i=1,…,m).\sum_{i=1}^m r_{ij}\le p\,b_j\quad(j=1,\dots,n)\qquad\text{and}\qquad\sum_{j=1}^n r_{ij}\le p\,a_i\quad(i=1,\dots,m).i=1∑m​rij​≤pbj​(j=1,…,n)andj=1∑n​rij​≤pai​(i=1,…,m).

In edge-colouring terms: the edges of the bipartite multigraph can be coloured with ppp colours so that at most aia_iai​ (resp. bjb_jbj​) edges at cic_ici​ (resp. tjt_jtj​) share a colour iff the degree of each node is at most ppp times its bound.

Formalization Note Positivity of aia_iai​ and bjb_jbj​ is the paper's hypothesis ("a positive integer"). The statement is for every ppp, including p=0p=0p=0.

Preamble
import Mathlib
import Definitions.Def_Timetabling85_ClassTeacher_Problems
Formal statement
namespace Timetabling85.ClassTeacher

/-- Proposition 2.2 (de Werra 1985, p. 152): for positive integers `a i`, `b j`, CT2 has a solution
iff `∑_i r_ij ≤ p b_j` for every `j` and `∑_j r_ij ≤ p a_i` for every `i`. -/
theorem prop_2_2 {m n : ℕ} (R : Fin m → Fin n → ℕ) (p : ℕ) (a : Fin m → ℕ) (b : Fin n → ℕ)
    (ha : ∀ i, 0 < a i) (hb : ∀ j, 0 < b j) :
    (∃ x : Fin m → Fin n → Fin p → ℕ, IsCT2 R p a b x) ↔
      (∀ j, colSum R j ≤ p * b j) ∧ (∀ i, rowSum R i ≤ p * a i) := by sorry

end Timetabling85.ClassTeacher
Source
de Werra, An introduction to timetabling, Eur. J. Oper. Res. 19 (1985), p. 152, Proposition 2.2
Human review
  • Endorsed by Shuze Chen · Oct 6, 2026

    Confirmed by the moderator at approval.

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