Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 4: no randomized (n−1)(n-1)(n−1)-server algorithm on nnn uniform vertices is ccc-competitive for c<Hn−1c < H_{n-1}c<Hn−1​

Proved
CompetitivePaging.LowerBound.no_competitive_below_harmonic_n_sub_one

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 n≥2n\ge2n≥2 and let MMM be a set of nnn vertices with the uniform metric: any two distinct vertices are at distance 111. Consider the uniform (n−1)(n-1)(n−1)-server problem on MMM (paging with a cache of n−1n-1n−1 pages and nnn pages in total). Let Hn−1=1+12+⋯+1n−1H_{n-1}=1+\tfrac12+\dots+\tfrac1{n-1}Hn−1​=1+21​+⋯+n−11​ be the (n−1)(n-1)(n−1)-st harmonic number.

For every randomized on-line algorithm AAA with n−1n-1n−1 servers on MMM, every initial configuration C0C_0C0​ and every real c<Hn−1c<H_{n-1}c<Hn−1​, 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​​(σ) the optimal off-line cost of serving σ\sigmaσ from C0C_0C0​.

Together with the marking algorithm's upper bound this shows that the marking algorithm is strongly competitive when k=n−1k=n-1k=n−1.

Formalization Note Competitiveness is the published KServer.RandomizedAlgorithm.IsCompetitiveFrom: every drawn deterministic algorithm starts at C0C_0C0​, and the right-hand side is clamped at 000 (ENNReal.ofReal). The clamp only weakens the property being refuted, so the statement is at least as strong as the paper's. The uniform metric is a hypothesis on an abstract space MMM with nnn points.

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

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

end CompetitivePaging.LowerBound
Source
Fiat, Karp, Luby, McGeoch, Sleator, Young, Competitive Paging Algorithms, arXiv:cs/0205038v1, p. 6, Theorem 4 (proof pp. 7–8)
Read-back

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

The setting is:

  • nnn is a natural number with n≥2n \ge 2n≥2.
  • MMM is a metric space together with a bijection e:{0,…,n−1}→Me : \{0,\dots,n-1\} \to Me:{0,…,n−1}→M, so MMM has exactly nnn points. The bijection is not used otherwise.
  • Any two distinct points of MMM are at distance exactly 111.
  • AAA is a randomized online algorithm with n−1n-1n−1 servers on MMM.
  • C0C_0C0​ is a configuration of n−1n-1n−1 servers in MMM. No condition is imposed on it; in particular, servers need not be at distinct points.
  • ccc is a real number with
c<Hn−1=1+12+⋯+1n−1,c < H_{n-1} = 1 + \tfrac12 + \cdots + \tfrac{1}{n-1},c<Hn−1​=1+21​+⋯+n−11​,

the (n−1)(n-1)(n−1)-th harmonic number, a rational number regarded as a real.

The conclusion is that AAA is not ccc-competitive starting from C0C_0C0​. "ccc-competitive from C0C_0C0​" is a predicate defined in imported files that are not shown. The statement's meaning depends entirely on that definition: for example, whether it compares expected cost with the optimal offline cost, whether an additive constant is allowed, and how C0C_0C0​ enters. None of that can be read from this code.

Degenerate cases:

  • n=2n = 2n=2: MMM has two points, there is one server, H1=1H_1 = 1H1​=1, and the claim covers every c<1c < 1c<1.
  • Negative ccc: any negative ccc is allowed and is covered by the claim.
  • Empty or one-point MMM: excluded, because n≥2n \ge 2n≥2 and MMM has exactly nnn points.
  • Subtraction in N\mathbb{N}N: n−1n-1n−1 is ordinary subtraction, since n≥2n \ge 2n≥2.
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