Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 5.1 (codes) — fixed code with gap M1−εM^{1-\varepsilon}M1−ε for any quadratic verifier, explicit exponent

Proved
LatticePrepro.code_gap

by WizardOfMenlo · Nov 13, 2026 · Mathlib 0df444a (Lean v4.33.1)

coding-theorycvp-ncp-preprocessinghardness-of-approximationlatticespreprocessing

Let ppp be a prime, FFF a finite field of characteristic ppp, and 0<ε<10<\varepsilon<10<ε<1. Let VVV be a quadratic verifier over Fp\mathbb{F}_pFp​ with instance length nnn, SSS assignment coordinates and language L(V)⊆{0,1}nL(V)\subseteq\{0,1\}^nL(V)⊆{0,1}n. Let

C=sizeExp(p,1−ε),C=\mathrm{sizeExp}(p,1-\varepsilon),C=sizeExp(p,1−ε),

the explicit exponent of the parameter choice, which depends only on ppp and ε\varepsilonε. Then there are a finite block length MMM, an FFF-linear code C⊆FM\mathcal{C}\subseteq F^MC⊆FM, a target tx∈FMt_x\in F^Mtx​∈FM for every x∈{0,1}nx\in\{0,1\}^nx∈{0,1}n, and an integer radius R≥1R\ge1R≥1 such that:

  1. 1≤M≤(S+1)C1\le M\le(S+1)^C1≤M≤(S+1)C;
  2. for every x∈L(V)x\in L(V)x∈L(V), dist⁡(tx,C)≤R\operatorname{dist}(t_x,\mathcal{C})\le Rdist(tx​,C)≤R;
  3. for every x∉L(V)x\notin L(V)x∈/L(V), dist⁡(tx,C)>M1−ε⋅R\operatorname{dist}(t_x,\mathcal{C})>M^{1-\varepsilon}\cdot Rdist(tx​,C)>M1−ε⋅R.

Here dHd_HdH​ is the Hamming distance and dist⁡(y,C)=min⁡c∈CdH(y,c)\operatorname{dist}(y,\mathcal{C})=\min_{c\in\mathcal{C}}d_H(y,c)dist(y,C)=minc∈C​dH​(y,c). In short,

x∈L(V)⇒dist⁡(tx,C)≤R,x∉L(V)⇒dist⁡(tx,C)>M1−ε⋅R.x\in L(V)\Rightarrow\operatorname{dist}(t_x,\mathcal{C})\le R,\qquad x\notin L(V)\Rightarrow\operatorname{dist}(t_x,\mathcal{C})>M^{1-\varepsilon}\cdot R.x∈L(V)⇒dist(tx​,C)≤R,x∈/L(V)⇒dist(tx​,C)>M1−ε⋅R.

The code C\mathcal{C}C and the radius RRR do not depend on xxx; only the target txt_xtx​ does.

This is the code case (s=1s=1s=1) of Theorem 5.1. It is stated for an arbitrary quadratic verifier, with block length bounded by (S+1)C(S+1)^C(S+1)C. The paper instead fixes a 3SAT verifier and obtains M=poly(n)M=\mathrm{poly}(n)M=poly(n); that instantiation is a separate Lean result.

Formalization Note The conclusion is Nonempty (CodeGap F ε V.Language (V.S + 1) C). The characteristic of FFF is expressed by an Algebra (ZMod p) F instance. The code distance is a natural number defined via sInf, and M1−εM^{1-\varepsilon}M1−ε is a real power (Real.rpow). Polynomial-time computability of the code and targets is not formalized; the search test of Lemma 5.2 is stated separately (CodeFamily.accepts_of_isApprox, CodeFamily.not_accepts_of_lt).

Note (existence form). This statement asserts only that some code with targets has the gap. The Lean statement does not require the targets to be computable, so this form is also satisfied by a construction unrelated to the paper, in which the target records whether the instance is in the language. The statement for the object that the paper constructs is LatticePrepro.QuadraticVerifier.Tables.codeFamily_hasGap.

Preamble
import Mathlib
import Definitions.Def_LatticePrepro_Basic_Blocks
import Definitions.Def_LatticePrepro_Reduction_LinearSystem
import Definitions.Def_LatticePrepro_Conversions_Codes
import Definitions.Def_LatticePrepro_Conversions_ConstructionA
import Definitions.Def_LatticePrepro_Conversions_Hadamard
import Definitions.Def_LatticePrepro_Conversions_Lattices
import Definitions.Def_LatticePrepro_Lattices_Distance
import Definitions.Def_LatticePrepro_Lattices_Mathlib
import Definitions.Def_LatticePrepro_Moments_Basic
import Definitions.Def_LatticePrepro_Moments_Representation
import Definitions.Def_LatticePrepro_Verifier_Quadratic
import Definitions.Def_LatticePrepro_Reduction_FixedSystem
import Definitions.Def_LatticePrepro_Tables_Digits
import Definitions.Def_LatticePrepro_Tables_FieldSetup
import Definitions.Def_LatticePrepro_Tables_Hankel
import Definitions.Def_LatticePrepro_Tables_Construction
import Definitions.Def_LatticePrepro_Tables_ElementTable
import Definitions.Def_LatticePrepro_Tables_TableSoundness
import Definitions.Def_LatticePrepro_Tables_Explicit
import Definitions.Def_LatticePrepro_Main

open LatticePrepro
Formal statement
theorem LatticePrepro.code_gap (p : ℕ) [hp : Fact p.Prime] (F : Type) [Field F] [Fintype F]
    [DecidableEq F] [Algebra (ZMod p) F] (ε : ℝ) (hε : 0 < ε) (hε1 : ε < 1)
    (V : QuadraticVerifier p) :
    Nonempty (CodeGap F ε V.Language (V.S + 1) (sizeExp p (1 - ε))) := by sorry
Source
G. Fenzi, G. Weissenberg, Nearly Optimal Hardness for CVP and NCP with Preprocessing (STOC 2027 submission #847; IACR ePrint 2026/2634, https://eprint.iacr.org/2026/2634), Theorem 5.1 (\label{thm:approximation-hardness}), code case; Lean: LatticePrepro/Main.lean, LatticePrepro.code_gap
Human review
  • Endorsed by Shuze Chen · Nov 15, 2026

    Confirmed by the moderator at approval.

  • Endorsed by WizardOfMenlo · Nov 15, 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