Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 5.4 — if no B-job can end last, every optimal schedule ends with a longest A-job

Proved
TwoAgentSched.TotalMax.lemma_5_4

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

interchange-argumentp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1schedulingtwo-agent

Consider the problem 1∥∑CiA:fmax⁡B≤Q1\|\sum C^A_i : f^B_{\max}\le Q1∥∑CiA​:fmaxB​≤Q (positive processing times, nondecreasing fkBf^B_kfkB​, feasibility fkB(CkB)≤Qf^B_k(C^B_k)\le QfkB​(CkB​)≤Q for all kkk), with at least one AAA-job. Assume the instance is feasible, and let τ=PA+PB\tau=P_A+P_Bτ=PA​+PB​ be the total processing time. If

fkB(τ)>Qfor every B-job JkB,f^B_k(\tau)>Q\quad\text{for every } B\text{-job } J^B_k,fkB​(τ)>Qfor every B-job JkB​,

then in every optimal schedule the last job is a longest AAA-job: an AAA-job JhAJ^A_hJhA​ with ph′A≤phAp^A_{h'}\le p^A_hph′A​≤phA​ for all h′h'h′.

This lemma justifies the second branch of the algorithm of Figure 1. When several AAA-jobs have the maximum length, the lemma does not say which of them is last.

Formalization Note The hypothesis nA≥1n_A\ge 1nA​≥1 excludes the instance with no jobs at all, whose empty schedule is feasible and has no last job; the paper's "a longest AAA-job" presupposes AAA-jobs.

Preamble
import Mathlib
import Definitions.Def_TwoAgentSched_TotalMax_Model
Formal statement
namespace TwoAgentSched.TotalMax

/-- Lemma 5.4 (Agnetis et al. 2004, §5.2, p. 234). Consider a feasible instance of
`1‖ΣC^A_i : f^B_max ≤ Q` with at least one A-job, and let `τ = P_A + P_B`. If every B-job has
`f^B_k(τ) > Q`, then in every optimal schedule the last job is a longest A-job: an A-job `h`
with `p^A_{h'} ≤ p^A_h` for every A-job `h'`. -/
theorem lemma_5_4 {nA nB : ℕ} (hA : 0 < nA) (p : TwoAgentSched.MaxMax.Job nA nB → ℝ) (hp : ∀ j, 0 < p j)
    (fB : Fin nB → ℝ → ℝ) (hfB : ∀ k, Monotone (fB k)) (Q : ℝ)
    (hfeas : IsFeasibleInstance p fB Q)
    (hall : ∀ k : Fin nB,
      Q < fB k (∑ h : Fin nA, p (Sum.inl h) + ∑ k : Fin nB, p (Sum.inr k))) :
    ∀ l : List (TwoAgentSched.MaxMax.Job nA nB), IsOptimal p fB Q l →
      ∃ h : Fin nA, l.getLast? = some (Sum.inl h) ∧
        ∀ h' : Fin nA, p (Sum.inl h') ≤ p (Sum.inl h) := by sorry

end TwoAgentSched.TotalMax
Source
Agnetis, Mirchandani, Pacciarelli & Pacifici, Scheduling Problems with Two Competing Agents, Oper. Res. 52(2) (2004), p. 234, Lemma 5.4
Human review
  • Endorsed by Shuze Chen · Oct 8, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 8, 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