Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of THEOREM 1, pp. 336–337 — the instance D has a schedule of cost ≤ k iff X has an even-odd partition

Proved
GTWSched.NPC.theorem_1_reduction

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

earliness-tardinessnp-completenessp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1reductionscheduling

Let X={x1,…,x2n}X=\{x_1,\dots,x_{2n}\}X={x1​,…,x2n​} be an instance of even-odd partition (n≥1n\ge1n≥1, positive integers, xi<xi+1x_i<x_{i+1}xi​<xi+1​) with x1>1x_1>1x1​>1. Build the instance D of total discrepancy with 2n+22n+22n+2 tasks T0,…,T2n+1T_0,\dots,T_{2n+1}T0​,…,T2n+1​:

  1. lengths l0=x1−1l_0=x_1-1l0​=x1​−1, li=xil_i=x_ili​=xi​ for 1≤i≤2n1\le i\le 2n1≤i≤2n, l2n+1=2l_{2n+1}=2l2n+1​=2;
  2. preferred midtimes Mj=M=∑i=02nli/2M_j=M=\sum_{i=0}^{2n}l_i/2Mj​=M=∑i=02n​li​/2 for 0≤j≤2n0\le j\le 2n0≤j≤2n, and M2n+1=2M+l2n+1/2M_{2n+1}=2M+l_{2n+1}/2M2n+1​=2M+l2n+1​/2;
  3. threshold k=∑i=1n(l2i+l2i−1)(n−i+12)+l0 nk=\sum_{i=1}^n(l_{2i}+l_{2i-1})(n-i+\tfrac12)+l_0\,nk=∑i=1n​(l2i​+l2i−1​)(n−i+21​)+l0​n.

Then

∃ schedule S of D with ∑j=02n+1∣mj(S)−Mj∣≤k  ⟺  X has an even-odd partition with equal sums.\exists\ \text{schedule } S \text{ of D with } \sum_{j=0}^{2n+1}|m_j(S)-M_j|\le k\iff X \text{ has an even-odd partition with equal sums.}∃ schedule S of D with j=0∑2n+1​∣mj​(S)−Mj​∣≤k⟺X has an even-odd partition with equal sums.

Formalization Note The instance D is real-valued (dLen, dMid, dK), since MMM and kkk can be half-integers; schedules have real, nonnegative starting times, and nonnegativity is essential here (the tasks of A(S′)A(S')A(S′) must fit between 000 and M−l0/2M-l_0/2M−l0​/2). The paper's "without loss of generality we assume that x1>1x_1>1x1​>1" is a hypothesis.

Preamble
import Mathlib
import Definitions.Def_CookPvsNP_defs
import Definitions.Def_ProjSchedTW_Complexity_Encoding
import Definitions.Def_GTWSched_NPC_Schedules
import Definitions.Def_GTWSched_NPC_Problems
Formal statement
namespace GTWSched.NPC

/-- Proof of THEOREM 1, pp. 336–337: for an even-odd partition instance `X` with `x₁ > 1`, the
instance D (lengths `l₀ = x₁ − 1`, `lᵢ = xᵢ`, `l₂ₙ₊₁ = 2`; midtimes `M = ∑ᵢ₌₀²ⁿ lᵢ/2` for
`T₀, …, T₂ₙ` and `2M + l₂ₙ₊₁/2` for `T₂ₙ₊₁`; threshold `k`) has a schedule of cost at most `k`
iff `X` has an even-odd partition into two parts of equal sum. -/
theorem theorem_1_reduction (x : List ℕ) (hx : EOInstance x) (hx1 : 1 < x.getD 0 0) :
    EOYes x ↔ TDYesReal (dLen x) (dMid x) (dK x) := by sorry

end GTWSched.NPC
Source
Garey, Tarjan & Wilfong, One-Processor Scheduling with Symmetric Earliness and Tardiness Penalties, Math. Oper. Res. 13 (1988), pp. 336–337, proof of THEOREM 1
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