Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 5 and Corollary 2 (pp. 43–44) — the Partition job shop JS has a schedule of finish time ≤5T\le 5T≤5T, preemptive or not, iff a partition exists

Proved
FlowJobShop.PartitionJob.lemma_5_corollary_2

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

job-shopnp-completenessp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1reductionscheduling

Let a1,…,ana_1, \dots, a_na1​,…,an​ be nonnegative integers and T=∑i=1naiT = \sum_{i=1}^n a_iT=∑i=1n​ai​. Let JS\mathrm{JS}JS be the job shop with two processors P1,P2P_1, P_2P1​,P2​ and n+2n+2n+2 jobs in which job i≤ni \le ni≤n has tasks (P2,ai),(P1,ai)(P_2, a_i), (P_1, a_i)(P2​,ai​),(P1​,ai​), job n+1n+1n+1 has tasks (P1,T/2),(P2,T/2),(P1,3T)(P_1, T/2), (P_2, T/2), (P_1, 3T)(P1​,T/2),(P2​,T/2),(P1​,3T), and job n+2n+2n+2 has tasks (P2,3T),(P1,T/2),(P2,T/2)(P_2, 3T), (P_1, T/2), (P_2, T/2)(P2​,3T),(P1​,T/2),(P2​,T/2). Then the following are equivalent:

  1. JS\mathrm{JS}JS has a preemptive schedule with finish time ≤5T\le 5T≤5T;
  2. JS\mathrm{JS}JS has a non-preemptive schedule with finish time ≤5T\le 5T≤5T;
  3. {a1,…,an}\{a_1, \dots, a_n\}{a1​,…,an​} has a partition, ∑i∈uai=T/2\sum_{i \in u} a_i = T/2∑i∈u​ai​=T/2 for some index set uuu.
(1)  ⟺  (3)and(2)  ⟺  (3).(1) \iff (3) \qquad\text{and}\qquad (2) \iff (3).(1)⟺(3)and(2)⟺(3).

The paper states these as Lemma 5, "Partition α\alphaα preemptive JOFT", and Corollary 2, "Partition α\alphaα nonpreemptive JOFT", and summarizes: finding optimal finish time preemptive schedules when m=2m = 2m=2 is NP-complete even when the job mix contains only two jobs with three nonzero tasks. Their proofs establish the two equivalences above for the constructed instance, which is what is formalized.

Formalization Note NP-completeness, the reduction's polynomial running time and Lemma 6 (JOFT is in NP) are not formalized. Schedules are finite sets of pieces (task, start, end) as in the paper's footnote 1, p. 40.

Preamble
import Mathlib
import Definitions.Def_JobShopLTAS_Core_Instance
import Definitions.Def_FlowJobShop_PartitionFlow_Partition
import Definitions.Def_FlowJobShop_PartitionJob_Schedule
import Definitions.Def_FlowJobShop_PartitionJob_JS
Formal statement
namespace FlowJobShop.PartitionJob

open JobShopLTAS.Core

/-- Lemma 5 and Corollary 2 (Gonzalez–Sahni 1978, pp. 43–44): for every PARTITION instance `a`,
the two-processor job shop `JS(a)` (`n` jobs with two tasks, two jobs with three tasks) has a
preemptive schedule with finish time `≤ 5T` iff `a` has a partition, and has a non-preemptive
schedule with finish time `≤ 5T` iff `a` has a partition. -/
theorem lemma_5_corollary_2 {n : ℕ} (a : Fin n → ℕ) :
    ((∃ S : Schedule (JS a), S.IsPreemptive ∧ S.FinishedBy (5 * FlowJobShop.PartitionFlow.T a)) ↔ FlowJobShop.PartitionFlow.HasPartition a) ∧
    ((∃ S : Schedule (JS a), S.IsNonPreemptive ∧ S.FinishedBy (5 * FlowJobShop.PartitionFlow.T a)) ↔ FlowJobShop.PartitionFlow.HasPartition a) := by sorry

end FlowJobShop.PartitionJob
Source
Gonzalez, Sahni, Flowshop and Jobshop Schedules: Complexity and Approximation, Operations Research 26(1) (1978), pp. 43–44, Lemma 5 and Corollary 2
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