Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of Theorem 9.2, Eqs. (5) and (6) — the two agents' total completion times in an SPT schedule

Proved
TwoAgentSched.TotalTotal.eq_5_6

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

p2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1partitionreductionschedulingtwo-agent

Let p1≤⋯≤pkp_1\le\dots\le p_kp1​≤⋯≤pk​ be nonnegative integers, P=∑ipiP=\sum_ip_iP=∑i​pi​, and consider an SPT schedule σ\sigmaσ of the instance of the proof of Theorem 9.2 (agents AAA and BBB each with jobs of lengths p1,…,pkp_1,\dots,p_kp1​,…,pk​; the pairs J[1],…,J[k]J[1],\dots,J[k]J[1],…,J[k] in order). Let x(0,ph)=0x(0,p_h)=0x(0,ph​)=0 if A≺hBA\prec_hBA≺h​B and x(0,ph)=phx(0,p_h)=p_hx(0,ph​)=ph​ if B≺hAB\prec_hAB≺h​A in σ\sigmaσ, and x=∑h=1kx(0,ph)x=\sum_{h=1}^kx(0,p_h)x=∑h=1k​x(0,ph​). Then

∑i=1kCiA(σ)=P+2∑i=1k(k−i)pi+x(5)\sum_{i=1}^kC^A_i(\sigma)=P+2\sum_{i=1}^k(k-i)p_i+x \qquad (5)i=1∑k​CiA​(σ)=P+2i=1∑k​(k−i)pi​+x(5)

and

∑i=1kCiB(σ)=P+2∑i=1k(k−i)pi+(P−x).(6)\sum_{i=1}^kC^B_i(\sigma)=P+2\sum_{i=1}^k(k-i)p_i+(P-x). \qquad (6)i=1∑k​CiB​(σ)=P+2i=1∑k​(k−i)pi​+(P−x).(6)

So in an SPT schedule the split of TTT between the two agents is governed by the single number xxx, the total length of the pairs in which BBB goes first.

Formalization Note The SPT schedule is given by x:Fin k→Boolx:\mathrm{Fin}\,k\to\mathrm{Bool}x:Fink→Bool (true meaning B≺hAB\prec_hAB≺h​A); xxx of the paper is xSum p x. Indices are 0-based, so the weight k−ik-ik−i is k−(i+1)k-(i+1)k−(i+1).

Preamble
import Mathlib
import Definitions.Def_TwoAgentSched_TotalTotal_Construction
Formal statement
namespace TwoAgentSched.TotalTotal

/-- Proof of Theorem 9.2, Eqs. (5) and (6) (Agnetis et al. 2004, p. 237): for integers
`p_1 ≤ ⋯ ≤ p_k` and the SPT schedule given by `x`, with `x = ∑_h x(0, p_h)` the total length of
the pairs in which B precedes A,
`∑ C^A_i = P + 2 ∑_{i=1}^k (k - i) p_i + x` (5) and
`∑ C^B_i = P + 2 ∑_{i=1}^k (k - i) p_i + (P - x)` (6). -/
theorem eq_5_6 {k : ℕ} (p : Fin k → ℕ) (hp : Monotone p) (x : Fin k → Bool) :
    (construction p).sumCA (sptSeq x) =
        (bigP p : ℝ) + 2 * (weightedSum p : ℝ) + (xSum p x : ℝ) ∧
      (construction p).sumCB (sptSeq x) =
        (bigP p : ℝ) + 2 * (weightedSum p : ℝ) + ((bigP p : ℝ) - (xSum p x : ℝ)) := by sorry

end TwoAgentSched.TotalTotal
Source
Agnetis, Mirchandani, Pacciarelli & Pacifici, Scheduling Problems with Two Competing Agents, Oper. Res. 52(2) (2004), p. 237, proof of Theorem 9.2, Eqs. (5) and (6)
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