Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

BanditAlgorithm.bandit_ucb_regret_bound

Proved

by Shuze Chen · Jul 17, 2026 · Mathlib 0df444a (Lean v4.33.1)

banditsregretucb

(UCB regret bound, GOAL) Consider UCB (L&S Algorithm 3) on a stochastic kkk-armed 1-subgaussian bandit: play each arm once, then play

At=arg⁡max⁡i(μ^i(t−1)+2log⁡(1/δ)Ti(t−1)).A_t = \arg\max_i \left( \hat\mu_i(t-1) + \sqrt{\frac{2\log(1/\delta)}{T_i(t-1)}} \right).At​=argimax​(μ^​i​(t−1)+Ti​(t−1)2log(1/δ)​​).

For any horizon nnn, if δ=1/n2\delta = 1/n^2δ=1/n2 then

Rn≤3∑i=1kΔi+∑i:Δi>016log⁡nΔi.R_n \le 3\sum_{i=1}^k \Delta_i + \sum_{i : \Delta_i > 0} \frac{16\log n}{\Delta_i}.Rn​≤3i=1∑k​Δi​+i:Δi​>0∑​Δi​16logn​.
Preamble
import Definitions.Def_banditRegret
import Definitions.Def_ucbPolicy


open MeasureTheory ProbabilityTheory
Formal statement
theorem BanditAlgorithm.bandit_ucb_regret_bound {k : ℕ} (hk : 0 < k) {ν : StochasticBandit k}
    (hν : IsSubgaussianBandit 1 ν) {n : ℕ} (hn : 0 < n)
    {π : BanditPolicy k} (hπ : IsUCBPolicy (1 / (n : ℝ) ^ 2) π) :
    banditRegret ν π n ≤
      3 * ∑ i, banditGap ν i +
        ∑ i ∈ Finset.univ.filter (fun i ↦ 0 < banditGap ν i),
          16 * Real.log n / banditGap ν i := by
  sorry
Source
L&S Theorem 7.1, p.105

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