Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Utility Lemma 12 — the mean of m i.i.d. variables bounded by B deviates from its expectation by at most B/√m in L¹

Proved
LearnStability.ERMLOO.utility_lemma12

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

concentrationp2o-batch-p100bp2o-gran-per-chapterp2o-plan-paperp2o-v1probability

Let X1,…,XmX_1,\dots,X_mX1​,…,Xm​ (m≥1m\ge1m≥1) be independent, identically distributed real random variables on a probability space with ∣Xi∣≤B|X_i|\le B∣Xi​∣≤B almost surely, and let X=1m∑i=1mXiX=\frac1m\sum_{i=1}^m X_iX=m1​∑i=1m​Xi​. Then

E[∣X−E[X]∣]≤Bm.\mathbb E\big[|X-\mathbb E[X]|\big]\le\frac{B}{\sqrt m}.E[∣X−E[X]∣]≤m​B​.

This is the elementary concentration estimate used to compare the empirical risk of a fixed hypothesis with its risk, for instance in Lemma 14 and Lemma 16.

Formalization Note. The bound ∣Xi∣≤B|X_i|\le B∣Xi​∣≤B is required almost surely (the paper writes ∣Xi∣≤B|X_i|\le B∣Xi​∣≤B), each XiX_iXi​ is measurable, independence is iIndepFun, and identical distribution is required pairwise.

Preamble
import Mathlib

open MeasureTheory ProbabilityTheory
Formal statement
namespace LearnStability.ERMLOO

theorem utility_lemma12 {Ω : Type*} [MeasurableSpace Ω] {μ : Measure Ω} [IsProbabilityMeasure μ]
    {m : ℕ} (hm : 1 ≤ m) (X : Fin m → Ω → ℝ) (B : ℝ)
    (hmeas : ∀ i, Measurable (X i))
    (hindep : iIndepFun X μ)
    (hident : ∀ i j, IdentDistrib (X i) (X j) μ μ)
    (hB : ∀ i, ∀ᵐ ω ∂μ, |X i ω| ≤ B) :
    ∫ ω, |(∑ i, X i ω) / m - ∫ ω', (∑ i, X i ω') / m ∂μ| ∂μ ≤ B / Real.sqrt m := by sorry

end LearnStability.ERMLOO
Source
Shalev-Shwartz, Shamir, Srebro and Sridharan, Learnability, Stability and Uniform Convergence, JMLR 11 (2010), p. 2650, Utility Lemma 12
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

The setting is a probability space (Ω,μ)(\Omega,\mu)(Ω,μ), an integer m≥1m \ge 1m≥1, and real-valued functions X1,…,XmX_1,\dots,X_mX1​,…,Xm​ on Ω\OmegaΩ. Assume all of the following:

  1. each XiX_iXi​ is measurable;
  2. X1,…,XmX_1,\dots,X_mX1​,…,Xm​ are mutually independent under μ\muμ;
  3. for every pair i,ji,ji,j, XiX_iXi​ and XjX_jXj​ have the same distribution under μ\muμ;
  4. for each iii, ∣Xi(ω)∣≤B|X_i(\omega)| \le B∣Xi​(ω)∣≤B for μ\muμ-almost every ω\omegaω, where BBB is a real number.

Let Xˉ(ω)=1m∑i=1mXi(ω)\bar X(\omega) = \frac1m\sum_{i=1}^m X_i(\omega)Xˉ(ω)=m1​∑i=1m​Xi​(ω) be the sample mean. The statement asserts

∫Ω∣Xˉ(ω)−∫ΩXˉ dμ∣ dμ(ω)  ≤  Bm,\int_\Omega \Big|\bar X(\omega) - \int_\Omega \bar X\,d\mu\Big|\,d\mu(\omega) \;\le\; \frac{B}{\sqrt m},∫Ω​​Xˉ(ω)−∫Ω​Xˉdμ​dμ(ω)≤m​B​,

that is, E∣Xˉ−EXˉ∣≤B/m\mathbb{E}|\bar X - \mathbb{E}\bar X| \le B/\sqrt mE∣Xˉ−EXˉ∣≤B/m​.

Degenerate cases:

  • Sample size. m=0m = 0m=0 is excluded. For m=1m = 1m=1 the claim is E∣X1−EX1∣≤B\mathbb{E}|X_1 - \mathbb{E}X_1| \le BE∣X1​−EX1​∣≤B.
  • Sign of BBB. Because μ\muμ is a probability measure and m≥1m \ge 1m≥1, the almost-sure bound forces B≥0B \ge 0B≥0. With B=0B = 0B=0, every XiX_iXi​ is 000 almost surely and both sides are 000.
  • Integrability. The integrands are measurable and bounded almost surely, so no zero-for-non-integrable convention is triggered.
Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 27, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me