Before the terminating request there are stale vertices, each covered with probability
ProvedCompetitivePaging.EATR.phase_stale_uniformLet algorithm EATR start with its servers on two distinct vertices , let be a request sequence, and let the requests with indices form a complete EATR phase in which clean vertices are requested. Just before the request to the stale vertex that terminates the phase:
- the number of stale vertices is ;
- every stale vertex is covered by a server of EATR with probability
This is the probabilistic core of the analysis of EATR: it gives the expected cost of the terminating request, the only request of a phase whose cost is random.
import Mathlib import Definitions.Def_KServer_model import Definitions.Def_CompetitivePaging_EATR_eatr open scoped ENNReal
namespace CompetitivePaging.EATR
theorem phase_stale_uniform {M : Type*} [DecidableEq M] (a b : M) (hab : a ≠ b)
(σ : List M) (i i' : ℕ) (hph : IsCompletePhase a b σ i i') :
(stale (bookAfter a b (σ.take (i' - 1)))).card = numClean a b σ i i' + 1 ∧
∀ v ∈ stale (bookAfter a b (σ.take (i' - 1))),
(lawAfter a b (σ.take (i' - 1))).toOuterMeasure {s | v ∈ servers s}
= ((numClean a b σ i i' : ℝ≥0∞) + 1)⁻¹ := by sorry
end CompetitivePaging.EATR
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting.
- is any type with decidable equality. No metric is assumed.
- with .
- is a request list, and are such that form a complete phase (as in the bundle above): request starts a phase, request ends it, , and no request in ends a phase.
Notation.
- is the bookkeeping after the first requests, i.e. just before the phase-ending request.
- is the distribution of EATR's random state at the same moment.
- is the number of indices whose request was clean just before it was served.
Claim. Both of the following hold.
- The stale set has exactly elements.
- For every :
Here is during a phase and otherwise. The probability is the total mass of the states satisfying the condition, and the equation is stated in .
Degenerate cases.
- If has at most two points, no phase can start (every request is in ), so the statement is vacuous.
- , so the reciprocal is never .
- The count runs over and so includes index . That request is stale, i.e. in , so it is not clean and does not contribute.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.