next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc :: gb

gb -- compute a Gröbner basis

Synopsis

Description

See Gröbner bases for more information and examples.

The returned value is not the Gröbner basis itself. The matrix whose columns form a sorted, auto-reduced Gröbner basis are obtained by applying generators (synonym: gens) to the result of gb.

i1 : R = QQ[a..d]

o1 = R

o1 : PolynomialRing
i2 : I = ideal(a^3-b^2*c, b*c^2-c*d^2, c^3)

             3    2      2      2   3
o2 = ideal (a  - b c, b*c  - c*d , c )

o2 : Ideal of R
i3 : G = gens gb I

o3 = | c3 bc2-cd2 a3-b2c c2d2 cd4 |

             1       5
o3 : Matrix R  <--- R

When I is a subquotient module M/N of a free module F, then N is generated by relations I and M is generated by the concatenated matrix generators I || relations I -- it is the Gröbner basis of that matrix which is computed, so that reduction modulo the Gröbner basis can be used to determine membership in M. When relations are present, the option SyzygyRows is set to the number of columns of generators I, so that if ChangeMatrix => true is used, then division by the Gröbner basis can be to express an element of F as a linear combination of columns of generators I, avoiding the computation of the coefficents of the columns of relations I, leaving all the information that is required to specify an element of I.

i4 : R = QQ[x,y]

o4 = R

o4 : PolynomialRing
i5 : M = subquotient(matrix {{x}}, matrix {{x+y}})

o5 = subquotient (| x |, | x+y |)

                               1
o5 : R-module, subquotient of R
i6 : gens gb M

o6 = | y x |

             1       2
o6 : Matrix R  <--- R
i7 : matrix {{x}} // gb(M,ChangeMatrix=>true)

o7 = {1} | 1 |

             1       1
o7 : Matrix R  <--- R
i8 : matrix {{y}} // gb(M,ChangeMatrix=>true)

o8 = {1} | -1 |

             1       1
o8 : Matrix R  <--- R

See also

Ways to use gb :