Lemma 5.2 (codes, YES instances) — approximate solutions pass the test
ProvedLatticePrepro.CodeFamily.accepts_of_isApproxLet be a field and a code family over : a linear code and targets . Let , let be an instance with
and let be a real number with . If is an -approximate solution for , that is, and , then is accepted by the test with threshold :
Here is the Hamming distance and (Definition 3.1).
This is the YES half of Lemma 5.2 (Testing search outputs) for codes. In Theorem 5.1 for codes it is applied with the radius of Lemma 3.11, the gap and : on a YES instance, every -approximate codeword passes the test.
Formalization Note. The statement is for an arbitrary code family over any field with decidable equality, with the YES condition given directly as the bound . The paper's hypotheses and (the case ) are replaced by the weaker , and the threshold appears as . The test and approximate solutions are the predicates CodeFamily.Accepts and CodeFamily.IsApprox.
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)theorem LatticePrepro.CodeFamily.accepts_of_isApprox {g R : ℕ} {x : X} (hx : codeDist (C.target x) C.code ≤ R) {f : ℝ}
(hfg : f ≤ g) {c : C.M → F} (hc : C.IsApprox f x c) : C.Accepts g R x c := by sorryConfirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.