Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 22 — Ĝ_n(F) ≤ (2B/n)√(Σ k(X_i, X_i)) and R̂_n(F) ≤ (2B/n)√(Σ k(X_i, X_i)) for the kernel class

Proved
RadGauss.Kernel.lemma_22

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

gaussian-complexitykernel-methodslearning-theoryp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1rademacher-complexity

Let kkk be a kernel on a compact space X\mathcal XX, let B≥0B \ge 0B≥0, and let FFF be the class of kernel expansions x↦∑i=1mαik(x,xi)x \mapsto \sum_{i=1}^m \alpha_i k(x, x_i)x↦∑i=1m​αi​k(x,xi​) with ∑i,jαiαjk(xi,xj)≤B2\sum_{i,j}\alpha_i\alpha_j k(x_i, x_j) \le B^2∑i,j​αi​αj​k(xi​,xj​)≤B2. Then for every nnn and every sample X1,…,Xn∈XX_1, \dots, X_n \in \mathcal XX1​,…,Xn​∈X, the empirical Gaussian and Rademacher complexities of FFF satisfy

G^n(F)≤2Bn∑i=1nk(Xi,Xi),R^n(F)≤2Bn∑i=1nk(Xi,Xi).\hat G_n(F) \le \frac{2B}{n}\sqrt{\sum_{i=1}^n k(X_i, X_i)}, \qquad \hat R_n(F) \le \frac{2B}{n}\sqrt{\sum_{i=1}^n k(X_i, X_i)}.G^n​(F)≤n2B​i=1∑n​k(Xi​,Xi​)​,R^n​(F)≤n2B​i=1∑n​k(Xi​,Xi​)​.

The bound depends on the sample only through the trace of its Gram matrix, so it holds for every realization of random elements X1,…,XnX_1, \dots, X_nX1​,…,Xn​ and requires no bound on the kernel beyond its values at the sample points.

Formalization Note The statement is sample-wise: it holds for every x:Fin n→Xx : \mathrm{Fin}\,n \to \mathcal Xx:Finn→X. Complexities are those of Definition 2 with values in [0,∞][0,\infty][0,∞], the right-hand side is embedded by ENNReal.ofReal. The paper takes B>0B > 0B>0; here B≥0B \ge 0B≥0. At n=0n = 0n=0 both sides are 000 (2/0=02/0 = 02/0=0 in Lean), so no n≥1n \ge 1n≥1 hypothesis is needed.

Preamble
import Mathlib
import Definitions.Def_RadGauss_Kernel_Complexity
import Definitions.Def_RadGauss_Kernel_KernelClass
Formal statement
namespace RadGauss.Kernel

/-- Lemma 22 (Bartlett–Mendelson 2002, p. 477). Let `k` be a kernel on `𝒳`, `B ≥ 0`, and let
`F = kernelClass k B`. For every sample `x_1, …, x_n ∈ 𝒳`,
`Ĝ_n(F) ≤ (2B/n) √(Σ_i k(x_i, x_i))` and `R̂_n(F) ≤ (2B/n) √(Σ_i k(x_i, x_i))`.
The paper takes `B > 0`; `0 ≤ B` is assumed here. At `n = 0` both sides are `0`. -/
theorem lemma_22 {X : Type*} [TopologicalSpace X] (k : X → X → ℝ) (hk : IsKernel k)
    (B : ℝ) (hB : 0 ≤ B) (n : ℕ) (x : Fin n → X) :
    empiricalGaussian (kernelClass k B) n x
        ≤ ENNReal.ofReal (2 * B / n * Real.sqrt (∑ i, k (x i) (x i))) ∧
      RadGauss.Classification.empiricalRademacher (kernelClass k B) n x
        ≤ ENNReal.ofReal (2 * B / n * Real.sqrt (∑ i, k (x i) (x i))) := by sorry

end RadGauss.Kernel
Source
Bartlett, Mendelson, Rademacher and Gaussian Complexities: Risk Bounds and Structural Results, J. Mach. Learn. Res. 3 (2002), p. 477 (PDF p. 15), Lemma 22
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