Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Bayesian Thompson sampling information accounting

Proved
BanditAlgorithm.bayesian_ts_information_accounting

by Harry_Xu · Jul 30, 2026 · Mathlib 0df444a (Lean v4.33.1)

banditsinformation-theoryprobabilitythompson-sampling

Consider a Bayesian adversarial kkk-armed bandit over nnn rounds. A reward matrix X∈[0,1]n×kX\in[0,1]^{n\times k}X∈[0,1]n×k is drawn from an arbitrary prior QQQ, and Thompson sampling plays according to the posterior distribution of the best fixed action A∗A^*A∗. Then there are per-round expected-regret terms δt\delta_tδt​ and per-round information gains ItI_tIt​ such that

BRn=∑t=1nδt,δt2≤k2It,∑t=1nIt≤log⁡k.BR_n=\sum_{t=1}^n\delta_t, \qquad \delta_t^2\le\frac{k}{2}I_t, \qquad \sum_{t=1}^n I_t\le\log k.BRn​=t=1∑n​δt​,δt2​≤2k​It​,t=1∑n​It​≤logk.

The pointwise inequality is the Thompson-sampling information-ratio estimate, while the last inequality is the chain-rule bound I(A∗;Hn)≤H(A∗)≤log⁡kI(A^*;H_n)\le H(A^*)\le\log kI(A∗;Hn​)≤H(A∗)≤logk. This theorem isolates the probabilistic and information-theoretic core from the final Cauchy--Schwarz step.

Preamble
import Definitions.Def_ThompsonSampling

open MeasureTheory ProbabilityTheory
open scoped BigOperators
Formal statement
theorem BanditAlgorithm.bayesian_ts_information_accounting {k n : ℕ} [NeZero k]
    (Q : Measure (Fin n → Fin k → ℝ)) [IsProbabilityMeasure Q]
    (hQ : ∀ᵐ X ∂Q, ∀ (t : Fin n) (a : Fin k), X t a ∈ Set.Icc (0 : ℝ) 1)
    {π : BanditPolicy k} (hπ : IsBayesianTSPolicy Q π) :
    ∃ δ info : Fin n → ℝ,
      bayesianAdversarialRegret Q π = ∑ t, δ t ∧
      (∀ t, δ t ^ 2 ≤ ((k : ℝ) / 2) * info t) ∧
      ∑ t, info t ≤ Real.log k := by
  sorry
Source
Lattimore and Szepesvari, Bandit Algorithms (CUP 2020), Theorem 36.5, Theorem 36.6, and Lemma 36.7, printed pp. 469-473; Eq. (36.10) and the proof of Lemma 36.7.

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