Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The basic-case rate for nonparametric least squares (Theorem 13.5)

Proved
HighDimStat.NonparametricLS.thm13_5_basic_case_rate

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

machine-learningprobabilitystatistics

Theorem 13.5 (p. 423). Suppose the shifted function class F∗=F−{f∗}F^*=F-\{f^*\}F∗=F−{f∗} is star-shaped, and let δn\delta_nδn​ be any positive solution of the critical inequality Gn(δ;F∗)/δ≤δ/(2σ)G_n(\delta;F^*)/\delta\le\delta/(2\sigma)Gn​(δ;F∗)/δ≤δ/(2σ). Then for any t≥δnt\ge\delta_nt≥δn​, the nonparametric least-squares estimate f^n\hat f_nf^​n​, computed from data yi=f∗(xi)+σwiy_i=f^*(x_i)+\sigma w_iyi​=f∗(xi​)+σwi​ with wi∼iidN(0,1)w_i\stackrel{iid}\sim N(0,1)wi​∼iidN(0,1), satisfies

P[∥f^n−f∗∥n2≥16 tδn]≤e−ntδn/(2σ2).\mathbb P\big[\|\hat f_n-f^*\|_n^2\ge 16\,t\delta_n\big]\le e^{-nt\delta_n/(2\sigma^2)}.P[∥f^​n​−f∗∥n2​≥16tδn​]≤e−ntδn​/(2σ2).

This is the special case f∗∈Ff^*\in Ff∗∈F of the oracle inequality (Theorem 13.13): when the true regression function actually lies in the class being fit, the least-squares estimate concentrates around it at the rate set by the critical radius δn\delta_nδn​.

Formalization Note fHat : Ω → (X → ℝ) is the (data-dependent) least-squares estimate: for every noise realization ω, fHat ω minimizes the empirical squared error over F on the data y ω. The probability is P.real, the ℝ-valued measure (ENNReal.toReal of the outer measure), since Measure itself is ℝ≥0∞-valued.

Preamble
import Mathlib
import Definitions.Def_HighDimStat_NonparametricLS_Core
Formal statement
namespace HighDimStat.NonparametricLS

open MeasureTheory

/-- **Theorem 13.5** (p. 423, PDF 443). Suppose the shifted function class `F* = F − {f*}` is
star-shaped, and let `δn` be any positive solution of the critical inequality (13.17). Then
for any `t ≥ δn`, the nonparametric least-squares estimate `f̂ₙ`, computed from data
`yᵢ = f*(xᵢ) + σwᵢ` with `wᵢ` i.i.d. standard Gaussian, satisfies

`P[ ‖f̂ₙ − f*‖ₙ² ≥ 16 t δn ] ≤ exp( − n t δn / (2σ²) )`.

`fHat : Ω → (X → ℝ)` is the (data-dependent, hence random) least-squares estimate: for every
realization `ω` of the noise, `fHat ω` minimizes the empirical squared error over `F` on the
data `y ω`. -/
theorem thm13_5_basic_case_rate {X Ω : Type*} [MeasurableSpace Ω] {n : ℕ} (hn : 0 < n)
    (x : Fin n → X)
    (w : Fin n → Ω → ℝ) (P : Measure Ω) [IsProbabilityMeasure P] (hw : IsIIDStdGaussian P w)
    (F : Set (X → ℝ)) (fStar : X → ℝ) (hFstar : fStar ∈ F)
    (hStar : IsStarShaped (shiftedClass F fStar))
    (σ : ℝ) (hσ : 0 < σ)
    (y : Ω → Fin n → ℝ) (hy : ∀ ω i, y ω i = fStar (x i) + σ * w i ω)
    (fHat : Ω → (X → ℝ)) (hfHat : ∀ ω, IsLeastSquaresEstimate x F (y ω) (fHat ω))
    (δn t : ℝ) (hδn : SatisfiesCriticalInequality x w P (shiftedClass F fStar) σ δn)
    (ht : δn ≤ t) :
    P.real {ω | 16 * t * δn ≤ empiricalNormSq x (fun z => fHat ω z - fStar z)} ≤
      Real.exp (-(↑n * t * δn) / (2 * σ ^ 2)) := by sorry

end HighDimStat.NonparametricLS
Source
Wainwright, High-Dimensional Statistics, CUP 2019, p. 423 (PDF p. 443), Theorem 13.5, Eq. (13.20)
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