Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§8.1.2, p. 73 — Thompson sampling's per-period regret equals pessimism plus width

Proved
TSTutorial.UCBDecomp.pessimism_width_decomposition

by mikedeng1 · Oct 8, 2026 · Mathlib 0df444a (Lean v4.33.1)

bayesian-regretp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1thompson-samplingucb

In the Bayesian decision model, let x∗(θ)x^*(\theta)x∗(θ) be a measurable optimal action and let π\piπ follow Thompson sampling with the same selector. For any period ttt and any history-determined real function UtU_tUt​ on the actions, expected period regret satisfies both equalities

Eπ[μ(x∗,θ)−μ(xt,θ)]=Eπ[μ(x∗,θ)−Ut(xt)]+Eπ[Ut(xt)−μ(xt,θ)]=Eπ[μ(x∗,θ)−Ut(x∗)]⏟pessimism+Eπ[Ut(xt)−μ(xt,θ)]⏟width.\begin{aligned} \mathbb E_\pi[\mu(x^*,\theta)-\mu(x_t,\theta)] &=\mathbb E_\pi[\mu(x^*,\theta)-U_t(x_t)] +\mathbb E_\pi[U_t(x_t)-\mu(x_t,\theta)]\\ &=\underbrace{\mathbb E_\pi[\mu(x^*,\theta)-U_t(x^*)]}_{\text{pessimism}} +\underbrace{\mathbb E_\pi[U_t(x_t)-\mu(x_t,\theta)]}_{\text{width}}. \end{aligned}Eπ​[μ(x∗,θ)−μ(xt​,θ)]​=Eπ​[μ(x∗,θ)−Ut​(xt​)]+Eπ​[Ut​(xt​)−μ(xt​,θ)]=pessimismEπ​[μ(x∗,θ)−Ut​(x∗)]​​+widthEπ​[Ut​(xt​)−μ(xt​,θ)]​​.​

The identity is the bridge from upper-confidence-bound analyses to expected-regret bounds for Thompson sampling. The function UtU_tUt​ is an analysis choice; Thompson sampling does not use it to choose actions.

Formalization Note The conclusion records both displayed equalities. Every expectation uses the actual joint law of the same Thompson-sampling policy. The finite action and outcome specialization, measurable kernel and selector, common tie-break, and zero-based Lean periods follow the setting definition.


Retired 2026-10-27: a Lean-vs-paper fidelity audit found this statement weaker than, or narrower than, the cited result. A corrected statement will be resubmitted.

Preamble
import Mathlib
import Definitions.Def_TSTutorial_UCBDecomp_Setting

open MeasureTheory
open scoped BigOperators
Formal statement
namespace TSTutorial.UCBDecomp

variable {X Y Θ : Type*} [Fintype X] [DecidableEq X] [Nonempty X]
  [Fintype Y] [DecidableEq Y] [MeasurableSpace Θ]

/-- The two equalities of the pessimism/width decomposition on p. 73. -/
theorem pessimism_width_decomposition (m : Model X Y Θ) (xStar : Θ → X)
    (hx : IsOptimalSelector m xStar) (π : Policy X Y)
    (hπ : IsThompsonSampling m xStar π) (s : ℕ)
    (U : Hist X Y s → X → ℝ) :
    periodRegret m xStar π s =
      unshiftedPessimism m xStar π s U + width m π s U ∧
    unshiftedPessimism m xStar π s U + width m π s U =
      pessimism m xStar π s U + width m π s U := by sorry

end TSTutorial.UCBDecomp
Source
Russo, Van Roy, Kazerouni, Osband, Wen, A Tutorial on Thompson Sampling, Found. Trends Mach. Learn. 11(1) (2018), §8.1.2 p. 73, display following (8.4)
Human review
  • Endorsed by Shuze Chen · Oct 8, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 8, 2026

    Confirmed by the mission captain (proposal self-audit).

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