Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 8, p. 39 — Bernstein (Azuma–Hoeffding) bound ℙ[|Σ D_k| ≥ t] ≤ 2exp(−t²/(2Σσ_k²)) for sub-Gaussian martingale differences

Proved
MostlyExplorationFree.GreedyBandit.lemma_8

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

concentration-inequalitymartingalep2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1sub-gaussian

Let (Hk)k≥0(\mathcal H_k)_{k \ge 0}(Hk​)k≥0​ be a filtration and D1,…,DnD_1, \dots, D_nD1​,…,Dn​ real random variables with DkD_kDk​ Hk\mathcal H_kHk​-measurable and conditionally σk\sigma_kσk​-sub-Gaussian given Hk−1\mathcal H_{k-1}Hk−1​:

E[eτDk∣Hk−1]≤eσk2τ2/2almost surely, for every τ∈R.\mathbb E\big[e^{\tau D_k} \mid \mathcal H_{k-1}\big] \le e^{\sigma_k^2 \tau^2/2} \quad \text{almost surely, for every } \tau \in \mathbb R .E[eτDk​∣Hk−1​]≤eσk2​τ2/2almost surely, for every τ∈R.

(In particular (Dk)(D_k)(Dk​) is a martingale difference sequence.) Then for every t>0t > 0t>0,

P[∣∑k=1nDk∣≥t]≤2exp⁡(−t22∑k=1nσk2).\mathbb P\Big[\Big|\sum_{k=1}^n D_k\Big| \ge t\Big] \le 2\exp\Big(-\frac{t^2}{2\sum_{k=1}^n \sigma_k^2}\Big).P[​k=1∑n​Dk​​≥t]≤2exp(−2∑k=1n​σk2​t2​).

This concentration inequality for adaptively generated noise sums is what controls the least-squares error of an arm whose samples were selected by the algorithm itself.

Formalization Note The paper says "DkD_kDk​ is σk\sigma_kσk​-subgaussian" for a martingale difference sequence; the cited proof (Wainwright 2019, Theorem 2.3) uses the conditional form, which is stated here (with integrability of eτDke^{\tau D_k}eτDk​). If ∑kσk2=0\sum_k \sigma_k^2 = 0∑k​σk2​=0, Lean's division by zero makes the right-hand side 222, which still bounds the probability.

Preamble
import Mathlib

open MeasureTheory ProbabilityTheory
Formal statement
namespace MostlyExplorationFree.GreedyBandit

theorem lemma_8 {Ω : Type*} {mΩ : MeasurableSpace Ω} (P : Measure Ω) [IsProbabilityMeasure P]
    (ℱ : Filtration ℕ mΩ) (D : ℕ → Ω → ℝ) (σk : ℕ → ℝ) (n : ℕ)
    (hadapted : ∀ k ∈ Finset.Icc 1 n, StronglyMeasurable[ℱ k] (D k))
    (hint : ∀ k ∈ Finset.Icc 1 n, ∀ τ : ℝ, Integrable (fun ω => Real.exp (τ * D k ω)) P)
    (hsubG : ∀ k ∈ Finset.Icc 1 n, ∀ τ : ℝ,
      condExp (ℱ (k - 1)) P (fun ω => Real.exp (τ * D k ω))
        ≤ᵐ[P] fun _ => Real.exp (σk k ^ 2 * τ ^ 2 / 2))
    (t : ℝ) (ht : 0 < t) :
    (P {ω | t ≤ |∑ k ∈ Finset.Icc 1 n, D k ω|}).toReal
      ≤ 2 * Real.exp (-(t ^ 2 / (2 * ∑ k ∈ Finset.Icc 1 n, σk k ^ 2))) := by sorry

end MostlyExplorationFree.GreedyBandit
Source
Bastani, Bayati & Khosravi, arXiv:1704.09011v8, p. 39, Lemma 8 (Bernstein Concentration; proof: Wainwright (2019), Theorem 2.3)
Human review
  • Endorsed by Shuze Chen · Oct 22, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 22, 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