Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Example 6: Lasso is (N(γ/2,Z,∥⋅∥∞),(Y(s)/c+1)γ)(\mathcal N(\gamma/2, \mathcal Z, \|\cdot\|_\infty), (Y(\mathbf s)/c + 1)\gamma)(N(γ/2,Z,∥⋅∥∞​),(Y(s)/c+1)γ)-robust

Proved
XuMannorRobust.Lasso.example6_lasso_robust

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

algorithmic-robustnesslassolearning-theoryp2o-batch-p200bp2o-gran-per-chapterp2o-plan-paperp2o-v1

Let Z\mathcal ZZ be a compact subset of Rm+1\mathbb R^{m+1}Rm+1, whose points are written z=(z(y),z(x))z = (z^{(y)}, z^{(x)})z=(z(y),z(x)) with z(y)∈Rz^{(y)} \in \mathbb Rz(y)∈R and z(x)∈Rmz^{(x)} \in \mathbb R^mz(x)∈Rm, and let c>0c > 0c>0. Let A\mathcal AA be a Lasso algorithm: for every training set s=(s1,…,sn)\mathbf s = (s_1, \dots, s_n)s=(s1​,…,sn​), As=w\mathcal A_{\mathbf s} = wAs​=w is a solution of

min⁡w 1n∑i=1n(si(y)−w⊤si(x))2+c∥w∥1,(5)\min_w \ \frac1n \sum_{i=1}^n \big(s_i^{(y)} - w^\top s_i^{(x)}\big)^2 + c\|w\|_1 , \tag{5}wmin​ n1​i=1∑n​(si(y)​−w⊤si(x)​)2+c∥w∥1​,(5)

and let the loss be l(As,z)=∣z(y)−As(z(x))∣=∣z(y)−w⊤z(x)∣l(\mathcal A_{\mathbf s}, z) = |z^{(y)} - \mathcal A_{\mathbf s}(z^{(x)})| = |z^{(y)} - w^\top z^{(x)}|l(As​,z)=∣z(y)−As​(z(x))∣=∣z(y)−w⊤z(x)∣. Then for every γ>0\gamma > 0γ>0 the Lasso is

(N(γ/2,Z,∥⋅∥∞), (Y(s)/c+1)γ)-robust,Y(s)=1n∑i=1n[si(y)]2.\Big(\mathcal N(\gamma/2, \mathcal Z, \|\cdot\|_\infty),\ \big(Y(\mathbf s)/c + 1\big)\gamma\Big)\text{-robust}, \qquad Y(\mathbf s) = \frac1n \sum_{i=1}^n \big[s_i^{(y)}\big]^2 .(N(γ/2,Z,∥⋅∥∞​), (Y(s)/c+1)γ)-robust,Y(s)=n1​i=1∑n​[si(y)​]2.

Together with the paper's Theorem 1 this gives a generalization bound for the Lasso that holds for every selection of a minimizer.

Formalization Note Rm+1\mathbb R^{m+1}Rm+1 is ℝ × (Fin m → ℝ), whose Lean norm is the maximum of the absolute values of the m+1m+1m+1 coordinates, i.e. ∥⋅∥∞\|\cdot\|_\infty∥⋅∥∞​. The covering number is Mathlib's Metric.coveringNumber (closed balls, centres in Z\mathcal ZZ) at radius Real.toNNReal (γ/2), converted to ℕ with toNat; its finiteness is not assumed but follows from compactness. The algorithm is any function returning a Lasso minimizer for every training set; c>0c > 0c>0 is assumed explicitly.

Preamble
import Mathlib
import Definitions.Def_XuMannorRobust_Lasso_IsRobustOn
import Definitions.Def_XuMannorRobust_Lasso_LassoFormulation
import Definitions.Def_XuMannorRobust_Lasso_LassoLoss
Formal statement
namespace XuMannorRobust.Lasso

/-- **Example 6 (Lasso)** (Xu & Mannor 2012, p. 404). Let `Z ⊆ ℝ × ℝ^m` (a copy of `ℝ^{m+1}`
carrying the `ℓ_∞` norm) be compact, `c > 0`, and let `A` be any algorithm that returns, for each
training set `s`, a solution `A_s` of the Lasso (5). With the loss `l(w, z) = |z^{(y)} − w^⊤ z^{(x)}|`,
`A` is `(N(γ/2, Z, ‖·‖_∞), (Y(s)/c + 1)γ)`-robust for every `γ > 0`, where
`Y(s) = (1/n) ∑_{i=1}^n [s_i^{(y)}]²`. -/
theorem example6_lasso_robust {m n : ℕ} (Z : Set (ℝ × (Fin m → ℝ))) (hZ : IsCompact Z)
    (c : ℝ) (hc : 0 < c) (A : (Fin n → ℝ × (Fin m → ℝ)) → (Fin m → ℝ))
    (hA : ∀ s, IsLassoSolution c s (A s)) (γ : ℝ) (hγ : 0 < γ) :
    IsRobustOn Z lassoLoss A (Metric.coveringNumber (Real.toNNReal (γ / 2)) Z).toNat
      (fun s => (meanSqResponse s / c + 1) * γ) := by sorry

end XuMannorRobust.Lasso
Source
Xu & Mannor, Robustness and Generalization, Mach Learn 86 (2012), DOI 10.1007/s10994-011-5268-1, p. 404, Example 6 (proof in Appendix F, p. 419)
Human review
  • Endorsed by Shuze Chen · Oct 1, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 1, 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