Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Gaussian tail sums in the Thompson-sampling pull-count decomposition

Open
BanditAlgorithm.gaussian_ts_pull_count_rhs_bound

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

banditsgaussianprobabilitythompson-sampling

Let i0i_0i0​ be an optimal arm and iii a suboptimal arm of a unit-variance Gaussian bandit, with gap Δi>0\Delta_i>0Δi​>0. In the pull-count decomposition of Theorem 36.2, choose the separating threshold μi0−Δi/2\mu_{i_0}-\Delta_i/2μi0​​−Δi​/2. Then there is a universal constant C>0C>0C>0 such that, for every n≥2n\ge2n≥2, the initial 111, the expected optimal-arm reciprocal-tail sum, and the expected suboptimal-arm large-tail indicator sum together satisfy

1+E ⁣[∑s=0n−1(1Gi0s−1)]+E ⁣[∑s=0n−11{Gis>1/n}]≤C(1+log⁡nΔi2).1+\mathbb E\!\left[\sum_{s=0}^{n-1}\left(\frac1{G_{i_0s}}-1\right)\right] +\mathbb E\!\left[\sum_{s=0}^{n-1}\mathbf 1\{G_{is}>1/n\}\right] \le C\left(1+\frac{\log n}{\Delta_i^2}\right).1+E[s=0∑n−1​(Gi0​s​1​−1)]+E[s=0∑n−1​1{Gis​>1/n}]≤C(1+Δi2​logn​).

Here GjsG_{js}Gjs​ is the posterior Gaussian probability of exceeding μi0−Δi/2\mu_{i_0}-\Delta_i/2μi0​​−Δi​/2 after sss observations of arm jjj. This theorem isolates exactly the two Gaussian tail calculations needed after Eq. (36.3).

Preamble
import Definitions.Def_ThompsonSampling
import Definitions.Def_GaussianBandit

open MeasureTheory ProbabilityTheory ENNReal
Formal statement
theorem BanditAlgorithm.gaussian_ts_pull_count_rhs_bound :
    ∃ C : ℝ, 0 < C ∧
      ∀ (k : ℕ) [NeZero k] (μvec : Fin k → ℝ) (π : BanditPolicy k),
        IsGaussianTSPolicy π →
        ∀ (i₀ : Fin k),
          banditArmMean (gaussianBandit μvec) i₀ =
            banditOptimalMean (gaussianBandit μvec) →
        ∀ (i : Fin k), 0 < banditGap (gaussianBandit μvec) i →
        ∀ n : ℕ, 2 ≤ n →
          1 + (∫⁻ h, ∑ s ∈ Finset.range n,
                ENNReal.ofReal
                  (1 / gaussianTSTailProb i₀ s
                    (banditArmMean (gaussianBandit μvec) i₀ -
                      banditGap (gaussianBandit μvec) i / 2) h - 1)
                ∂banditMeasure (gaussianBandit μvec) π n)
            + ∫⁻ h, ∑ s ∈ Finset.range n,
                (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
Source
Lattimore and Szepesvari, Bandit Algorithms (CUP 2020), Theorem 36.2, Eq. (36.3), printed p.463, and Theorem 36.3 / Exercise 36.6, printed pp.465 and 477.

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