Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Theorem 1.5: decoding by linear programming recovers the input from sparsely corrupted measurements

Proved
CandesTao.Decoding.decoding_by_lp

by naimengye · Sep 30, 2026 · Mathlib 0df444a (Lean v4.33.1)

compressed-sensingerror-correcting-codesl1-minimizationlinear-programmingrestricted-isometrysparse-recovery

Let AAA be a real m×nm \times nm×n coding matrix with m>nm > nm>n and full rank (the paper's standing assumption of Section 1.1), and let FFF be a real p×mp \times mp×m matrix such that FA=0FA = 0FA=0. Let S≥1S \ge 1S≥1 obey the hypothesis of Theorem 1.4 for FFF,

δS(F)+θS,S(F)+θS,2S(F)<1.\delta_S(F) + \theta_{S,S}(F) + \theta_{S,2S}(F) < 1 .δS​(F)+θS,S​(F)+θS,2S​(F)<1.

Set y=Af+ey = Af + ey=Af+e, where f∈Rnf \in \mathbb{R}^nf∈Rn is arbitrary and e∈Rme \in \mathbb{R}^me∈Rm is a real vector supported on a set of size at most SSS. Then fff is the unique minimizer of

(P1′)min⁡g∈Rn∥y−Ag∥ℓ1.(P_1') \qquad \min_{g \in \mathbb{R}^n} \|y - Ag\|_{\ell^1} .(P1′​)g∈Rnmin​∥y−Ag∥ℓ1​.

This is the decoding statement of the paper's title: with an annihilator FFF of the code (any matrix with FA=0FA = 0FA=0, for instance the orthogonal projection onto the cokernel of AAA) obeying the restricted isometry condition, the plaintext fff is recovered exactly from the corrupted ciphertext Af+eAf + eAf+e by solving one linear program, whatever the positions and values of the at most SSS errors.

Formalization Note Full rank of the m×nm \times nm×n matrix AAA with m>nm > nm>n is formalized as injectivity of g↦Agg \mapsto Agg↦Ag; the paper states m>nm > nm>n and full rank once, in Section 1.1, and uses full rank to pass from the recovered error eee back to fff. "Unique minimizer" means that every g≠fg \ne fg=f has strictly larger residual ℓ1\ell^1ℓ1 norm. The hypothesis 3S≤m3S \le m3S≤m is the domain on which Definition 1.1 defines θS,2S\theta_{S,2S}θS,2S​.

Preamble
import Definitions.Def_CandesTao_Decoding_RestrictedIsometry
import Definitions.Def_CandesTao_Decoding_L1Minimization
Formal statement
namespace CandesTao.Decoding
theorem decoding_by_lp {p m n : ℕ} (hmn : n < m)
    (A : Matrix (Fin m) (Fin n) ℝ) (hA : Function.Injective A.mulVec)
    (F : Matrix (Fin p) (Fin m) ℝ) (hFA : F * A = 0) (S : ℕ)
    (hS : 1 ≤ S) (hSm : 3 * S ≤ m)
    (h : restrictedIsometryConst F S + restrictedOrthogonalityConst F S S +
      restrictedOrthogonalityConst F S (2 * S) < 1)
    (f : Fin n → ℝ) (e : Fin m → ℝ) (T : Finset (Fin m)) (hT : T.card ≤ S)
    (he : SupportedOn e T) :
    IsUniqueResidualL1Minimizer A (A.mulVec f + e) f := by sorry
end CandesTao.Decoding
Source
Candès--Tao 2005, Decoding by Linear Programming, IEEE Trans. Inform. Theory 51(12):4203-4215, doi:10.1109/TIT.2005.858979; arXiv:math/0502327v1 (https://arxiv.org/abs/math/0502327), p. 6, Theorem 1.5; standing assumptions m > n and A of full rank, p. 2, Section 1.1; equivalence of (P1) and (P1'), p. 4, Section 1.3
Read-back

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

Read-back of decoding_by_lp

Conventions. Rk\mathbb{R}^kRk denotes real vectors indexed by the kkk-element index set {0,…,k−1}\{0,\dots,k-1\}{0,…,k−1}; a matrix acts by ordinary matrix–vector multiplication. Two norms from the bundle are used, written out:

∥c∥1:=∑j∣cj∣,∥x∥2:=∑ixi2.\|c\|_1 := \sum_{j} |c_j|, \qquad \|x\|_2 := \sqrt{\sum_i x_i^2}.∥c∥1​:=j∑​∣cj​∣,∥x∥2​:=i∑​xi2​​.

Because a sum of squares is non-negative, ∥x∥22=∑ixi2\|x\|_2^2 = \sum_i x_i^2∥x∥22​=∑i​xi2​ exactly, and no junk value of the square root arises. A vector c∈Rmc \in \mathbb{R}^mc∈Rm is supported on a set TTT of indices when cj=0c_j = 0cj​=0 for every index j∉Tj \notin Tj∈/T; that is, the support of ccc is contained in TTT (it need not equal TTT; c=0c = 0c=0 is supported on every TTT, including T=∅T = \emptysetT=∅).

Universally quantified data and hypotheses. The statement quantifies over all of the following:

  • natural numbers ppp, mmm, nnn (each may a priori be 000), with n<mn < mn<m;
  • a real m×nm \times nm×n matrix AAA such that x↦Axx \mapsto Axx↦Ax is an injective map Rn→Rm\mathbb{R}^n \to \mathbb{R}^mRn→Rm (i.e. Ax=Ax′Ax = Ax'Ax=Ax′ implies x=x′x = x'x=x′; equivalently AAA has trivial kernel);
  • a real p×mp \times mp×m matrix FFF such that the matrix product FAFAFA is the p×np \times np×n zero matrix;
  • a natural number SSS with 1≤S1 \le S1≤S and 3S≤m3S \le m3S≤m (so m≥3m \ge 3m≥3);
  • the inequality
δS(F)+θS,S(F)+θS,2S(F)<1,\delta_S(F) + \theta_{S,S}(F) + \theta_{S,2S}(F) < 1,δS​(F)+θS,S​(F)+θS,2S​(F)<1,

where δS(F)\delta_S(F)δS​(F) and θS,S′(F)\theta_{S,S'}(F)θS,S′​(F) are the bundle's own constants, unfolded below;

  • a vector f∈Rnf \in \mathbb{R}^nf∈Rn;
  • a vector e∈Rme \in \mathbb{R}^me∈Rm;
  • a finite set T⊆{0,…,m−1}T \subseteq \{0,\dots,m-1\}T⊆{0,…,m−1} with ∣T∣≤S|T| \le S∣T∣≤S (this TTT is a variable of the theorem, distinct from the bound variables of the same name inside the definitions below);
  • the assumption that eee is supported on TTT, i.e. ej=0e_j = 0ej​=0 for all j∉Tj \notin Tj∈/T. Together with ∣T∣≤S|T| \le S∣T∣≤S this says eee has at most SSS non-zero coordinates; e=0e = 0e=0 and T=∅T = \emptysetT=∅ are permitted.

The two constants, unfolded. For a natural number SSS,

δS(F):=inf⁡{δ∈R  :  δ≥0, and for every T⊆{0,…,m−1} with ∣T∣≤S and every c∈Rm supported on T: (1−δ) ∥c∥22≤∥Fc∥22  and  ∥Fc∥22≤(1+δ) ∥c∥22}.\delta_S(F) := \inf\Bigl\{\delta \in \mathbb{R} \;:\; \delta \ge 0,\ \text{and for every } T \subseteq \{0,\dots,m-1\} \text{ with } |T| \le S \text{ and every } c \in \mathbb{R}^m \text{ supported on } T:\ (1-\delta)\,\|c\|_2^2 \le \|Fc\|_2^2 \ \text{ and } \ \|Fc\|_2^2 \le (1+\delta)\,\|c\|_2^2 \Bigr\}.δS​(F):=inf{δ∈R:δ≥0, and for every T⊆{0,…,m−1} with ∣T∣≤S and every c∈Rm supported on T: (1−δ)∥c∥22​≤∥Fc∥22​  and  ∥Fc∥22​≤(1+δ)∥c∥22​}.

For natural numbers S,S′S, S'S,S′,

θS,S′(F):=inf⁡{θ∈R  :  θ≥0, and for all disjoint T,T′⊆{0,…,m−1} with ∣T∣≤S, ∣T′∣≤S′, and all c,c′∈Rm with c supported on T, c′ supported on T′: ∣⟨Fc, Fc′⟩∣≤θ ∥c∥2 ∥c′∥2},\theta_{S,S'}(F) := \inf\Bigl\{\theta \in \mathbb{R} \;:\; \theta \ge 0,\ \text{and for all disjoint } T, T' \subseteq \{0,\dots,m-1\} \text{ with } |T| \le S,\ |T'| \le S', \text{ and all } c, c' \in \mathbb{R}^m \text{ with } c \text{ supported on } T,\ c' \text{ supported on } T':\ \bigl|\langle Fc,\, Fc'\rangle\bigr| \le \theta\,\|c\|_2\,\|c'\|_2 \Bigr\},θS,S′​(F):=inf{θ∈R:θ≥0, and for all disjoint T,T′⊆{0,…,m−1} with ∣T∣≤S, ∣T′∣≤S′, and all c,c′∈Rm with c supported on T, c′ supported on T′: ​⟨Fc,Fc′⟩​≤θ∥c∥2​∥c′∥2​},

where ⟨u,v⟩=∑iuivi\langle u, v\rangle = \sum_i u_i v_i⟨u,v⟩=∑i​ui​vi​ is the ordinary dot product on Rp\mathbb{R}^pRp. In both definitions the index sets range over all subsets of size at most SSS (resp. S′S'S′), including the empty set, and c,c′c, c'c,c′ range over all vectors supported there, not only unit vectors. In θS,S′\theta_{S,S'}θS,S′​ the two sets must be disjoint, but either may be empty; for T=∅T = \emptysetT=∅ only c=0c = 0c=0 qualifies and the inequalities read 0≤00 \le 00≤0.

About the infima. The infimum is Mathlib's infimum on R\mathbb{R}R, which returns the junk value 000 when the set is empty or when it is not bounded below. Neither happens here: both sets lie in [0,∞)[0,\infty)[0,∞), so they are bounded below, and both are non-empty (every δ≥max⁡(1,∥F∥op2)\delta \ge \max(1, \|F\|_{\mathrm{op}}^2)δ≥max(1,∥F∥op2​) lies in the first set, because for δ≥1\delta \ge 1δ≥1 the left side of the lower inequality is ≤0\le 0≤0; every θ≥∥F∥op2\theta \ge \|F\|_{\mathrm{op}}^2θ≥∥F∥op2​ lies in the second by Cauchy–Schwarz). Each set is also closed (its defining conditions are non-strict inequalities, continuous in δ\deltaδ resp. θ\thetaθ), so the infimum is attained. Hence δS(F)≥0\delta_S(F) \ge 0δS​(F)≥0 and θS,S′(F)≥0\theta_{S,S'}(F) \ge 0θS,S′​(F)≥0, and the hypothesis δS+θS,S+θS,2S<1\delta_S + \theta_{S,S} + \theta_{S,2S} < 1δS​+θS,S​+θS,2S​<1 forces each of the three constants to be <1< 1<1.

Conclusion. Put y:=Af+e∈Rmy := Af + e \in \mathbb{R}^my:=Af+e∈Rm. The theorem asserts that fff is a unique residual ℓ1\ell^1ℓ1-minimiser for (A,y)(A, y)(A,y) in the bundle's sense, which unfolds to

for every g∈Rn with g≠f:∥y−Af∥1  <  ∥y−Ag∥1.\text{for every } g \in \mathbb{R}^n \text{ with } g \ne f: \qquad \|y - Af\|_1 \;<\; \|y - Ag\|_1 .for every g∈Rn with g=f:∥y−Af∥1​<∥y−Ag∥1​.

Since y−Af=ey - Af = ey−Af=e identically, this is the same as

∀g∈Rn,g≠f  ⟹  ∥e∥1  <  ∥ e−A(g−f) ∥1,\forall g \in \mathbb{R}^n,\quad g \ne f \;\Longrightarrow\; \|e\|_1 \;<\; \bigl\|\,e - A(g - f)\,\bigr\|_1,∀g∈Rn,g=f⟹∥e∥1​<​e−A(g−f)​1​,

with a strict inequality. The comparison is over all g∈Rng \in \mathbb{R}^ng∈Rn, with no constraint on ggg. Nothing is asserted about g=fg = fg=f itself, and nothing is asserted about how fff might be found.

Edge cases the quantifiers include.

  • p=0p = 0p=0 is allowed. Then FFF has no rows, FcFcFc is the empty vector, ∥Fc∥2=0\|Fc\|_2 = 0∥Fc∥2​=0 and ⟨Fc,Fc′⟩=0\langle Fc, Fc'\rangle = 0⟨Fc,Fc′⟩=0 for all c,c′c, c'c,c′, and FA=0FA = 0FA=0 holds automatically. Consequently θS,S(F)=θS,2S(F)=0\theta_{S,S}(F) = \theta_{S,2S}(F) = 0θS,S​(F)=θS,2S​(F)=0, whereas (since S≥1S \ge 1S≥1 and m≥3m \ge 3m≥3 supply a non-zero ccc with a single non-zero coordinate) the lower inequality (1−δ)∥c∥22≤0(1-\delta)\|c\|_2^2 \le 0(1−δ)∥c∥22​≤0 forces δ≥1\delta \ge 1δ≥1, so δS(F)=1\delta_S(F) = 1δS​(F)=1 and the hypothesis δS+θS,S+θS,2S<1\delta_S + \theta_{S,S} + \theta_{S,2S} < 1δS​+θS,S​+θS,2S​<1 is false. The theorem therefore asserts nothing when p=0p = 0p=0.
  • n=0n = 0n=0 is allowed (only n<mn < mn<m is required). Then Rn\mathbb{R}^nRn has a single element, fff is that element, no g≠fg \ne fg=f exists, and the conclusion holds vacuously; injectivity of x↦Axx \mapsto Axx↦Ax and FA=0FA = 0FA=0 are likewise automatic.
  • m≥3S≥3m \ge 3S \ge 3m≥3S≥3 and n≤m−1n \le m-1n≤m−1 always. Beyond FA=0FA = 0FA=0 no relation between FFF and AAA is assumed: nothing is assumed about the rank of FFF, about the size of ppp, or about ppp relative to m−nm - nm−n.
  • The hypothesis 3S≤m3S \le m3S≤m is not referred to by any other hypothesis or by the conclusion; it stands as an additional assumption.
  • The accompanying definitions of a matrix column and of the column span do not occur anywhere in the statement.
Human review
  • Endorsed by Shuze Chen · Oct 1, 2026

    Confirmed by the moderator at approval.

  • Endorsed by naimengye · 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