Macaulay2 » Documentation
Packages » Macaulay2Doc » commutative algebra » Gröbner bases » computing Groebner bases » gb » using a Hilbert hint for a Groebner basis calculation
next | previous | forward | backward | up | index | toc

using a Hilbert hint for a Groebner basis calculation -- how to provide the Hilbert function to speed up Groebner basis calculations

If the input module is homogeneous (and its ring passes the checks in canUseHilbertHint), and one knows the Hilbert function of the module, then one can provide this information to the engine to prevent unnecessary S-pair reductions.

For example, if one considers a list of $m$ random forms in $n$ variables with $m \leq n$, one expects the ideal to define a complete intersection, so we can provide this Hilbert function to the engine. One provides the numerator of the Hilbert series of the module (or in the case of an ideal, of the corresponding quotient module) as provided by poincare. In the example below, we use a monomial complete intersection to easily provide this information.

i1 : R = ZZ/101[a,b,c,d,e]

o1 = R

o1 : PolynomialRing
i2 : M = ideal random(R^1,R^{-4,-5,-5,-6});

o2 : Ideal of R
i3 : hf = poincare ideal (a^4,b^5,c^5,d^6)

          4     5    6     9     10     11    14     15    16    20
o3 = 1 - T  - 2T  - T  + 2T  + 2T   + 2T   - T   - 2T   - T   + T

o3 : ZZ[T]
i4 : elapsedTime Mgb = gb M
 -- 1.23419s elapsed

o4 = GroebnerBasis[status: done; S-pairs encountered up to degree 17]

o4 : GroebnerBasis
i5 : M = ideal M_*;

o5 : Ideal of R
i6 : elapsedTime Mgb = gb(M, Hilbert => hf)
 -- .365763s elapsed

o6 = GroebnerBasis[status: done; S-pairs encountered up to degree 17]

o6 : GroebnerBasis

However, obtaining the Hilbert function is not always easy to provide in this way. In this case, one must work with the degreesRing of the ring in question.

i7 : S = degreesRing R

o7 = S

o7 : PolynomialRing
i8 : T = S_0

o8 = T

o8 : S
i9 : hf = (1 - T^4) * (1 - T^5)^2 * (1 - T^6)

          4     5    6     9     10     11    14     15    16    20
o9 = 1 - T  - 2T  - T  + 2T  + 2T   + 2T   - T   - 2T   - T   + T

o9 : S
i10 : M = ideal M_*;

o10 : Ideal of R
i11 : elapsedTime Mgb = gb(M, Hilbert => hf)
 -- .473213s elapsed

o11 = GroebnerBasis[status: done; S-pairs encountered up to degree 17]

o11 : GroebnerBasis

See also


The source of this document is in Macaulay2Doc/functions/gb-doc.m2:371:0.