Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 4.1, p. 17 — restarting an algorithm on RHR_HRH​, H=(2+ϵ)D(F)/ϵH = (2+\epsilon)D(F)/\epsilonH=(2+ϵ)D(F)/ϵ, is a (1+ϵ)α(1+\epsilon)\alpha(1+ϵ)α-competitive deterministic algorithm

Proved
OnlineRandomization.Restart.theorem_4_1

by mikedeng1 · Oct 4, 2026 · Mathlib 0df444a (Lean v4.33.1)

competitive-analysisderandomizationonline-algorithmsp2o-batch-pfp1bp2o-gran-per-chapterp2o-plan-paperp2o-v1

Let FFF be a request-answer game with a finite nonempty request set RRR and a finite nonempty answer set AAA. Assume that

  1. FFF is monotone and local;
  2. f0≥0f_0 \ge 0f0​≥0 (the empty play has nonnegative cost);
  3. DDD is a bound on the diameter of FFF (so FFF has finite diameter D(F)≤DD(F) \le DD(F)≤D).

Let α(x)=d x\alpha(x) = d\,xα(x)=dx with d≥1d \ge 1d≥1, let ϵ>0\epsilon > 0ϵ>0, and put

H=(2+ϵ)Dϵ.H = \frac{(2+\epsilon) D}{\epsilon}.H=ϵ(2+ϵ)D​.

Then:

  1. the set RHR_HRH​ is finite;
  2. the restart algorithm built from any AHA_HAH​ depends only on the values of AHA_HAH​ on RHR_HRH​;
  3. for every deterministic online algorithm AHA_HAH​ that is α\alphaα-competitive on RHR_HRH​, i.e. cAH(r)≤d c(r)c_{A_H}(r) \le d\, c(r)cAH​​(r)≤dc(r) for all r∈RHr \in R_Hr∈RH​, the restart algorithm built from AHA_HAH​ is (1+ϵ)α(1+\epsilon)\alpha(1+ϵ)α-competitive:
cRestart(r)≤(1+ϵ) d c(r)for every request sequence r.c_{\mathrm{Restart}}(r) \le (1+\epsilon)\, d\, c(r) \quad \text{for every request sequence } r.cRestart​(r)≤(1+ϵ)dc(r)for every request sequence r.

This is the constructive content of Theorem 4.1. Theorem 2.1 of the paper shows that an α\alphaα-competitive randomized algorithm against adaptive off-line adversaries yields a deterministic α\alphaα-competitive algorithm, but not how to compute it. Theorem 4.1 replaces it by a finite object: an algorithm AHA_HAH​ that only has to be good on the finite set RHR_HRH​, extended to all request sequences by restarting, at the price of a factor 1+ϵ1+\epsilon1+ϵ.

Formalization Note The paper's hypothesis "there exists a randomized online algorithm that is α\alphaα-competitive against every offline adaptive adversary" serves only to produce, via Theorem 2.1, an algorithm AHA_HAH​ that is α\alphaα-competitive on RHR_HRH​; the statement here quantifies over every such AHA_HAH​ instead, so it does not need that hypothesis. "Computable" has no precise meaning for real-valued costs (the paper says so of Corollary 3.1); its content is represented by parts 1 and 2: the restart algorithm is determined by a finite table. For a deterministic algorithm, competitiveness against every adaptive off-line adversary is competitiveness on every request sequence, which is how part 3 is stated. Pins: costs are real (the paper allows +∞+\infty+∞); finite diameter is a real bound DDD and the theorem holds for each, in particular D=D(F)D = D(F)D=D(F); f0≥0f_0 \ge 0f0​≥0 is added (it makes all costs nonnegative, which the proof uses for the last segment, and holds in the paper's examples); α(x)=d x\alpha(x) = d\,xα(x)=dx with d≥1d \ge 1d≥1 rather than a general linear function, since with H=(2+ϵ)D/ϵH = (2+\epsilon)D/\epsilonH=(2+ϵ)D/ϵ the final inequality needs (2+ϵ)d≥1+(1+ϵ)d(2+\epsilon) d \ge 1 + (1+\epsilon) d(2+ϵ)d≥1+(1+ϵ)d; (1+ϵ)α(1+\epsilon)\alpha(1+ϵ)α is x↦(1+ϵ)dxx \mapsto (1+\epsilon) d xx↦(1+ϵ)dx; RRR is nonempty.


Retired 2026-10-27: a Lean-vs-paper fidelity audit found this statement weaker than, or narrower than, the cited result. A corrected statement will be resubmitted.

Preamble
import Mathlib
import Definitions.Def_OnlineRandomization_Restart_Model
import Definitions.Def_OnlineRandomization_Restart_GameProperties
import Definitions.Def_OnlineRandomization_Restart_RestartAlgorithm
Formal statement
namespace OnlineRandomization.Restart

/-- Theorem 4.1 (p. 17), through its construction (p. 18). Let `F` be a monotone, local game
with finite request set `R`, finite answer set `A`, `f_0 ≥ 0`, and diameter at most `D`.
Let `α(x) = d·x` with `d ≥ 1`, let `ε > 0` and `H = (2 + ε) D / ε`. Then
1. `R_H` is finite;
2. the restart algorithm consults `A_H` only on `R_H`;
3. for every `A_H` that is `α`-competitive on `R_H`, the restart algorithm built from `A_H`
   is `(1 + ε)α`-competitive. -/
theorem theorem_4_1 {R A : Type*} [Fintype R] [Nonempty R] [Fintype A] [Nonempty A]
    (F : Game R A) (hmono : IsMonotone F) (hloc : IsLocal F) (hf0 : 0 ≤ F.cost [] [])
    (D : ℝ) (hD : DiameterBound F D) (d : ℝ) (hd : 1 ≤ d) (ε : ℝ) (hε : 0 < ε) :
    {r : List R | InRH F ((2 + ε) * D / ε) r}.Finite ∧
    (∀ AH AH' : DetAlg R A, (∀ r : List R, InRH F ((2 + ε) * D / ε) r → AH r = AH' r) →
      restart F ((2 + ε) * D / ε) AH = restart F ((2 + ε) * D / ε) AH') ∧
    (∀ AH : DetAlg R A,
      (∀ r : List R, InRH F ((2 + ε) * D / ε) r → AH.costOn F r ≤ d * F.opt r) →
      IsCompetitive F (fun x => (1 + ε) * (d * x)) (restart F ((2 + ε) * D / ε) AH)) := by sorry

end OnlineRandomization.Restart
Source
Ben-David, Borodin, Karp, Tardos and Wigderson, On the power of randomization in on-line algorithms, Algorithmica 11 (1994), manuscript p. 17, Theorem 4.1, with the construction of its proof, p. 18
Human review
  • Endorsed by Shuze Chen · Oct 4, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 4, 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