Lemma 2.1 — when
ProvedMetricalTaskSystem.Deterministic.ratioLimsup_le_of_competitiveLet be a task system, an on-line algorithm, an initial state, and an infinite sequence of nonnegative tasks such that the off-line costs tend to as . Then every for which is -competitive satisfies
Equivalently, .
This lemma turns the analysis of a single adversarial infinite sequence into a lower bound on the competitive ratio of .
Formalization Note The limsup is in EReal; the statement is phrased for each , which is equivalent to the paper's with .
import Mathlib import Definitions.Def_MetricalTaskSystem_Deterministic_Model import Definitions.Def_MetricalTaskSystem_Deterministic_CruelTaskmaster
namespace MetricalTaskSystem.Deterministic
/-- **Lemma 2.1** (Borodin–Linial–Saks 1992, p. 749). If `T` is an infinite (nonnegative) task
sequence whose off-line costs `c₀(T¹ ⋯ Tᵐ)` tend to infinity, then `w_T(A) ≤ w` for every
`w ∈ W_A`; that is, `w(A) = inf W_A ≥ w_T(A)`. -/
theorem ratioLimsup_le_of_competitive {S : Type} [Fintype S] [DecidableEq S] [Nonempty S]
(d : S → S → ℝ) (hd : IsTaskSystem d) (A : OnlineAlgorithm S) (s₀ : S)
(T : ℕ → S → ℝ) (hT : ∀ i s, 0 ≤ T i s)
(hT_inf : Filter.Tendsto (fun m : ℕ => offlineOpt d s₀ (prefixSeq T m))
Filter.atTop Filter.atTop)
(w : ℝ) (hw : IsCompetitive d A w) :
ratioLimsup d A s₀ T ≤ (w : EReal) := by sorry
end MetricalTaskSystem.Deterministic
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. Let be a finite, nonempty set of states, and let be a task system on :
- ;
- for ;
- .
Let be an arbitrary on-line algorithm, i.e. any function mapping to a state. Fix and an infinite task sequence with for all .
Costs. For a prefix , let .
- The off-line cost is the minimum of over all with .
- The on-line cost is , with and .
Hypotheses.
- as .
- is a real number and is -competitive: , and there is a real such that for every initial state, every length, and every finite nonnegative task sequence .
Conclusion. In the extended reals,
Each quotient is the real quotient, with .
Degenerate cases.
- Hypothesis 1 forces for all large . Only finitely many prefixes can have (for instance , where the quotient is and is read as ), and these do not affect the limsup.
- with one element. Hypothesis 1 says .
- No competitive algorithm. If is not -competitive for a given , nothing is asserted for that .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.