Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of Theorem 8 — w.p. ≥1−δ/2\ge 1-\delta/2≥1−δ/2, sup⁡(Eh−E^nh)≤Esup⁡(Eh−E^nh)+2ln⁡(2/δ)/n\sup(\mathbf Eh-\hat{\mathbf E}_nh)\le \mathbf E\sup(\mathbf Eh-\hat{\mathbf E}_nh)+\sqrt{2\ln(2/\delta)/n}sup(Eh−E^n​h)≤Esup(Eh−E^n​h)+2ln(2/δ)/n​

Proved
RadGauss.RiskBound.mcdiarmid_step

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

concentration-inequalityempirical-processlearning-theoryp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1

Let PPP be a probability measure on X×Y\mathcal X \times \mathcal YX×Y, let ϕ:Y×A→[0,1]\phi : \mathcal Y \times \mathcal A \to [0, 1]ϕ:Y×A→[0,1] be measurable, let FFF be a class of measurable maps X→A\mathcal X \to \mathcal AX→A, let n≥1n \ge 1n≥1 and 0<δ<10 < \delta < 10<δ<1. Let S=((Xi,Yi))i=1nS = ((X_i, Y_i))_{i=1}^nS=((Xi​,Yi​))i=1n​ be an i.i.d. sample from PPP. Then with probability at least 1−δ/21 - \delta/21−δ/2,

sup⁡h∈ϕ~∘F(Eh−E^nh)≤Esup⁡h∈ϕ~∘F(Eh−E^nh)+2ln⁡(2/δ)n.\sup_{h\in\tilde\phi\circ F}\bigl(\mathbf E h - \hat{\mathbf E}_n h\bigr) \le \mathbf E \sup_{h\in\tilde\phi\circ F}\bigl(\mathbf E h - \hat{\mathbf E}_n h\bigr) + \sqrt{\frac{2\ln(2/\delta)}{n}} .h∈ϕ~​∘Fsup​(Eh−E^n​h)≤Eh∈ϕ~​∘Fsup​(Eh−E^n​h)+n2ln(2/δ)​​.

The outer expectation is over the sample. This is the concentration half of the proof of Theorem 8.

Formalization Note The uniform deviation S↦sup⁡h(Eh−E^nh)S \mapsto \sup_h(\mathbf Eh - \hat{\mathbf E}_nh)S↦suph​(Eh−E^n​h) is assumed measurable (the mission's measurability guard; the paper does not discuss measurability). The statement bounds the measure of the failure event {sup⁡>Esup⁡+2ln⁡(2/δ)/n}\{\sup > \mathbf E\sup + \sqrt{2\ln(2/\delta)/n}\}{sup>Esup+2ln(2/δ)/n​} by δ/2\delta/2δ/2. The hypothesis n≥1n \ge 1n≥1 is the paper's "integer nnn".

Preamble
import Mathlib
import Definitions.Def_RadGauss_RiskBound_uniformDeviation
import Definitions.Def_RadGauss_RiskBound_phiTildeComp

open MeasureTheory
Formal statement
namespace RadGauss.RiskBound

/-- **Proof of Theorem 8** (p. 467), the McDiarmid step: with probability at least `1 − δ/2` over
an i.i.d. sample of size `n ≥ 1` from `P`,
`sup_{h ∈ φ̃∘F} (E h − Ê_n h) ≤ E sup_{h ∈ φ̃∘F} (E h − Ê_n h) + √(2 ln(2/δ)/n)`.
The uniform deviation is assumed measurable as a function of the sample. -/
theorem mcdiarmid_step {X Y A : Type*} [MeasurableSpace X] [MeasurableSpace Y]
    [MeasurableSpace A] [Zero A]
    (φ : Y → A → ℝ) (hφ : Measurable (Function.uncurry φ))
    (hφ01 : ∀ y a, 0 ≤ φ y a ∧ φ y a ≤ 1)
    (F : Set (X → A)) (hF : ∀ f ∈ F, Measurable f)
    (P : Measure (X × Y)) [IsProbabilityMeasure P] (n : ℕ) (hn : 0 < n)
    (δ : ℝ) (hδ0 : 0 < δ) (hδ1 : δ < 1)
    (hsup : Measurable (supDev P n (phiTildeComp φ F))) :
    (Measure.pi fun _ : Fin n => P)
      {S | ¬ (supDev P n (phiTildeComp φ F) S ≤
          (∫ S', supDev P n (phiTildeComp φ F) S' ∂(Measure.pi fun _ : Fin n => P)) +
            Real.sqrt (2 * Real.log (2 / δ) / n))}
      ≤ ENNReal.ofReal (δ / 2) := by sorry

end RadGauss.RiskBound
Source
Bartlett, Mendelson, Rademacher and Gaussian Complexities: Risk Bounds and Structural Results, J. Mach. Learn. Res. 3 (2002), p. 467 (PDF p. 5), proof of Theorem 8, last display
Human review
  • Endorsed by Shuze Chen · Oct 5, 2026

    Confirmed by the moderator at approval.

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