Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

PROOF, p. 689 — reassigning jobs j and k over σ leaves max{C(k), C(j)} unchanged

Proved
SchrageSRPT.Opt.max_completion_eq

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​ and δr\delta_rδr​ be two schedules of the same arrival stream, let t∈Rt \in \mathbb Rt∈R, and let j≠kj \ne kj=k be two jobs in system at time ttt under δo\delta_oδo​. Suppose that

  1. δr\delta_rδr​ agrees with δo\delta_oδo​ on jjj and on kkk before time ttt;
  2. δr\delta_rδr​ gives the pair the same capacity as δo\delta_oδo​: δr(j,x)+δr(k,x)=δo(j,x)+δo(k,x)\delta_r(j, x) + \delta_r(k, x) = \delta_o(j, x) + \delta_o(k, x)δr​(j,x)+δr​(k,x)=δo​(j,x)+δo​(k,x) for all xxx;
  3. neither schedule processes jjj or kkk once that job has no remaining processing time: S(i,x)≤0S(i, x) \le 0S(i,x)≤0 implies δ(i,x)=0\delta(i, x) = 0δ(i,x)=0 for i∈{j,k}i \in \{j, k\}i∈{j,k} and δ∈{δo,δr}\delta \in \{\delta_o, \delta_r\}δ∈{δo​,δr​}.

Then the later of the two completion times is the same under both schedules:

max⁡{Co(k),Co(j)}=max⁡{Cr(k),Cr(j)}.\max\{C_o(k), C_o(j)\} = \max\{C_r(k), C_r(j)\}.max{Co​(k),Co​(j)}=max{Cr​(k),Cr​(j)}.

In the letter's words, "regardless of how jjj and kkk are scheduled over σ\sigmaσ, the last job will always finish at the same time". It is relation (3) of the letter's PROOF.

Formalization Note. The statement holds for every reassignment of the pair's capacity, not only the SRPT one, as the letter says. Hypothesis 3 is added: the letter's identity max⁡{C(k),C(j)}=min⁡{x:∫tx[δ(k,y)+δ(j,y)] dy≥S(k,t)+S(j,t)}\max\{C(k), C(j)\} = \min\{x : \int_t^x [\delta(k,y)+\delta(j,y)]\,dy \ge S(k,t)+S(j,t)\}max{C(k),C(j)}=min{x:∫tx​[δ(k,y)+δ(j,y)]dy≥S(k,t)+S(j,t)} fails if a schedule spends capacity on a job that has already completed. The letter does not require other jobs to be unchanged for this identity, and neither does the statement. Completion times take values in R∪{+∞}\mathbb R \cup \{+\infty\}R∪{+∞}.

Preamble
import Mathlib
import Definitions.Def_SchrageSRPT_Opt_Model
Formal statement
namespace SchrageSRPT.Opt
theorem max_completion_eq (A P : ℕ → ℝ) (δo δr : ℕ → ℝ → ℝ)
    (hδo : IsSchedule A δo) (hδr : IsSchedule A δr) (j k : ℕ) (t : ℝ) (hjk : j ≠ k)
    (hj : j ∈ inSystem A P δo t) (hk : k ∈ inSystem A P δo t)
    (hbefore : ∀ x, x < t → δr j x = δo j x ∧ δr k x = δo k x)
    (hsum : ∀ x, δr j x + δr k x = δo j x + δo k x)
    (hwaste_o : ∀ i, (i = j ∨ i = k) → ∀ x, remaining A P δo i x ≤ 0 → δo i x = 0)
    (hwaste_r : ∀ i, (i = j ∨ i = k) → ∀ x, remaining A P δr i x ≤ 0 → δr i x = 0) :
    max (completion A P δo k) (completion A P δo j) =
      max (completion A P δr k) (completion A P δr j) := 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, the displayed identity for max{C_o(k), C_o(j)} and relation (3)
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