Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 4(f) — KNAPSACK has a solution iff the constructed n∣1∣rn≥0,wj=1∣∑wjUjn|1|r_n\ge0,w_j=1|\sum w_jU_jn∣1∣rn​≥0,wj​=1∣∑wj​Uj​ instance has ∑Uj≤0\sum U_j\le0∑Uj​≤0

Proved
SchedComplexity.OneMachine.theorem_4f_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​, and take the instance of reductions (c) and (f): n=t+1n=t+1n=t+1 jobs with unit weights, the jobs j∈Tj\in Tj∈T released at 000 with pj1=ajp_{j1}=a_jpj1​=aj​, dj=A+1d_j=A+1dj​=A+1, and the last job released at rn=br_n=brn​=b with pn1=1p_{n1}=1pn1​=1, dn=b+1d_n=b+1dn​=b+1. Then

∃ S⊆T: ∑j∈Saj=b⟺∃ feasible schedule with ∑j=1nwjUj≤0,\exists\,S\subseteq T:\ \sum_{j\in S}a_j=b\quad\Longleftrightarrow\quad \exists\text{ feasible schedule with } \sum_{j=1}^n w_jU_j\le 0 ,∃S⊆T: j∈S∑​aj​=b⟺∃ feasible schedule with j=1∑n​wj​Uj​≤0,

that is, with no late job. This is the equivalence behind KNAPSACK ∝n∣1∣rn≥0,wj=1∣∑wjUj\propto n|1|r_n\ge0,w_j=1|\sum w_jU_j∝n∣1∣rn​≥0,wj​=1∣∑wj​Uj​ with threshold y=0y=0y=0; the paper states (c) and (f) with one construction.

Formalization Note As in (c), 0<b<A0<b<A0<b<A is the proof's standing assumption (p. 16), idle time is allowed, and the paper's "Cf. reduction (i) and Figure 4" is made explicit as this equivalence over all feasible schedules.

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

/-- Theorem 4(f), equivalence (Brucker, Lenstra & Rinnooy Kan, Report BW 43/75, p. 17): for
positive integers `a_1, …, a_t, b` with `0 < b < A = ∑ a_j`, KNAPSACK has a solution iff the
constructed `n|1|r_n≥0,w_j=1|∑w_jU_j` instance (the construction of (c), unit weights) has a
feasible schedule with `∑ w_j U_j ≤ y = 0`. -/
theorem theorem_4f_equivalence (a : List ℕ) (b : ℕ) (ha : ∀ v ∈ a, 0 < v) (hb : 0 < b)
    (hbA : b < a.sum) :
    KnapsackYes a b ↔
      ∃ B, (instCF a b).IsFeasible B ∧ (instCF a b).sumWU B ≤ 0 := by sorry

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