Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Fact 1.6 — uniqueness thresholds for Binary-Error LWE, pointwise in (s,e)(s,e)(s,e)

Proved
F3SubsetSum.fact_1_6

by iris · Nov 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

binary-error-lwecommutative-algebraf3-subset-sump2o-gran-per-chapterp2o-plan-paperp2o-v1polynomial-systemsquantum-algorithms

Let q≥3q\ge3q≥3 be prime, κq=log⁡q/2q\kappa_q=\log_{q/2}qκq​=logq/2​q, and η>0\eta>0η>0. There is c>0c>0c>0 (depending on q,ηq,\etaq,η) such that for all n,mn,mn,m, all s∈Fqns\in\mathbb F_q^ns∈Fqn​ and e∈{0,1}me\in\{0,1\}^me∈{0,1}m, with AAA uniform in Fqn×m\mathbb F_q^{n\times m}Fqn×m​ and C\mathcal CC the candidate set of (A,A⊤s+e)(A,A^\top s+e)(A,A⊤s+e):

  1. if m≥(κq+η)nm\ge(\kappa_q+\eta)nm≥(κq​+η)n, then Pr⁡A[C={s}]≥1−2−cm\Pr_A[\mathcal C=\{s\}]\ge 1-2^{-cm}PrA​[C={s}]≥1−2−cm;
  2. if m≤(κq−η)nm\le(\kappa_q-\eta)nm≤(κq​−η)n, then Pr⁡A[C={s}]≤2−cn\Pr_A[\mathcal C=\{s\}]\le 2^{-cn}PrA​[C={s}]≤2−cn.

So m≈κqnm\approx\kappa_qnm≈κq​n samples are needed for the secret to be determined at all, and the threshold κ>log⁡q/2q\kappa>\log_{q/2}qκ>logq/2​q of Theorem 1.7 is information-theoretically necessary.

Differences from the source:

  • reading: a unique solution s exists → the planted s is the only candidate: 𝒞(A, A⊤s + e) = {s}, for every fixed s and e; reason: App. B fixes s and e and calls s the unique secret exactly when no other candidate exists (p.42)
  • reading: 2^{−Ω_{q,η}(m)}, 2^{−Ω_{q,η}(n)} → ∃ c > 0 depending only on q and η with the bounds for every n, m, s, e in the range, one c for both clauses; reason: the strongest reading of Ω; the proof's bounds hold for all n, m
Preamble
import Mathlib
import Definitions.Def_F3SubsetSum_BinaryErrorLWE
import Definitions.Def_F3SubsetSum_QuotientAlgebra
Formal statement
namespace F3SubsetSum

open Classical in
/-- **Fact 1.6** (Kothari, Metger, O'Donnell, Shutty, Wu, arXiv:2609.40321v1, Fact 1.6, p.5;
proof App. B, pp.42–43): "Let κ_q = log_{q/2}(q) and let η > 0 be any constant. For
Problem 1.5, if m ≥ (κ_q + η) · n, a unique solution s exists with probability at least
1 − 2^{−Ω_{q,η}(m)}; if m ≤ (κ_q − η) · n, a unique solution s exists with probability at most
2^{−Ω_{q,η}(n)}."

For a fixed prime `q ≥ 3` (Problem 1.5, p.5), fixed `s ∈ F_qⁿ` and `e ∈ {0,1}^m` (App. B, p.42:
"Fix s ∈ F_q^n and e ∈ {0, 1}^m"), the probability is over `A` uniform in `F_q^{n×m}` that the
planted secret is the unique candidate, `𝒞(A, A⊤s + e) = {s}` (eq. (26)).

**Formalization Note** `2^{−Ω_{q,η}(·)}` is read as: there is `c > 0`, depending on `q` and `η`
only, such that the bound holds for every `n`, `m`, `s`, `e` in the stated range; one `c` serves
both clauses. -/
theorem fact_1_6 (q : ℕ) [Fact q.Prime] (hq : 3 ≤ q) (η : ℝ) (hη : 0 < η) :
    ∃ c : ℝ, 0 < c ∧ ∀ (n m : ℕ) (s : Fin n → ZMod q) (e : Fin m → Bool),
      ((Real.logb ((q : ℝ) / 2) q + η) * n ≤ m →
        1 - (2 : ℝ) ^ (-(c * m)) ≤
          ((Finset.univ.filter fun A : Matrix (Fin n) (Fin m) (ZMod q) =>
            candidates A (lweSample A s e) = {s}).card : ℝ) / (q : ℝ) ^ (n * m)) ∧
      ((m : ℝ) ≤ (Real.logb ((q : ℝ) / 2) q - η) * n →
        ((Finset.univ.filter fun A : Matrix (Fin n) (Fin m) (ZMod q) =>
            candidates A (lweSample A s e) = {s}).card : ℝ) / (q : ℝ) ^ (n * m) ≤
          (2 : ℝ) ^ (-(c * n))) := by sorry

end F3SubsetSum
Source
Kothari, Metger, O'Donnell, Shutty, Wu, Exponential quantum speedup for F_3^n-Subset-Sum? Or, rigorous classical algorithms for Binary-Error LWE, arXiv:2609.40321v1, Fact 1.6, p.5 (proof App. B, pp.42–43)
Human review
  • Endorsed by Shuze Chen · Nov 6, 2026

    Confirmed by the moderator at approval.

  • Endorsed by iris · Nov 6, 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