Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Lemma 15 — an on-average generalizing AERM is consistent

Proved
LearnStability.Characterization.lemma15_aerm_onAverage_consistent

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

consistencylearning-theoryp2o-batch-p100bp2o-gran-per-chapterp2o-plan-paperp2o-v1

Let fff be a learning problem satisfying the standing assumptions, with H\mathcal HH nonempty, AAA a measurable learning rule and D\mathcal DD a distribution on Z\mathcal ZZ. If AAA is an AERM with rate εerm(m)\varepsilon_{\rm erm}(m)εerm​(m) under D\mathcal DD and on-average generalizes with rate εoag(m)\varepsilon_{\rm oag}(m)εoag​(m) under D\mathcal DD, then AAA is consistent under D\mathcal DD with rate

εcons(m)=εoag(m)+εerm(m),\varepsilon_{\rm cons}(m)=\varepsilon_{\rm oag}(m)+\varepsilon_{\rm erm}(m),εcons​(m)=εoag​(m)+εerm​(m),

that is, ES∼Dm[F(A(S))−F∗]≤εoag(m)+εerm(m)\mathbb E_{S\sim\mathcal D^m}[F(A(S))-F^*]\le\varepsilon_{\rm oag}(m)+\varepsilon_{\rm erm}(m)ES∼Dm​[F(A(S))−F∗]≤εoag​(m)+εerm​(m) for every m≥1m\ge1m≥1.

With Lemma 11 and Claim 6 this gives the consistency part of Theorem 8 and the sufficiency direction of Theorem 7.

Preamble
import Mathlib
import Definitions.Def_LearnStability_Characterization_Setting
import Definitions.Def_LearnStability_Characterization_RuleProperties

open MeasureTheory
Formal statement
namespace LearnStability.Characterization

/-- Lemma 15 (p. 2651): if a (measurable) rule is an AERM with rate `ε_erm` and on-average
generalizes with rate `ε_oag` under `D`, then it is consistent with rate `ε_oag + ε_erm`
under `D`. -/
theorem lemma15_aerm_onAverage_consistent {H Z : Type*} [MeasurableSpace Z] [Nonempty H]
    (f : H → Z → ℝ) (B : ℝ) (hP : StandingAssumptions f B)
    (A : Rule H Z) (hA : MeasurableRule f A)
    (D : Measure Z) [IsProbabilityMeasure D] (εerm εoag : ℕ → ℝ)
    (haerm : IsAERM f A D εerm) (hoag : OnAverageGeneralizes f A D εoag) :
    Consistent f A D (fun m => εoag m + εerm m) := by sorry

end LearnStability.Characterization
Source
Shalev-Shwartz, Shamir, Srebro and Sridharan, Learnability, Stability and Uniform Convergence, JMLR 11 (2010), p. 2651, Lemma 15
Read-back

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

Hypotheses.

  • HHH is nonempty.
  • A loss fff and a real number BBB satisfying the standing assumptions:
    • ∣f(h;z)∣≤B|f(h;z)|\le B∣f(h;z)∣≤B;
    • each f(h;⋅)f(h;\cdot)f(h;⋅) is measurable;
    • S↦F^SS\mapsto\hat F_SS↦F^S​ is measurable for each mmm, where F^S=inf⁡hFS(h)\hat F_S=\inf_h F_S(h)F^S​=infh​FS​(h) and FS(h)=1m∑if(h;zi)F_S(h)=\frac1m\sum_i f(h;z_i)FS​(h)=m1​∑i​f(h;zi​).
  • A rule AAA with (S,z)↦f(Am(S);z)(S,z)\mapsto f(A_m(S);z)(S,z)↦f(Am​(S);z) jointly measurable for every mmm.
  • A probability measure DDD on ZZZ.
  • Two arbitrary functions εerm,εoag:N→R\varepsilon_{\rm erm},\varepsilon_{\rm oag}:\mathbb N\to\mathbb Rεerm​,εoag​:N→R.
  • AAA is an AERM under DDD with rate εerm\varepsilon_{\rm erm}εerm​: for every m≥1m\ge1m≥1,
∫(FS(Am(S))−F^S) dDm(S)≤εerm(m).\int\big(F_S(A_m(S))-\hat F_S\big)\,dD^m(S)\le\varepsilon_{\rm erm}(m).∫(FS​(Am​(S))−F^S​)dDm(S)≤εerm​(m).
  • AAA on-average generalizes under DDD with rate εoag\varepsilon_{\rm oag}εoag​: for every m≥1m\ge1m≥1,
∣∫(FD(Am(S))−FS(Am(S))) dDm(S)∣≤εoag(m),\Big|\int\big(F_D(A_m(S))-F_S(A_m(S))\big)\,dD^m(S)\Big|\le\varepsilon_{\rm oag}(m),​∫(FD​(Am​(S))−FS​(Am​(S)))dDm(S)​≤εoag​(m),

where FD(h)=∫f(h;z) dDF_D(h)=\int f(h;z)\,dDFD​(h)=∫f(h;z)dD.

Conclusion. AAA is consistent under DDD with rate εoag+εerm\varepsilon_{\rm oag}+\varepsilon_{\rm erm}εoag​+εerm​: for every m≥1m\ge1m≥1,

∫(FD(Am(S))−FD∗) dDm(S)≤εoag(m)+εerm(m),FD∗=inf⁡h∈HFD(h).\int\big(F_D(A_m(S))-F^*_D\big)\,dD^m(S)\le\varepsilon_{\rm oag}(m)+\varepsilon_{\rm erm}(m),\qquad F^*_D=\inf_{h\in H}F_D(h).∫(FD​(Am​(S))−FD∗​)dDm(S)≤εoag​(m)+εerm​(m),FD∗​=h∈Hinf​FD​(h).

Degenerate cases.

  • If ZZZ is empty, the statement is vacuous because there is no probability measure.
  • HHH nonempty excludes the empty-infimum value.
  • The rates are not assumed to be monotone, to vanish, or to be nonnegative.
  • m=0m=0m=0 is never tested.
  • Non-integrable integrands would be read as 000.
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