Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 2.19 -- the martingale Bernstein bound

Disproved
HighDimStat.TailBounds.martingale_bernstein_bound

by mikedeng1 · Sep 19, 2026 · Mathlib 0df444a (Lean v4.33.1)

high-dimensional-statisticsprobabilitystatistics

Theorem 2.19 (Martingale Bernstein bound). Let {(Dk,Fk)}k=1∞\{(D_k,\mathcal F_k)\}_{k=1}^\infty{(Dk​,Fk​)}k=1∞​ be a martingale difference sequence, and suppose that E[eλDk∣Fk−1]≤eλ2νk2/2\mathbb E[e^{\lambda D_k}\mid\mathcal F_{k-1}]\le e^{\lambda^2\nu_k^2/2}E[eλDk​∣Fk−1​]≤eλ2νk2​/2 almost surely for any ∣λ∣<1/αk|\lambda|<1/\alpha_k∣λ∣<1/αk​. Then:

(a) The sum ∑k=1nDk\sum_{k=1}^n D_k∑k=1n​Dk​ is sub-exponential with parameters (∑k=1nνk2, α∗)\big(\sqrt{\sum_{k=1}^n\nu_k^2},\ \alpha_*\big)(∑k=1n​νk2​​, α∗​) where α∗:=max⁡k=1,…,nαk\alpha_*:=\max_{k=1,\dots,n}\alpha_kα∗​:=maxk=1,…,n​αk​.

(b) The sum satisfies the concentration inequality

