Macaulay2 » Documentation
Packages » Macaulay2Doc » ideals » Ideal » hilbertPolynomial(Ideal)
next | previous | forward | backward | up | index | toc

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

- Function: hilbertPolynomial
- Usage:
    `hilbertPolynomial I`
- Inputs:
  - I, an ideal
- Optional inputs:
  - Projective => ..., default value true, choose how to display the Hilbert polynomial
- Outputs:
  - a projective Hilbert polynomial, unless the option Projective is false

## 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.

## Ways to use this method:

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

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Macaulay2Doc/functions/hilbertPolynomial-doc.m2:124:0.