Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 5.1 (codes) for the paper's code — the code ker⁡A×{0}\ker A\times\{0\}kerA×{0} of the fixed linear system has gap M1−εM^{1-\varepsilon}M1−ε

Proved
LatticePrepro.QuadraticVerifier.Tables.codeFamily_hasGap

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

coding-theorycvp-ncp-preprocessinghardness-of-approximationlatticespreprocessing

Let ppp be a prime and let VVV be a quadratic verifier over Fp\mathbb F_pFp​ with instance length nnn, SSS assignment coordinates, NNN evaluation tables and language L(V)⊆{0,1}nL(V)\subseteq\{0,1\}^nL(V)⊆{0,1}n. For a gap exponent δ<1\delta<1δ<1 put m=⌈δ/(1−δ)⌉+1m=\lceil\delta/(1-\delta)\rceil+1m=⌈δ/(1−δ)⌉+1 (momentAxes) and g=(S+1)kg=(S+1)^{k}g=(S+1)k with kkk = gapExp p δ. Tables for VVV and δ\deltaδ consist of an integer B≥2B\ge2B≥2 with 8Ng≤Bm≤2m⋅8Ng8Ng\le B^{m}\le2^{m}\cdot8Ng8Ng≤Bm≤2m⋅8Ng and an explicit moment representation in the sense of Theorem A.8 with mmm axes and representation bound r=Bmr=B^{m}r=Bm. They do not depend on the instance.

The fixed linear system of the tables TTT is the system Av=bxAv=b_xAv=bx​ of Construction 4.5 built from them: AAA is a fixed Fp\mathbb F_pFp​-linear map on FpNcol\mathbb F_p^{N_{\mathrm{col}}}FpNcol​​ whose columns are partitioned into DDD blocks of size bbb, and the right-hand side bxb_xbx​, for x∈{0,1}nx\in\{0,1\}^nx∈{0,1}n, is zero except for the entries θxk\theta_x^{k}θxk​ of the translation equations, where θx\theta_xθx​ is the encoding of the instance.

Statement. Let FFF be a field of characteristic ppp, let 0<ε<10<\varepsilon<10<ε<1, and let TTT be tables for VVV and δ=1−ε\delta=1-\varepsilonδ=1−ε. Let C⊆FM\mathcal C\subseteq F^{M}C⊆FM, M=2NcolM=2N_{\mathrm{col}}M=2Ncol​, be the code spanned over FFF by ker⁡A×{0}\ker A\times\{0\}kerA×{0}, with the targets tx=(vx,0)t_x=(v_x,0)tx​=(vx​,0) for a solution vxv_xvx​ of Av=bxAv=b_xAv=bx​ if there is one and tx=(0,1)t_x=(0,\mathbf 1)tx​=(0,1) otherwise. Then, with CCC = sizeExp p (1 - ε),

1≤M≤(S+1)C,D≥1,1\le M\le(S+1)^{C},\qquad D\ge1,1≤M≤(S+1)C,D≥1, x∈L(V) ⟹ Δ(tx,C)≤D,x∉L(V) ⟹ Δ(tx,C)>M1−ε⋅D.x\in L(V)\ \Longrightarrow\ \Delta(t_x,\mathcal C)\le D,\qquad x\notin L(V)\ \Longrightarrow\ \Delta(t_x,\mathcal C)>M^{1-\varepsilon}\cdot D .x∈L(V) ⟹ Δ(tx​,C)≤D,x∈/L(V) ⟹ Δ(tx​,C)>M1−ε⋅D.

This is Theorem 5.1 for codes, for an arbitrary quadratic verifier, with the radius R=DR=DR=D. The existence form of this statement only asserts that some code or lattice with targets has the gap. Since the Lean statement does not require the targets to be computable, that form is satisfied by a construction unrelated to the paper, in which the target records whether xxx is in the language. Here the code, the lattice and the targets are the ones the paper constructs.

Formalization Note. The statement holds for every choice of tables; they exist by Tables.nonempty. The conclusion is CodeFamily.HasGap. The field FFF is any field that is an Fp\mathbb F_pFp​-algebra (the paper takes it finite). Polynomial-time computability of the code, the lattice and the targets is not formalized. The target uses a solution of Av=bxAv=b_xAv=bx​ picked by classical choice, where the paper uses Gaussian elimination; the distance from the target to the code does not depend on the solution.

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_Codes_Ext
import Definitions.Def_LatticePrepro_Conversions_ConstructionA
import Definitions.Def_LatticePrepro_Conversions_ConstructionA_Ext
import Definitions.Def_LatticePrepro_Conversions_Hadamard
import Definitions.Def_LatticePrepro_Conversions_Hadamard_Ext
import Definitions.Def_LatticePrepro_Conversions_Padding
import Definitions.Def_LatticePrepro_Conversions_Lattices
import Definitions.Def_LatticePrepro_Conversions_Lattices_Ext
import Definitions.Def_LatticePrepro_Lattices_Distance
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_Lattices_Mathlib
import Definitions.Def_LatticePrepro_Main
import Definitions.Def_LatticePrepro_Verifier_Gates
import Definitions.Def_LatticePrepro_Verifier_Circuit
import Definitions.Def_LatticePrepro_Verifier_Expr
import Definitions.Def_LatticePrepro_Verifier_ThreeSAT
import Definitions.Def_LatticePrepro_ThreeSAT
import Definitions.Def_LatticePrepro_ThreeSAT_Ext
import Definitions.Def_LatticePrepro_Explicit

open LatticePrepro
open LatticePrepro.QuadraticVerifier
variable {p : ℕ} [hp : Fact p.Prime]
open LatticePrepro.QuadraticVerifier.Tables
variable {V : QuadraticVerifier p} {δ : ℝ}
Formal statement
theorem LatticePrepro.QuadraticVerifier.Tables.codeFamily_hasGap (F : Type) [Field F] [DecidableEq F] [Algebra (ZMod p) F] {ε : ℝ}
    (hε : 0 < ε) (hε1 : ε < 1) (T : V.Tables (1 - ε)) :
    (T.codeFamily F).HasGap T.system.numBlocks ε 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, with Lemma 3.11 (\label{lem:block-system-codes}) and Construction 4.5 (\label{con:fixed-verifier}); Lean: LatticePrepro/Explicit.lean, LatticePrepro.QuadraticVerifier.Tables.codeFamily_hasGap

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