Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 1, proof (forward direction) — an exact cover gives x = 1_J with Ax = b and exactly m/3 nonzeros

Proved
SparseApprox.Hardness.exactCover_gives_exact_solution

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

exact-covernp-hardness-reductionp2o-batch-p200ap2o-gran-per-chapterp2o-plan-paperp2o-v1sparse-approximation

Let S={s1,…,sm}S=\{s_1,\dots,s_m\}S={s1​,…,sm​} and let C=c1,…,cnC=c_1,\dots,c_nC=c1​,…,cn​ be a list of 3-element subsets of SSS. Let A∈Rm×nA\in\mathbb R^{m\times n}A∈Rm×n be the incidence matrix of CCC (Aij=1A_{ij}=1Aij​=1 if si∈cjs_i\in c_jsi​∈cj​, else 000) and b=(1,…,1)∈Rmb=(1,\dots,1)\in\mathbb R^mb=(1,…,1)∈Rm. If the sub-collection {cj:j∈J}\{c_j : j\in J\}{cj​:j∈J} is an exact cover of SSS, then the indicator vector x=1Jx=\mathbf 1_Jx=1J​ (xj=1x_j=1xj​=1 for j∈Jj\in Jj∈J, xj=0x_j=0xj​=0 otherwise) satisfies

Ax=band3 ∥x∥0=m,Ax=b\qquad\text{and}\qquad 3\,\|x\|_0=m,Ax=band3∥x∥0​=m,

that is, xxx solves the system exactly and has exactly m/3m/3m/3 nonzero entries.

This is the forward direction of the equivalence behind Theorem 1: an exact cover yields a solution of the SAS instance (with any tolerance, in particular ε=1/2\varepsilon=1/2ε=1/2) with m/3m/3m/3 nonzero entries.

Formalization Note "Exactly m/3m/3m/3 nonzero entries" is written 3 ∥x∥0=m3\,\|x\|_0=m3∥x∥0​=m, avoiding natural-number division; it contains the paper's remark that mmm must be a multiple of 333 when an exact cover exists. The number of nonzeros of 1J\mathbf 1_J1J​ is ∣J∣|J|∣J∣.

Preamble
import Mathlib
import Definitions.Def_SparseApprox_Hardness_Basic
Formal statement
namespace SparseApprox.Hardness

theorem exactCover_gives_exact_solution {m n : ℕ} (C : Fin n → Finset (Fin m))
    (hC : ∀ j, (C j).card = 3) (J : Finset (Fin n)) (hJ : IsExactCover C J) :
    Matrix.toEuclideanLin (incidence C) (indicatorVec J) = onesVec m ∧
      3 * nnz (indicatorVec J) = m := by sorry

end SparseApprox.Hardness
Source
Natarajan, Sparse Approximate Solutions to Linear Systems, SIAM J. Comput. 24 (1995), p. 228, proof of Theorem 1, second-to-last paragraph ("If the X3C instance has a solution, then consider the vector x …")
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