Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 5.5 — the representer theorem for empirical SVM solutions

Proved
SupportVectorMachines.InfiniteSample.theorem_5_5_representer_theorem

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

functional-analysismachine-learningstatistics

This is Theorem 5.5 (the representer theorem) of Steinwart & Christmann, Support Vector Machines (Springer 2008, p. 168): let L:X×Y×R→[0,∞)L : X \times Y \times \mathbb R \to [0,\infty)L:X×Y×R→[0,∞) be a convex loss and D:=((x1,y1),…,(xn,yn))∈(X×Y)nD := ((x_1,y_1),\dots,(x_n,y_n)) \in (X \times Y)^nD:=((x1​,y1​),…,(xn​,yn​))∈(X×Y)n. Let HHH be an RKHS over XXX with kernel kkk. Then, for all λ>0\lambda > 0λ>0, there exists a unique empirical SVM solution fD,λ∈Hf_{D,\lambda} \in HfD,λ​∈H, i.e. a unique minimizer of

f↦λ∥f∥H2+RL,D(f)f \mapsto \lambda\|f\|_H^2 + R_{L,D}(f)f↦λ∥f∥H2​+RL,D​(f)

over HHH. In addition, there exist α1,…,αn∈R\alpha_1,\dots,\alpha_n \in \mathbb Rα1​,…,αn​∈R such that

fD,λ(x)=∑i=1nαi k(x,xi)for all x∈X.f_{D,\lambda}(x) = \sum_{i=1}^n \alpha_i\, k(x,x_i) \qquad \text{for all } x \in X.fD,λ​(x)=i=1∑n​αi​k(x,xi​)for all x∈X.

This is the single most quoted structural fact about support vector machines: although the optimization problem ranges over the entire (typically infinite-dimensional) RKHS HHH, its minimizer always lies in the nnn-dimensional subspace spanned by the kernel functions k(⋅,x1),…,k(⋅,xn)k(\cdot,x_1),\dots,k(\cdot,x_n)k(⋅,x1​),…,k(⋅,xn​), which is exactly what makes SVM training a finite-dimensional (and hence computationally tractable) problem in practice.

Formalization Note The goal keeps both of the theorem's clauses together, as a single unique witness: existence and uniqueness of the minimizer, and — for that same, unique minimizer — the finite kernel-expansion representation. The coefficients α1,…,αn\alpha_1,\dots, \alpha_nα1​,…,αn​ are only asserted to exist, not to be unique, matching the book exactly (the representation can be non-unique when the k(⋅,xi)k(\cdot,x_i)k(⋅,xi​) are linearly dependent). HHH is required to carry a genuine reproducing kernel kkk (IsRKHSOfKernel), not merely to be an abstract Hilbert space, since the representation clause is stated directly in terms of kkk.

Preamble
import Mathlib
import Definitions.Def_SupportVectorMachines_InfiniteSample_Loss
import Definitions.Def_SupportVectorMachines_InfiniteSample_IsRKHSOfKernel
import Definitions.Def_SupportVectorMachines_InfiniteSample_populationRisk

open MeasureTheory
Formal statement
namespace SupportVectorMachines.InfiniteSample

/-- Theorem 5.5 (Representer theorem), p. 168: let `L` be a convex loss and
`D := ((x₁,y₁),…,(xₙ,yₙ)) ∈ (X × ℝ)ⁿ`. Let `H` be the RKHS of a kernel `k` over `X`. Then for all
`λ > 0` there exists a unique empirical SVM solution `f_{D,λ} ∈ H`, i.e. a unique minimizer of
`f ↦ λ‖f‖²_H + R_{L,D}(f)` over `H`; moreover there exist `α₁,…,αₙ ∈ ℝ` with
`f_{D,λ}(x) = ∑ᵢ αᵢ k(x,xᵢ)` for all `x ∈ X`. -/
theorem theorem_5_5_representer_theorem {X : Type*} {n : ℕ} (hn : 0 < n)
    (L : Loss X) (hL : ∀ x y, ConvexOn ℝ Set.univ (L x y)) (hLnn : ∀ x y t, 0 ≤ L x y t)
    (D : Fin n → X × ℝ)
    (H : Type) [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H]
    (toFun : H →ₗ[ℝ] (X → ℝ)) (k : X → X → ℝ) (hRKHS : IsRKHSOfKernel H toFun k)
    (lam : ℝ) (hlam : 0 < lam) :
    ∃! f : H,
      (∀ g : H, lam * ‖f‖ ^ 2 + empiricalRisk n L D (toFun f) ≤
        lam * ‖g‖ ^ 2 + empiricalRisk n L D (toFun g)) ∧
      ∃ α : Fin n → ℝ, ∀ x : X, toFun f x = ∑ i, α i * k x (D i).1 := by sorry

end SupportVectorMachines.InfiniteSample
Source
Steinwart & Christmann, Support Vector Machines, Springer 2008, p. 168, Theorem 5.5
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