Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§2.1, p. 336 — the total discrepancy problem is in NP

Proved
GTWSched.NPC.td_mem_NP

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

complexitynp-completenessp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1scheduling

The total discrepancy problem belongs to NP: the language of codes of instances N,k∈Z+N,k\in\mathbb Z^+N,k∈Z+, Mi,li∈Z+M_i,l_i\in\mathbb Z^+Mi​,li​∈Z+ for which some one-processor schedule SSS with real starting times has ∑i=1N∣mi(S)−Mi∣≤k\sum_{i=1}^N|m_i(S)-M_i|\le k∑i=1N​∣mi​(S)−Mi​∣≤k is in

NP.\mathrm{NP}.NP.

The paper leaves this "as a simple exercise".

Formalization Note NP is the published CookPvsNP.NP; the language is tdLang. A certificate cannot simply be a list of real starting times; a polynomial-size certificate exists because for a fixed task order the optimal starting times solve a linear program with integer data.

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

open CookPvsNP ProjSchedTW.Complexity

/-- p. 336: the total discrepancy problem is in NP. -/
theorem td_mem_NP : tdLang ∈ NP BSym := by sorry

end GTWSched.NPC
Source
Garey, Tarjan & Wilfong, One-Processor Scheduling with Symmetric Earliness and Tardiness Penalties, Math. Oper. Res. 13 (1988), p. 336, §2.1, before 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