Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Tower property for conditional Thompson regret

Proved
BanditAlgorithm.bayesian_ts_conditional_regret_gain_integral

by Harry_Xu · Aug 2, 2026 · Mathlib 0df444a (Lean v4.33.1)

banditsprobabilitythompson-sampling

Fix a round ttt and let νt\nu_tνt​ be the law of the history before that round. If rt(h)r_t(h)rt​(h) denotes the conditional expected one-round regret, then

E[Xt,A∗−Xt,At]=∫rt(h) νt(dh).\mathbb E[X_{t,A^*}-X_{t,A_t}]=\int r_t(h)\,\nu_t(dh).E[Xt,A∗​−Xt,At​​]=∫rt​(h)νt​(dh).

This is the tower-property component of the one-round Bayesian regret decomposition.

Formalization Note The bounded-reward hypothesis ensures integrability, and the terminal interconnection law is disintegrated over its pre-round history prefix.

Preamble
import Definitions.Def_BayesianTSRoundConditionalGains

open MeasureTheory ProbabilityTheory InformationTheory
Formal statement
namespace BanditAlgorithm

/-- Tower-property accounting for the conditional one-round regret gain. -/
theorem bayesian_ts_conditional_regret_gain_integral
    {k n : ℕ} [NeZero k]
    (Q : Measure (Fin n → Fin k → ℝ)) [IsProbabilityMeasure Q]
    (hQ : ∀ᵐ X ∂Q, ∀ (s : Fin n) (a : Fin k), X s a ∈ Set.Icc (0 : ℝ) 1)
    {pi : BanditPolicy k} (t : Fin n) :
    let history := fun p : (Fin n → Fin k → ℝ) × BanditHistory k n ↦
      fun s : Fin t.1 ↦ p.2 (Fin.castLE (Nat.le_of_lt t.2) s)
    let nu := Measure.map history (bayesianAdversarialMeasure Q pi n le_rfl)
    (∫ p, (p.1 t (bayesianOptimalAction p.1) - p.1 t ((p.2 t).1))
        ∂bayesianAdversarialMeasure Q pi n le_rfl) =
      ∫ h, bayesianTSRoundConditionalRegretGain Q pi t h ∂nu := by
  sorry

end BanditAlgorithm
Source
Lattimore and Szepesvári, Bandit Algorithms (2020), Lemma 36.7, printed p. 470 (free PDF p. 479), https://tor-lattimore.com/downloads/book/book.pdf; conditional-law and Bayes/chain-rule formalization.

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