<< Chapter < Page | Chapter >> Page > |
Here is some code computing the same Gröbner basis in Sage:
----------------------------------------------------------------------
| Sage Version 4.5.2, Release Date: 2010-08-05 || Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------sage: R.<x,y,z> = PolynomialRing(QQ,3,order='deglex') # or degrevlex, lex, etc.
sage: f = x^2*y+y^2*z;sage: g = x*y^2+z^2;
sage: I = (f,g)*Rsage: I
Ideal (x^2*y + y^2*z, x*y^2 + z^2) of Multivariate Polynomial Ring in x, y, z over Rational Fieldsage: gI = I.groebner_basis(); gI
[x^2*z^2 + y*z^3, y^3*z - x*z^2, x^2*y + y^2*z, x*y^2 + z^2]sage: h = y^4*z^2+x^3*z^2;
sage: h.mod(I)0
sage: h.mod(gI) # I'm not sure how to get Sage to just do the division algorithm0
Exercises
You may wish to use a computer to do most of the work in the following calculations.
One advantage of Macaulay 2 is the
getChangeMatrix
command to express the generators of the Gröbner basis as linear combinations of the original generators, something I'm not sure how to do in the other programs.
Last time we found that
was a Gröbner basis for in grlex order with .
Of course, we'd like to be able to say our Gröbner bases are unique. As a first step, we noticed last time that one element of the Gröbner basis was redundant: , so we could remove it and still have a Gröbner basis
More generally, if is a Gröbner basis with and is a multiple of , then will be redundant and can be removed, i.e. the set is still a Gröbner basis for the same ideal. (Why?)
Of course, multiplying any element of a Gröbner basis by a scalar will give a different Gröbner basis, so if we want uniqueness, we should require that each leading coefficient be 1. Since a monomial ideal certainly has a unique minimal monomial generating set, we might hope that forcing constant leading coefficients and removing redundant elements would be enough to get a Gröbner basis which is unique, but that is not quite the case. The problem is that we could still add a multiple of one generator to another. For example, for any
is another Gröbner basis for the same ideal as above. To avoid non-uniqueness arising in this way, we say that a reduced Gröbner basis is a Gröbner basis where the leading coefficient of every is 1 and no term of any is divisible by the leading term of any with .
Notification Switch
Would you like to follow the 'The art of the pfug' conversation and receive update notifications?