A set of polynomials {F1,…,FN} generate an ideal I; namely, I is the set of all linear combinations of the Fj. Given such an ideal, a Gröbner basis for I is a subset G={G1,…,Gn} of I such that for any F in I, there is a Gk in G such that the leading monomial of Gk divides the leading monomial of F. (Note that the leading monomial depends on a fixed ordering of the monomials.)
If G is a Gröbner basis for such an ideal I, then for any nonzero F in I, if you do a Euclidean division of F by the corresponding Gk, take the remainder of this division, do again the same and so on, at some point you get a remainder of zero.
Example.
Let I be the ideal generated by {x3−2xy, x2y−2y2+x}
with the standard lexicographic order on the monomials. One Gröbner
basis for I is
G = {g1(x,y) = x2,g2(x,y)= x y,g3(x,y)=2 y2−x} |
Consider the element F(x,y) = 2x2y − 3x2 + 6xy − 4y2+2x of I. The leading monomial x2y of F(x,y) is divisible by the leading monomial x2 of g1(x,y). Dividing F(x,y) by g1(x,y) leaves a remainder of R1(x,y) = 6xy−4y2+2x. The leading monomial of R1(x,y), which is xy, is divisible by the leading monomial of g2(x,y), which is xy. Dividing R1(x,y) by g2(x,y) leaves a remainder of R2(x,y)=−4y2+2x. Finally, the leading monomial of R2(x,y), which is y2, is divisible by the leading monomial of g3(x,y), which is y2. Dividing R2(x,y) by g3(x,y) leaves a remainder of 0.
The gbasis command computes Gröbner bases.
Note that the lexicographic order depends on the order the variables are given in vars. For example, if vars=[x,y,z], then x^2*y^4*z^3 comes before x^2*y^3*z^4, but if vars=[x,z,y], then x^2*y^4*z^3 comes after x^2*y^3*z^4.
Examples.
⎡ ⎣ | y3,x2−y2,2 x y−y2 | ⎤ ⎦ |
⎡ ⎣ | x33−1,−x22−x2 x3−x32,x1+x2+x3 | ⎤ ⎦ |