ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 07 May 2015 17:37:57 -0500Groebner basis computation with symbolic constantshttp://ask.sagemath.org/question/26748/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!Wed, 06 May 2015 14:56:22 -0500http://ask.sagemath.org/question/26748/groebner-basis-computation-with-symbolic-constants/Answer by tmonteil for <p>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</p>
<pre><code>y^2 + z - c1
x*y^2 - c2 - 2
</code></pre>
<p>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), </p>
<pre><code>Ideal (y^2 + z - c1, x*y^2 - c2 - 2) of Multivariate Polynomial Ring in x, y, z over Symbolic Ring
</code></pre>
<p>but then the polynomials containing them don't have division.</p>
<pre><code>AttributeError: 'MPolynomialRing_polydict_with_category' object has no attribute 'monomial_divides'
</code></pre>
<p>Thank you!</p>
http://ask.sagemath.org/question/26748/groebner-basis-computation-with-symbolic-constants/?answer=26753#post-id-26753I 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]
Thu, 07 May 2015 02:08:25 -0500http://ask.sagemath.org/question/26748/groebner-basis-computation-with-symbolic-constants/?answer=26753#post-id-26753Comment by jooyous for <p>I am not sure this trick is formally correct (please tell us!), but you can try to make <code>c1</code> and <code>c2</code> transcendental, by creating a fraction field around them:</p>
<pre><code>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]
</code></pre>
http://ask.sagemath.org/question/26748/groebner-basis-computation-with-symbolic-constants/?comment=26756#post-id-26756Seems to be working so far!Thu, 07 May 2015 17:37:57 -0500http://ask.sagemath.org/question/26748/groebner-basis-computation-with-symbolic-constants/?comment=26756#post-id-26756