1 | initial version |
If you do explicit division of polynomials with /
, you (reasonably) end up in the fraction field of the polynomial ring. What you want to do instead is division with //
, which is division (ignoring the remainder) in the polynomial ring. Since you know the remainder is zero, this will be the actual quotient, as a member of the polynomial ring.
(If you have an element q
in the fraction field of R
and it has denominator 1, then you can also convert it to an element of the polynomial ring by R(q)
.)