Lemma 4.9 — Algorithm 2 terminates (positive job sizes)
ProvedRestrictedAssignment.Svensson.extendSchedule_terminatesLet be an instance of restricted assignment in which every job has positive size, . Let be a valid partial schedule and a job with . Then Algorithm 2 started on has no infinite run: there is no sequence of states with the initial state and obtained from by one iteration of the while loop, whichever potential move of minimum value is chosen in each iteration.
In particular, if there is always a potential move to choose, Algorithm 2 terminates, i.e. assigns . Combined with Lemma 4.6, this is the correctness of the local search.
Formalization Note The printed lemma allows . Its proof uses that moving a job off a machine in a small blocker strictly decreases that machine's load, which fails for a job of size , and the statement fails too. Take one small job of size with , a job of size with , a job of size with on , a job of size with on , and on . Then the algorithm can alternate forever between blocking , moving to , blocking and moving back to , with all choices of minimum value. The hypothesis excludes this and loses nothing for the goal, where jobs of size can be placed at the end.
import Mathlib import Definitions.Def_RestrictedAssignment_Svensson_configLP import Definitions.Def_RestrictedAssignment_Svensson_extendSchedule
namespace RestrictedAssignment.Svensson
/-- Svensson, arXiv:1011.1168v2, p. 19, Lemma 4.9: Algorithm 2 terminates — it has no infinite
run, whatever potential move of minimum value is chosen in each iteration. Stated for positive
job sizes: with a job of size 0 the printed statement fails (see the natural-language
statement). -/
theorem extendSchedule_terminates {J M : Type} [Fintype J] [Fintype M] [DecidableEq J] [DecidableEq M]
(Γ : J → Finset M) (p : J → ℝ) (hp : ∀ j, 0 < p j)
(σ0 : J → Option M) (jnew : J) (hσ0 : Valid Γ p σ0) (hjnew : σ0 jnew = none) :
¬ ∃ f : ℕ → AlgState J M,
f 0 = initState σ0 jnew ∧ ∀ n, Step Γ p jnew (f n) (f (n + 1)) := by sorry
end RestrictedAssignment.Svensson
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let (jobs) and (machines) be finite types with decidable equality. Let for each job, and let every size be strictly positive: .
Hypotheses.
- is a valid partial schedule:
- assigned jobs on machines in their ;
- at most one big job () per machine;
- loads .
- .
Conclusion. There is no infinite sequence of states such that and every consecutive pair is one step, for every .
What one step is. A step from , where is a list of blockers (job set, machine or , kind), holds exactly when:
- .
- Some potential move has lexicographically minimum value among all potential moves.
- Some blocker with is chosen.
- The next state is:
- if yields a valid schedule: that reassignment, with and all later blockers removed;
- else, for a small or huge-to-small move: unchanged, plus an appended small blocker on holding ;
- else, for a medium/large-to-big or huge-to-big move: an appended big blocker on holding the big jobs on ;
- otherwise: an appended medium blocker on holding the medium jobs on .
Potential moves. is a potential move if , , , and one of:
- small: small and ; or medium, , no big job on ; or large, , no big job on .
- medium/large-to-big: those medium/large conditions with a big job on .
- huge-to-small or huge-to-big: huge, , no big job or a big job on respectively, and .
- huge-to-medium: huge, , and .
Class boundaries: small medium large huge.
Values. Values are compared lexicographically:
- valid move: ;
- small type: ;
- medium/large-to-big: ;
- huge-to-small: ;
- huge-to-big: ;
- huge-to-medium: .
Degenerate cases.
- The claim covers every choice of tie-breaking and of .
- No configuration-LP feasibility is assumed.
- Zero or negative sizes are excluded by hypothesis.
- A run that stops because no step is possible (for example, no potential move exists, or has been assigned) is consistent with the conclusion.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.