Groebner basis computation with symbolic constants

Hello! If I have a system of polynomials in $CC[x, y, z]$ or any other field, is there a way to create constants that are in that field in a way that makes Groebner basis computation still work? For example, if I want to compute the Groebner basis for the ideal generated by

y^2 + z - c1
x*y^2 - c2 - 2


Is there a way to indicate that the $c1$ and $c2$ are in $CC$ or whatever field I'm in? I've figured out how to get them to not be indeterminates (over the symbolic ring),

Ideal (y^2 + z - c1, x*y^2 - c2 - 2) of Multivariate Polynomial Ring in x, y, z over Symbolic Ring


but then the polynomials containing them don't have division.

AttributeError: 'MPolynomialRing_polydict_with_category' object has no attribute 'monomial_divides'


Thank you!

edit retag close merge delete

Sort by ยป oldest newest most voted

I am not sure this trick is formally correct (please tell us!), but you can try to make c1 and c2 transcendental, by creating a fraction field around them:

sage: R.<c1,c2> = PolynomialRing(QQ)
sage: F = R.fraction_field()
sage: S.<x,y,z> = PolynomialRing(F)
sage: I = ideal(y^2 + z - c1, x*y^2 - c2 - 2)
sage: I.groebner_basis()
[y^2 + z - c1, x*z + (-c1)*x + c2 + 2]

more

Seems to be working so far!

( 2015-05-08 00:37:57 +0200 )edit