Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§2.1, p. 153, flow sketch after Proposition 2.3 — after one balanced day, the remaining days stay balanced

Proved
Timetabling85.ClassTeacher.remaining_bounds

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

balanced-edge-coloringfloor-ceilingp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1timetabling

Let p≥2p\ge2p≥2 and let s,ys,ys,y be nonnegative integers with ⌊s/p⌋≤y≤⌈s/p⌉\lfloor s/p\rfloor\le y\le\lceil s/p\rceil⌊s/p⌋≤y≤⌈s/p⌉. Then

⌊sp⌋≤⌊s−yp−1⌋and⌈s−yp−1⌉≤⌈sp⌉.\Big\lfloor \tfrac{s}{p}\Big\rfloor\le\Big\lfloor \tfrac{s-y}{p-1}\Big\rfloor\qquad\text{and}\qquad\Big\lceil \tfrac{s-y}{p-1}\Big\rceil\le\Big\lceil \tfrac{s}{p}\Big\rceil.⌊ps​⌋≤⌊p−1s−y​⌋and⌈p−1s−y​⌉≤⌈ps​⌉.

Applied to every entry rijr_{ij}rij​, every row total and every column total of a requirement matrix, it says that once one day has been scheduled within the bounds of (8)–(10), the remaining lectures form a CT3 instance on p−1p-1p−1 days whose bounds lie inside the original ones. So a CT3 solution for the rest is a CT3 solution for the whole, which is what makes the day-by-day construction of the paper's sketch possible: "it will be possible to schedule the remaining lectures … without violating the right inequalities in (8)–(10)".

Formalization Note s−ys-ys−y is natural-number subtraction; under the hypotheses y≤⌈s/p⌉≤sy\le\lceil s/p\rceil\le sy≤⌈s/p⌉≤s whenever s≥1s\ge1s≥1 (and y=0y=0y=0 when s=0s=0s=0), so no truncation occurs.

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

/-- The remaining days stay balanced (de Werra 1985, §2.1, p. 153): if `p ≥ 2` and a day receives
`y` of `s` lectures with `⌊s/p⌋ ≤ y ≤ ⌈s/p⌉`, the remaining `s − y` lectures over `p − 1` days
have bounds `⌊(s−y)/(p−1)⌋ ≥ ⌊s/p⌋` and `⌈(s−y)/(p−1)⌉ ≤ ⌈s/p⌉`. -/
theorem remaining_bounds (s y p : ℕ) (hp : 2 ≤ p) (hlo : lo s p ≤ y) (hhi : y ≤ hi s p) :
    lo s p ≤ lo (s - y) (p - 1) ∧ hi (s - y) (p - 1) ≤ hi s p := by sorry

end Timetabling85.ClassTeacher
Source
de Werra, An introduction to timetabling, Eur. J. Oper. Res. 19 (1985), p. 153, §2.1, network-flow sketch after Proposition 2.3 (lower bounds l^k guaranteeing the remaining days)
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