Sparsity in levels and the weighted rNSP in levels (Defs. 1.6–1.7)
DefinitionDef_CAH21_SparsityInLevelsSparsity in levels and the weighted robust null space property in levels (SI Appendix, Definitions 1.6 and 1.7).
Let with and , and let with . Level is the block of coordinates . A vector is -sparse in levels if it has at most nonzero entries in level for every ; a set of coordinates is an support set if it has at most elements in level . Weights are constant on levels, for in level (assumption (1.15)). Define
A matrix has the weighted rNSP in levels of order with constants , if for every support set ,
The file also defines the Euclidean norm, the spectral norm , and the constants and of Theorem 3.
These definitions are the shared model for every statement of the mission.
Formalization Note Coordinates are numbered from , so level is ; the sequences are indexed by and only indices are used. The standing assumptions (including and (1.15)) are bundled in the predicate LevelData.Valid. The rNSPL predicate includes the constraints , .
import Mathlib
/-!
Colbrook–Antun–Hansen (PNAS 2022, arXiv:2101.08286v2), SI Appendix §1.2.2:
sparsity in levels (Definition 1.6), the quantities `ξ, ζ, κ` and the weighted
robust null space property in levels (Definition 1.7).
Conventions: coordinates of `ℂ^N` are indexed by `Fin N` starting at `0`, so the
paper's level `{M_{k-1}+1, …, M_k}` is `{i : M (k-1) ≤ i < M k}`. Levels are
indexed by `k = 1, …, r` and the sequences `M, s, wl` are indexed by `ℕ`, with
`M 0 = 0` (the paper's convention `M_0 = 0`); values at indices outside
`0, …, r` are never used.
-/
namespace ColbrookAntunHansen
open Finset
/-- Sparsity-in-levels data: number of levels `r`, level boundaries `M`,
local sparsities `s`, coordinate weights `w` and level weights `wl`
(the paper's `w_{(k)}`). -/
structure LevelData (N : ℕ) where
r : ℕ
M : ℕ → ℕ
s : ℕ → ℕ
w : Fin N → ℝ
wl : ℕ → ℝ
namespace LevelData
variable {N : ℕ} (L : LevelData N)
/-- Coordinate `i` lies in the `k`-th level `{M_{k-1}+1, …, M_k}` (0-indexed). -/
def InLevel (k : ℕ) (i : Fin N) : Prop := L.M (k - 1) ≤ i.val ∧ i.val < L.M k
instance (k : ℕ) : DecidablePred (L.InLevel k) := fun i => by
unfold InLevel; infer_instance
/-- The standing assumptions of Definition 1.6 and of SI §1.2.2:
`M_0 = 0`, `1 ≤ M_1 < ⋯ < M_r = N` (with `r ≥ 1`), `0 < s_k ≤ M_k - M_{k-1}`,
positive weights, and (1.15): `w_i = w_{(k)}` whenever `i` is in level `k`. -/
def Valid : Prop :=
1 ≤ L.r ∧ L.M 0 = 0 ∧ (∀ k, 1 ≤ k → k ≤ L.r → L.M (k - 1) < L.M k) ∧ L.M L.r = N ∧
(∀ k, 1 ≤ k → k ≤ L.r → 0 < L.s k ∧ L.s k ≤ L.M k - L.M (k - 1)) ∧
(∀ i, 0 < L.w i) ∧
(∀ k, 1 ≤ k → k ≤ L.r → ∀ i, L.InLevel k i → L.w i = L.wl k)
/-- `Δ ⊆ {1,…,N}` is an `(s, M)` support set: it has at most `s_k` elements in level `k`. -/
def IsSupportSet (Δ : Finset (Fin N)) : Prop :=
∀ k, 1 ≤ k → k ≤ L.r → (Δ.filter (L.InLevel k)).card ≤ L.s k
/-- `x` is `(s, M)`-sparse in levels, i.e. `x ∈ Σ_{s,M}`. -/
def IsSparse (x : Fin N → ℂ) : Prop :=
∀ k, 1 ≤ k → k ≤ L.r →
((Finset.univ.filter (fun i => x i ≠ 0)).filter (L.InLevel k)).card ≤ L.s k
/-- `ξ = ∑_{k=1}^r w_{(k)}^2 s_k`. -/
def xi : ℝ := ∑ k ∈ Finset.Icc 1 L.r, L.wl k ^ 2 * (L.s k : ℝ)
/-- `ζ = min_{k=1,…,r} w_{(k)}^2 s_k`. -/
noncomputable def zeta : ℝ := ⨅ k : Finset.Icc 1 L.r, L.wl k ^ 2 * (L.s k : ℝ)
/-- `κ = ξ / ζ`. -/
noncomputable def kappa : ℝ := L.xi / L.zeta
/-- `min_{k=1,…,r} w_{(k)}`. -/
noncomputable def minWeight : ℝ := ⨅ k : Finset.Icc 1 L.r, L.wl k
end LevelData
/-- Euclidean norm `‖x‖_{l^2}`. -/
noncomputable def l2norm {n : ℕ} (x : Fin n → ℂ) : ℝ := Real.sqrt (∑ i, ‖x i‖ ^ 2)
/-- Weighted `l^1` norm `‖x‖_{l^1_w} = ∑ w_i |x_i|`. -/
noncomputable def wl1norm {N : ℕ} (w : Fin N → ℝ) (x : Fin N → ℂ) : ℝ := ∑ i, w i * ‖x i‖
/-- Projection `P_Δ x` (keep the coordinates in `Δ`, zero the others). -/
def restrict {N : ℕ} (Δ : Finset (Fin N)) (x : Fin N → ℂ) : Fin N → ℂ :=
fun i => if i ∈ Δ then x i else 0
/-- Euclidean operator norm `‖A‖ = sup {‖A x‖_{l^2} : ‖x‖_{l^2} ≤ 1}`. -/
noncomputable def opNorm {m N : ℕ} (A : Matrix (Fin m) (Fin N) ℂ) : ℝ :=
sSup ((fun x => l2norm (A.mulVec x)) '' {x | l2norm x ≤ 1})
/-- `σ_{s,M}(x)_{l^1_w} = inf {‖x - z‖_{l^1_w} : z ∈ Σ_{s,M}}`. -/
noncomputable def sigmaSM {N : ℕ} (L : LevelData N) (x : Fin N → ℂ) : ℝ :=
sInf ((fun z => wl1norm L.w (x - z)) '' {z | L.IsSparse z})
/-- Definition 1.7: `A` has the weighted rNSP in levels of order `(s, M)` with constants
`0 < ρ < 1`, `γ > 0`: for every `(s, M)` support set `Δ` and every `x ∈ ℂ^N`,
`‖x_Δ‖_{l^2} ≤ ρ ‖x_{Δᶜ}‖_{l^1_w} / √ξ + γ ‖A x‖_{l^2}`. -/
def WeightedRNSPL {m N : ℕ} (A : Matrix (Fin m) (Fin N) ℂ) (L : LevelData N) (ρ γ : ℝ) : Prop :=
0 < ρ ∧ ρ < 1 ∧ 0 < γ ∧
∀ Δ : Finset (Fin N), L.IsSupportSet Δ → ∀ x : Fin N → ℂ,
l2norm (restrict Δ x) ≤ ρ * wl1norm L.w (restrict Δᶜ x) / Real.sqrt L.xi + γ * l2norm (A.mulVec x)
/-- The constant `C₁ = ((1+ρ)/2 + (3+ρ) κ^{1/4}/4) · (3+ρ)/(1-ρ)` of Theorem 3. -/
noncomputable def constC1 (ρ κ : ℝ) : ℝ :=
((1 + ρ) / 2 + (3 + ρ) * κ ^ ((1 : ℝ) / 4) / 4) * ((3 + ρ) / (1 - ρ))
/-- The constant `C₂ = 2 ((3+ρ)/(1-ρ) + (7+ρ)/(1-ρ) · κ^{1/4}/2) γ` of Theorem 3. -/
noncomputable def constC2 (ρ κ γ : ℝ) : ℝ :=
2 * ((3 + ρ) / (1 - ρ) + (7 + ρ) / (1 - ρ) * (κ ^ ((1 : ℝ) / 4) / 2)) * γ
end ColbrookAntunHansen
Read-back
What the Lean code literally says, in plain math · Aristotle (Harmonic) — same agent that drafted the statements (non-blind)
Non-blind read-back. This read-back was written by the same agent (Aristotle, by Harmonic) that drafted the Lean statements, at the proposal owner's explicit request. It is not independent, blind testimony: its author knew the source paper and the intended meaning while writing it. Reviewers should treat it as the drafter's own reading of the code, not as an independent audit, and should compare the Lean code against the source themselves.
This file introduces the following objects (everything lives in the namespace ColbrookAntunHansen).
Level data. A record over a dimension consists of a natural number , sequences and of natural numbers, a coordinate weight vector of reals, and a real sequence of level weights. Coordinates are numbered . Coordinate is in level iff
where is natural-number subtraction (so for this reads , which is empty).
Validity of means all of:
- ;
- ;
- for ;
- ;
- for (natural-number subtraction, harmless here by 3);
- for every coordinate ;
- for and every in level , .
Values for play no role in validity. Validity forces and implies that every coordinate lies in exactly one level .
Support sets and sparsity. A finite set is an support set iff for every . A vector is -sparse iff the set is an support set (written out: at most nonzero entries in each level , ).
Numbers attached to .
The infima are over the finite index set (real-number infimum; if they would be the junk value , and division by is , but validity excludes ).
Norms and projections. For : . For weights : (no positivity is built into this definition). For a set of coordinates, keeps the entries with index in and replaces the others by . For a complex matrix ,
(real supremum of a set of reals; this set is nonempty and bounded, so this is the usual spectral norm).
Best sparse approximation error.
(real infimum; the set is nonempty since is sparse).
Weighted rNSP in levels. A complex matrix satisfies it with constants iff , , and for every support set and every ,
Here is the real square root (equal to on negative inputs; under validity).
Constants. For reals (with the real power, meaningful for ):
(No hypotheses are attached; at the divisions return .)