Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

PROOF, p. 689, case (b1) — processing an idle-waiting job j over an idle interval reduces C(j) and leaves every other C(i) unchanged

Proved
SchrageSRPT.Opt.idle_fill_improves

by mikedeng1 · Oct 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

interchange-argumentp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1schedulingsrpt

Let δo\delta_oδo​ be a schedule of an arrival stream {A(n),P(n)}\{A(n), P(n)\}{A(n),P(n)}, let t∈Rt \in \mathbb Rt∈R and v>0v > 0v>0, and let jjj be a job in system at time ttt under δo\delta_oδo​. Suppose that over the interval [t,t+v][t, t+v][t,t+v]

  1. job jjj is not processed: δo(j,x)=0\delta_o(j, x) = 0δo​(j,x)=0 for t≤x≤t+vt \le x \le t + vt≤x≤t+v;
  2. the processor is idle with respect to the jobs in system (condition (b1)): δo(k,x)=0\delta_o(k, x) = 0δo​(k,x)=0 for every k∈θo(x)k \in \theta_o(x)k∈θo​(x) and t≤x≤t+vt \le x \le t+vt≤x≤t+v;

and that jjj completes under δo\delta_oδo​, i.e. Co(j)<∞C_o(j) < \inftyCo​(j)<∞. Let δr\delta_rδr​ be the revised schedule that processes jjj throughout [t,t+v][t, t+v][t,t+v] and agrees with δo\delta_oδo​ elsewhere. Then

Cr(j)<Co(j)andCr(i)=Co(i)  for every i≠j.C_r(j) < C_o(j) \qquad\text{and}\qquad C_r(i) = C_o(i) \ \text{ for every } i \ne j.Cr​(j)<Co​(j)andCr​(i)=Co​(i)  for every i=j.

This is the first case of the letter's interchange argument: a schedule that leaves the processor idle while a job is waiting can be improved.

Formalization Note. The letter's condition (a) also requires So(j,x)<So(k,x)S_o(j, x) < S_o(k, x)So​(j,x)<So​(k,x) for the jobs kkk in system; that clause is not needed in case (b1) and is omitted, which makes the statement stronger. The hypothesis Co(j)<∞C_o(j) < \inftyCo​(j)<∞ is added: if jjj never completes under δo\delta_oδo​ it need not complete under δr\delta_rδr​ either, and "C(j)C(j)C(j) can be reduced" has no content. The revised schedule switches every other job off on [t,t+v][t, t+v][t,t+v] so that it is again a schedule; this only removes service from jobs that have already completed, so it does not change their completion times. That the revision is a schedule follows from the hypotheses and is not assumed.

Preamble
import Mathlib
import Definitions.Def_SchrageSRPT_Opt_Model
Formal statement
namespace SchrageSRPT.Opt
theorem idle_fill_improves (A P : ℕ → ℝ) (δo : ℕ → ℝ → ℝ) (hδo : IsSchedule A δo)
    (j : ℕ) (t v : ℝ) (hv : 0 < v) (hj : j ∈ inSystem A P δo t)
    (hj_idle : ∀ x ∈ Set.Icc t (t + v), δo j x = 0)
    (hb1 : ∀ x ∈ Set.Icc t (t + v), ∀ k ∈ inSystem A P δo x, δo k x = 0)
    (hCj : completion A P δo j ≠ ⊤) :
    completion A P (idleFill δo j t v) j < completion A P δo j ∧
      ∀ i, i ≠ j → completion A P (idleFill δo j t v) i = completion A P δo i := by sorry
end SchrageSRPT.Opt
Source
Schrage, A proof of the optimality of the shortest remaining processing time discipline, Oper. Res. 16 (1968), p. 689, PROOF, conditions (a), (b1) and the sentence after (b)
Human review
  • Endorsed by Shuze Chen · Oct 6, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 6, 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