Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 1 — the selection phase runs at most ⌈2ρln⁡(∥b∥2/ε)⌉\lceil 2\rho\ln(\|b\|_2/\varepsilon)\rceil⌈2ρln(∥b∥2​/ε)⌉ iterations

Proved
SparseApprox.Greedy.iterations_le_of_rho

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

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

Throughout, A∈Rm×nA\in\mathbb R^{m\times n}A∈Rm×n, b∈Rmb\in\mathbb R^mb∈Rm and ε>0\varepsilon>0ε>0 are the input of Algorithm Greedy, and k0,k1,…k_0,k_1,\dotsk0​,k1​,… are the indices it selects. For r<tr<tr<t, A(r)A^{(r)}A(r) (columns aj(r)a^{(r)}_jaj(r)​), b(r)b^{(r)}b(r) and τ(r)\tau^{(r)}τ(r) are the columns, the vector bbb and the set of chosen indices at the start of iteration rrr of a run of ttt selection iterations, as computed by the algorithm.

For each r<tr<tr<t let u(r)u^{(r)}u(r) be a vector with the minimum number N(r)N^{(r)}N(r) of nonzero entries such that ∥A(r)u(r)−b(r)∥2≤ε/2\|A^{(r)}u^{(r)}-b^{(r)}\|_2\le\varepsilon/2∥A(r)u(r)−b(r)∥2​≤ε/2, and let ρ\rhoρ be a real number bounding every term of the paper's definition (2),

4 N(r) ∥u(r)∥22≤ρ ∥b(r)∥22(0≤r<t).4\,N^{(r)}\,\|u^{(r)}\|_2^2\le\rho\,\|b^{(r)}\|_2^2\qquad(0\le r<t).4N(r)∥u(r)∥22​≤ρ∥b(r)∥22​(0≤r<t).

Then the number of iterations satisfies

t≤⌈2ρln⁡(∥b∥2ε)⌉.t\le\Big\lceil 2\rho\ln\Big(\frac{\|b\|_2}{\varepsilon}\Big)\Big\rceil .t≤⌈2ρln(ε∥b∥2​​)⌉.

This is the first of the three lemmas that combine into Theorem 2: it bounds the number of selected columns by ρ\rhoρ, and Lemmas 2 and 3 then bound ρ\rhoρ.

Formalization Note "Every ρ\rhoρ bounding each term of (2)" is used instead of the maximum in (2); the bound is monotone in ρ\rhoρ whenever t≥1t\ge1t≥1, so the two readings agree, and the form avoids a maximum over an empty range at t=0t=0t=0. The ceiling is the natural-number ceiling Nat.ceil, which agrees with the integer ceiling whenever t≥1t\ge1t≥1 (then ∥b∥2>ε\|b\|_2>\varepsilon∥b∥2​>ε and the logarithm is positive). No condition ρ>1\rho>1ρ>1 is assumed: at ρ=1\rho=1ρ=1 the statement remains true although the paper's (21) takes ln⁡(1−1/ρ)\ln(1-1/\rho)ln(1−1/ρ). The hypotheses can hold only if a vector xxx with ∥Ax−b∥2≤ε/2\|Ax-b\|_2\le\varepsilon/2∥Ax−b∥2​≤ε/2 exists.

Preamble
import Mathlib
import Definitions.Def_SparseApprox_Greedy_Basic
import Definitions.Def_SparseApprox_Greedy_Algorithm

open scoped InnerProductSpace
Formal statement
namespace SparseApprox.Greedy

theorem iterations_le_of_rho {m n : ℕ} (A : Matrix (Fin m) (Fin n) ℝ)
    (b : EuclideanSpace ℝ (Fin m)) (ε : ℝ) (hε : 0 < ε) (k : ℕ → Fin n) (t : ℕ)
    (hrun : IsGreedyRun A b ε k t) (u : ℕ → EuclideanSpace ℝ (Fin n))
    (hu : ∀ r < t,
      IsMinSparseSol (greedyState A b k r).col (greedyState A b k r).res (ε / 2) (u r))
    (ρ : ℝ)
    (hρ : ∀ r < t, 4 * (nnz (u r) : ℝ) * ‖u r‖ ^ 2 ≤ ρ * ‖(greedyState A b k r).res‖ ^ 2) :
    t ≤ ⌈2 * ρ * Real.log (‖b‖ / ε)⌉₊ := by sorry

end SparseApprox.Greedy
Source
Natarajan, Sparse Approximate Solutions to Linear Systems, SIAM J. Comput. 24 (1995), p. 230, Lemma 1, Eq. (3) (proof pp. 230–232, (4)–(23))
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