Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Eq. (9) — test average loss converges in probability to the expected loss

Proved
XuMannorRobust.WeakRobust.eq9_convergence_in_probability

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

concentrationlearning-theoryp2o-batch-p200bp2o-gran-per-chapterp2o-plan-paperp2o-v1

Let Z\mathcal ZZ be a measurable space with a probability measure μ\muμ, H\mathcal HH a set of hypotheses, l:H×Z→[0,M]l : \mathcal H \times \mathcal Z \to [0, M]l:H×Z→[0,M] a loss measurable in its sample argument, A={An}\mathcal A = \{\mathcal A^n\}A={An} a learning method and s∗\mathbf s^*s∗ a fixed sequence of training samples. Let t(n)∼μn\mathbf t(n) \sim \mu^nt(n)∼μn. Then

L(As∗(n),t(n))−L(As∗(n))→ Pr⁡ 0,(9)L(\mathcal A_{\mathbf s^*(n)}, \mathbf t(n)) - \mathcal L(\mathcal A_{\mathbf s^*(n)}) \xrightarrow{\ \Pr\ } 0, \qquad (9)L(As∗(n)​,t(n))−L(As∗(n)​) Pr ​0,(9)

that is, for every ϵ>0\epsilon > 0ϵ>0,

lim⁡n→∞Pr⁡(∣L(As∗(n),t(n))−L(As∗(n))∣≥ϵ)=0.\lim_{n \to \infty} \Pr\Big( \big| L(\mathcal A_{\mathbf s^*(n)}, \mathbf t(n)) - \mathcal L(\mathcal A_{\mathbf s^*(n)}) \big| \ge \epsilon \Big) = 0.n→∞lim​Pr(​L(As∗(n)​,t(n))−L(As∗(n)​)​≥ϵ)=0.

The hypothesis As∗(n)\mathcal A_{\mathbf s^*(n)}As∗(n)​ changes with nnn; the convergence holds because the loss is uniformly bounded by MMM, so the concentration is uniform over hypotheses. Combined with Lemma 2 it gives the necessity half of Theorem 8.

Formalization Note The probability is Measure.pi (fun _ : Fin n => μ) of the event, and the limit is in [0,∞][0, \infty][0,∞]. Measurability of l(h,⋅)l(h, \cdot)l(h,⋅) is added.

Preamble
import Mathlib
import Definitions.Def_XuMannorRobust_WeakRobust_Setup

open MeasureTheory Filter Topology
Formal statement
namespace XuMannorRobust.WeakRobust

/-- Xu & Mannor 2012, p. 411, proof of Theorem 8, Eq. (9): for a loss uniformly bounded in
`[0, M]`, `L(A_{s*(n)}, t(n)) − 𝓛(A_{s*(n)}) → 0` in probability, `t(n) ∼ μⁿ`: for every `ε > 0`,
`Pr(|L(A_{s*(n)}, t(n)) − 𝓛(A_{s*(n)})| ≥ ε) → 0`. The hypothesis `A_{s*(n)}` changes with `n`. -/
theorem eq9_convergence_in_probability {Z H : Type*} [MeasurableSpace Z] (μ : Measure Z)
    [IsProbabilityMeasure μ] (l : H → Z → ℝ) (M : ℝ)
    (hl_bound : ∀ h z, 0 ≤ l h z ∧ l h z ≤ M) (hl_meas : ∀ h, Measurable (l h))
    (A : (n : ℕ) → (Fin n → Z) → H) (sStar : ℕ → Z) :
    ∀ ε > 0, Tendsto
      (fun n => Measure.pi (fun _ : Fin n => μ)
        {t | ε ≤ |avgLoss l (A n (firstN sStar n)) t - expectedLoss μ l (A n (firstN sStar n))|})
      atTop (𝓝 0) := by sorry

end XuMannorRobust.WeakRobust
Source
Xu & Mannor, Robustness and Generalization, Mach Learn 86 (2012), DOI 10.1007/s10994-011-5268-1, p. 411, proof of Theorem 8, Eq. (9)
Human review
  • Endorsed by Shuze Chen · Oct 1, 2026

    Confirmed by the moderator at approval.

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