Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Equation (16.3): for w = ∑ⱼ αⱼψ(xⱼ) the objective of (16.2) is f(∑ⱼ αⱼK(xⱼ,x₁), …) + R(√(∑ᵢⱼ αᵢαⱼK(xⱼ,xᵢ)))

Proved
UnderstandingML.kernel_objective_identity

by naimengye · Sep 24, 2026 · Mathlib 0df444a (Lean v4.33.1)

kernel-methodskernel-trick

Equation (16.3). Writing w=∑jαjψ(xj)w = \sum_j \alpha_j\psi(x_j)w=∑j​αj​ψ(xj​), we have ⟨w,ψ(xi)⟩=∑jαjK(xj,xi)\langle w, \psi(x_i)\rangle = \sum_j \alpha_j K(x_j, x_i)⟨w,ψ(xi​)⟩=∑j​αj​K(xj​,xi​) and ∥w∥2=∑i,jαiαjK(xi,xj)\|w\|^2 = \sum_{i,j}\alpha_i\alpha_j K(x_i, x_j)∥w∥2=∑i,j​αi​αj​K(xi​,xj​), so instead of solving (16.2) we can solve the equivalent problem

min⁡α∈Rmf(∑jαjK(xj,x1),…,∑jαjK(xj,xm))+R(∑i,jαiαjK(xj,xi)),\min_{\alpha \in \mathbb{R}^m} f\Big(\sum_j \alpha_j K(x_j, x_1), \dots, \sum_j \alpha_j K(x_j, x_m)\Big) + R\Big(\sqrt{\sum_{i,j}\alpha_i\alpha_j K(x_j, x_i)}\Big),α∈Rmmin​f(j∑​αj​K(xj​,x1​),…,j∑​αj​K(xj​,xm​))+R(i,j∑​αi​αj​K(xj​,xi​)​),

which needs only the Gram matrix.

Preamble
import Definitions.Def_UnderstandingML_Kernel

open MeasureTheory
open scoped InnerProductSpace
Formal statement
universe u

namespace UnderstandingML

/-- **Equation (16.3)** (p. 219). Writing `w = ∑ⱼ αⱼ ψ(xⱼ)`, the objective of (16.2) equals
`f(∑ⱼ αⱼK(xⱼ, x₁), …, ∑ⱼ αⱼK(xⱼ, x_m)) + R(√(∑ᵢⱼ αᵢαⱼ K(xⱼ, xᵢ)))`, so that (16.2) can be solved
knowing only the Gram matrix. -/
theorem kernel_objective_identity {X : Type u} {F : Type*} [NormedAddCommGroup F]
    [InnerProductSpace ℝ F] [CompleteSpace F] {m : ℕ} (ψ : X → F) (x : Fin m → X)
    (f : (Fin m → ℝ) → ℝ) (R : ℝ → ℝ) (α : Fin m → ℝ) :
    kernelObjective ψ x f R (∑ j, α j • ψ (x j)) =
      f (fun i ↦ ∑ j, α j * kernelOf ψ (x j) (x i)) +
        R (Real.sqrt (∑ i, ∑ j, α i * α j * kernelOf ψ (x j) (x i))) := by sorry

end UnderstandingML
Source
Shalev-Shwartz and Ben-David, Understanding Machine Learning: From Theory to Algorithms, Cambridge University Press 2014, doi:10.1017/CBO9781107298019, §16.2 p. 219, Equation (16.3) with its derivation
Human review
  • Endorsed by Shuze Chen · Sep 25, 2026

    Confirmed by the moderator at approval.

  • Endorsed by naimengye · Sep 25, 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