Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Exp4 quadratic-mass expectation bound

Proved
BanditAlgorithm.exp4_quadratic_mass_expectation_bound

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

bandit-algorithmsprobability

Let k≥1k\ge1k≥1, M≥2M\ge2M≥2, n≥1n\ge1n≥1, and η>0\eta>0η>0. Let rewards satisfy xt,a∈[0,1]x_{t,a}\in[0,1]xt,a​∈[0,1], let every expert advice row be a probability distribution, and suppose the learner follows Exp4 with exploration parameter γ=0\gamma=0γ=0. With Qt,mQ_{t,m}Qt,m​ and X~t,m\widetilde X_{t,m}Xt,m​ denoting the Exp4 expert weights and one-round expert score estimates, define

Vn=∑t=1n∑m=1MQt,m(1−X~t,m)2.V_n=\sum_{t=1}^{n}\sum_{m=1}^{M}Q_{t,m}(1-\widetilde X_{t,m})^2.Vn​=t=1∑n​m=1∑M​Qt,m​(1−Xt,m​)2.

Then the cumulative quadratic term satisfies

E[Vn]≤nk.\mathbb E[V_n]\le nk.E[Vn​]≤nk.

This second-moment estimate is the variance-control ingredient that turns the Exp4 potential inequality into a square-root regret bound.

Formalization Note VnV_nVn​ is represented by exp4QuadraticMass, recursively accumulated along the sampled bandit history.

Preamble
import Definitions.Def_ContextualAdversarialBandit
import Definitions.Def_exp4Analysis

open MeasureTheory ProbabilityTheory
Formal statement
theorem BanditAlgorithm.exp4_quadratic_mass_expectation_bound
    {k M : ℕ} (hk : 0 < k) (hM : 1 < M) (n : ℕ) (hn : 0 < n)
    (η : ℝ) (hη : 0 < η)
    (x : ℕ → Fin k → ℝ) (hx : ∀ t : ℕ, ∀ a : Fin k, x t a ∈ Set.Icc (0 : ℝ) 1)
    (E : ℕ → Fin M → Fin k → ℝ)
    (hE0 : ∀ t : ℕ, ∀ m : Fin M, ∀ a : Fin k, 0 ≤ E t m a)
    (hE1 : ∀ t : ℕ, ∀ m : Fin M, ∑ a, E t m a = 1)
    (π : BanditPolicy k)
    (hπ : IsExp4Policy η 0 E π) :
    (∫ h, exp4QuadraticMass η E n h ∂(adversarialMeasure x π n)) ≤
      (n : ℝ) * k := by
  sorry
Source
Lattimore and Szepesvári, Bandit Algorithms (Cambridge University Press, 2020), Theorem 18.1 proof, printed p. 230, Eq. (18.12) and the displayed calculation immediately below it. https://tor-lattimore.com/downloads/book/book.pdf

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