Processing math: 100%
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Reducing the Coefficients of a Polynomial Modulo an Ideal

I have a polynomial in two variables t1 and t2 (say 2t1+at2) defined over a ring which is itself a polynomial ring (say Z[a]). I'd like to reduce the coefficients of the polynomial modulo an ideal of the latter ring (say (2) or (a) or (2,a)). When I execute

M.<a> = PolynomialRing(ZZ)
R.<t1,t2> = PolynomialRing(M)
m = M.ideal(a)
(2*t1 + a*t2).change_ring(QuotientRing(M,m))

I get 2*t1, as I would expect. On the other hand, the code

M.<a> = PolynomialRing(ZZ)
R.<t1,t2> = PolynomialRing(M)
m = M.ideal(2)
(2*t1 + a*t2).change_ring(QuotientRing(M,m))

gives me a type error ("polynomial must have unit leading coefficient"). And the input

M.<a> = PolynomialRing(ZZ)
R.<t1,t2> = PolynomialRing(M)
m = M.ideal(2,a)
(2*t1 + a*t2).change_ring(QuotientRing(M,m))

gives the output 2*t1 + abar*t2 rather than the 0 I would have expected. What should I do to get the outputs I would expect (namely 2*t1, abar*t2, and 0, respectively)?