Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 5.1 — approximate equivalence of the Lasso and Dantzig prediction losses

Proved
LassoDantzig.Equivalence.theorem_5_1

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

dantzig-selectorhigh-dimensional-statisticslassop2o-batch-p100bp2o-gran-per-chapterp2o-plan-paperp2o-v1prediction-loss

Let n≥1n\ge1n≥1 and M≥2M\ge2M≥2. Let X=(fj(Zi))∈Rn×MX=(f_j(Z_i))\in\mathbb R^{n\times M}X=(fj​(Zi​))∈Rn×M be the design matrix of a dictionary f1,…,fMf_1,\dots,f_Mf1​,…,fM​ at design points Z1,…,ZnZ_1,\dots,Z_nZ1​,…,Zn​, with empirical column norms ∥fj∥n=(1n∑iXij2)1/2≠0\|f_j\|_n=(\tfrac1n\sum_iX_{ij}^2)^{1/2}\ne0∥fj​∥n​=(n1​∑i​Xij2​)1/2=0, and let f=(f(Z1),…,f(Zn))∈Rnf=(f(Z_1),\dots,f(Z_n))\in\mathbb R^nf=(f(Z1​),…,f(Zn​))∈Rn be arbitrary (the regression function is not assumed to be a combination of the fjf_jfj​). Let W1,…,WnW_1,\dots,W_nW1​,…,Wn​ be independent N(0,σ2)\mathcal N(0,\sigma^2)N(0,σ2) random variables with σ>0\sigma>0σ>0, and observe y=f+Wy=f+Wy=f+W. Let Assumption RE(s,1)(s,1)(s,1) hold with 1≤s≤M1\le s\le M1≤s≤M and witness κ>0\kappa>0κ>0. Let A>22A>2\sqrt2A>22​ and

r=Aσlog⁡Mn.r=A\sigma\sqrt{\frac{\log M}{n}} .r=AσnlogM​​.

Then there is an event of probability at least 1−M1−A2/81-M^{1-A^2/8}1−M1−A2/8 on which, for every Lasso solution β^L\hat\beta_Lβ^​L​ of (2.1) and every Dantzig selector β^D\hat\beta_Dβ^​D​ of (2.4) (both with this rrr) such that M(β^L)≤s\mathcal M(\hat\beta_L)\le sM(β^​L​)≤s,

∣ ∥f^D−f∥n2−∥f^L−f∥n2 ∣≤16A2 M(β^L)σ2n fmax⁡2κ2 log⁡M,\Big|\,\|\hat f_D-f\|_n^2-\|\hat f_L-f\|_n^2\,\Big|\le16A^2\,\frac{\mathcal M(\hat\beta_L)\sigma^2}{n}\,\frac{f_{\max}^2}{\kappa^2}\,\log M ,​∥f^​D​−f∥n2​−∥f^​L​−f∥n2​​≤16A2nM(β^​L​)σ2​κ2fmax2​​logM,

where f^L=Xβ^L\hat f_L=X\hat\beta_Lf^​L​=Xβ^​L​, f^D=Xβ^D\hat f_D=X\hat\beta_Df^​D​=Xβ^​D​, ∥g−f∥n2=1n∑i(gi−fi)2\|g-f\|_n^2=\tfrac1n\sum_i(g_i-f_i)^2∥g−f∥n2​=n1​∑i​(gi​−fi​)2 and fmax⁡=max⁡j∥fj∥nf_{\max}=\max_j\|f_j\|_nfmax​=maxj​∥fj​∥n​.

The two estimators thus have prediction losses that differ by at most the rate M(β^L)σ2log⁡M/n\mathcal M(\hat\beta_L)\sigma^2\log M/nM(β^​L​)σ2logM/n of a sparse regression with M(β^L)\mathcal M(\hat\beta_L)M(β^​L​) parameters, up to the factor fmax⁡2/κ2f_{\max}^2/\kappa^2fmax2​/κ2 measuring how ill-posed the Gram matrix is on sparse vectors. Any prediction bound proved for one estimator then transfers to the other at this cost.

Formalization Note κ\kappaκ is any witness of RE(s,1)(s,1)(s,1); the paper's κ(s,1)\kappa(s,1)κ(s,1) is the largest witness and the bound decreases in κ\kappaκ, so the two formulations are equivalent. The condition "M(β^L)≤s\mathcal M(\hat\beta_L)\le sM(β^​L​)≤s" concerns the realised Lasso solution and is required inside the event, for each ω\omegaω and each solution; the event itself does not depend on the solutions. Neither estimator need be unique and the bound holds for all of them. The law of WiW_iWi​ is Mathlib's gaussianReal 0 σ², with each WiW_iWi​ measurable and the family mutually independent; log⁡\loglog is the natural logarithm; the event is measurable and its probability is taken as a real number.

Preamble
import Mathlib
import Definitions.Def_LassoDantzig_Equivalence_Model

open MeasureTheory ProbabilityTheory
Formal statement
namespace LassoDantzig.Equivalence

