Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Suboptimal-arm large posterior tails along realized ranks

Proved
BanditAlgorithm.gaussian_ts_suboptimal_exact_rank_large_tail_sum_bound

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

banditsgaussianprobabilitythompson-sampling

Consider an arbitrary adaptive policy on a unit-variance Gaussian bandit. Fix an optimal arm i0i_0i0​ and a suboptimal arm iii with gap Δi>0\Delta_i>0Δi​>0. After the first sss realized rewards of arm iii, let Gi,s(μ∗−Δi/2)G_{i,s}(\mu_* - \Delta_i/2)Gi,s​(μ∗​−Δi​/2) be the posterior Gaussian probability of exceeding the midpoint between the two arm means. There is a universal constant C>0C>0C>0 such that, for every n≥2n\ge2n≥2,

E ⁣[∑s<Ti(n)1 ⁣{Gi,s(μ∗−Δi/2)>1n}]≤C(1+log⁡nΔi2).\mathbb E\!\left[\sum_{s<T_i(n)} \mathbf 1\!\left\{G_{i,s}(\mu_* - \Delta_i/2)>\frac1n\right\}\right] \le C\left(1+\frac{\log n}{\Delta_i^2}\right).E​s<Ti​(n)∑​1{Gi,s​(μ∗​−Δi​/2)>n1​}​≤C(1+Δi2​logn​).

This finite estimate is the suboptimal-arm Gaussian posterior-tail input in the pull-count analysis. Exact realized ranks ensure that every empirical mean in the sum is computed from observations that actually occurred.

Formalization Note The expectation is represented by a lintegral with values in the extended nonnegative reals.

Preamble
import Definitions.Def_ThompsonSampling
import Definitions.Def_GaussianBandit

open MeasureTheory ProbabilityTheory ENNReal
Formal statement
namespace BanditAlgorithm

/-- The suboptimal-arm posterior large-tail estimate from Exercise 36.6(b),
truncated at the realized pull count. -/
theorem gaussian_ts_suboptimal_exact_rank_large_tail_sum_bound :
    ∃ C : ℝ, 0 < C ∧
      ∀ (k : ℕ) [NeZero k] (μvec : Fin k → ℝ) (π : BanditPolicy k),
        ∀ (i₀ : Fin k),
          banditArmMean (gaussianBandit μvec) i₀ =
            banditOptimalMean (gaussianBandit μvec) →
        ∀ (i : Fin k), 0 < banditGap (gaussianBandit μvec) i →
        ∀ n : ℕ, 2 ≤ n →
          (∫⁻ h, ∑ s ∈ Finset.range (armPullCount i h),
              (if 1 / (n : ℝ) <
                  gaussianTSTailProb i s
                    (banditArmMean (gaussianBandit μvec) i₀ -
                      banditGap (gaussianBandit μvec) i / 2) h
                then (1 : ℝ≥0∞) else 0)
              ∂banditMeasure (gaussianBandit μvec) π n) ≤
            ENNReal.ofReal
              (C * (1 + Real.log n /
                banditGap (gaussianBandit μvec) i ^ 2)) := by
  sorry

end BanditAlgorithm
Source
Lattimore and Szepesvári, Bandit Algorithms (CUP 2020), Exercise 36.6(b), printed p. 475 / PDF p. 484; Theorem 36.2 and Eq. (36.3), printed pp. 463–465 / PDF pp. 472–474. This is the finite-horizon exact-rank envelope underlying the displayed asymptotic estimate.

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