# gb -- compute a Gröbner basis

## Synopsis

• Usage:
gb I
• Inputs:
• I, an ideal, module, or matrix
• Optional inputs:
• Algorithm => , default value Inhomogeneous, possible values: Homogeneous, Inhomogeneous, Homogeneous2, and Sugarless. Experimental options include LinearAlgebra and Toric.
• BasisElementLimit => an integer, default value infinity, stop when this number of (nonminimal) Gröbner basis elements has been found
• ChangeMatrix => , default value false, whether to compute the change of basis matrix from Gröbner basis elements to original generators. Use getChangeMatrix to recover it.
• CodimensionLimit => an integer, default value infinity, stop computation once codimension of submodule of lead terms reaches this value (not functional yet)
• DegreeLimit => a list, default value {}, stop after the Gröbner basis in this degree has been computed
• GBDegrees => a list, default value null, a list of positive integer weights, one for each variable in the ring, to be used for organizing the computation by degrees (the 'sugar' ecart vector)
• HardDegreeLimit => ..., default value null, throws away all S-pairs of degrees beyond the limit. The computation will be re-initialized if higher degrees are required.
• Hilbert => ..., default value null, informs Macaulay2 that this is the poincare polynomial, and can be used to aid in the computation of the Gröbner basis (Hilbert driven)
• MaxReductionCount => an integer, default value 10, the maximum number of reductions of an S-pair done before requeueing it, if the Inhomogeneous algorithm is in use
• PairLimit => an integer, default value infinity, stop after this number of spairs has been considered
• StopBeforeComputation => , default value false, whether to initialize the Gröbner basis engine but return before doing any computation (useful for using or viewing partially computed Gröbner bases)
• StopWithMinimalGenerators => , default value false, whether to stop as soon as the minimal set (or a trimmed set, if not homogeneous or local) of generators is known. Intended for internal use only
• Strategy => ..., default value {}, either LongPolynomial, Sort, or a list of these. LongPolynomial: use a geobucket data structure while reducing polynomials; Sort: sort the S-pairs. Another symbol usable here is UseSyzygies. Usually S-pairs are processed degree by degree in the order that they were constructed.
• SubringLimit => an integer, default value infinity, stop after this number of elements of the Gröbner basis lie in the first subring
• Syzygies => , default value false, whether to collect syzygies on the original generators during the computation. Intended for internal use only
• SyzygyLimit => an integer, default value infinity, stop when this number of non-zero syzygies has been found
• SyzygyRows => an integer, default value infinity, for each syzygy and change of basis element, keep only this many rows of each syzygy
• Outputs:
• , a Gröbner basis computation object

## Description

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 coefficients 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

• "gb(Ideal)"
• "gb(Matrix)"
• "gb(Module)"

## For the programmer

The object gb is .