Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

With the current Groebner basis commands in Sage, there is not a good way to do this. None of the underlying methods like _groebner_basis_macaulay2 support a degree limit.

As a workaround, you can do something like the following:

sage: P.<a,b,c> = PolynomialRing(QQ,3, order='lex')
sage: I = sage.rings.ideal.Katsura(P,3)
sage: I.groebner_basis()  #compute the normal Groebner basis
[a - 60*c^3 + 158/7*c^2 + 8/7*c - 1, b + 30*c^3 - 79/7*c^2 + 3/7*c, c^4 - 10/21*c^3 + 1/84*c^2 + 1/84*c]
sage: singular.eval('degBound = 2;')  #set the degree bound in Singular
'degBound = 2;'
sage: gb = Sequence(map(P, singular(I).std())); gb
[10*b*c - b + 12*c^2 - 4*c, 4*b^2 + 2*b*c - b, a + 2*b + 2*c - 1]
sage: singular.eval('degBound = 0;')  #reset it back to 0 (unlimited)
'degBound = 0;'

I've made this ticket #9789.