Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 5.2 (codes, NO instances) — every vector is rejected

Proved
LatticePrepro.CodeFamily.not_accepts_of_lt

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

coding-theorycvp-ncp-preprocessinghardness-of-approximationlatticespreprocessing

Let FFF be a field and (C,(tx)x∈X)(\mathcal C,(t_x)_{x\in X})(C,(tx​)x∈X​) a code family over FFF with coordinate set MMM. Let g,R∈Ng,R\in\mathbb Ng,R∈N and let xxx be an instance with

Δ(tx,C)>g⋅R.\Delta(t_x,\mathcal C)>g\cdot R.Δ(tx​,C)>g⋅R.

Then no vector c∈FMc\in F^Mc∈FM is accepted by the test with threshold g⋅Rg\cdot Rg⋅R: it is not the case that c∈Cc\in\mathcal Cc∈C and Δ(tx,c)≤g⋅R\Delta(t_x,c)\le g\cdot RΔ(tx​,c)≤g⋅R. Here Δ\DeltaΔ is the Hamming distance and Δ(tx,C)=min⁡c′∈CΔ(tx,c′)\Delta(t_x,\mathcal C)=\min_{c'\in\mathcal C}\Delta(t_x,c')Δ(tx​,C)=minc′∈C​Δ(tx​,c′).

This is the NO half of Lemma 5.2 (Testing search outputs) for codes. In Theorem 5.1 for codes it is applied with R=DR=DR=D and the gap ggg, using Δ(tx,C)>g⋅D\Delta(t_x,\mathcal C)>g\cdot DΔ(tx​,C)>g⋅D on NO instances (Lemma 3.11): whatever a search algorithm returns on a NO instance, the test rejects it.

Formalization Note. The NO condition is given directly as the bound on Δ(tx,C)\Delta(t_x,\mathcal C)Δ(tx​,C), a natural number (codeDist), and ccc ranges over all of FMF^MFM, not only over codewords. The test is the predicate CodeFamily.Accepts g R x c.

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_Conversions_SearchTest

open LatticePrepro
open LatticePrepro.CodeFamily
variable {F : Type} [Field F] [DecidableEq F] {X : Type} (C : CodeFamily F X)
Formal statement
theorem LatticePrepro.CodeFamily.not_accepts_of_lt {g R : ℕ} {x : X} (hx : g * R < codeDist (C.target x) C.code)
    (c : C.M → F) : ¬ C.Accepts g R x 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), Lemma 5.2 (\label{lem:search-test}), codes, NO instances; Lean: LatticePrepro/Conversions/SearchTest.lean, LatticePrepro.CodeFamily.not_accepts_of_lt
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