Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Sharp exponential-sum bound for the UCB counting lemma

Proved
BanditAlgorithm.bandit_ucb_index_exponential_sum_bound_sharp

by Harry_Xu · Jul 28, 2026 · Mathlib 0df444a (Lean v4.33.1)

analysisbanditsconcentrationucb

For n∈Nn\in\mathbb{N}n∈N, ε>0\varepsilon>0ε>0, and a>0a>0a>0, assign weight 111 to each t≤2a/ε2t\le 2a/\varepsilon^2t≤2a/ε2 and weight

exp⁡ ⁣(−[t(ε−2a/t)]22t)\exp\!\left(-\frac{[t(\varepsilon-\sqrt{2a/t})]^2}{2t}\right)exp(−2t[t(ε−2a/t​)]2​)

to each later ttt. The sum of these weights for 1≤t≤n1\le t\le n1≤t≤n is at most 2ε2(a+πa+1)\frac{2}{\varepsilon^2}(a+\sqrt{\pi a}+1)ε22​(a+πa​+1). This is the sharp, no-extra-111 integral comparison used in Lemma 8.2.

Preamble
import Mathlib.Probability.Moments.SubGaussian
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic

open MeasureTheory ProbabilityTheory Real
Formal statement
theorem BanditAlgorithm.bandit_ucb_index_exponential_sum_bound_sharp
    {n : ℕ} {ε a : ℝ} (hε : 0 < ε) (ha : 0 < a) :
    Finset.sum (Finset.Icc 1 n) (fun t ↦
      if 2 * a / ε ^ 2 < (t : ℝ) then
        Real.exp (-((t : ℝ) * (ε - Real.sqrt (2 * a / t))) ^ 2 / ((2 : ℝ) * (t : ℝ) * (1 : ℝ)))
      else 1) ≤
      2 / ε ^ 2 * (a + Real.sqrt (Real.pi * a) + 1) := by sorry
Source
Lattimore and Szepesvári, Bandit Algorithms (Cambridge University Press, 2020), Lemma 8.2 and its proof, printed pp. 118–119 / PDF pp. 127–128, https://tor-lattimore.com/downloads/book/book.pdf

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