next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Macaulay2Doc :: hilbertPolynomial(Ideal)

hilbertPolynomial(Ideal) -- compute the Hilbert polynomial of the quotient of the ambient ring by the ideal

Synopsis

Description

We compute the Hilbert polynomial of the quotient of the ambient ring by an ideal.
i1 : R = QQ[a..d];
i2 : I = monomialCurveIdeal(R, {1,3,4});

o2 : Ideal of R
i3 : h = hilbertPolynomial I

o3 = - 3*P  + 4*P
          0      1

o3 : ProjectiveHilbertPolynomial
i4 : hilbertPolynomial (R/I)

o4 = - 3*P  + 4*P
          0      1

o4 : ProjectiveHilbertPolynomial
i5 : hilbertPolynomial(I, Projective=>false)

o5 = 4i + 1

o5 : QQ[i]

These Hilbert polynomials can serve as Hilbert functions too since the values of the Hilbert polynomial eventually are the same as the Hilbert function.

i6 : apply(10, k-> h(k))

o6 = {1, 5, 9, 13, 17, 21, 25, 29, 33, 37}

o6 : List
i7 : apply(10, k-> hilbertFunction(k,I))

o7 = {1, 4, 9, 13, 17, 21, 25, 29, 33, 37}

o7 : List

Caveat

As is often the case, calling this function on an ideal I actually computes it for R/I where R is the ring of I.