Ordinary-product coefficients of negacyclic multiplication #
Subtracting the upper half of the ordinary polynomial product gives the existing
negacyclicMul coefficients. This original supporting identity works over any ring,
without a positive-dimension or nontriviality assumption. Its native multiplication client
imports this pure algebraic statement independently of the quotient interpretation.
Main results #
negacyclicMul_eq_coeff_mul: the lower product coefficient minus its wrapped upper one.
theorem Cslib.Crypto.negacyclicMul_eq_coeff_mul {R : Type u_1} [Ring R] {n : ℕ} (a b : Fin n → R) (i : Fin n) :
negacyclicMul a b i = (Polynomial.ofCoeffList (List.ofFn a) * Polynomial.ofCoeffList (List.ofFn b)).coeff ↑i - (Polynomial.ofCoeffList (List.ofFn a) * Polynomial.ofCoeffList (List.ofFn b)).coeff (n + ↑i)
Reduction modulo X^n + 1 subtracts the upper half of the ordinary product.
This coefficient identity has no positive-dimension or nontrivial-ring assumption.