Integer polynomials modulo X^p - 1 #
Main definitions #
CyclicIntRing: the integer polynomial quotient.CyclicIntRing.coeff: coefficients in the unique representative of degree less thanp.
Main results #
CyclicIntRing.coeff_x_pow: powers have a single coefficient at the residue of their exponent.
References #
Adapted from Anthropic's Hashing.lean.
@[reducible, inline]
The quotient ring ℤ[X]/(X^p - 1).
Instances For
The element x of ℤ[x]/(x^p − 1).
Instances For
The coefficient of degree r in an element z of the quotient, as a linear map. It is the
coefficient of x^r in the unique polynomial of degree less than p that represents z
(Mathlib's AdjoinRoot.modByMonicHom gives that polynomial; it asks for the fact that x^p − 1
is monic, which holds as p ≠ 0).
Instances For
The coefficient, in terms of the representing polynomial.