Reduction of polynomials over number fields modulo a prime ideal
Given a polynomial and a prime ideal of , we want to determine the reduction , where is the residue field. Concretely, we want to reduce the polynomial over . We begin by defining the cyclomotic field and the polynomial.
julia> K, ζ = cyclotomic_field(7);
julia> Kx, x = K['x'];
julia> f = x^3 + (1 + ζ + ζ^2)*x^2 + (23 + 55ζ^5)x + (ζ + 77)//2
x^3 + (z_7^2 + z_7 + 1)*x^2 + (55*z_7^5 + 23)*x + 1//2*z_7 + 77//2
Next we determine the ring of integers and a prime ideal lying above the prime .
julia> OK = maximal_order(K);
julia> p = 29;
julia> frakp = prime_decomposition(OK, p)[1][1]
<29, z_7 + 22>
Norm: 29
Minimum: 29
two normal wrt: 29
We can now determine the residue field and the canonical map .
julia> F, reduction_map_OK = ResidueField(OK, frakp);
julia> F
Finite field of degree 1 over F_29
julia> reduction_map_OK
Map with following data
Domain:
=======
Maximal order of Cyclotomic field of order 7
with basis nf_elem[1, z_7, z_7^2, z_7^3, z_7^4, z_7^5]
Codomain:
=========
Finite field of degree 1 over F_29
Not that the reduction map has domain and thus cannot be applied to elements of . We can extend it to the set of -integral elements by invoking the extend function. Not that the domain of the extended map will be the whole , but the map will throw an error when applied to elements which are not -integral.
julia> reduction_map_extended = extend(reduction_map_OK, K)
Map with following data
Domain:
=======
Cyclotomic field of order 7
Codomain:
=========
Finite field of degree 1 over F_29
julia> reduction_map_extended(K(1//3))
10
julia> reduction_map_extended(K(1//29))
ERROR: Element not p-integral
Finally we can reduce modulo , which we obtain by applying the reduction map to the coefficients.
julia> fbar = map_coefficients(reduction_map_extended, f)
x^3 + 28*x^2 + 4*x + 13
julia> base_ring(fbar) === F
true