# ApCoCoA-1:NC.HF

## NC.HF

Enumerate the values of the Hilbert function of a finitely generated `K`-algebra.

### Syntax

NC.HF(G:LIST[, DB:INT]):LIST

### Description

Let `P` be a finitely generated non-commutative polynomial ring over `K`, and let `I` be a finitely generated two-sided ideal in `P`. Then `P/I` is a finitely generated `K`-algebra. Moreover, for every integer `i`, we let `F_{i}` be the `K`-vector subspace generated by the words of length less than or equal to `i`. Clearly, the set `{F_{i}}` is a filtration of `P`. Further, the filtration `{F_{i}}` induces a filtration `{F_{i}/(F_{i} intersects I)}` of `P/I`. The *Hilbert function* of `K`-algebra `P/I` is a map `HF: N --> N` defined by `HF(i)=dim(F_{i}/(F_{i} intersects I))-dim(F_{i-1}/(F_{i-1} intersects I))`, i.e. `HF(i)` is equal to the number of words of length `i` in a Macaulay's basis (see NC.MB) of `P/I`.

*Please note:* The function(s) explained on this page is/are using the *ApCoCoAServer*. You will have to start the ApCoCoAServer in order to use it/them.

Please set non-commutative polynomial ring (via the command Use) and word ordering (via the function NC.SetOrdering) before calling this function. The default word ordering is the length-lexicographic ordering ("LLEX"). For more information, please check the relevant commands and functions.

@param

*G:*a LIST of non-zero non-commutative polynomials, which form a Groebner basis with respect to a length compatible word ordering. Each polynomial is represented as a LIST of LISTs, and each element in every inner LIST involves only one indeterminate or none (a constant). For example, the polynomial`f=2x[2]y[1]x[2]^2-9y[2]x[1]^2x[2]^3+5`is represented as F:=[[2x[1],y[1],x[2]^2], [-9y[2],x[1]^2,x[2]^3], [5]]. The zero polynomial`0`is represented as the empty LIST [].*Warning:*users should take responsibility to ensure that G is indeed a Groebner basis with respect to a length compatible word ordering!@return: a LIST of non-negative integers, which are values of the Hilbert function of the K-algebra

`P/<G>`.

Optional parameter:

@param

*DB:*a positive INT, which is a degree bound of the Hilbert function.*Note that*we set DB=32 by default. Thus, in the case that the`K`-dimension of`P/<G>`is finite, it is necessary to set DB to a large enough INT in order to compute all the values of the Hilbert function.

#### Example

Use ZZ/(2)[t,x,y]; NC.SetOrdering(<quotes>LLEX</quotes>); F1 := [[x^2], [y,x]]; -- x^2+yx F2 := [[x,y], [t,y]]; -- xy+ty F3 := [[x,t], [t,x]]; -- xt+tx F4 := [[y,t], [t,y]]; -- yt+ty G := [F1, F2,F3,F4]; Gb:=NC.GB(G); NC.HF(Gb,5); [1, 3, 5, 5, 5, 5] -------------------------------

### See also