Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

KL-UCB pull-count failure split

Proved
BanditAlgorithm.bandit_kl_ucb_pull_count_failure_split

by Harry_Xu · Jul 29, 2026 · Mathlib c5ea003 (Lean v4.30.0)

banditsprobability

This is the selected-round decomposition used in the finite-time proof of KL-UCB.

Fix an optimal arm aaa, an arm iii, a horizon nnn, and a tolerance ε\varepsilonε. Let La,i,ε(n)L_{a,i,\varepsilon}(n)La,i,ε​(n) count selections of iii made during initialization or while the optimal-arm index is at most μ⋆−ε\mu^\star-\varepsilonμ⋆−ε, and let Ha,i,ε(n)H_{a,i,\varepsilon}(n)Ha,i,ε​(n) count initialized selections of iii whose own index is at least μ⋆−ε\mu^\star-\varepsilonμ⋆−ε. If the policy follows the KL-UCB selection rule, then

Eν,π[Ti(n)]≤Eν,π[La,i,ε(n)]+Eν,π[Ha,i,ε(n)].\mathbb E_{\nu,\pi}[T_i(n)] \le \mathbb E_{\nu,\pi}[L_{a,i,\varepsilon}(n)] + \mathbb E_{\nu,\pi}[H_{a,i,\varepsilon}(n)].Eν,π​[Ti​(n)]≤Eν,π​[La,i,ε​(n)]+Eν,π​[Ha,i,ε​(n)].

This deterministic-policy bridge separates the pull count into the two probabilistic failure modes controlled by Lemmas 10.7 and 10.8.

Formalization Note The expectations are integrals against the canonical finite-history bandit measure. The statement records that aaa has optimal mean, matching its role in the source argument.

Preamble
import Definitions.Def_klucbFailureCount

open MeasureTheory ProbabilityTheory
Formal statement
theorem BanditAlgorithm.bandit_kl_ucb_pull_count_failure_split {k : ℕ}
    {ν : BanditAlgorithm.StochasticBandit k}
    {π : BanditAlgorithm.BanditPolicy k}
    (hπ : BanditAlgorithm.IsKLUCBPolicy π)
    (n : ℕ) (a i : Fin k) (ε : ℝ)
    (ha : BanditAlgorithm.banditArmMean ν a =
      BanditAlgorithm.banditOptimalMean ν) :
    MeasureTheory.integral (BanditAlgorithm.banditMeasure ν π n)
        (fun h ↦ (BanditAlgorithm.armPullCount i h : ℝ)) ≤
      MeasureTheory.integral (BanditAlgorithm.banditMeasure ν π n)
          (fun h ↦
            (BanditAlgorithm.klucbFailureCount ν a i ε h).1) +
        MeasureTheory.integral (BanditAlgorithm.banditMeasure ν π n)
          (fun h ↦
            (BanditAlgorithm.klucbFailureCount ν a i ε h).2) := by
  sorry
Source
Tor Lattimore and Csaba Szepesvári, Bandit Algorithms, Cambridge University Press, 2020, proof of Theorem 10.6, displayed pull-count decomposition on printed p. 139.

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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me