-
-
Notifications
You must be signed in to change notification settings - Fork 698
Description
I'd like to "remove squares" in some polynomials living in a polynomial ring over QQ, in 2 variables: x,y. I tried to implement this by modding out by the ideal (x^2 - x, y^2 - y). Depending on the ordering, the result of .mod() does not always output the polynomial I am looking for.
Without specifying an ordering, everything seems fine:
sage: R1.<x,y> = PolynomialRing(QQ, 2)
sage: I1 = R1.ideal(["x^2 - x", "y^2 - y"])
sage: R1("x^2 + y").mod(I1)
x + y
sage: R1("x + y^2").mod(I1)
x + yHowever, when specifying the order lex the reduction of x + y^2 is not as expected:
sage: R2.<x,y> = PolynomialRing(QQ, 2, order="lex")
sage: I2 = R2.ideal(["x^2 - x", "y^2 - y"])
sage: R2("x^2 + y").mod(I2)
x + y
sage: R2("x + y^2").mod(I2)
x + y^2This issue was reported in sage-support where it was pointed out that it is likely a bug in Singular, or in the Singular interface to Sage.
In particular, using the order lex works when implementation="generic" is also specified:
sage: R3.<x,y> = PolynomialRing(QQ, 2, order="lex", implementation="generic")
sage: I3 = R3.ideal(["x^2 - x", "y^2 - y"])
sage: R3("x^2 + y").mod(I3)
x + y
sage: R3("x + y^2").mod(I3)
x + yFor reference, I am using Sage version 8.6 on macOS Mojave 10.14.3.
PS. see also https://groups.google.com/d/msg/sage-devel/K49-V3BbWbg/pxuoehPvAAAJ
CC: @simon-king-jena @malb @mwageringel
Component: commutative algebra
Keywords: multivariate polynomial, quotient ring, singular
Author: Dima Pasechnik
Branch: 21e4f9a
Reviewer: Markus Wageringel
Issue created by migration from https://trac.sagemath.org/ticket/27508