Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

KL-UCB index threshold feasibility

Proved
BanditAlgorithm.klucb_index_threshold_feasible

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

bandit-algorithmsformal-bridgekl-ucb

Let hhh be a finite bandit history, let μ^i(h)∈[0,1]\widehat\mu_i(h)\in[0,1]μ​i​(h)∈[0,1] be the empirical mean of arm iii, and let q∈(0,1)q\in(0,1)q∈(0,1). Write

Ui(h)=sup⁡{q′∈[0,1]:d ⁣(μ^i(h),q′)≤log⁡f(n+1)Ti(h)}U_i(h)=\sup\left\{q'\in[0,1]: d\!\left(\widehat\mu_i(h),q'\right) \le \frac{\log f(n+1)}{T_i(h)} \right\}Ui​(h)=sup{q′∈[0,1]:d(μ​i​(h),q′)≤Ti​(h)logf(n+1)​}

for the KL-UCB index after nnn observations, with f(t)=1+tlog⁡2tf(t)=1+t\log^2tf(t)=1+tlog2t. Then

q≤Ui(h)⟺dˉ ⁣(μ^i(h),q)≤log⁡f(n+1)Ti(h).q\le U_i(h) \quad\Longleftrightarrow\quad \bar d\!\left(\widehat\mu_i(h),q\right) \le \frac{\log f(n+1)}{T_i(h)}.q≤Ui​(h)⟺dˉ(μ​i​(h),q)≤Ti​(h)logf(n+1)​.

This equivalence is the deterministic confidence-set bridge used in the proof of the KL-UCB pull-count decomposition: an interior threshold lies below the supremum index exactly when its one-sided KL constraint is feasible.

Formalization Note The explicit assumption μ^i(h)∈[0,1]\widehat\mu_i(h)\in[0,1]μ​i​(h)∈[0,1] is satisfied on Bernoulli histories. The endpoint guards in the definition of the index are retained, while the threshold qqq is restricted to the open unit interval.

Preamble
import Definitions.Def_klucbTruncatedRelativeEntropy

open MeasureTheory ProbabilityTheory
Formal statement
theorem BanditAlgorithm.klucb_index_threshold_feasible
    {k n : ℕ} (i : Fin k) (h : BanditAlgorithm.BanditHistory k n)
    (q : ℝ) (hq : q ∈ Set.Ioo (0 : ℝ) 1)
    (hp : BanditAlgorithm.armEmpiricalMean i h ∈ Set.Icc (0 : ℝ) 1) :
    q ≤ BanditAlgorithm.klucbIndex i h ↔
      BanditAlgorithm.klucbTruncatedRelativeEntropy
          (BanditAlgorithm.armEmpiricalMean i h) q ≤
        Real.log (BanditAlgorithm.klucbExploration (n + 1)) /
          BanditAlgorithm.armPullCount i h := by
  sorry
Source
Lattimore and Szepesvari, Bandit Algorithms (CUP 2020), Algorithm 8 printed p. 137 / PDF p. 146 and the threshold-feasibility step in the proof of Theorem 10.6 printed p. 139 / PDF p. 148. This is the formal supremum/feasibility bridge implicit in that step.

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