Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 4(a), equivalence: KNAPSACK has a solution iff the constructed instance has ∑jCj≤y\sum_jC_j\le y∑j​Cj​≤y

Proved
SchedComplexity.TotalCompletion.theorem_4a_equivalence

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

knapsacknp-completenessp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1schedulingtotal-completion-time

Let a1,…,at,ba_1,\dots,a_t,ba1​,…,at​,b be positive integers with 0<b<A0<b<A0<b<A, where A=∑j∈TajA=\sum_{j\in T}a_jA=∑j∈T​aj​. Let the instance with n=t+t′+u+1n=t+t'+u+1n=t+t′+u+1 jobs and the threshold yyy be those of the construction of Theorem 4(a). Then

∃S⊆T: ∑j∈Saj=b⟺the instance is in n∣1∣rn≥0,wj=1∣∑wjCj and has a feasible schedule with ∑jCj≤y.\exists S\subseteq T:\ \sum_{j\in S}a_j=b \quad\Longleftrightarrow\quad \text{the instance is in } n|1|r_n\ge0,w_j=1|\textstyle\sum w_jC_j \text{ and has a feasible schedule with } \sum_jC_j\le y .∃S⊆T: j∈S∑​aj​=b⟺the instance is in n∣1∣rn​≥0,wj​=1∣∑wj​Cj​ and has a feasible schedule with ∑j​Cj​≤y.

This is the correctness of the reduction in Theorem 4(a); the proof combines the forward direction with claims (A)–(D).

Formalization Note The paper ends the converse with "This implies that KNAPSACK has a solution, as is easily seen"; the Lean statement asserts the full equivalence. The hypothesis 0<b<A0<b<A0<b<A is the paper's "We may assume that 0<b<A0<b<A0<b<A" (p. 16). Class membership of the constructed instance (unit weights, release date 000 for every job but JnJ_nJn​) is part of the right-hand side. Starting times are natural numbers.

Preamble
import Mathlib
import Definitions.Def_SchedComplexity_TotalCompletion_Knapsack
import Definitions.Def_SchedComplexity_TotalCompletion_SingleMachine
import Definitions.Def_SchedComplexity_TotalCompletion_Construction
Formal statement
namespace SchedComplexity.TotalCompletion

/-- Theorem 4(a), the equivalence of the reduction (pp. 22–23): for positive integers
`a_1, …, a_t, b` with `0 < b < A`, KNAPSACK has a solution if and only if the constructed
instance belongs to the class `n|1|r_n≥0,w_j=1|Σw_jC_j` and has a feasible schedule with
`Σ_j C_j ≤ y`. -/
theorem theorem_4a_equivalence {t : ℕ} (a : Fin t → ℕ) (b : ℕ)
    (ha : ∀ i, 0 < a i) (hb : 0 < b) (hbA : b < sumA a) :
    SchedComplexity.Tardiness.KnapsackYes a b ↔
      IsYes (procTime a b) (weight a b) (release a b) (yThreshold a b) := by sorry

end SchedComplexity.TotalCompletion
Source
Brucker, Lenstra & Rinnooy Kan, Complexity of Machine Scheduling Problems, Mathematisch Centrum Report BW 43/75 (1975), pp. 22–23, proof of Theorem 4(a); p. 16 (0 < b < A)
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