Theorem 3 — Algorithm EATR is -competitive for the uniform 2-server problem
ProvedCompetitivePaging.EATR.eatr_competitiveLet be a set of vertices, enumerated as , carrying the uniform metric: any two distinct vertices are at distance . Run algorithm EATR with its two servers initially on the vertices and (the paper's vertices and ), and let be its expected cost on a request sequence . Let be the optimal off-line cost of serving with two servers starting on and . Then there is a constant such that for every request sequence ,
Since every deterministic algorithm , on-line or off-line, pays at least on (up to a constant for another starting position), this is the paper's statement that EATR is -competitive. As , the second harmonic number, and the paper shows that no randomized paging algorithm is better than -competitive, EATR is strongly competitive for two servers.
Formalization Note is KServer.offlineCost from the published KServer model, the infimum of the movement cost over all schedules that serve from the configuration . The constant is quantified before . The uniform metric is a hypothesis on an abstract metric space, not the metric of Fin n.
import Mathlib import Definitions.Def_KServer_model import Definitions.Def_CompetitivePaging_EATR_eatr open scoped ENNReal
namespace CompetitivePaging.EATR
theorem eatr_competitive {n : ℕ} {M : Type*} [MetricSpace M] [DecidableEq M]
(e : Fin n ≃ M) (hn : 2 ≤ n) (hunif : ∀ x y : M, x ≠ y → dist x y = 1) :
∃ c : ℝ, ∀ σ : List M,
eatrExpCost (e ⟨0, by omega⟩) (e ⟨1, hn⟩) σ
≤ (3 / 2 : ℝ) * KServer.offlineCost ![e ⟨0, by omega⟩, e ⟨1, hn⟩] σ + c := by sorry
end CompetitivePaging.EATR
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let be a natural number and a type carrying a metric (a genuine metric space structure) and decidable equality. The statement assumes the following:
- is a bijection, so has exactly points, labelled .
- .
- Uniform metric: for all with , . Since in any metric space, is the discrete metric on .
Write and . Because is injective, these are two distinct points of , at distance from each other.
The conclusion is that there is a single real constant such that, for every finite sequence of points of (any length , repetitions allowed):
The two cost terms are:
- is a real-valued quantity from the imported definition
eatrExpCostin the namespaceCompetitivePaging.EATR. It is applied to the two starting points and and the request sequence . That definition's body is not part of this declaration, so this read-back cannot say what it computes. The name alone does not establish that it is an expected cost or the cost of any particular algorithm. - is the imported
KServer.offlineCost, also not shown here. It is applied to the two-entry configuration with and , and to the same sequence .
The factor on the right is exactly , and the inequality is non-strict ().
The constant is chosen once, after , , the metric, the decidable-equality instance and are fixed, and before . So it may depend on all of those but not on . Nothing constrains further: it is not required to be non-negative, and it may be arbitrarily large. The opened notation for extended non-negative reals is not used in the statement.
Degenerate cases:
- Small : and are excluded by the hypothesis , so always has at least two points. When , , so every request in is one of the two starting points.
- Empty : for the empty sequence, the claim is only . For any single fixed , some large enough would satisfy the inequality. The statement has content only because one must work for all sequences at once, of unbounded length.
- Hypotheses are satisfiable: for every , the discrete metric on an -point set meets all of them, so the statement is not vacuous.
- Totality and junk values: whether either cost can take a default value from a total function (for example division by zero, or an infinite quantity collapsed to a real number) depends on the imported definitions, which are not visible here. The statement asserts nothing about them beyond the inequality above.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.