Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 2 — Greedy selects at most ⌈18 Opt(ε/2)∥A+∥22ln⁡(∥b∥2/ε)⌉\lceil 18\,\mathrm{Opt}(\varepsilon/2)\|\mathbf A^+\|_2^2\ln(\|b\|_2/\varepsilon)\rceil⌈18Opt(ε/2)∥A+∥22​ln(∥b∥2​/ε)⌉ columns (for AAA with linearly independent columns)

Proved
SparseApprox.Greedy.greedy_iterations_le

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

greedy-algorithmp2o-batch-p200ap2o-gran-per-chapterp2o-plan-paperp2o-v1sparse-approximation

Let A∈Rm×nA\in\mathbb R^{m\times n}A∈Rm×n have linearly independent columns, let b∈Rmb\in\mathbb R^mb∈Rm and ε>0\varepsilon>0ε>0, and assume that some x∈Rnx\in\mathbb R^nx∈Rn satisfies ∥Ax−b∥2≤ε/2\|Ax-b\|_2\le\varepsilon/2∥Ax−b∥2​≤ε/2. Let A\mathbf AA be AAA with each column normalized in the L2L_2L2​ norm, A+\mathbf A^+A+ its pseudo-inverse and ∥A+∥2\|\mathbf A^+\|_2∥A+∥2​ its spectral norm, and let

Opt⁡(ε/2)=min⁡{∥x∥0:∥Ax−b∥2≤ε/2}\operatorname{Opt}(\varepsilon/2)=\min\{\|x\|_0 : \|Ax-b\|_2\le\varepsilon/2\}Opt(ε/2)=min{∥x∥0​:∥Ax−b∥2​≤ε/2}

be the fewest number of nonzero entries over all solutions within error ε/2\varepsilon/2ε/2. Then every run of the selection phase of Algorithm Greedy on input A,b,εA,b,\varepsilonA,b,ε (with any tie-breaking in the greedy choice) performs a number ttt of iterations, equal to the number of columns selected, that satisfies

t≤⌈18 Opt⁡(ε/2) ∥A+∥22 ln⁡(∥b∥2ε)⌉.t\le\Big\lceil 18\,\operatorname{Opt}(\varepsilon/2)\,\|\mathbf A^+\|_2^2\,\ln\Big(\frac{\|b\|_2}{\varepsilon}\Big)\Big\rceil .t≤⌈18Opt(ε/2)∥A+∥22​ln(ε∥b∥2​​)⌉.

Since the solution phase solves a linear system in the selected columns only, the computed solution has at most this many nonzero entries.

The theorem shows that the greedy heuristic approximates the NP-hard sparse approximation problem within a factor that depends on the conditioning of A\mathbf AA and logarithmically on ∥b∥2/ε\|b\|_2/\varepsilon∥b∥2​/ε, at the price of doubling the error tolerance in the comparison with the optimum.

Formalization Note The hypothesis that AAA has linearly independent columns is added; the printed Theorem 2 is false without it. Counterexample: m=2m=2m=2, n=200n=200n=200, columns (cos⁡θj,sin⁡θj)(\cos\theta_j,\sin\theta_j)(cosθj​,sinθj​) and (sin⁡θj,cos⁡θj)(\sin\theta_j,\cos\theta_j)(sinθj​,cosθj​) for 100100100 distinct θj∈[0.001,0.01]\theta_j\in[0.001,0.01]θj​∈[0.001,0.01], b=2(1,1)b=\sqrt2(1,1)b=2​(1,1), ε=1\varepsilon=1ε=1: then Opt⁡(1/2)=2\operatorname{Opt}(1/2)=2Opt(1/2)=2 and ∥A+∥22≈0.0101\|\mathbf A^+\|_2^2\approx0.0101∥A+∥22​≈0.0101, so the bound is ⌈0.252⌉=1\lceil0.252\rceil=1⌈0.252⌉=1, yet Greedy selects two columns. The hypothesis forces n≤mn\le mn≤m and holds for the paper's motivating nonsingular interpolation systems. The existence hypothesis on xxx is needed because Opt⁡\operatorname{Opt}Opt is an infimum over ℕ, which is 000 on the empty set. The ceiling is Nat.ceil; when t≥1t\ge1t≥1 we have ∥b∥2>ε\|b\|_2>\varepsilon∥b∥2​>ε, the logarithm is positive and Nat.ceil agrees with the integer ceiling. The bound is stated for every prefix of a run, so no run can exceed it. The pseudo-inverse is any matrix satisfying the four Penrose equations for A\mathbf AA.

Preamble
import Mathlib
import Definitions.Def_SparseApprox_Greedy_Basic
import Definitions.Def_SparseApprox_Greedy_Algorithm

open scoped InnerProductSpace
Formal statement
namespace SparseApprox.Greedy

theorem greedy_iterations_le {m n : ℕ} (A : Matrix (Fin m) (Fin n) ℝ)
    (b : EuclideanSpace ℝ (Fin m)) (ε : ℝ) (hε : 0 < ε)
    (hA : LinearIndependent ℝ (colE A))
    (hfeas : ∃ x : EuclideanSpace ℝ (Fin n), ‖Matrix.toEuclideanLin A x - b‖ ≤ ε / 2)
    (P : Matrix (Fin n) (Fin m) ℝ) (hP : IsMoorePenrose (Abar A) P)
    (k : ℕ → Fin n) (t : ℕ) (hrun : IsGreedyRun A b ε k t) :
    t ≤ ⌈18 * (optSparsity A b (ε / 2) : ℝ) * opNorm2 P ^ 2 * Real.log (‖b‖ / ε)⌉₊ := by sorry

end SparseApprox.Greedy
Source
Natarajan, Sparse Approximate Solutions to Linear Systems, SIAM J. Comput. 24 (1995), p. 229, Theorem 2, Eq. (1) (proof pp. 230–233, concluding at (34))
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