Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

THEOREM 2 proof, Case 2, p. 338 — cost of appending a late task

Proved
GTWSched.FixedOrder.case_2_cost

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

earliness-tardinessp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1schedulingsingle-machine

Let SnS_nSn​ be the algorithm's schedule for n≥1n\ge1n≥1 tasks. If the preceding task finishes after task nnn's preferred starting time, then the algorithm appends task nnn at that finish time and possibly shifts the final block. The resulting total cost is

cost⁡n+1(Sn+1)=cost⁡n(Sn)+sn−1+ln−1−an.\operatorname{cost}_{n+1}(S_{n+1}) =\operatorname{cost}_n(S_n)+s_{n-1}+l_{n-1}-a_n.costn+1​(Sn+1​)=costn​(Sn​)+sn−1​+ln−1​−an​.

This identity isolates the new task's discrepancy in Case 2 of the optimality proof.

Formalization Note The paper's task Tn+1T_{n+1}Tn+1​ is task nnn here. Preferred starts and lengths are nonnegative, as in the paper's model.

Preamble
import Mathlib
import Definitions.Def_GTWSched_FixedOrder_Algorithm
Formal statement
namespace GTWSched.FixedOrder

/-- Case 2 of THEOREM 2, p. 338: inserting the late new task adds precisely
its discrepancy; a subsequent balanced-block shift costs nothing. -/
theorem case_2_cost (a l : ℕ → ℝ) (ha : ∀ i, 0 ≤ a i) (hl : ∀ i, 0 ≤ l i)
    (n : ℕ) (hn : 0 < n)
    (hlate : a n < sched a l n (n - 1) + l (n - 1)) :
    cost a (n + 1) (sched a l (n + 1)) =
      cost a n (sched a l n) +
        (sched a l n (n - 1) + l (n - 1) - a n) := by sorry

end GTWSched.FixedOrder
Source
Garey, Tarjan & Wilfong, One-Processor Scheduling with Symmetric Earliness and Tardiness Penalties, Math. Oper. Res. 13 (1988), p. 338, THEOREM 2 proof, Case 2
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