Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 4(e) — KNAPSACK has a solution iff the constructed n∣1∣∣∑wjUjn|1||\sum w_jU_jn∣1∣∣∑wj​Uj​ instance has ∑wjUj≤A−b\sum w_jU_j\le A-b∑wj​Uj​≤A−b

Proved
SchedComplexity.OneMachine.theorem_4e_equivalence

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

knapsacklate-jobsnp-completenessp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1schedulingsingle-machine

Let a1,…,at,ba_1,\dots,a_t,ba1​,…,at​,b be positive integers with 0<b<A=∑j∈Taj0<b<A=\sum_{j\in T}a_j0<b<A=∑j∈T​aj​. Consider the single-machine instance of reduction (e): n=tn=tn=t jobs, all released at time 000, with pj1=wj=ajp_{j1}=w_j=a_jpj1​=wj​=aj​ and common due date dj=bd_j=bdj​=b. Then

∃ S⊆T: ∑j∈Saj=b⟺∃ feasible schedule with ∑j∈TwjUj≤A−b.\exists\,S\subseteq T:\ \sum_{j\in S}a_j=b\quad\Longleftrightarrow\quad \exists\text{ feasible schedule with } \sum_{j\in T} w_jU_j\le A-b .∃S⊆T: j∈S∑​aj​=b⟺∃ feasible schedule with j∈T∑​wj​Uj​≤A−b.

This is the equivalence behind KNAPSACK ∝n∣1∣∣∑wjUj\propto n|1||\sum w_jU_j∝n∣1∣∣∑wj​Uj​; the paper cites Karp and Figure 7 (SSS in [0,b][0,b][0,b], T−ST-ST−S in [b,A][b,A][b,A]).

Formalization Note 0<b<A0<b<A0<b<A is the proof's standing assumption (p. 16); under it the threshold A−bA-bA−b is a natural number. Idle time is allowed. The paper gives no argument beyond the construction; the statement makes the equivalence explicit.

Preamble
import Mathlib
import Definitions.Def_SchedComplexity_OneMachine_Knapsack
import Definitions.Def_SchedComplexity_OneMachine_Constructions
Formal statement
namespace SchedComplexity.OneMachine

/-- Theorem 4(e), equivalence (Brucker, Lenstra & Rinnooy Kan, Report BW 43/75, p. 19): for
positive integers `a_1, …, a_t, b` with `0 < b < A = ∑ a_j`, KNAPSACK has a solution iff the
constructed `n|1||∑w_jU_j` instance (`p_{j1} = w_j = a_j`, `d_j = b`) has a feasible schedule
with `∑ w_j U_j ≤ y = A - b`. -/
theorem theorem_4e_equivalence (a : List ℕ) (b : ℕ) (ha : ∀ v ∈ a, 0 < v) (hb : 0 < b)
    (hbA : b < a.sum) :
    KnapsackYes a b ↔
      ∃ B, (instE a b).IsFeasible B ∧ (instE a b).sumWU B ≤ yE a b := by sorry

end SchedComplexity.OneMachine
Source
Brucker, Lenstra & Rinnooy Kan, Complexity of Machine Scheduling Problems, Mathematisch Centrum Report BW 43/75 (1975), p. 19, Theorem 4(e)
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