/-- Theorem 5.1 (Bickel–Ritov–Tsybakov): approximate equivalence of the Lasso and Dantzig
prediction losses. With probability at least `1 − M^{1 − A²/8}`, for every Lasso solution
`β̂_L` with `𝓜(β̂_L) ≤ s` and every Dantzig selector `β̂_D` (same `r = Aσ√(log M / n)`),
`|‖f̂_D − f‖_n² − ‖f̂_L − f‖_n²| ≤ 16 A² (𝓜(β̂_L) σ² / n) (f_max² / κ²) log M`. -/
theorem theorem_5_1 {n M : ℕ} (hn : 1 ≤ n) (hM : 2 ≤ M)
    (X : Matrix (Fin n) (Fin M) ℝ) (f : Fin n → ℝ) (hX : ∀ j, colNorm X j ≠ 0)
    {Ω : Type*} [MeasurableSpace Ω] (P : Measure Ω) [IsProbabilityMeasure P]
    (W : Fin n → Ω → ℝ) (σ : ℝ) (hσ : 0 < σ) (hWm : ∀ i, Measurable (W i))
    (hWind : iIndepFun W P) (hWlaw : ∀ i, P.map (W i) = gaussianReal 0 (σ ^ 2).toNNReal)
    (s : ℕ) (hs1 : 1 ≤ s) (hsM : s ≤ M) (κ : ℝ) (hκ : 0 < κ) (hRE : RE X s 1 κ)
    (A : ℝ) (hA : 2 * Real.sqrt 2 < A) (r : ℝ) (hr : r = A * σ * Real.sqrt (Real.log M / n)) :
    ∃ E : Set Ω, MeasurableSet E ∧ 1 - (M : ℝ) ^ (1 - A ^ 2 / 8) ≤ (P E).toReal ∧
      ∀ ω ∈ E, ∀ βL βD : Fin M → ℝ,
        IsLasso X (fun i => f i + W i ω) r βL → IsDantzig X (fun i => f i + W i ω) r βD →
        sparsity βL ≤ s →
        |predLoss X f βD - predLoss X f βL| ≤
          16 * A ^ 2 * ((sparsity βL : ℝ) * σ ^ 2 / n) * (fmax X ^ 2 / κ ^ 2) * Real.log M := by sorry

end LassoDantzig.Equivalence
Source
Bickel, Ritov and Tsybakov, Simultaneous Analysis of Lasso and Dantzig Selector, arXiv:0801.1095v3, pp. 11–12, Theorem 5.1, Eq. (5.1)
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Throughout, nnn and MMM are natural numbers with n≥1n \ge 1n≥1 and M≥2M \ge 2M≥2. The data are:

  • a real n×Mn \times Mn×M matrix XXX (rows indexed by i∈{1,…,n}i \in \{1,\dots,n\}i∈{1,…,n}, columns by j∈{1,…,M}j \in \{1,\dots,M\}j∈{1,…,M});
  • a deterministic vector f=(f1,…,fn)∈Rnf = (f_1,\dots,f_n) \in \mathbb{R}^nf=(f1​,…,fn​)∈Rn.

The matrix XXX is assumed to satisfy colNorm⁡(X,j)≠0\operatorname{colNorm}(X, j) \neq 0colNorm(X,j)=0 for every column jjj. Here colNorm⁡\operatorname{colNorm}colNorm, and also RE⁡\operatorname{RE}RE, IsLasso⁡\operatorname{IsLasso}IsLasso, IsDantzig⁡\operatorname{IsDantzig}IsDantzig, sparsity⁡\operatorname{sparsity}sparsity, predLoss⁡\operatorname{predLoss}predLoss and fmax⁡f_{\max}fmax​ below, are defined in the imported module Definitions.Def_LassoDantzig_Equivalence_Model. Their bodies are not part of this code, so this read-back names them only and does not say what they compute.

The random noise. Let (Ω,F,P)(\Omega, \mathcal{F}, P)(Ω,F,P) be an arbitrary probability space. Let W1,…,Wn:Ω→RW_1,\dots,W_n : \Omega \to \mathbb{R}W1​,…,Wn​:Ω→R be functions with these properties:

  • each WiW_iWi​ is measurable;
  • W1,…,WnW_1,\dots,W_nW1​,…,Wn​ are mutually independent under PPP;
  • the law of each WiW_iWi​ under PPP is the Gaussian N(0,σ2)\mathcal{N}(0, \sigma^2)N(0,σ2), where σ\sigmaσ is a real number with σ>0\sigma > 0σ>0.

The remaining parameters.

  • sss is a natural number with 1≤s≤M1 \le s \le M1≤s≤M.
  • κ\kappaκ is a real number with κ>0\kappa > 0κ>0 such that RE⁡(X,s,1,κ)\operatorname{RE}(X, s, 1, \kappa)RE(X,s,1,κ) holds.
  • AAA is a real number with A>22A > 2\sqrt{2}A>22​.
  • rrr is the real number
r=A σ log⁡Mnr = A\,\sigma\,\sqrt{\frac{\log M}{n}}r=AσnlogM​​

(natural logarithm, with MMM and nnn cast to reals).

The conclusion. There exists a measurable set E⊆ΩE \subseteq \OmegaE⊆Ω with

