Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

No need to backtrack beyond the last decision

Proved
Timetabling.StableHalf.closed_extend_iff

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

algorithmsbacktrackinggraph-theory

Let GGG be a graph on the nodes xj,xˉjx_j, \bar x_jxj​,xˉj​ (j=1,…,nj = 1, \dots, nj=1,…,n) and aaa a partial assignment closed under implications. Then

G has a stable transversal  ⟺  G has a stable transversal extending a.G \text{ has a stable transversal} \iff G \text{ has a stable transversal extending } a .G has a stable transversal⟺G has a stable transversal extending a.

With the milestone implications are forced, this shows that when both xjx_jxj​ and xˉj\bar x_jxˉj​ fail from a closed assignment, no stable transversal exists at all, so the problem has no timetable.

Differences from the source:

  • generalization: the conflict graph of a CT4 instance → any graph on Fin n × Bool; reason: the argument uses only closedness; specializes to the conflict graph
  • encoding: there was no implication fixing the schedule of any of the yet unscheduled teachers → hypothesis IsClosed G a; reason: closedness is exactly this condition on the assignment fixed so far
  • encoding: both decisions imply that no timetable can be found, then none exists → the equivalence 'a stable transversal exists iff one extends a'; reason: the page's conclusion follows from it together with propagate_spec; stated as the underlying equivalence, both directions
Preamble
import Mathlib
import Definitions.Def_Timetabling_StableHalf_IsStableTransversal
import Definitions.Def_Timetabling_StableHalf_IsClosed
Formal statement
namespace Timetabling.StableHalf

/-- **No need to backtrack beyond the last decision.**
de Werra, *An introduction to timetabling*, EJOR 19 (1985), proof of Proposition 2.4, p. 155:
"Let us now show that when decisions x_j and x̄_j have been examined and when both imply that no
timetable can be found, then none exists. Indeed there is no need to backtrack to some earlier
decision: [...] So the subproblem containing only tacher t_j and all those who were unscheduled
when x_j and x̄_j were examined has no timetable. Hence the problem itself has no timetable."

Let `G` be a graph on `Fin n × Bool` and `a` a closed partial assignment. Then `G` has a stable
transversal if and only if it has a stable transversal extending `a` (agreeing with `a` on every
assigned pair). -/
theorem closed_extend_iff {n : ℕ} (G : SimpleGraph (Fin n × Bool)) (a : Fin n → Option Bool)
    (ha : IsClosed G a) :
    (∃ c : Fin n → Bool, IsStableTransversal G c) ↔
      ∃ c : Fin n → Bool, IsStableTransversal G c ∧ ∀ j b, a j = some b → c j = b := by sorry

end Timetabling.StableHalf
Source
de Werra (1985), proof of Proposition 2.4, p. 155, "Let us now show that when decisions x_j and x̄_j have been examined ... Hence the problem itself has no timetable.". D. de Werra, An introduction to timetabling, European Journal of Operational Research 19 (1985) 151-162, doi:10.1016/0377-2217(85)90167-5

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