At the start of every phase the marked vertices are the covered ones
ProvedCompetitivePaging.Marking.phase_start_marked_eq_coveredLet be a set of vertices enumerated as , let , and run the marking algorithm with servers starting from the covered and marked set . Let be a request sequence and let request start a phase, i.e. the marked set after the first requests satisfies .
Then for every state that the algorithm reaches with positive probability after the first requests,
In words: at the start of every phase the marked vertices are precisely the ones occupied by the algorithm's servers, and the first request of every phase is to an unmarked vertex. This is the structural fact that makes the phase analysis of Theorem 1 possible: at every phase boundary the random configuration of the marking algorithm is in fact determined by the request sequence.
import Mathlib import Definitions.Def_KServer_model import Definitions.Def_CompetitivePaging_Marking_markingAlgorithm
namespace CompetitivePaging.Marking
/-- §3, proof of Theorem 1 (p. 4): at the start of every phase the marked vertices are
precisely the ones occupied by the marking algorithm's servers, and the first request of the
phase is to an unmarked vertex. -/
theorem phase_start_marked_eq_covered {n k : ℕ} {M : Type*} [DecidableEq M]
(e : Fin n ≃ M) (hk : 1 ≤ k) (hkn : k ≤ n) (σ : List M) (t : ℕ) (ht : t < σ.length)
(hstart : IsPhaseStart k (initVertices e hkn) σ t) :
∀ s ∈ (lawAfter k (initVertices e hkn) (σ.take t)).support,
s.marked = s.covered ∧ σ.get ⟨t, ht⟩ ∉ s.marked := by sorry
end CompetitivePaging.Marking
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting.
- are natural numbers with .
- is a type with decidable equality, and is a bijection, so has exactly elements.
- .
- is a finite sequence of points of , and .
- is a phase start: , where is obtained from by applying the mark update ("insert ; if the result has exactly elements, replace it by ") to .
Claim. Consider the randomized marking process that starts from the state (covered, marked) and serves . At each step:
- marks are updated;
- a covered request moves nothing;
- an uncovered request replaces a uniformly random element of (covered new marks) by , or changes nothing if that set is empty.
Then every state with positive probability after these requests satisfies
Degenerate cases.
- At , the only state is . The phase-start hypothesis says , i.e. .
- The hypothesis repeats what the phase-start hypothesis already contains.
- When , no index can be a phase start, since has only elements. The statement is then vacuous.
- and are excluded by .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.