Open in CoCalc

Example at the top of page 162 of this book needs to be updated.

He gives some sage code, then claims "which yields a^2 + 1." as output. But the output is 0 (if you try it), and it's very obvious it should be 0 if you just think about what it's doing (so definitely not a bug). Then he claims "Careful: sage is not perfect, and if you change QQ above the ZZ, sage doesn’t seem to be able to give the correct answer (as of the time these notes were written).". That also works fine.

R.<x,y> = PolynomialRing(QQ)
I = R.ideal([x^2*y,x*y^3])
S.<a,b> = R.quotient_ring(I)
a^2*b

0
R.<x,y> = PolynomialRing(ZZ)
I = R.ideal([x^2*y,x*y^3])
S.<a,b> = R.quotient_ring(I)
a^2*b

0