Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 4(d), inequalities (2) and (3) — the ppp-weighted tail sum

Proved
SchedComplexity.Tardiness.ineq_2_3

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

np-completenessp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1schedulingweighted-tardiness

Let a1,…,ata_1,\dots,a_ta1​,…,at​ be positive integers and bbb an integer with 0<b<A0<b<A0<b<A, where A=∑j=1tajA=\sum_{j=1}^t a_jA=∑j=1t​aj​ and a∗=max⁡jaja_*=\max_j a_ja∗​=maxj​aj​ (the paper's standing assumption "we may assume that 0<b<A0<b<A0<b<A", p. 16). Put

t′=⌈12(t+1)(A−b)+12 t(t+1)a∗2⌉,t'=\Big\lceil \tfrac12(t+1)(A-b)+\tfrac12\,t(t+1)a_*^2\Big\rceil ,t′=⌈21​(t+1)(A−b)+21​t(t+1)a∗2​⌉,

let τ\tauτ be any integer with τ>2t′+A\tau>2t'+Aτ>2t′+A, and consider the single-machine instance of Theorem 4(d) with n=t+t′n=t+t'n=t+t′ jobs: for j∈T={1,…,t}j\in T=\{1,\dots,t\}j∈T={1,…,t}, pj=τ+ajp_j=\tau+a_jpj​=τ+aj​, wj=τ+aj+1w_j=\tau+a_j+1wj​=τ+aj​+1, dj=tτ+bd_j=t\tau+bdj​=tτ+b; for the t′t't′ dummy jobs j∉Tj\notin Tj∈/T, pj=τp_j=\taupj​=τ, wj=τ+1w_j=\tau+1wj​=τ+1, dj=tτ+bd_j=t\tau+bdj​=tτ+b. Setting aj=0a_j=0aj​=0 for j∉Tj\notin Tj∈/T, every job has pj=τ+ajp_j=\tau+a_jpj​=τ+aj​ and wj=pj+1w_j=p_j+1wj​=pj​+1. The threshold is

y=12 t′(t′+1)τ(τ+1)+(t′+1)τ(A−b)+t′.y=\tfrac12\,t'(t'+1)\tau(\tau+1)+(t'+1)\tau(A-b)+t'.y=21​t′(t′+1)τ(τ+1)+(t′+1)τ(A−b)+t′.

For a processing order π=(π(1),…,π(n))\pi=(\pi(1),\dots,\pi(n))π=(π(1),…,π(n)) the jobs are processed without idle time from time 000, so the job in position jjj completes at Cπ(j)=∑i≤jpπ(i)C_{\pi(j)}=\sum_{i\le j}p_{\pi(i)}Cπ(j)​=∑i≤j​pπ(i)​, and

cπ=Cπ(t)−(tτ+b).c_\pi=C_{\pi(t)}-(t\tau+b).cπ​=Cπ(t)​−(tτ+b).

Then for every processing order π\piπ,

∑j>tpπ(j)(Cπ(j)−Cπ(t))=∑t<j≤k≤n(τ+aπ(j))(τ+aπ(k))=12 t′(t′+1)τ2+(t′+1)τ(A−b−cπ)+∑t<j≤k≤naπ(j)aπ(k)(2)\sum_{j>t}p_{\pi(j)}\big(C_{\pi(j)}-C_{\pi(t)}\big)=\sum_{t<j\le k\le n}(\tau+a_{\pi(j)})(\tau+a_{\pi(k)})=\tfrac12\,t'(t'+1)\tau^2+(t'+1)\tau(A-b-c_\pi)+\sum_{t<j\le k\le n}a_{\pi(j)}a_{\pi(k)}\qquad(2)j>t∑​pπ(j)​(Cπ(j)​−Cπ(t)​)=t<j≤k≤n∑​(τ+aπ(j)​)(τ+aπ(k)​)=21​t′(t′+1)τ2+(t′+1)τ(A−b−cπ​)+t<j≤k≤n∑​aπ(j)​aπ(k)​(2)

and the last term satisfies

0≤∑t<j≤k≤naπ(j)aπ(k)≤12 t(t+1)a∗2.(3)0\le\sum_{t<j\le k\le n}a_{\pi(j)}a_{\pi(k)}\le\tfrac12\,t(t+1)a_*^2.\qquad(3)0≤t<j≤k≤n∑​aπ(j)​aπ(k)​≤21​t(t+1)a∗2​.(3)

Here j,kj,kj,k are positions. Identity (2) evaluates the first term of the splitting (1) of the weighted tail sum, and (3) bounds its only order-dependent part.

Formalization Note The paper prints t′=12(t+1)(A−b)+12t(t+1)a∗2t'=\tfrac12(t+1)(A-b)+\tfrac12t(t+1)a_*^2t′=21​(t+1)(A−b)+21​t(t+1)a∗2​, which is a half-integer when (t+1)(A−b)(t+1)(A-b)(t+1)(A−b) is odd although t′t't′ counts jobs; the Lean takes its ceiling (tPrime), and yyy (yThr, an exact natural-number division since t′(t′+1)t'(t'+1)t′(t′+1) is even) is computed from the same t′t't′. Jobs are Fin (t + t'), the items of TTT being the indices 0,…,t−10,\dots,t-10,…,t−1 (aExt is the convention aj=0a_j=0aj​=0 for j∉Tj\notin Tj∈/T). Positions are 0-based in Lean: π i is the paper's π(i+1)\pi(i+1)π(i+1), and posCompletion p π k is the paper's Cπ(k)C_{\pi(k)}Cπ(k)​ for the 1-based position kkk (the total processing time of the first kkk positions). Sums ∑j>t\sum_{j>t}∑j>t​ run over the 0-based positions i≥ti\ge ti≥t (tailWeighted). τ\tauτ is quantified over all naturals with τ>2t′+A\tau>2t'+Aτ>2t′+A, as in the paper.

