Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Eq. (3) — f(j, t) is the maximum weight of a prefix-feasible on-time set of the first j jobs within time t

Proved
LawlerMoore.WeightedTardy.eq3_value

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

dynamic-programmingknapsackp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1

Let nnn jobs have nonnegative integer processing times aj′a'_jaj′​, nonnegative integer deadlines djd_jdj​ and real weights pjp_jpj​ (no sign condition, no ordering of the deadlines), and let fff be defined by Equation (3) with the base cases 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 for every j∈{0,1,…,n}j \in \{0, 1, \dots, n\}j∈{0,1,…,n} and every integer t≥0t \ge 0t≥0, f(j,t)f(j, t)f(j,t) is a real number and

f(j,t)=max⁡{∑i=1jpixi  :  x∈{0,1}j,  ∑i=1kai′xi≤dk (k=1,…,j),  ∑i=1jai′xi≤t},f(j, t) = \max\Bigl\{ \sum_{i=1}^{j} p_i x_i \;:\; x \in \{0,1\}^j,\ \ \sum_{i=1}^{k} a'_i x_i \le d_k \ (k = 1, \dots, j),\ \ \sum_{i=1}^{j} a'_i x_i \le t \Bigr\},f(j,t)=max{i=1∑j​pi​xi​:x∈{0,1}j,  i=1∑k​ai′​xi​≤dk​ (k=1,…,j),  i=1∑j​ai′​xi​≤t},

the maximum being attained.

In particular f(n,dn)f(n, d_n)f(n,dn​) is the optimal value of the prefix-constrained knapsack problem of Section 6, which is how the paper solves that problem by (3).

Formalization Note Vectors are x : Fin n → Bool with xi=0x_i = 0xi​=0 for the jobs i>ji > ji>j; the set of values is stated with IsGreatest, and f(j,t)f(j,t)f(j,t) equals the coercion of its greatest element into WithBot ℝ. The statement covers every t≥0t \ge 0t≥0, not only t≤djt \le d_jt≤dj​ (for t>djt > d_jt>dj​ both sides are unchanged by the cap). It holds for weights of any sign and without the deadline ordering.

Preamble
import Mathlib
import Definitions.Def_LawlerMoore_WeightedTardy_PrefixFeasible
import Definitions.Def_LawlerMoore_WeightedTardy_eq3
Formal statement
namespace LawlerMoore.WeightedTardy

/-- Eq. (3) (§6, p. 80): for `j ≤ n` and every time `t ≥ 0`, `f(j, t)` is finite and equals the
maximum of `∑ p_i x_i` over the 0–1 vectors `x` that use only the first `j` jobs, satisfy the
prefix constraints `a'_1 x_1 + ⋯ + a'_k x_k ≤ d_k` for `k = 1, …, j`, and have
`a'_1 x_1 + ⋯ + a'_j x_j ≤ t`. -/
theorem eq3_value {n : ℕ} (a' d : Fin n → ℕ) (p : Fin n → ℝ) (j : ℕ) (hj : j ≤ n) (t : ℕ) :
    ∃ V : ℝ, eq3 a' d p j (t : ℤ) = (V : WithBot ℝ) ∧
      IsGreatest
        {v : ℝ | ∃ x : Fin n → Bool,
          (∀ i : Fin n, j ≤ i.val → x i = false) ∧
          (∀ k : Fin n, k.val < j →
            ∑ i ∈ Finset.univ.filter (fun i => i ≤ k), a' i * (x i).toNat ≤ d k) ∧
          ∑ i, a' i * (x i).toNat ≤ t ∧
          v = knapValue p x}
        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), p. 80, 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