Decision LWE for an arbitrary modular error law
DefinitionCityLWE_DecisionExperimentThe real challenge is the public marginal of the joint search experiment. The ideal challenge gives an independently uniform matrix and label vector of the same shape. Decision hardness requires that the absolute difference of the two acceptance probabilities be negligible for every valid uniform probabilistic polynomial-time distinguisher and every unary polynomial-time sample schedule.
import Definitions.Def_CityLWE_SearchExperiment
set_option autoImplicit false
open QAlgorithms.Complexity PPSLattice
namespace CityLWE
noncomputable def uniformTranscript (q n m : ℕ) : PMF (Transcript q n m) :=
(uniformMat q n m).bind fun A =>
(iidVec (uniformZq q) m).map fun labels => (A, labels)
noncomputable def decisionAccept (q n m param : ℕ)
(D : RestrictedDec.Adversary) (views : PMF (Transcript q n m)) : ℝ :=
((views.bind fun ab =>
(D.activate param [] (BeyondDS.tup [encMat q ab.1, encVec q ab.2])).map
fun output => output.2.headD false) true).toReal
noncomputable def decisionAdvantage (q n m param : ℕ) (χ : PMF (ZMod q))
(D : RestrictedDec.Adversary) : ℝ :=
|decisionAccept q n m param D ((joint q n m χ).map Prod.snd) -
decisionAccept q n m param D (uniformTranscript q n m)|
def DecisionHard (dim modulus : ℕ → ℕ)
(error : (t : ℕ) → PMF (ZMod (modulus t))) : Prop :=
∀ m : ℕ → ℕ, PolyTimeOn (fun t : ℕ => encNat t) (fun t => encNat (m t)) →
∀ D : RestrictedDec.Adversary, D.Valid →
NoisyOWMPC.Negligible fun t =>
decisionAdvantage (modulus t) (dim t) (m t) t (error t) D
end CityLWE
Read-back
What the Lean code literally says, in plain math · GPT-6 (Codex)
For every , the comparison transcript is , where all entries of the matrix and length- vector are independent and uniform over for . For , the sampler for each entry is the point mass at zero in .
For any such , any parameter , any adversary, and any probability mass function on transcripts, the acceptance probability is the real probability that the move begins with after drawing the transcript and activating the adversary once. An empty move rejects. An adversary consists of a bit-string function and . Validity means that one deterministic polynomial-time machine computes . At parameter , one activation runs on the tuple of , the empty state, the encoded input, and independent fair bits. Its move is the second parsed output field, empty if missing, truncated to bits. The returned state is discarded. The encoded input is the tuple of the row-major matrix code and the label-vector code. Each residue occupies bits least significant first, of width zero for . Tuple encoding doubles each bit of a field and appends to that field.
For each , each error law on , and each adversary, the advantage is the absolute difference between its acceptance probabilities on the following two laws. In the first, draw independent entries of and by the same residue sampler, independently draw errors from , and present with , discarding . In the second, present the comparison transcript . For the sum is zero, and for both laws present empty matrix and vector codes.
For arbitrary functions and error laws on , decision hardness means that for every unary-polynomial-time sample-count function and every valid adversary its advantage at modulus , dimension , sample count , parameter and error law is negligible in . Write . A unary-polynomial-time function has one deterministic polynomial-time bit-string machine sending to for every . A real function is negligible if for every and, for every real , there exists such that for every .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.