Documentation

CslibFrontier.Foundations.Data.ZMod.DotProduct

Integer list dot products and residue matrices #

The integer-cast matrix bridge formerly used inside Lyubashevsky's verifier is available independently of cryptography and native certificates. The operation is Mathlib's public padded list dot product; no new arithmetic definition is introduced.

Main results #

theorem Mathlib.Tactic.Matrix.ListMatrix.intCast_dotProduct_matrix_ofFn {n m q : ℕ} (A : Matrix (Fin n) (Fin m) (ZMod q)) (z : Fin m → ℤ) (i : Fin n) :
↑(dotProduct m ((List.ofFn fun (r : Fin n) => List.ofFn fun (c : Fin m) => (A r c).cast).getD ↑i []) (List.ofFn z)) = A.mulVec (Int.cast ∘ z) i

A canonical integer lift of a residue-matrix row gives its residue dot product.