Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proposition 2.3, p. 153 — there exists a solution to CT3 for any number p ≥ 1 of days

Proved
Timetabling85.ClassTeacher.prop_2_3

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

balanced-edge-coloringequitable-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, with class totals ri⋅=∑jrijr_{i\cdot}=\sum_j r_{ij}ri⋅​=∑j​rij​ and teacher totals r⋅j=∑irijr_{\cdot j}=\sum_i r_{ij}r⋅j​=∑i​rij​, and let p≥1p\ge1p≥1 be a number of days. Then there are nonnegative integers xijkx_{ijk}xijk​ (1≤i≤m1\le i\le m1≤i≤m, 1≤j≤n1\le j\le n1≤j≤n, 1≤k≤p1\le k\le p1≤k≤p) with ∑k=1pxijk=rij\sum_{k=1}^p x_{ijk}=r_{ij}∑k=1p​xijk​=rij​ for all i,ji,ji,j such that, for every day kkk and all i,ji,ji,j,

⌊ri⋅p⌋≤∑j=1nxijk≤⌈ri⋅p⌉,⌊r⋅jp⌋≤∑i=1mxijk≤⌈r⋅jp⌉,⌊rijp⌋≤xijk≤⌈rijp⌉.\Big\lfloor \tfrac{r_{i\cdot}}{p}\Big\rfloor\le\sum_{j=1}^n x_{ijk}\le\Big\lceil \tfrac{r_{i\cdot}}{p}\Big\rceil,\qquad \Big\lfloor \tfrac{r_{\cdot j}}{p}\Big\rfloor\le\sum_{i=1}^m x_{ijk}\le\Big\lceil \tfrac{r_{\cdot j}}{p}\Big\rceil,\qquad \Big\lfloor \tfrac{r_{ij}}{p}\Big\rfloor\le x_{ijk}\le\Big\lceil \tfrac{r_{ij}}{p}\Big\rceil.⌊pri⋅​​⌋≤j=1∑n​xijk​≤⌈pri⋅​​⌉,⌊pr⋅j​​⌋≤i=1∑m​xijk​≤⌈pr⋅j​​⌉,⌊prij​​⌋≤xijk​≤⌈prij​​⌉.

In words: the lectures can always be spread over the ppp days so that the daily load of every class and every teacher is perfectly balanced, and at the same time the lectures of each class–teacher pair are spread as evenly as possible. Equivalently, every bipartite multigraph has a ppp-edge-colouring in which every node sees ⌊d/p⌋\lfloor d/p\rfloor⌊d/p⌋ or ⌈d/p⌉\lceil d/p\rceil⌈d/p⌉ edges of each colour (ddd its degree) and every bundle of rrr parallel edges contains ⌊r/p⌋\lfloor r/p\rfloor⌊r/p⌋ or ⌈r/p⌉\lceil r/p\rceil⌈r/p⌉ edges of each colour. It extends Propositions 2.1 and 2.2.

Formalization Note The paper says "for any ppp"; the hypothesis p≥1p\ge1p≥1 makes this a number of days (for p=0p=0p=0 and R≠0R\neq0R=0 constraint (1) cannot hold). Floors and ceilings in the first two families are of the totals divided by ppp, not sums of entrywise floors and ceilings.

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

/-- Proposition 2.3 (de Werra 1985, p. 153): for every `m × n` requirement matrix `R` and every
number `p ≥ 1` of days, problem CT3 ((1) and (8)–(10)) has a solution. -/
theorem prop_2_3 {m n : ℕ} (R : Fin m → Fin n → ℕ) (p : ℕ) (hp : 0 < p) :
    ∃ x : Fin m → Fin n → Fin p → ℕ, IsCT3 R p x := by sorry

end Timetabling85.ClassTeacher
Source
de Werra, An introduction to timetabling, Eur. J. Oper. Res. 19 (1985), p. 153, Proposition 2.3
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