Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 4 — a schedule with makespan at most 3 exists iff the 3-dimensional matching instance has a matching

Proved
UnrelatedSched.TwoTimes.theorem_4

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

makespannp-hardnessp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1reductionschedulingthree-dimensional-matching

Let A={a1,…,an}A=\{a_1,\dots,a_n\}A={a1​,…,an​}, B={b1,…,bn}B=\{b_1,\dots,b_n\}B={b1​,…,bn​}, C={c1,…,cn}C=\{c_1,\dots,c_n\}C={c1​,…,cn​} be disjoint sets and T1,…,TmT_1,\dots,T_mT1​,…,Tm​ triples with one element in each of AAA, BBB, CCC. Consider the scheduling instance on mmm unrelated machines built from them: 3n3n3n element jobs, one per element of A∪B∪CA\cup B\cup CA∪B∪C, and m−nm-nm−n dummy jobs; machine iii processes the element jobs of the three elements of TiT_iTi​ in one time unit each and every other job in three time units. Then

∃ schedule σ with Cmax⁡(σ)≤3  ⟺  the family {T1,…,Tm} contains a matching,\exists\ \text{schedule } \sigma \text{ with } C_{\max}(\sigma)\le 3 \iff \text{the family } \{T_1,\dots,T_m\} \text{ contains a matching},∃ schedule σ with Cmax​(σ)≤3⟺the family {T1​,…,Tm​} contains a matching,

where a schedule assigns every job to one machine, the load of a machine is the sum of the processing times of its jobs, and the makespan Cmax⁡C_{\max}Cmax​ is the largest load.

The paper states Theorem 4 as: deciding whether a schedule with makespan at most 3 exists is NP-complete. Its proof is a reduction from 3-dimensional matching, and the equivalence above is what that proof establishes; it is what is formalized. Theorem 4 is the case {p,q}={1,3}\{p,q\}=\{1,3\}{p,q}={1,3} of the paper's last result, Theorem 7, which recalls it.

Formalization Note NP-completeness, membership in NP and the polynomial size of the reduction are not formalized. The statement holds for all mmm and nnn: when m<nm<nm<n there are no dummy jobs and neither side holds (when n≥1n\ge1n≥1), which stands in for the paper's "trivial 'no' instance".

Preamble
import Mathlib
import Definitions.Def_MatousekLP_Scheduling_Schedule
import Definitions.Def_UnrelatedSched_TwoTimes_Theorem4Instance

open MatousekLP.Scheduling
Formal statement
namespace UnrelatedSched.TwoTimes

/-- Theorem 4 (Lenstra, Shmoys, Tardos, CWI Report OS-R8714 (1987), p. 7), in the form its proof
establishes: for the scheduling instance `thm4Times T` built from a 3-DIMENSIONAL MATCHING
instance `T` (`m` machines, `3n` element jobs, `m - n` dummy jobs, all processing times in
`{1, 3}`), there is a schedule with makespan at most `3` if and only if `T` has a matching.
"NP-complete" is not formalized. -/
theorem theorem_4 {m n : ℕ} (T : Fin m → Fin n × Fin n × Fin n) :
    (∃ σ : Fin (3 * n + (m - n)) → Fin m,
        makespan (fun i j => (thm4Times T i j : ℝ)) σ ≤ 3) ↔
      ∃ F' : Finset (Fin m), IsThreeDimMatching T F' := by sorry

end UnrelatedSched.TwoTimes
Source
Lenstra, Shmoys, Tardos, Approximation algorithms for scheduling unrelated parallel machines, CWI Report OS-R8714 (1987), p. 7, Theorem 4 and its proof
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