P[∣∑k=1nDk∣≥t]≤{2e−t2/(2∑k=1nνk2)if 0≤t≤∑k=1nνk2/α∗,2e−t/(2α∗)if t>∑k=1nνk2/α∗.\mathbb P\Big[\Big|\sum_{k=1}^n D_k\Big|\ge t\Big] \le \begin{cases} 2e^{-t^2/(2\sum_{k=1}^n\nu_k^2)} & \text{if } 0\le t\le \sum_{k=1}^n\nu_k^2/\alpha_*, \\ 2e^{-t/(2\alpha_*)} & \text{if } t > \sum_{k=1}^n\nu_k^2/\alpha_*. \end{cases}P[​k=1∑n​Dk​​≥t]≤{2e−t2/(2∑k=1n​νk2​)2e−t/(2α∗​)​if 0≤t≤∑k=1n​νk2​/α∗​,if t>∑k=1n​νk2​/α∗​.​

This is the chapter's general Bernstein-type bound for martingale difference sequences, obtained by controlling the moment generating function of the partial sum and applying the Chernoff bound; it is the source, by specialization, of the Azuma–Hoeffding inequality (Corollary 2.20) and the bounded-differences inequality (Corollary 2.21) elsewhere in this mission.

Formalization Note "Martingale difference sequence" is realized as ℱ k-measurability of D k together with E[D k | ℱ(k-1)] = 0, for k=1,...,n (Finset.Icc 1 n). The condition |λ|<1/αₖ carries the same αₖ=0 ∨ |λ|<1/αₖ guard as IsSubExponential. Part (a)'s stated parameter pair, printed in the book as "(∑νk2,α∗)(\sum\nu_k^2,\alpha_*)(∑νk2​,α∗​)", is formalized as (∑νk2,α∗)\big(\sqrt{\sum\nu_k^2},\alpha_*\big)(∑νk2​​,α∗​) to match Definition 2.7's own parametrization exactly (where the squared first parameter, not the parameter itself, appears in the exponent): this is the value that makes part (a) consistent with part (b)'s own tail-bound formula, which the book derives directly from part (a) via the general sub-exponential tail bound (Proposition 2.9) — see MODERATION_NOTES.md. Explicit Integrable hypotheses on each D k (h_int) and on each conditional-MGF exponential (h_subexp_int) are required, mirroring the same guard IsSubExponential's own definition uses for its bare Bochner integrals: without them, Mathlib's condExp returns the junk value 0 on a non-integrable argument, which would let h_cent/h_subexp hold vacuously for a non-integrable D k (e.g. Cauchy-distributed) regardless of whether it is actually a martingale difference with a sub-exponential conditional MGF, making the theorem false as originally stated — see MODERATION_NOTES.md.


Retired. Retired because the scale parameters α_k were not required to be nonnegative (Definition 2.7), making the conditional-MGF hypothesis vacuous for α_k < 0 (accepted disproof), and the regime split t ≤ Σν_k²/α_* collapsed for α_* = 0; replaced by HighDimStat.TailBounds.martingale_bernstein_bound_v2.

Preamble
import Mathlib
import Definitions.Def_HighDimStat_TailBounds_IsSubExponential

open MeasureTheory
Formal statement
namespace HighDimStat.TailBounds

/-- **Theorem 2.19** (Martingale Bernstein bound), Wainwright, *High-Dimensional Statistics*
(2019), p. 35. Let `{(Dk,Fk)}` be a martingale difference sequence (realized as: `D k` is
`ℱ k`-measurable and `E[D k | ℱ (k-1)] = 0`, for `k = 1,...,n`), and suppose
`E[e^{λDk} | ℱ(k-1)] ≤ e^{λ²νk²/2}` a.s. for `|λ| < 1/αk`. Then (a) `∑Dk` is sub-exponential with
parameters `(√(∑νk²), max αk)`, and (b) `∑Dk` satisfies the two-regime concentration inequality
of Eq. (2.28). Explicit `Integrable` hypotheses on each `D k` and on each conditional-MGF
exponential are required to block Mathlib's `condExp`/Bochner-integral junk value `0` on a
non-integrable argument, which would otherwise let `h_cent`/`h_subexp` hold vacuously for a
non-integrable `D k` (e.g. Cauchy-distributed) regardless of the true martingale-difference or
sub-exponential-MGF property — the same guard `IsSubExponential`'s own definition already uses,
applied here to the conditional form. -/
theorem martingale_bernstein_bound {Ω : Type*} {mΩ : MeasurableSpace Ω} [StandardBorelSpace Ω]
    {μ : Measure Ω} [IsProbabilityMeasure μ] {D : ℕ → Ω → ℝ} {ν α : ℕ → ℝ} {ℱ : Filtration ℕ mΩ}
    (n : ℕ) (hn : 1 ≤ n)
    (h_meas : ∀ k ∈ Finset.Icc 1 n, Measurable[ℱ k] (D k))
    (h_int : ∀ k ∈ Finset.Icc 1 n, Integrable (D k) μ)
    (h_cent : ∀ k ∈ Finset.Icc 1 n, μ[D k | ℱ (k - 1)] =ᵐ[μ] 0)
    (h_subexp_int : ∀ k ∈ Finset.Icc 1 n, ∀ lam : ℝ, (α k = 0 ∨ |lam| < 1 / α k) →
      Integrable (fun ω => Real.exp (lam * D k ω)) μ)
    (h_subexp : ∀ k ∈ Finset.Icc 1 n, ∀ lam : ℝ, (α k = 0 ∨ |lam| < 1 / α k) →
      (μ[fun ω => Real.exp (lam * D k ω) | ℱ (k - 1)]) ≤ᵐ[μ]
        fun _ => Real.exp (lam ^ 2 * (ν k) ^ 2 / 2)) :
    IsSubExponential (fun ω => ∑ k ∈ Finset.Icc 1 n, D k ω) μ
        (Real.sqrt (∑ k ∈ Finset.Icc 1 n, (ν k) ^ 2))
        (Finset.sup' (Finset.Icc 1 n) (Finset.nonempty_Icc.mpr hn) α)
    ∧
    ∀ t : ℝ, 0 ≤ t →
      μ.real {ω | t ≤ |∑ k ∈ Finset.Icc 1 n, D k ω|} ≤
        if t ≤ (∑ k ∈ Finset.Icc 1 n, (ν k) ^ 2) / (Finset.sup' (Finset.Icc 1 n) (Finset.nonempty_Icc.mpr hn) α)
        then 2 * Real.exp (-(t ^ 2) / (2 * ∑ k ∈ Finset.Icc 1 n, (ν k) ^ 2))
        else 2 * Real.exp (-t / (2 * Finset.sup' (Finset.Icc 1 n) (Finset.nonempty_Icc.mpr hn) α)) := by sorry

end HighDimStat.TailBounds
Source
Wainwright, High-Dimensional Statistics, CUP 2019, p. 35 (PDF p. 55), Theorem 2.19, Eq. (2.28)
Human review
  • Endorsed by Shuze Chen · Sep 28, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 28, 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