Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

LEMMA 5, p. 335 — swapping Aᵢ and Bᵢ in [Aₙ, …, A₁, T₀@M, B₁, …, Bₙ] keeps the cost

Proved
GTWSched.NPC.lemma_5

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

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

Let T0,…,T2nT_0,\dots,T_{2n}T0​,…,T2n​ have lengths 0<l0<l1<⋯<l2n0<l_0<l_1<\dots<l_{2n}0<l0​<l1​<⋯<l2n​ and common preferred midtime MMM. For a schedule

S=[An,An−1,…,A1,T0@M,B1,B2,…,Bn]S=[A_n,A_{n-1},\dots,A_1,T_0@M,B_1,B_2,\dots,B_n]S=[An​,An−1​,…,A1​,T0​@M,B1​,B2​,…,Bn​]

(T0T_0T0​ with midtime MMM, the BBB's after it and the AAA's before it in the indicated order, packed without gaps) and 1≤i≤n1\le i\le n1≤i≤n, let Si=[An,…,Ai+1,Bi,Ai−1,…,A1,T0@M,B1,…,Bi−1,Ai,Bi+1,…,Bn]S_i=[A_n,\dots,A_{i+1},B_i,A_{i-1},\dots,A_1,T_0@M,B_1,\dots,B_{i-1},A_i,B_{i+1},\dots,B_n]Si​=[An​,…,Ai+1​,Bi​,Ai−1​,…,A1​,T0​@M,B1​,…,Bi−1​,Ai​,Bi+1​,…,Bn​] be the schedule obtained by swapping AiA_iAi​ and BiB_iBi​.

LEMMA 5.

cost(Si)=cost(S).\mathrm{cost}(S_i)=\mathrm{cost}(S).cost(Si​)=cost(S).

Formalization Note The bracket is given by injective maps A B : Fin n → Fin (2n+1) with disjoint ranges avoiding T0T_0T0​; A k is the paper's Ak+1A_{k+1}Ak+1​, and SiS_iSi​ is obtained by updating A at iii to B i and B at iii to A i. The common midtime satisfies M>∑iliM>\sum_i l_iM>∑i​li​, and SSS is a minimum cost schedule, as in the surrounding special case.

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

/-- LEMMA 5, p. 335: swapping `Aᵢ` and `Bᵢ` in `[Aₙ, …, A₁, T₀@M, B₁, …, Bₙ]` does not change the
cost. -/
theorem lemma_5 {n : ℕ} (l : Fin (2 * n + 1) → ℝ) (M : ℝ) (hl0 : 0 < l 0)
    (hmono : StrictMono l) (hM : ∑ i, l i < M)
    (A B : Fin n → Fin (2 * n + 1)) (hAB : IsBracket A B)
    (hmin : IsMinCost l M (centered l M A B)) (i : Fin n) :
    commonCost l M (centered l M (Function.update A i (B i)) (Function.update B i (A i))) =
      commonCost l M (centered l M A B) := by sorry

end GTWSched.NPC
Source
Garey, Tarjan & Wilfong, One-Processor Scheduling with Symmetric Earliness and Tardiness Penalties, Math. Oper. Res. 13 (1988), p. 335, LEMMA 5 (Sᵢ defined on p. 335)
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