Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Sect. 4.1 — Algorithm 2 keeps the partial schedule valid

Proved
RestrictedAssignment.Svensson.valid_of_reachable

by mikedeng1 · Sep 27, 2026 · Mathlib 0df444a (Lean v4.33.1)

local-searchp2o-batch-p100bp2o-gran-per-chapterp2o-plan-paperp2o-v1scheduling

Let (J,M,p,Γ)(J, M, p, \Gamma)(J,M,p,Γ) be an instance of restricted assignment, σ0\sigma_0σ0​ a valid partial schedule (every assigned job on a machine of Γ(j)\Gamma(j)Γ(j), at most one big job per machine, every load at most 1+R=33/171 + R = 33/171+R=33/17), and jnewj_{\mathrm{new}}jnew​ a job with σ0(jnew)=TBD\sigma_0(j_{\mathrm{new}}) = \mathrm{TBD}σ0​(jnew​)=TBD. Then every state (σ,T)(\sigma, T)(σ,T) that Algorithm 2 started on (σ0,jnew)(\sigma_0, j_{\mathrm{new}})(σ0​,jnew​) reaches after finitely many iterations has a valid partial schedule σ\sigmaσ.

This is the invariant that makes the output of Algorithm 2 a schedule of makespan at most 1+R1 + R1+R.

Preamble
import Mathlib
import Definitions.Def_RestrictedAssignment_Svensson_configLP
import Definitions.Def_RestrictedAssignment_Svensson_extendSchedule
Formal statement
namespace RestrictedAssignment.Svensson

/-- Svensson, arXiv:1011.1168v2, p. 14, Sect. 4.1: Algorithm 2 only updates the schedule when a
valid move is chosen, so the schedule stays valid throughout the execution. -/
theorem valid_of_reachable {J M : Type} [Fintype J] [Fintype M] [DecidableEq J] [DecidableEq M]
    (Γ : J → Finset M) (p : J → ℝ) (σ0 : J → Option M) (jnew : J)
    (hσ0 : Valid Γ p σ0) (hjnew : σ0 jnew = none) (s : AlgState J M)
    (hs : Reachable Γ p σ0 jnew s) :
    Valid Γ p s.σ := by sorry

end RestrictedAssignment.Svensson
Source
Svensson, Santa Claus Schedules Jobs on Unrelated Machines, arXiv:1011.1168v2, p. 14, Sect. 4.1
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Let JJJ (jobs) and MMM (machines) be finite types with decidable equality. Let Γ(j)⊆M\Gamma(j) \subseteq MΓ(j)⊆M for each job, and let p:J→Rp : J \to \mathbb{R}p:J→R be arbitrary real sizes. No sign restriction is assumed.

Hypotheses.

  • σ0:J→M∪{TBD}\sigma_0 : J \to M \cup \{\mathrm{TBD}\}σ0​:J→M∪{TBD} is a partial schedule that is valid:
    • σ0(j)=i\sigma_0(j) = iσ0​(j)=i implies i∈Γ(j)i \in \Gamma(j)i∈Γ(j);
    • every machine carries at most one big job (big means pj≥11/17p_j \ge 11/17pj​≥11/17);
    • every machine's load ∑σ0(j)=ipj\sum_{\sigma_0(j) = i} p_j∑σ0​(j)=i​pj​ is at most 1+16/17=33/171 + 16/17 = 33/171+16/17=33/17.
  • jnewj_{new}jnew​ is a job with σ0(jnew)=TBD\sigma_0(j_{new}) = \mathrm{TBD}σ0​(jnew​)=TBD.
  • s=(σ,T)s = (\sigma, T)s=(σ,T) is a state reachable from the initial state (σ0, [({jnew}, ⊥, small)])(\sigma_0,\ [(\{j_{new}\},\ \bot,\ \text{small})])(σ0​, [({jnew​}, ⊥, small)]) by finitely many (possibly zero) steps.

What one step is. A state consists of a partial schedule and a list TTT of blockers. Each blocker has a job set, a machine or ⊥\bot⊥, and a kind (small, big or medium). A step from (σ,T)(\sigma, T)(σ,T) requires three things:

  1. σ(jnew)=TBD\sigma(j_{new}) = \mathrm{TBD}σ(jnew​)=TBD.
  2. A choice of a potential move (j,i)(j,i)(j,i) of lexicographically minimum value among all potential moves.
  3. A blocker BkB_kBk​ in TTT whose job set contains jjj.

A potential move is a pair with the following properties:

  • jjj lies in some blocker's job set;
  • i∈Γ(j)i \in \Gamma(j)i∈Γ(j) and σ(j)≠i\sigma(j) \ne iσ(j)=i;
  • one of five size and blocker conditions (small; medium/large-to-big; huge-to-small; huge-to-big; huge-to-medium) holds. These are phrased with the classes small pj≤9/17p_j \le 9/17pj​≤9/17, medium 9/17<pj<11/179/17 < p_j < 11/179/17<pj​<11/17, large 11/17≤pj<14/1711/17 \le p_j < 14/1711/17≤pj​<14/17 and huge pj≥14/17p_j \ge 14/17pj​≥14/17, and with the machines of existing blockers.

The step then has one of two effects:

  • If setting σ(j):=i\sigma(j) := iσ(j):=i yields a valid partial schedule: the step does exactly that and deletes BkB_kBk​ and all blockers after it.
  • Otherwise: σ\sigmaσ is left unchanged and one blocker with machine iii is appended. Its job set is either the jobs on iii not already in any blocker, or the big jobs on iii, or the medium jobs on iii, according to the move's type.

Conclusion. The schedule σ\sigmaσ of sss is valid, in the three-part sense above.

Degenerate cases.

  • The statement covers sss equal to the initial state, where it restates the hypothesis on σ0\sigma_0σ0​.
  • It covers sizes that are negative or zero. Such jobs are small, and a small invalid move with pj<0p_j < 0pj​<0 has a value below that of any valid move.
  • It covers every way of breaking ties and choosing kkk.
  • If no step is possible, the only reachable state is the initial one.
Human review
  • Endorsed by Shuze Chen · Sep 28, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 28, 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