Section 2, proof of the Theorem — adjacent with can be interchanged
ProvedLawlerMoore.PrecDeadline.adjacent_interchangeConsider jobs on a single machine with processing times and real deadlines . The machine starts at time and processes the jobs of a sequence one after another without idle time, so the completion time of job in a sequence is the total processing time of and the jobs before it. Let be a transitive precedence relation, numbered so that implies , and let be the modified deadlines with and whenever .
Suppose the sequence
lists every job exactly once, is consistent with , and completes every job on time ( for all ), and suppose . Then the sequence obtained by interchanging and is again consistent with and again completes every job on time.
This is the exchange step of the §2 Theorem: a finite number of such interchanges transforms any on-time sequence consistent with into the sequence ordered by increasing .
Formalization Note Sequences are duplicate-free lists of all jobs (MooreLateJobs.Shared.IsSchedule) with completion times MooreLateJobs.Shared.completionTime (start at , no idle time); consistency with is LawlerPrec.MinMax.IsFeasible. The hypothesis is not stated in the paper but is used by its argument (" will remain on time since it will be earlier in the sequence") and is necessary. The paper's " is a small number" is made explicit as above. Jobs are Fin n, 0-based.
import Mathlib import Definitions.Def_MooreLateJobs_Shared_completionTime import Definitions.Def_LawlerPrec_MinMax_IsFeasible import Definitions.Def_LawlerMoore_PrecDeadline_modifiedDeadline
namespace LawlerMoore.PrecDeadline
theorem adjacent_interchange (n : ℕ) (a d : Fin n → ℝ) (ha : ∀ j, 0 ≤ a j)
(ρ : Fin n → Fin n → Prop) [DecidableRel ρ]
(htrans : ∀ i j k, ρ i j → ρ j k → ρ i k)
(hnum : ∀ i j, ρ i j → i ≤ j)
(ε : ℝ) (hε : 0 < ε) (hgap : ∀ k k', d k < d k' → (n : ℝ) * ε < d k' - d k)
(l₁ l₂ : List (Fin n)) (i j : Fin n)
(hfeas : LawlerPrec.MinMax.IsFeasible ρ Finset.univ (l₁ ++ i :: j :: l₂))
(hon : ∀ x, MooreLateJobs.Shared.completionTime a (l₁ ++ i :: j :: l₂) x ≤ d x)
(hlt : modifiedDeadline ρ d ε j < modifiedDeadline ρ d ε i) :
LawlerPrec.MinMax.IsFeasible ρ Finset.univ (l₁ ++ j :: i :: l₂) ∧
∀ x, MooreLateJobs.Shared.completionTime a (l₁ ++ j :: i :: l₂) x ≤ d x := by sorry
end LawlerMoore.PrecDeadline
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.