P(E)  ≥  1−M 1−A2/8P(E) \;\ge\; 1 - M^{\,1 - A^2/8}P(E)≥1−M1−A2/8

(real-valued power) with the following property. For every ω∈E\omega \in Eω∈E, let

y(ω)=(fi+Wi(ω))i=1ny(\omega) = \big(f_i + W_i(\omega)\big)_{i=1}^ny(ω)=(fi​+Wi​(ω))i=1n​

be the observation vector. Then for all vectors βL,βD∈RM\beta_L, \beta_D \in \mathbb{R}^MβL​,βD​∈RM, the three conditions

  • IsLasso⁡(X,y(ω),r,βL)\operatorname{IsLasso}(X, y(\omega), r, \beta_L)IsLasso(X,y(ω),r,βL​),
  • IsDantzig⁡(X,y(ω),r,βD)\operatorname{IsDantzig}(X, y(\omega), r, \beta_D)IsDantzig(X,y(ω),r,βD​),
  • sparsity⁡(βL)≤s\operatorname{sparsity}(\beta_L) \le ssparsity(βL​)≤s (a natural-number comparison)

together imply

∣predLoss⁡(X,f,βD)−predLoss⁡(X,f,βL)∣  ≤  16 A2⋅sparsity⁡(βL) σ2n⋅fmax⁡(X)2κ2⋅log⁡M.\big|\operatorname{predLoss}(X, f, \beta_D) - \operatorname{predLoss}(X, f, \beta_L)\big| \;\le\; 16\,A^2 \cdot \frac{\operatorname{sparsity}(\beta_L)\,\sigma^2}{n} \cdot \frac{f_{\max}(X)^2}{\kappa^2} \cdot \log M .​predLoss(X,f,βD​)−predLoss(X,f,βL​)​≤16A2⋅nsparsity(βL​)σ2​⋅κ2fmax​(X)2​⋅logM.

What the conclusion depends on.

  • Both losses are evaluated against the deterministic vector fff, not against y(ω)y(\omega)y(ω). The noise enters only through the predicates IsLasso⁡\operatorname{IsLasso}IsLasso and IsDantzig⁡\operatorname{IsDantzig}IsDantzig.
  • The right-hand side uses sparsity⁡(βL)\operatorname{sparsity}(\beta_L)sparsity(βL​), not sss.
  • The same rrr is passed to both predicates.
  • No relation between nnn and MMM is assumed.
  • The set EEE is only asserted to exist. It is chosen once, before βL\beta_LβL​ and βD\beta_DβD​ are quantified.

Degenerate cases. The hypotheses rule out most of the usual default-value cases:

  • No zero counts. Since n≥1n \ge 1n≥1, the division by nnn is genuine. Since M≥2M \ge 2M≥2, log⁡M>0\log M > 0logM>0, so r>0r > 0r>0 and the square root is of a positive number. Since κ>0\kappa > 0κ>0, the division by κ2\kappa^2κ2 is genuine.
  • The noise variance. Since σ>0\sigma > 0σ>0, the variance σ2\sigma^2σ2 given to the Gaussian (converted to a nonnegative real) is exactly σ2\sigma^2σ2, not truncated to 000.
  • The probability bound. Since A>22A > 2\sqrt{2}A>22​, we have A2/8>1A^2/8 > 1A2/8>1, so the exponent 1−A2/81 - A^2/81−A2/8 is negative and M1−A2/8M^{1 - A^2/8}M1−A2/8 lies strictly between 000 and 111. The lower bound on P(E)P(E)P(E) therefore lies strictly between 000 and 111. P(E)P(E)P(E) is finite because PPP is a probability measure, so converting it to a real number loses nothing.
  • Empty or one-element types. The index sets have at least one row (n≥1n \ge 1n≥1) and at least two columns (M≥2M \ge 2M≥2). Ω\OmegaΩ is an arbitrary type carrying a probability measure, so it is nonempty.
  • Vacuous cases. The inner implication holds vacuously at any ω\omegaω for which no vector satisfies IsLasso⁡\operatorname{IsLasso}IsLasso, or none satisfies IsDantzig⁡\operatorname{IsDantzig}IsDantzig, or every Lasso vector has sparsity⁡>s\operatorname{sparsity} > ssparsity>s. The whole statement holds vacuously if the hypotheses RE⁡(X,s,1,κ)\operatorname{RE}(X, s, 1, \kappa)RE(X,s,1,κ) and colNorm⁡(X,j)≠0\operatorname{colNorm}(X, j) \neq 0colNorm(X,j)=0 cannot be met together. Whether that can happen is not decidable from this code, because those definitions are not shown.
  • Where the imported definitions could hide default values. Any division, subtraction, supremum or similar operation inside predLoss⁡\operatorname{predLoss}predLoss, fmax⁡f_{\max}fmax​, RE⁡\operatorname{RE}RE, IsLasso⁡\operatorname{IsLasso}IsLasso, IsDantzig⁡\operatorname{IsDantzig}IsDantzig or colNorm⁡\operatorname{colNorm}colNorm could produce a default value in edge cases. Their bodies are not shown, so this cannot be checked from this code.
Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 27, 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