Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 4(i) — KNAPSACK has a solution iff the two-machine job shop instance has C_max ≤ A + 1

Proved
SchedComplexity.Shops.theorem_4i_equivalence

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

job-shopknapsacknp-completenessp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1scheduling

Let a1,…,ata_1,\dots,a_ta1​,…,at​ and bbb be positive integers with 0<b<A0<b<A0<b<A, where A=∑j∈TajA=\sum_{j\in T}a_jA=∑j∈T​aj​. Consider the two-machine job shop with n=t+1n=t+1n=t+1 jobs in which item job JjJ_jJj​ (j∈Tj\in Tj∈T) has the single operation pj1=ajp_{j1}=a_jpj1​=aj​ on M1M_1M1​, and JnJ_nJn​ has machine order (M2,M1,M2)(M_2,M_1,M_2)(M2​,M1​,M2​) with processing times bbb, 111, A−bA-bA−b. Then

∃ S⊆T: ∑j∈Saj=b⟺the instance has a feasible schedule with Cmax⁡≤A+1.\exists\,S\subseteq T:\ \sum_{j\in S}a_j=b\quad\Longleftrightarrow\quad\text{the instance has a feasible schedule with } C_{\max}\le A+1.∃S⊆T: j∈S∑​aj​=b⟺the instance has a feasible schedule with Cmax​≤A+1.

This is the equivalence in the proof of Theorem 4(i), which shows that KNAPSACK reduces to n∣2∣G,mj≤3∣Cmax⁡n|2|G,m_j{\le}3|C_{\max}n∣2∣G,mj​≤3∣Cmax​.

Formalization Note The report writes "we may assume that 0<b<A0<b<A0<b<A"; the theorem carries this, and the positivity of the data, as hypotheses. The report proves the forward direction with a schedule of value exactly yyy; the equivalence it concludes is with "value ≤y\le y≤y", which is what is stated.

Preamble
import Mathlib
import Definitions.Def_SchedComplexity_OneMachine_Knapsack
import Definitions.Def_SchedComplexity_Shops_Constructions
Formal statement
namespace SchedComplexity.Shops

/-- Theorem 4(i), Brucker, Lenstra & Rinnooy Kan, Report BW 43/75, p. 16: for positive integers
`a_1, …, a_t`, `b` with `0 < b < A = ∑ a_j`, KNAPSACK has a solution iff the two-machine job shop
`constrI a b` (items on `M_1` with `p_j1 = a_j`; `J_n` with machine order `(M_2, M_1, M_2)` and
times `b, 1, A - b`) has a feasible schedule with `C_max ≤ y = A + 1`. -/
theorem theorem_4i_equivalence (a : List ℕ) (b : ℕ) (ha : ∀ v ∈ a, 0 < v) (hb : 0 < b)
    (hbA : b < a.sum) :
    SchedComplexity.OneMachine.KnapsackYes a b ↔ (constrI a b).HasScheduleLE (yI a) := by sorry

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