Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 3.9 — Hoeffding–Azuma inequality for bounded martingale differences

Proved
ModernOnlineLearning.OnlineToBatch.theorem_3_9

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

concentrationmartingalep2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-bookp2o-v1probability

Let Z0,…,ZTZ_0,\ldots,Z_TZ0​,…,ZT​ be an integrable martingale on a probability space, adapted to a filtration. Suppose T≥1T\ge1T≥1, B>0B>0B>0, ε≥0\varepsilon\ge0ε≥0, and ∣Zt−Zt−1∣≤B|Z_t-Z_{t-1}|\le B∣Zt​−Zt−1​∣≤B almost surely for every 1≤t≤T1\le t\le T1≤t≤T. Then both tails satisfy

P(ZT−Z0≥ε), P(Z0−ZT≥ε) ≤ exp⁡ ⁣(−ε22B2T).\mathbb P(Z_T-Z_0\ge\varepsilon),\ \mathbb P(Z_0-Z_T\ge\varepsilon)\ \le\ \exp\!\left(-\frac{\varepsilon^2}{2B^2T}\right).P(ZT​−Z0​≥ε), P(Z0​−ZT​≥ε) ≤ exp(−2B2Tε2​).

This concentration bound supplies the two deviations used in the high-probability online-to-batch conversion.

Formalization Note The source leaves the threshold and denominator domain implicit. The conditions ε≥0\varepsilon\ge0ε≥0, B>0B>0B>0 and T≥1T\ge1T≥1 make its printed formula valid and defined. The martingale is indexed only through TTT, matching the finite sequence in the book.

Preamble
import Mathlib
Formal statement
namespace ModernOnlineLearning.OnlineToBatch

/-- Orabona, arXiv:1912.13213v10, Theorem 3.9, p. 27. -/
theorem theorem_3_9 {Ω : Type*} [MeasurableSpace Ω]
    (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ]
    (T : ℕ) (ℱ : MeasureTheory.Filtration (Fin (T + 1)) ‹MeasurableSpace Ω›)
    (Z : Fin (T + 1) → Ω → ℝ) (B ε : ℝ)
    (hT : 1 ≤ T) (hB : 0 < B) (hε : 0 ≤ ε)
    (hZ : MeasureTheory.Martingale Z ℱ μ)
    (hZint : ∀ t : Fin (T + 1), MeasureTheory.Integrable (Z t) μ)
    (hdiff : ∀ t : Fin T,
      ∀ᵐ ω ∂μ, |Z ⟨t.val + 1, Nat.succ_lt_succ t.isLt⟩ ω -
        Z ⟨t.val, Nat.lt_trans t.isLt (Nat.lt_succ_self T)⟩ ω| ≤ B) :
    μ.real {ω | ε ≤ Z (Fin.last T) ω - Z ⟨0, Nat.zero_lt_succ T⟩ ω} ≤
      Real.exp (-(ε ^ 2) / (2 * B ^ 2 * (T : ℝ))) ∧
    μ.real {ω | ε ≤ Z ⟨0, Nat.zero_lt_succ T⟩ ω - Z (Fin.last T) ω} ≤
      Real.exp (-(ε ^ 2) / (2 * B ^ 2 * (T : ℝ))) := by sorry

end ModernOnlineLearning.OnlineToBatch
Source
Orabona, arXiv:1912.13213v10, Theorem 3.9, p. 27 (PDF p. 39)
Human review
  • Endorsed by Shuze Chen · Oct 9, 2026

    Confirmed by the moderator at approval.

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