Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Sections 5–6 and Eq. (3) — the minimum weighted number of tardy jobs is Σ p_j − f(n, d_n)

Proved
LawlerMoore.WeightedTardy.min_weighted_tardy_eq

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

dynamic-programmingp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1schedulingweighted-tardy-jobs

Let n≥1n \ge 1n≥1 jobs be processed one at a time by a single machine. Job jjj has a nonnegative integer processing time aj′a'_jaj′​, a nonnegative integer deadline djd_jdj​ and a penalty pj≥0p_j \ge 0pj​≥0, paid if the job completes after its deadline; the jobs are numbered so that

d1≤d2≤⋯≤dn.d_1 \le d_2 \le \cdots \le d_n .d1​≤d2​≤⋯≤dn​.

Let fff be defined by Equation (3), f(j,t)=max⁡{f(j,t−1),f(j−1,t),pj+f(j−1,t−aj′)}f(j,t) = \max\{f(j, t-1), f(j-1, t), p_j + f(j-1, t-a'_j)\}f(j,t)=max{f(j,t−1),f(j−1,t),pj​+f(j−1,t−aj′​)} for t≤djt \le d_jt≤dj​ and f(j,t)=f(j,dj)f(j, t) = f(j, d_j)f(j,t)=f(j,dj​) for t>djt > d_jt>dj​, with f(0,t)=0f(0, t) = 0f(0,t)=0 for t≥0t \ge 0t≥0 and f(j,t)=−∞f(j, t) = -\inftyf(j,t)=−∞ for t<0t < 0t<0. Then f(n,dn)f(n, d_n)f(n,dn​) is a real number and

min⁡σ∑j tardy in σpj  =  ∑j=1npj−f(n,dn),\min_{\sigma} \sum_{j \text{ tardy in } \sigma} p_j \;=\; \sum_{j=1}^n p_j - f(n, d_n),σmin​j tardy in σ∑​pj​=j=1∑n​pj​−f(n,dn​),

the minimum being taken over all sequences σ\sigmaσ of the jobs (and attained).

This is the paper's solution of the problem of minimizing the weighted number of tardy jobs on one machine: order the jobs by deadline and evaluate Equation (3).

Formalization Note The paper says "the problem is solved by" (1), equivalently (3), without naming the argument at which fff is read; the evaluation point (n,dn)(n, d_n)(n,dn​) is made explicit (f(n,t)=f(n,dn)f(n, t) = f(n, d_n)f(n,t)=f(n,dn​) for all t≥dnt \ge d_nt≥dn​ by the cap). n≥1n \ge 1n≥1 is assumed only so that dnd_ndn​ exists. Processing times and deadlines are natural numbers (as the unit steps of (3) require), penalties are real and nonnegative, and the deadline numbering is Monotone d on the job index. Sequences are schedules in the published list model (IsSchedule, completionTime, lateSet); "minimum" is IsLeast over the set of values of all schedules. The base cases of (3) are those of (1) with −∞-\infty−∞ for a maximum.

Preamble
import Mathlib
import Definitions.Def_MooreLateJobs_Shared_completionTime
import Definitions.Def_MooreLateJobs_NumLate_lateSet
import Definitions.Def_LawlerMoore_WeightedTardy_weightedTardy
import Definitions.Def_LawlerMoore_WeightedTardy_eq3
Formal statement
namespace LawlerMoore.WeightedTardy

open MooreLateJobs.Shared

/-- §§5–6 and Eq. (3) (pp. 79–80): with the jobs numbered by deadline (`d` monotone) and
penalties `p j ≥ 0`, the value `f(n, d_n)` of Equation (3) is finite, `f(n, d_n) = V`, and the
minimum over all sequences of the weighted number of tardy jobs is `∑_j p_j - V`. -/
theorem min_weighted_tardy_eq {n : ℕ} (hn : 0 < n) (a' d : Fin n → ℕ) (p : Fin n → ℝ)
    (hp : ∀ j, 0 ≤ p j) (hd : Monotone d) :
    ∃ V : ℝ, eq3 a' d p n (d ⟨n - 1, by omega⟩ : ℤ) = (V : WithBot ℝ) ∧
      IsLeast {w : ℝ | ∃ l : List (Fin n), IsSchedule Finset.univ l ∧ w = weightedTardy a' d p l}
        ((∑ j, p j) - V) := by sorry

end LawlerMoore.WeightedTardy
Source
Lawler, Moore, A Functional Equation and Its Application to Resource Allocation and Sequencing Problems, Management Sci. 16 (1969), pp. 79–80, Sections 5–6 and Eq. (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