Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 5.1 (codes, 3SAT) for the paper's code — gap M1−εM^{1-\varepsilon}M1−ε with M≤nCM\le n^{C}M≤nC

Proved
LatticePrepro.ThreeSAT.explicit_code_gap

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

coding-theorycvp-ncp-preprocessinghardness-of-approximationlatticespreprocessing

Instances of 3SAT on vvv variables are encoded as bit strings of length n=(2v)3n=(2v)^{3}n=(2v)3, one bit per possible clause, and VvV_vVv​ is the quadratic verifier of the 3SAT verifier circuit over the relevant prime field. Tables for VvV_vVv​ consist of a base and an explicit moment representation (Theorem A.8) in the ranges of the proof of Theorem 4.8; they do not depend on the instance.

Codes. For every prime ppp, every finite field FFF of characteristic ppp and every 0<ε<10<\varepsilon<10<ε<1, there is C∈NC\in\mathbb NC∈N such that for every v≥1v\ge1v≥1 there are tables TTT for VvV_vVv​ over Fp\mathbb F_pFp​ for which the following holds. Let Av=bxAv=b_xAv=bx​ be the fixed linear system of Construction 4.5 for TTT, with DDD blocks, and let C⊆FM\mathcal C\subseteq F^{M}C⊆FM be the code spanned over FFF by ker⁡A×{0}\ker A\times\{0\}kerA×{0}, with the targets txt_xtx​ of Lemma 3.11. Then 1≤M≤nC1\le M\le n^{C}1≤M≤nC, D≥1D\ge1D≥1, and

x satisfiable ⟹ Δ(tx,C)≤D,x unsatisfiable ⟹ Δ(tx,C)>M1−ε⋅D.x\ \text{satisfiable}\ \Longrightarrow\ \Delta(t_x,\mathcal C)\le D,\qquad x\ \text{unsatisfiable}\ \Longrightarrow\ \Delta(t_x,\mathcal C)>M^{1-\varepsilon}\cdot D .x satisfiable ⟹ Δ(tx​,C)≤D,x unsatisfiable ⟹ Δ(tx​,C)>M1−ε⋅D.

This is the code half of Theorem 5.1 for the code that the paper constructs. 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. Only the tables are asserted to exist; the code, the lattice, the targets and the radius are defined from them, and the instance enters through the right-hand side bxb_xbx​ of the fixed linear system alone. 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. The description lengths of Theorem 5.1 are not formalized either.

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.ThreeSAT
open QuadraticVerifier
Formal statement
theorem LatticePrepro.ThreeSAT.explicit_code_gap (p : ℕ) [Fact p.Prime] (F : Type) [Field F] [Fintype F]
    [DecidableEq F] [Algebra (ZMod p) F] (ε : ℝ) (hε : 0 < ε) (hε1 : ε < 1) :
    ∃ C : ℕ, ∀ v : ℕ, 1 ≤ v → ∃ T : (verifier p v).Tables (1 - ε),
      ((T.codeFamily F).comap encode).HasGap T.system.numBlocks ε (SAT v) (len v) C := 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}), codes, for the 3SAT verifier; Lean: LatticePrepro/Explicit.lean, LatticePrepro.ThreeSAT.explicit_code_gap

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