Preamble
import Mathlib
import Definitions.Def_SchedComplexity_Tardiness_Construction
Formal statement
namespace SchedComplexity.Tardiness

/-- Inequalities (2) and (3) of the proof of Theorem 4(d), p. 20: for every processing order `π`,
`Σ_{j>t} p_π(j)(C_π(j) − C_π(t)) = Σ_{t<j≤k≤n} (τ + a_π(j))(τ + a_π(k))
  = ½t'(t'+1)τ² + (t'+1)τ(A − b − c_π) + Σ_{t<j≤k≤n} a_π(j) a_π(k)`, and
`0 ≤ Σ_{t<j≤k≤n} a_π(j) a_π(k) ≤ ½t(t+1)a_*²`. -/
theorem ineq_2_3 {t : ℕ} (a : Fin t → ℕ) (b τ : ℕ)
    (ha : ∀ j, 0 < a j) (hb : 0 < b) (hbA : b < bigA a)
    (hτ : 2 * tPrime a b + bigA a < τ)
    (π : Equiv.Perm (Fin (t + tPrime a b))) :
    tailWeighted (wtP a b τ) (wtP a b τ) π t =
        ∑ i ∈ Finset.univ.filter (fun i : Fin (t + tPrime a b) => t ≤ i.val),
          ∑ k ∈ Finset.univ.filter (fun k : Fin (t + tPrime a b) => i ≤ k),
            (wtP a b τ (π i) : ℤ) * wtP a b τ (π k) ∧
    (tailWeighted (wtP a b τ) (wtP a b τ) π t : ℝ) =
        (1 / 2 : ℝ) * tPrime a b * (tPrime a b + 1) * (τ : ℝ) ^ 2
          + (tPrime a b + 1) * (τ : ℝ) * ((bigA a : ℝ) - b - cPi a b τ π)
          + aPairSum a b π ∧
    0 ≤ aPairSum a b π ∧
    (aPairSum a b π : ℝ) ≤ (1 / 2 : ℝ) * t * (t + 1) * (aStar a : ℝ) ^ 2 := by sorry

end SchedComplexity.Tardiness
Source
Brucker, Lenstra & Rinnooy Kan, Complexity of Machine Scheduling Problems, Mathematisch Centrum Report BW 43/75 (1975), p. 20, proof of Theorem 4(d), (2) and (3)
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