Theorem 4(d), proof p. 20 — KNAPSACK ⇔ some order has ;
ProvedSchedComplexity.Tardiness.knapsack_iff_splitLet be positive integers and an integer with , where and (the paper's standing assumption "we may assume that ", p. 16). Put
let be any integer with , and consider the single-machine instance of Theorem 4(d) with jobs: for , , , ; for the dummy jobs , , , . Setting for , every job has and . The threshold is
For a processing order the jobs are processed without idle time from time , so the job in position completes at , and
Then KNAPSACK has a solution, i.e. for some , if and only if there is a processing order with
and every processing order satisfies .
This translates the KNAPSACK question into a statement about the completion time of the -th job; the paper says "it is easily seen".
Formalization Note The paper prints , which is a half-integer when is odd although counts jobs; the Lean takes its ceiling (tPrime), and (yThr, an exact natural-number division since is even) is computed from the same . Jobs are Fin (t + t'), the items of being the indices (aExt is the convention for ). Positions are 0-based in Lean: π i is the paper's , and posCompletion p π k is the paper's for the 1-based position (the total processing time of the first positions). Sums run over the 0-based positions (tailWeighted). is quantified over all naturals with , as in the paper.
import Mathlib import Definitions.Def_SchedComplexity_Tardiness_Construction import Definitions.Def_SchedComplexity_Tardiness_Knapsack
namespace SchedComplexity.Tardiness
/-- Proof of Theorem 4(d), p. 20: KNAPSACK has a solution iff some processing order `π` of the
constructed jobs has `C_π(t) = tτ + b`; and `−b ≤ c_π ≤ A − b` for every order `π`. -/
theorem knapsack_iff_split {t : ℕ} (a : Fin t → ℕ) (b τ : ℕ)
(ha : ∀ j, 0 < a j) (hb : 0 < b) (hbA : b < bigA a)
(hτ : 2 * tPrime a b + bigA a < τ) :
(KnapsackYes a b ↔
∃ π : Equiv.Perm (Fin (t + tPrime a b)), posCompletion (wtP a b τ) π t = t * τ + b) ∧
∀ π : Equiv.Perm (Fin (t + tPrime a b)),
-(b : ℤ) ≤ cPi a b τ π ∧ cPi a b τ π ≤ (bigA a : ℤ) - b := by sorry
end SchedComplexity.Tardiness
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.