Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of Theorem 4.1, p. 18 — the restart algorithm costs at most α(c(1))+∑i=2t(α(c(i))+D(F))\alpha(c(1)) + \sum_{i=2}^{t} (\alpha(c(i)) + D(F))α(c(1))+∑i=2t​(α(c(i))+D(F))

Proved
OnlineRandomization.Restart.restart_cost_le

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

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

Let FFF be a request-answer game with finite nonempty answer set, let DDD bound its diameter, and let HHH be a real number with f0≤Hf_0 \le Hf0​≤H. Let α:R→R\alpha : \mathbb{R} \to \mathbb{R}α:R→R, and let AHA_HAH​ be a deterministic online algorithm that is α\alphaα-competitive on RHR_HRH​: cAH(r)≤α(c(r))c_{A_H}(r) \le \alpha(c(r))cAH​​(r)≤α(c(r)) for every r∈RHr \in R_Hr∈RH​. Then for every nonempty request sequence rrr with restart segments r(1),…,r(t)r(1), \dots, r(t)r(1),…,r(t) and c(i)=c(r(i))c(i) = c(r(i))c(i)=c(r(i)), the restart algorithm built from AHA_HAH​ satisfies

cRestart(r)≤α(c(1))+∑i=2t(α(c(i))+D).c_{\mathrm{Restart}}(r) \le \alpha(c(1)) + \sum_{i=2}^{t} \big(\alpha(c(i)) + D\big).cRestart​(r)≤α(c(1))+i=2∑t​(α(c(i))+D).

The algorithm pays at most what AHA_HAH​ pays on each segment, plus at most DDD at each of the t−1t-1t−1 restarts. This is the upper bound on the algorithm's cost in the proof of Theorem 4.1.

Formalization Note Written as ∑i=1tα(c(i))+(t−1)D\sum_{i=1}^t \alpha(c(i)) + (t-1) D∑i=1t​α(c(i))+(t−1)D with ttt cast to a real number, which equals the page's expression for t≥1t \ge 1t≥1; hence the hypothesis r≠∅r \ne \emptysetr=∅ (for r=∅r = \emptysetr=∅, t=0t = 0t=0 and the sum form would be false). "α\alphaα-competitive against any adaptive off-line adversary restricted to request sequences from RHR_HRH​" is, for a deterministic algorithm, the stated inequality on every r∈RHr \in R_Hr∈RH​. The hypothesis f0≤Hf_0 \le Hf0​≤H makes every segment lie in RHR_HRH​ (see segments_greedy); in Theorem 4.1 it follows from f0≥0f_0 \ge 0f0​≥0 and D≤HD \le HD≤H. α\alphaα is an arbitrary function here; no linearity is needed for this step.

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

/-- p. 18: if `D` bounds the diameter, `f_0 ≤ H`, and `A_H` is `α`-competitive on `R_H`, then
on every nonempty `r` with segments `r(1), …, r(t)` the restart algorithm costs at most
`α(c(1)) + Σ_{i=2}^{t} (α(c(i)) + D)`. -/
theorem restart_cost_le {R A : Type*} [Fintype A] [Nonempty A] (F : Game R A) (D H : ℝ)
    (hD : DiameterBound F D) (hf0 : F.cost [] [] ≤ H) (α : ℝ → ℝ) (AH : DetAlg R A)
    (hAH : ∀ r : List R, InRH F H r → AH.costOn F r ≤ α (F.opt r))
    (r : List R) (hr : r ≠ []) :
    (restart F H AH).costOn F r ≤
      ((segments F H r).map (fun s => α (F.opt s))).sum
        + (((segments F H r).length : ℝ) - 1) * D := 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. 18, §4, proof of Theorem 4.1, fourth paragraph, sentence 1
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