Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 4(g) — KNAPSACK has a solution iff the flow shop with release date r_n = tb has C_max ≤ t(A + 1)

Proved
SchedComplexity.Shops.theorem_4g_equivalence

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

flow-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 flow shop (every job visits M1M_1M1​, then M2M_2M2​) with n=t+1n=t+1n=t+1 jobs: item job JjJ_jJj​ (j∈Tj\in Tj∈T) has release date 000 and processing times pj1=tajp_{j1}=ta_jpj1​=taj​, pj2=1p_{j2}=1pj2​=1; JnJ_nJn​ has release date rn=tbr_n=tbrn​=tb and processing times pn1=1p_{n1}=1pn1​=1, pn2=t(A−b)p_{n2}=t(A-b)pn2​=t(A−b). Then

∃ S⊆T: ∑j∈Saj=b⟺the instance has a feasible schedule with Cmax⁡≤t(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 t(A+1).∃S⊆T: j∈S∑​aj​=b⟺the instance has a feasible schedule with Cmax​≤t(A+1).

This is the equivalence in the proof of Theorem 4(g), which shows that KNAPSACK reduces to n∣2∣F,rn≥0∣Cmax⁡n|2|F,r_n{\ge}0|C_{\max}n∣2∣F,rn​≥0∣Cmax​.

Formalization Note The report prints the two directions and leaves the concluding "if and only if" implicit, as in reductions (i) and (j); the theorem states it. The assumption 0<b<A0<b<A0<b<A and the positivity of the data are hypotheses.

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

/-- Theorem 4(g), Brucker, Lenstra & Rinnooy Kan, Report BW 43/75, p. 18: for positive integers
`a_1, …, a_t`, `b` with `0 < b < A = ∑ a_j`, KNAPSACK has a solution iff the two-machine flow shop
`constrG a b` (items with `r_j = 0`, `p_j1 = t a_j`, `p_j2 = 1`; `J_n` with `r_n = t b`,
`p_n1 = 1`, `p_n2 = t(A - b)`) has a feasible schedule with `C_max ≤ y = t(A + 1)`. -/
theorem theorem_4g_equivalence (a : List ℕ) (b : ℕ) (ha : ∀ v ∈ a, 0 < v) (hb : 0 < b)
    (hbA : b < a.sum) :
    SchedComplexity.OneMachine.KnapsackYes a b ↔ (constrG a b).HasScheduleLE (yG a) := by sorry

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