Proposition 2.4 and Remark, pp. 154–155 — limited backtracking terminates, and its success and failure answers are correct
ProvedTimetabling85.TwoPeriod.limited_backtracking_correctLet be a graph on the nodes , of teachers in which and are linked for every (each teacher has two possible schedules, and they are incompatible). Run de Werra's limited backtracking from , with arbitrary choices of the teacher to decide and of the first schedule tried. Then:
- termination — there is no infinite run: the move relation is well founded from ;
- progress — every reachable state in which some teacher is not yet fixed has a move;
- success is correct — if is reachable and every teacher is fixed in , then is a set of pairwise non-adjacent nodes of , i.e. a timetable;
- failure is correct — if is reachable, then
Together, every run of the procedure stops after finitely many decisions and returns a timetable exactly when one exists. Combined with the reduction of CT4 to the conflict graph, this is the correctness content of de Werra's Proposition 2.4 (the case of CT4 in which every teacher is available during at most 2 periods) and of the Remark that follows it.
Formalization Note The running-time claim of Proposition 2.4 and of the Remark is not formalized: the page fixes no machine model and no constant. Termination (clause 1) is the formal content; each move fixes at least one more teacher. All four clauses quantify over every run of the nondeterministic move relation, not over one fixed choice rule; clauses 1 and 2 rule out a procedure that never moves.
Retired 2026-10-27: a Lean-vs-paper fidelity audit found this statement weaker than, or narrower than, the cited result. A corrected statement will be resubmitted.
import Mathlib import Definitions.Def_Timetabling85_TwoPeriod_Backtracking
namespace Timetabling85.TwoPeriod
theorem limited_backtracking_correct {n : ℕ} (G : SimpleGraph (Fin n × Bool))
(hpair : ∀ j : Fin n, G.Adj (j, false) (j, true)) :
Acc (fun t s => Step G s t) (State.run ∅) ∧
(∀ A : Finset (Fin n × Bool), Reachable G (State.run A) → (∃ j, ¬ Fixed A j) →
∃ t, Step G (State.run A) t) ∧
(∀ A : Finset (Fin n × Bool), Reachable G (State.run A) → (∀ j, Fixed A j) →
G.IsNIndepSet n A) ∧
(Reachable G State.fail → ¬ ∃ T : Finset (Fin n × Bool), G.IsNIndepSet n T) := by sorry
end Timetabling85.TwoPeriod
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.