Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 1 — binary search with a ρ-relaxed decision procedure is a ρ-approximation algorithm

Proved
UnrelatedSched.TwoApprox.lemma_1

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

approximation-algorithmsbinary-searchp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1scheduling

Let m≥1m\ge 1m≥1 machines and nnn jobs have processing times pijp_{ij}pij​ that are positive integers, and let OPT\mathrm{OPT}OPT be the minimum makespan. Let ρ∈R\rho\in\mathbb Rρ∈R and let DDD be a ρ\rhoρ-relaxed decision procedure for this instance. Then the schedule σD\sigma_DσD​ output by the binary search of Lemma 1 driven by DDD satisfies

makespan⁡(σD)≤ρ⋅OPT.\operatorname{makespan}(\sigma_D)\le\rho\cdot\mathrm{OPT}.makespan(σD​)≤ρ⋅OPT.

The lemma reduces the design of a ρ\rhoρ-approximation algorithm to the design of a ρ\rhoρ-relaxed decision procedure, which only has to answer the decision question approximately for one deadline at a time.

Formalization Note The paper states: "If there is a polynomial ρ\rhoρ-relaxed decision procedure ..., then there is a polynomial ρ\rhoρ-approximation algorithm". Its proof establishes that the binary search outputs a schedule within ρ⋅OPT\rho\cdot\mathrm{OPT}ρ⋅OPT, which is what is formalized; the polynomial running time is not. The procedure is evaluated at natural-number deadlines, which suffices because OPT\mathrm{OPT}OPT is an integer. No hypothesis ρ≥1\rho\ge 1ρ≥1 is needed: when n≥1n\ge 1n≥1 no ρ\rhoρ-relaxed procedure with ρ<1\rho<1ρ<1 exists (it would have to beat the optimum at d=OPTd=\mathrm{OPT}d=OPT), and when n=0n=0n=0 every makespan is 000. OPT\mathrm{OPT}OPT is the makespan of an optimal schedule σopt.

Preamble
import Mathlib
import Definitions.Def_MatousekLP_Scheduling_Schedule
import Definitions.Def_UnrelatedSched_TwoApprox_DeadlineLP
import Definitions.Def_UnrelatedSched_TwoApprox_Algorithm
Formal statement
namespace UnrelatedSched.TwoApprox

open MatousekLP.Scheduling

/-- Lemma 1, p. 5: the binary search driven by a `ρ`-relaxed decision procedure outputs a schedule
of makespan at most `ρ` times the optimum. -/
theorem lemma_1 {m n : ℕ} (hm : 0 < m) (P : Matrix (Fin m) (Fin n) ℕ) (hP : ∀ i j, 0 < P i j)
    (ρ : ℝ) (D : DecisionProcedure m n) (hD : IsRelaxedDecisionProcedure P ρ D)
    (σopt : Fin n → Fin m) (hopt : IsOptimalSchedule (realTimes P) σopt) :
    makespan (realTimes P) (binarySearch P hm D) ≤ ρ * makespan (realTimes P) σopt := by sorry

end UnrelatedSched.TwoApprox
Source
Lenstra, Shmoys, Tardos, Approximation algorithms for scheduling unrelated parallel machines, CWI Report OS-R8714 (1987), p. 5, Lemma 1 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