Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » Type » Ring » hilbertPolynomial(Ring)
next | previous | forward | backward | up | index | toc

# hilbertPolynomial(Ring) -- compute the Hilbert polynomial of the ring

- Function: hilbertPolynomial
- Usage:
    `hilbertPolynomial R`
- Inputs:
  - R, a ring
- 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 a coordinate ring of the rational quartic curve in P^3.

    i1 : R = ZZ/101[a..d];

    i2 : S = coimage map(R, R, {a^4, a^3*b, a*b^3, b^4});

    i3 : presentation S

    o3 = | bc-ad c3-bd2 ac2-b2d b3-a2c |

                 1      4
    o3 : Matrix R  <-- R

    i4 : h =  hilbertPolynomial S

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

    o4 : ProjectiveHilbertPolynomial

    i5 : hilbertPolynomial(S, Projective=>false)

    o5 = 4i + 1

    o5 : QQ[i]

The rational quartic curve in P^3 is therefore 'like' 4 copies of P^1, with three points missing. One can see this by noticing that there is a deformation of the rational quartic to the union of 4 lines, or 'sticks', which intersect in three successive points.

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(5, k-> h(k))

    o6 = {1, 5, 9, 13, 17}

    o6 : List

    i7 : apply(5, k-> hilbertFunction(k,S))

    o7 = {1, 4, 9, 13, 17}

    o7 : List

## Ways to use this method:

- hilbertPolynomial(Ring) -- compute the Hilbert polynomial of the ring

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