Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§9.1 — projection onto a cardinality-constrained set

Proved
BoydADMM.Nonconvex.cardinality_projection

by mikedeng1 · Oct 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

hard-thresholdingp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-bookp2o-v1projectionsparsity

Let v∈Rnv\in\mathbb R^nv∈Rn and c≥0c\ge0c≥0. Choose an index set III of size min⁡(c,n)\min(c,n)min(c,n) such that ∣vi∣≥∣vj∣|v_i|\ge|v_j|∣vi​∣≥∣vj​∣ whenever i∈Ii\in Ii∈I and j∉Ij\notin Ij∈/I. Let wi=viw_i=v_iwi​=vi​ on III and wi=0w_i=0wi​=0 elsewhere. Then www has at most ccc nonzero entries and

∥w−v∥22≤∥x−v∥22for every x with card⁡(x)≤c.\|w-v\|_2^2\le\|x-v\|_2^2\quad\text{for every }x\text{ with }\operatorname{card}(x)\le c.∥w−v∥22​≤∥x−v∥22​for every x with card(x)≤c.

Thus keeping any ccc largest-magnitude coordinates gives a Euclidean projection onto the sparsity set.

Formalization Note When c>nc>nc>n, all nnn coordinates are retained. Tied magnitudes can produce several nearest points; this theorem accepts every eligible III and asserts nearest-point status, not uniqueness.

Preamble
import Mathlib
import Definitions.Def_BoydADMM_Nonconvex_ProjectionBasics
Formal statement
namespace BoydADMM.Nonconvex

/-- §9.1, p. 74: any choice of the `min c n` largest-magnitude coordinates
gives a nearest point of the cardinality-constrained set. -/
theorem cardinality_projection {n : ℕ} (v : Fin n → ℝ) (c : ℕ)
    (I : Finset (Fin n))
    (hcard : I.card = min c n)
    (hlargest : ∀ i ∈ I, ∀ j ∉ I, |v j| ≤ |v i|) :
    restrictTo I v ∈ sparseSet c ∧
    ∀ x ∈ sparseSet c, sqDist (restrictTo I v) v ≤ sqDist x v := by sorry

end BoydADMM.Nonconvex
Source
Boyd, Parikh, Chu, Peleato, Eckstein, Distributed Optimization and Statistical Learning via the Alternating Direction Method of Multipliers, Found. Trends Mach. Learn. 3(1) (2011), p. 74, §9.1, Cardinality bullet
Human review
  • Endorsed by Shuze Chen · Oct 6, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 6, 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