Section II.B — at every step of the TTC algorithm with students remaining there is a cycle
ProvedSchoolChoice.TTC.ttc_exists_cycleLet be a finite set of students and a finite set of schools with capacities such that there is no shortage of seats,
Fix strict priorities and an announced preference profile . For every , if some student remains at the beginning of Step of the top trading cycles algorithm, then some remaining student lies on a cycle of the pointing graph at that step.
This is the claim "there is at least one cycle" that the paper makes at Step 1 and at every Step ; it is what makes each step of the algorithm remove at least one student.
Formalization Note The claim is stated only for states reached by the algorithm from the initial state and under the no-shortage assumption: an arbitrary state can have remaining students and no remaining school, and then there is no cycle.
import Mathlib import Definitions.Def_SchoolChoice_TTC_Algorithm
namespace SchoolChoice.TTC
/-- Section II.B (p. 15): at every step of the top trading cycles algorithm at which some
student remains, there is at least one cycle, i.e. some remaining student is in a cycle.
`run q pri P t` is the state at the beginning of Step `t + 1`. -/
theorem ttc_exists_cycle {I S : Type} [Fintype I] [DecidableEq I] [Fintype S]
[DecidableEq S] (q : S → ℕ) (hq : Fintype.card I ≤ ∑ s, q s)
(pri : S → Priority I) (P : I → Pref S) (t : ℕ)
(hrem : (run q pri P t).rem.Nonempty) :
∃ i ∈ (run q pri P t).rem, InCycle P pri (run q pri P t) i := by sorry
end SchoolChoice.TTC
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.