Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of Theorem 5 — every feasible schedule can be transformed into an (a)–(c) schedule at least as good

Proved
ResourceScheduling.Poly.q2_exists_abc_le

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

p2o-batch-p100bp2o-gran-per-chapterp2o-plan-paperp2o-v1resource-constraintsscheduling

Consider two uniform machines M1,M2M_1,M_2M1​,M2​ with speeds q1≥q2>0q_1\ge q_2>0q1​≥q2​>0, one resource of positive integer size s1s_1s1​, nnn unit-time jobs with requirements r1jr_{1j}r1j​, and no precedence constraints. For every feasible schedule σ\sigmaσ there is a feasible schedule σ′\sigma'σ′ that satisfies properties (a), (b) and (c) of the proof of Theorem 5 and has

Cmax⁡(σ′)≤Cmax⁡(σ).C_{\max}(\sigma')\le C_{\max}(\sigma).Cmax​(σ′)≤Cmax​(σ).

In the paper's words: "The correctness of the algorithm will now be proved by showing that any feasible schedule can be transformed into a schedule that is at least as good and satisfies properties (a), (b) and (c)." It reduces the optimality of the algorithm to a comparison among (a)–(c) schedules only.

Formalization Note Start times are real and the resource constraint is checked at every real time; the transformed schedule is again nonpreemptive.

Preamble
import Mathlib
import Definitions.Def_ResourceScheduling_Poly_Model
import Definitions.Def_ResourceScheduling_Poly_Q2Properties
Formal statement
namespace ResourceScheduling.Poly

/-- Proof of Theorem 5 (p. 16), the exchange argument: for `Q2 | res1··, p_j = 1 | C_max` with
`q_1 ≥ q_2`, every feasible schedule can be transformed into a feasible schedule that is at least
as good and satisfies properties (a), (b) and (c). -/
theorem q2_exists_abc_le (I : Instance) (hm : I.m = 2) (hl : I.l = 1)
    (hprec : I.NoPrecedence) (hq : I.q (I.M₂ hm) ≤ I.q (I.M₁ hm))
    (σ : Schedule I) (hσ : σ.Feasible) :
    ∃ σ' : Schedule I, σ'.Feasible ∧ σ'.SatisfiesABC hm hl ∧ σ'.makespan ≤ σ.makespan := by sorry

end ResourceScheduling.Poly
Source
Błażewicz, Lenstra & Rinnooy Kan, Scheduling subject to resource constraints: classification and complexity, Discrete Appl. Math. 5 (1983), pp. 16–17, proof of Theorem 5 ("any feasible schedule can be transformed into a schedule that is at least as good")
Read-back

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

Hypotheses. Take any instance with nnn jobs, positive real speeds, natural-number resource sizes sh≥1s_h \ge 1sh​≥1 and natural-number requirements, and an acyclic precedence relation, such that:

  • m=2m = 2m=2. M1M_1M1​ is machine index 000 with speed q1q_1q1​; M2M_2M2​ is machine index 111 with speed q2q_2q2​.
  • l=1l = 1l=1. rjr_jrj​ is job jjj's requirement and sss is the size.
  • There are no precedence arcs.
  • q2≤q1q_2 \le q_1q2​≤q1​.

Let σ\sigmaσ be any schedule (machine μ(j)\mu(j)μ(j) and real start SjS_jSj​ per job, completion Cj=Sj+1/qμ(j)C_j = S_j + 1/q_{\mu(j)}Cj​=Sj​+1/qμ(j)​) that is feasible:

  • Sj≥0S_j \ge 0Sj​≥0 for all jjj;
  • distinct jobs on one machine have Cj≤SkC_j \le S_kCj​≤Sk​ or Ck≤SjC_k \le S_jCk​≤Sj​;
  • precedence respected (vacuous here);
  • at every real ttt, the total requirement of the jobs with Sj≤t<CjS_j \le t < C_jSj​≤t<Cj​ is at most sss.

Conclusion. There exists a schedule σ′\sigma'σ′ such that:

  • σ′\sigma'σ′ is feasible;
  • σ′\sigma'σ′ satisfies properties (a), (b) and (c) below;
  • Cmax⁡(σ′)≤Cmax⁡(σ)C_{\max}(\sigma') \le C_{\max}(\sigma)Cmax​(σ′)≤Cmax​(σ), where Cmax⁡C_{\max}Cmax​ is the largest completion time, or 000 if n=0n = 0n=0.

With ccc the number of jobs of σ′\sigma'σ′ on M1M_1M1​, the properties are:

  • (a) every job on M1M_1M1​ starts at some p/q1p/q_1p/q1​ with p∈Np \in \mathbb{N}p∈N, p<cp < cp<c; distinct jobs on M1M_1M1​ start at distinct times; and on M1M_1M1​, Sj′<Sk′S'_j < S'_kSj′​<Sk′​ implies rk≤rjr_k \le r_jrk​≤rj​;
  • (b) on M2M_2M2​, Sj′<Sk′S'_j < S'_kSj′​<Sk′​ implies rj≤rkr_j \le r_krj​≤rk​;
  • (c) every job on M1M_1M1​ has requirement at least that of every job on M2M_2M2​.

Degenerate cases.

  • There is no hypothesis that each job fits alone. However, a feasible σ\sigmaσ can exist only if rj≤sr_j \le srj​≤s for all jjj, because each job is executing at its own start time. When no feasible schedule exists, the statement is vacuous.
  • If n=0n = 0n=0, σ′=σ\sigma' = \sigmaσ′=σ works trivially, with makespan 000.
Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

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