Ask Your Question

Revision history [back]

Why is .groebner_basis only defined for a LaurentPolynomialRing on two or more generators?

If I run the code

Q.<x> = LaurentPolynomialRing(QQ)
I = Q.ideal([x - x^-1 + x^2])
print(I.groebner_basis())

I get the error: TypeError: unable to convert Univariate Laurent Polynomial Ring in x over Rational Field to a rational. But if I change it to Q.<x,y> or Q.<x,y,z>, it works fine and is able to print a Groebner basis. On the documentation page, it seems like it would map to the ring Q[x1,x2]/(x1x2-1) and find a Groebner basis there, but I don't see any reason why this would fail but Q[x1, x2, x3, x4]/(x1x2-1, x3x4-1) would succeed.