In a phase the adversary pays at least
ProvedCompetitivePaging.Marking.adversary_phase_cost_ge_halfIn the setting of the two preceding milestones (uniform metric on vertices, , a lazy adversary schedule and a complete phase of the marking algorithm started from ), let be the number of clean vertices requested in the phase, the number of 's servers outside the marking algorithm's servers at the start of the phase, the same quantity at the end of the phase, and the adversary's cost in the phase. Then
Summed over the phases, the and terms telescope, so up to an additive constant the adversary's cost is at least half the total number of clean requests; this is the adversary side of the comparison in Theorem 1.
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's cost `C_A`
satisfies `C_A ≥ max(l - d, d') ≥ (l - d + d')/2`. -/
theorem adversary_phase_cost_ge_half {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') :
max (((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 : ℝ))
((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)) ∧
(((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 : ℝ)
+ ((Finset.univ.filter
(fun j : Fin k => S i' j ∉ marksAt k (initVertices e hkn) σ i')).card : ℝ)) / 2
≤ max (((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 : ℝ))
((Finset.univ.filter
(fun j : Fin k => S i' j ∉ marksAt k (initVertices e hkn) σ i')).card : ℝ) := by sorry
end CompetitivePaging.Marking
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. The hypotheses are the same as in the previous two statements:
- is a metric space with decidable equality in which distinct points are at distance exactly .
- is a bijection and .
- .
- is a request sequence.
- is any lazy schedule on , with unconstrained.
- is a complete phase for the deterministic mark process started from . is the marked set just before request , and is a phase start iff . The phase condition means are phase starts, so , with none strictly between.
Quantities.
- .
- .
- .
- , with imported and not defined here.
Claim. Both of the following hold, in real arithmetic:
The second inequality holds for any real numbers and does not depend on the hypotheses.
Degenerate cases.
- may be negative.
- When , no phase start exists and the whole statement is vacuous.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.