Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Corollary 5: no randomized paging algorithm with kkk servers is ccc-competitive for c<Hkc < H_kc<Hk​

Proved
CompetitivePaging.LowerBound.no_competitive_below_harmonic

by mikedeng1 · Sep 27, 2026 · Mathlib 0df444a (Lean v4.33.1)

competitive-analysislower-boundonline-algorithmsp2o-batch-p100bp2o-gran-per-chapterp2o-plan-paperp2o-v1pagingrandomized-algorithms

Let 1≤k≤n−11\le k\le n-11≤k≤n−1 and let MMM be a set of nnn vertices with the uniform metric: any two distinct vertices are at distance 111. Consider the uniform kkk-server problem on MMM, that is, paging with a cache of kkk pages out of nnn. Let Hk=1+12+⋯+1kH_k=1+\tfrac12+\dots+\tfrac1kHk​=1+21​+⋯+k1​ be the kkk-th harmonic number.

For every randomized on-line algorithm AAA with kkk servers on MMM, every initial configuration C0C_0C0​ and every real c<Hkc<H_kc<Hk​, the algorithm AAA is not ccc-competitive from C0C_0C0​: there is no constant aaa such that for every request sequence σ\sigmaσ

CA(σ) ≤ c⋅OPTC0(σ)+a,C_A(\sigma)\ \le\ c\cdot \mathrm{OPT}_{C_0}(\sigma)+a ,CA​(σ) ≤ c⋅OPTC0​​(σ)+a,

where CA(σ)C_A(\sigma)CA​(σ) is the expected cost of AAA on σ\sigmaσ against an oblivious adversary and OPTC0(σ)\mathrm{OPT}_{C_0}(\sigma)OPTC0​​(σ) is the optimal off-line cost of serving σ\sigmaσ from C0C_0C0​.

This is the lower bound matching, up to the factor 222, the 2Hk2H_k2Hk​ upper bound for the marking algorithm, and exactly for k=n−1k=n-1k=n−1.

Formalization Note Randomized algorithms and competitiveness are the published KServer.RandomizedAlgorithm and IsCompetitiveFrom (every drawn deterministic algorithm starts at C0C_0C0​; the right-hand side is clamped at 000 by ENNReal.ofReal, which only weakens the property being refuted). No laziness or injectivity is assumed of AAA or C0C_0C0​. The uniform metric is a hypothesis on an abstract space MMM with nnn points; HkH_kHk​ is Mathlib's harmonic k cast to R\mathbb RR.

Preamble
import Mathlib
import Definitions.Def_KServer_model
import Definitions.Def_KServer_randomized
Formal statement
namespace CompetitivePaging.LowerBound

theorem no_competitive_below_harmonic (n k : ℕ) (hk : 1 ≤ k) (hkn : k + 1 ≤ n) (M : Type)
    [MetricSpace M] (e : Fin n ≃ M) (hd : ∀ x y : M, x ≠ y → dist x y = 1)
    (A : KServer.RandomizedAlgorithm k M) (C₀ : KServer.Config k M) (c : ℝ)
    (hc : c < (harmonic k : ℝ)) :
    ¬ A.IsCompetitiveFrom C₀ c := by sorry

end CompetitivePaging.LowerBound
Source
Fiat, Karp, Luby, McGeoch, Sleator, Young, Competitive Paging Algorithms, arXiv:cs/0205038v1, p. 8, Corollary 5
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

The statement concerns a metric space MMM, together with two natural numbers nnn and kkk subject to

1≤k,k+1≤n.1 \le k, \qquad k + 1 \le n .1≤k,k+1≤n.

Two hypotheses fix the shape of MMM:

  • Size. eee is a bijection from {0,1,…,n−1}\{0, 1, \dots, n-1\}{0,1,…,n−1} onto MMM, so MMM has exactly nnn points. MMM is an ordinary type, and eee is not used anywhere else in the statement.
  • Distances. Every pair of distinct points x≠yx \ne yx=y in MMM satisfies d(x,y)=1d(x,y) = 1d(x,y)=1. Since MMM is a metric space, d(x,x)=0d(x,x) = 0d(x,x)=0. So MMM carries the uniform (discrete) metric on nnn points.

The remaining inputs are universally quantified:

  • AAA is any object of type KServer.RandomizedAlgorithm kkk MMM. Going by the name, this is a randomized algorithm for the kkk-server problem on MMM.
  • C0C_0C0​ is any object of type KServer.Config kkk MMM. Going by the name, this is a configuration of kkk servers in MMM.
  • ccc is any real number satisfying
c<Hk=∑i=1k1i,c < H_k = \sum_{i=1}^{k} \frac{1}{i},c<Hk​=i=1∑k​i1​,

where HkH_kHk​ is the kkk-th harmonic number. It is computed exactly as a rational number and then cast to a real.

The Lean code of these definitions (from the imported files Def_KServer_model and Def_KServer_randomized) was not given to me. The meaning of RandomizedAlgorithm, Config and the predicate IsCompetitiveFrom therefore cannot be unfolded here, and this read-back does not say what they contain. In particular, it cannot say:

  • how "competitive" is defined;
  • whether an additive constant is allowed;
  • whether the adversary is oblivious or adaptive;
  • whether the cost is an expectation;
  • whether configurations may place more than one server on the same point.

The conclusion is that AAA does not satisfy the predicate IsCompetitiveFrom with starting configuration C0C_0C0​ and ratio ccc. Put together: on every uniform metric space with at least k+1k+1k+1 points, for every k≥1k \ge 1k≥1, every randomized kkk-server algorithm and every starting configuration, the predicate IsCompetitiveFrom fails for every real ratio ccc strictly below HkH_kHk​.

The inequality on ccc is strict. Nothing is said about c=Hkc = H_kc=Hk​ or any c≥Hkc \ge H_kc≥Hk​.

Degenerate cases:

  • k=0k = 0k=0 is excluded, by 1≤k1 \le k1≤k.
  • The smallest allowed case is k=1k = 1k=1 with n≥2n \ge 2n≥2. There H1=1H_1 = 1H1​=1, and the claim is that no ratio c<1c < 1c<1 works, on a uniform space with at least two points.
  • The one-point space is excluded, because n≥k+1≥2n \ge k+1 \ge 2n≥k+1≥2. The empty space is excluded for the same reason.
  • Negative ratios are included. ccc may be zero or negative, since c<Hkc < H_kc<Hk​ is its only constraint. The claim then covers those values of ccc too; whether that says anything non-trivial depends on the undisclosed definition of IsCompetitiveFrom.
  • Satisfiability of the hypotheses. They can be satisfied for every admissible nnn and kkk, since the uniform metric on nnn points exists. The statement is not vacuous in that way.
  • No default-value arithmetic. No division, natural-number subtraction, integral or supremum appears explicitly in the statement, so none of Lean's default values can arise at the surface. Any such behaviour would sit inside the unseen definitions.
Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 27, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me