In a phase the adversary pays at least
ProvedCompetitivePaging.Marking.adversary_cost_ge_clean_sub_dLet be a set of vertices with the uniform metric (distinct vertices at distance ), enumerated as , let , and consider the phases of the marking algorithm started from on a request sequence . Let be a lazy schedule of servers on (the adversary ; its starting configuration is arbitrary), and let requests form a complete phase. Write for the marked set just before the phase (the vertices occupied by the marking algorithm's servers at the start of the phase) and for the set of vertices requested in the phase. Put
- , the number of requests to clean vertices in the phase;
- = the number of servers of with , i.e. the number of 's servers that do not coincide with any of the marking algorithm's servers at the beginning of the phase;
- , the cost incurred by in the phase.
Then
This is the first of the two lower bounds on the adversary's cost in a phase used in the proof of Theorem 1.
Formalization Note. The marking algorithm's servers at the start of a phase are identified with the (deterministic) marked set there; the preceding milestone shows that the two coincide with probability one. For the first phase the "previous phase" is the initial configuration .
import Mathlib import Definitions.Def_KServer_model import Definitions.Def_CompetitivePaging_Marking_markingAlgorithm
namespace CompetitivePaging.Marking
/-- §3, proof of Theorem 1 (p. 4): in a complete phase, a lazy adversary `A` pays at least
`l - d`, where `l` is the number of clean vertices requested in the phase and `d` is the
number of `A`'s servers outside the marking algorithm's servers (= the marked set) at the
start of the phase. -/
theorem adversary_cost_ge_clean_sub_d {n k : ℕ} {M : Type*} [MetricSpace M] [DecidableEq M]
(e : Fin n ≃ M) (hdist : ∀ x y : M, x ≠ y → dist x y = 1) (hk : 1 ≤ k) (hkn : k ≤ n)
(σ : List M) (S : ℕ → KServer.Config k M) (hlazy : IsLazySchedule σ S) (i i' : ℕ)
(hphase : IsCompletePhase k (initVertices e hkn) σ i i') :
((phaseRequested σ i i' \ marksAt k (initVertices e hkn) σ i).card : ℝ)
- ((Finset.univ.filter
(fun j : Fin k => S i j ∉ marksAt k (initVertices e hkn) σ i)).card : ℝ)
≤ ∑ t ∈ Finset.Ico i i', KServer.moveCost (S t) (S (t + 1)) := by sorry
end CompetitivePaging.Marking
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting.
- is a metric space with decidable equality in which any two distinct points are at distance exactly .
- is a bijection and .
- .
- is a request sequence.
- is any lazy schedule on , with read as the configuration just before request . For each : if some server is on nothing changes; otherwise exactly one server index is reassigned to . is arbitrary.
- is a complete phase for the mark process started from : are both phase starts, so , and no index strictly between them is one. An index is a phase start if , where is the marked set just before request (the deterministic mark update applied to starting from ).
Quantities.
- is the number of distinct points requested at indices that were not marked just before request . Note that is taken before the reset triggered at .
- counts server indices, not points. Several servers on the same point are counted separately.
Claim. In real arithmetic,
where comes from the imported k-server model and its definition is not shown here.
Degenerate cases.
- may be negative, and then the claim only asks the sum to exceed a negative number.
- When , there are no phase starts and the statement is vacuous.
- The schedule is not required to start at any particular configuration.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.