Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

LEMMA 7, p. 338 — each algorithmic block has more Increase than Decrease tasks or starts at zero

Proved
GTWSched.FixedOrder.lemma_7

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

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

Let ai≥0a_i\ge0ai​≥0 and li≥0l_i\ge0li​≥0 be the preferred starts and lengths, and let SnS_nSn​ be the schedule produced by the block-shifting algorithm for the first nnn tasks. For every maximal contiguous block B=[j,k]B=[j,k]B=[j,k] of SnS_nSn​, either its number of Decrease tasks is strictly less than its number of Increase tasks, or the first task starts at zero:

Dec⁡(B)<Inc⁡(B)orsj=0.\operatorname{Dec}(B)<\operatorname{Inc}(B)\quad\text{or}\quad s_j=0.Dec(B)<Inc(B)orsj​=0.

This is the invariant cited in the correctness proof of the algorithm.

Formalization Note Task iii represents the paper's Ti+1T_{i+1}Ti+1​; a block is determined by equality of successive completion and starting times.

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

/-- LEMMA 7, p. 338: every algorithmic block is weighted toward Increase,
unless its first task starts at zero. -/
theorem lemma_7 (a l : ℕ → ℝ) (ha : ∀ i, 0 ≤ a i) (hl : ∀ i, 0 ≤ l i)
    (n j k : ℕ) (hblock : IsBlock l n (sched a l n) j k) :
    decCount a (sched a l n) j k < incCount a (sched a l n) j k ∨
      sched a l n j = 0 := 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, LEMMA 7
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