# CoCoA:HilbertPoly

## HilbertPoly

the Hilbert polynomial

### Description

This function returns the Hilbert polynomial for R as a polynomial in

the standard CoCoA ring Qt (= Q[t]).

The weights of the indeterminates of R must all be 1, and the

coefficient ring must be a field.

If the input is not homogeneous, the Hilbert polynomial of the

corresponding leading term (initial) ideal or module is calculated.

For the Hilbert *function*, see <ttref>Hilbert</ttref>.

#### Example

```  Use R ::= Q[w,x,y,z];
I := Ideal(z^2-xy,xz^2+w^3);
Hilbert(R/I);
H(0) = 1
H(1) = 4
H(t) = 6t-3   for t &gt;= 2
-------------------------------
F := HilbertPoly(R/I);
F;  -- a polynomial in the ring Qt
Qt :: 6t-3
-------------------------------
Subst(F,Qt::t,3);
Qt :: 15
-------------------------------
```

### Syntax

```Hilbert(R:RING or TAGGED(<quotes>Quotient</quotes>)):POLY in the ring Qt.
```

```   <type>groebner</type>
<type>groebner-basic</type>
<type>hilbert</type>
<type>quotient</type>
<type>ring</type>
```