Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§2.1, p. 333 — a minimum cost schedule with a common preferred midtime has no gaps

Proved
GTWSched.NPC.min_cost_no_gaps

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

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

Consider tasks T0,T1,…,T2nT_0,T_1,\dots,T_{2n}T0​,T1​,…,T2n​ with lengths 0<l0<l1<⋯<l2n0<l_0<l_1<\dots<l_{2n}0<l0​<l1​<⋯<l2n​ and one common preferred midtime M>∑i=02nliM>\sum_{i=0}^{2n}l_iM>∑i=02n​li​, with cost cost(S)=∑i=02n∣M−mi(S)∣\mathrm{cost}(S)=\sum_{i=0}^{2n}|M-m_i(S)|cost(S)=∑i=02n​∣M−mi​(S)∣. If SSS is a minimum cost schedule, then SSS has no gaps between tasks:

every task of S either starts first or starts when another task finishes.\text{every task of }S\text{ either starts first or starts when another task finishes.}every task of S either starts first or starts when another task finishes.

This is the first structural property of optimal schedules used in the proof of THEOREM 1.

Formalization Note Tasks are Fin (2n+1), T0T_0T0​ is index 0; schedules have nonnegative starting times (a standing assumption, which never binds when M>∑liM>\sum l_iM>∑li​).

Preamble
import Mathlib
import Definitions.Def_GTWSched_NPC_Schedules
Formal statement
namespace GTWSched.NPC

/-- p. 333: in the special case (tasks `T₀, …, T₂ₙ` with `0 < l₀ < l₁ < ⋯ < l₂ₙ` and one common
preferred midtime `M > ∑ᵢ lᵢ`), a minimum cost schedule has no gaps between tasks. -/
theorem min_cost_no_gaps {n : ℕ} (l : Fin (2 * n + 1) → ℝ) (M : ℝ) (hl0 : 0 < l 0)
    (hmono : StrictMono l) (hM : ∑ i, l i < M) (s : Fin (2 * n + 1) → ℝ)
    (hs : IsMinCost l M s) : NoGaps l s := by sorry

end GTWSched.NPC
Source
Garey, Tarjan & Wilfong, One-Processor Scheduling with Symmetric Earliness and Tardiness Penalties, Math. Oper. Res. 13 (1988), p. 333, §2.1, "The first observation we make …"
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