Hilbert Series and Graded Rings#

The theory of Hilbert series is standard so it is only briefly touched on here. See Matsumura [Matsumura, 1989] Section 13 for more details (or other any standard textbook on algebra such as Zariski–Samuel or Eisenbud.)

Hilbert Series and Hilbert Polynomials#

Let \(R = \oplus R_n\), the sum taken over \(n\ge 0\), be a finitely-generated graded \(k\)-algebra with \(R_0=k\) and grading given by \(n\). The Hilbert polynomial of \(R\) is the numerical polynomial \(p(t)\) such that \(\dim R_n = p(n)\) for all \(n\) sufficiently large. The Hilbert series of \(R\) is the power series

\[P(R) = \sum_{n\ge 0} (\dim R_n) t^n.\]

For example, let \(C\subset{\bf P}^3\) be the twisted cubic defined by the three equations

\[xz = y^2,\quad xt = yz, \quad yt = z^2\]

and let

\[R = { {k[x,y,z,t]} \over {xz - y^2, xt - yz, yt - z^2} }\]

be the homogeneous polynomial ring of \(C\). Then one computes that

\[P(R) = 1 + 4t + 7t^2 + 10t^3 + \cdots\]

as follows. Certainly \(R_0=k\), and there are no equations of degree 1 so \(R_1\) is the 4-dimensional vector space spanned by \(x,y,z,t\). Now \(R_2\) is spanned by the 10 quadrics \(x^2,xy,\dots, t^2\), but these are related by the three equations, so \(\dim R_2 = 10 - 3 = 7\). And so on. If you are systematic about it, you will discover quickly that the dimension of \(R_n\) is \(3n+1\) for \(n\ge 1\). This can be proved by induction. So the Hilbert polynomial of \(R\) is \(p(t)=3t+1\), which determines every coefficient of the Hilbert series \(P(R)\) except the constant term.

Consider a bigger example: let \(C=C_{10}\subset{\bf P}(1,1,5)\) be a hyperelliptic curve of genus 4 and degree 2 given by an equation

\[y^2 = f_{10}(x_1,x_2)\]

in coordinates \(x_1,x_2,y\) on wps \({\bf P}(1,1,5)\) where \(f_{10}\) is some general polynomial of degree 10. Again one calculates the Hilbert polynomial as \(p(t)=2t-3\) and Hilbert series as

\[P(t) = 1 + 2t + 3t^2 + 4t^3 + 5t^4 + 7t^5 + 9t^6 + \cdots .\]

This power series can also be described as a rational function

\[P(t) = {{1-t^{10}}\over{(1-t)^2(1-t^5)}}\]

from which one can formulate a rule of thumb for relating this expression to the description of the curve as \(C_{10}\subset{\bf P}(1,1,5)\) (or see the answer in Section or [Reid, 2000], Section 3.2).

Now there are other curves in wps that have the same Hilbert polynomial \(p\) as this example, but which have a different Hilbert series. To find one, consider modifying early terms of the series

\[P(t) = 1 + t + 2t^2 + 4t^3 + 5t^4 + 7t^5 + 9t^6 + \dots\]

and attempt to build the curve \(B\) in some wps. The coefficient of the term \(t\) (which is 1 in this case) implies that there is one linear coordinate \(x\). Then the \(2t^2\) demands one degree 2 coordinate \(y\) so that the 2-dimensional space of degree 2 homogeneous functions is spanned by \(x^2,y\). In degree 3, \(x,y\) generate only a 2-dimensional space \(\left< x^3,xy \right>\), but the graded piece in degree 3 is 4-dimensional, according to the term \(4t^3\), so there must be two more generators \(z_1,z_2\). In degree 4 we see \(x^4,x^2y,y^2,xz_1,xz_2\) which is just right if we assume that these are linearly independent (which we do). Similarly in degree 5 we hit the right number on the nose. But in degree 6 we see 11 monomials:

\[x^6, x^4y, x^2y^2, y^3, x^3z_1, xyz_1, x^3z_2, xyz_2, z_1^2, z_1z_2, z_2^2.\]

These lie in a 9-dimensional vector space (9 being the coefficient of \(t^6\) in \(P(t)\)) so there must be two relations between them. We could carry on in this vein, but in fact we have done enough now: it is an exercise in wps to show that the curve

\[B = B_{6,6} \subset {\bf P}(1,2,3,3)\]

defined by two general polynomials of degree 6 has genus 4 and degree 2 just as in the first example. We will work this example in Magma in the next subsection.

Thus the Hilbert polynomial determines the coefficients of high powers of \(t\) in the Hilbert series. So in this case, and more generally for the subcanonical curves of Section Subcanonical Curves, to determine a Hilbert series \(P\) one must produce both the Hilbert polynomial \(p\) and a sequence \(V\) of the early coefficients that are not determined by \(p\).

There is one extra twist that can happen: it is possible that there is not a single Hilbert polynomial \(p\) that determines the higher coefficients, but a sequence of polynomials \(p_0,\dots, p_{r-1}\) so that the \(n\)th coefficient is given by \(p_i(n)\) where \(i\) is the residue of \(n\) modulo \(r\). It is easy to generate examples of this using the intrinsics described below. This phenomenon occurs naturally when the RR data includes quotient singularities or fractional divisors, since these tend to make periodic corrections to an otherwise well-determined Hilbert polynomial, and one could rephrase this as above by saying that there is a sequence of Hilbert polynomials. In practice, this is a small distraction that is completely bound up in the main creation intrinsics.

HilbertFunction(p, V): RngUPolElt, SeqEnum -> UserProgram#
HilbertFunction(Q, V): SeqEnum, SeqEnum -> UserProgram#

The Hilbert function determined by a univariate polynomial \(p\) (the Hilbert polynomial), or a sequence \(Q\) of univariate polynomials, and a sequence of initial values \(V\). The returned object is a function whose domain is the integers.

HilbertSeries(p, V): RngUPolElt, SeqEnum -> FldFunRatUElt#
HilbertSeries(Q, V): SeqEnum, SeqEnum -> FldFunRatUElt#

The Hilbert series determined by a univariate polynomial \(p\) (the Hilbert polynomial), or a sequence \(Q\) of univariate polynomials, and a sequence of initial values \(V\). The returned object is a rational function in one variable.

Interpreting the Hilbert Numerator#

The Hilbert series of a variety \(X\subset{\bf P}(w_0,\dots,w_N)\) defined by equations of degrees \(d_1,\dots, d_r\) has the form

\[P(t) = {{1 - t^{d_1} - t^{d_2} - \cdots - t^{d_r} + t^e \pm \dots \pm t^k} \over{(1-t^{w_0})\cdots (1-t^{w_N})}}.\]

We refer to the numerator of this expression as the Hilbert numerator with respect to the weights \(w_0,\dots, w_N\), or simply Hilbert numerator if the weights are clear.

The aim is to apply a converse statement: if we can manipulate the Hilbert series of a polarised variety into such a form, we guess that it is embedded in \({\bf P}(w_0,\dots,w_N)\) by equations of degrees given by low degree terms with negative coefficients (where the absolute value of the coefficient determines the number of equations of that degree).

This can be taken further: the syzygies, and indeed a free resolution of the ideal of \(X\), are also encoded weakly in the weights and the Hilbert numerator. For more details see [Reid, 2000], Section 3, or [Altınok et al., 2002], Section 4.

HilbertSeriesMultipliedByMinimalDenominator(p, V): RngUPolElt, SeqEnum -> RngUPolElt, SeqEnum#
HilbertSeriesMultipliedByMinimalDenominator(Q, V): SeqEnum, SeqEnum -> RngUPolElt, SeqEnum#

Let \(h\) be the Hilbert series determined by a univariate polynomial \(p\), or a sequence \(Q\) of univariate polynomials, and a sequence of initial values \(V\). This function produces a rational expression \(g(t)/\Pi(1-t^d)\) for \(h\), returning the numerator \(g\) as first value and a sequence containing the factors \(1-t^d\) of the denominator as second value.

HilbertNumerator(g, D): FldFunRatUElt, SeqEnum -> FldFunRatUElt#

The product \(g\times\Pi(1-t^d)\) taken over all integers \(d\in D\), assuming the result is a polynomial. This function is typically used when \(g\) is a Hilbert series and \(D\) is a proposed collection of weights for a variety realising this series.

Example: Gr Genus4curve (ex-bc959f)#

We reproduce the example described in the introduction to this Section Hilbert Series and Graded Rings.

> T<t> := PolynomialRing(Rationals());
> p := 2*t - 3;
> V := [ 1, 2, 3, 4 ];
> h_fun := HilbertFunction(p,V);
> [ h_fun(n) : n in [0..7]];
[ 1, 2, 3, 4, 5, 7, 9, 11 ]
> h := HilbertSeries(p,V);
> h;
(t^5 + 1)/(t^2 - 2*t + 1)

Run in calculator

The Hilbert series will be the Hilbert series of a polarised curve \(C\) (since the degree of the Hilbert polynomial—the order of growth of the coefficients of the Hilbert series—is one). It is already expressed as a rational function, so we apply a power series ring coercion to see the dimensions of the graded pieces—we could increase the precision if required.

> S<s> := PowerSeriesRing(Rationals(),8);
> S ! h;
1 + 2*s + 3*s^2 + 4*s^3 + 5*s^4 + 7*s^5 + 9*s^6 + 11*s^7 + O(s^8)

Run in calculator

The rule of thumb for interpreting Hilbert series as varieties defined by homogeneous polynomials in wps requires one to write the Hilbert series in the form \(P/Q\) for polynomials \(P,Q\), where \(Q\) is a product of terms \(1-t^a\) (corresponding to the coordinates of weight \(a\)). The next line computes the Hilbert series together with the minimal such expression.

> HilbertSeriesMultipliedByMinimalDenominator(p,V);
t^5 + 1
[ -t + 1, -t + 1 ]

Run in calculator

One could interpret this return value as a Noether normalisation of the graded ring of \(C\). Instead, we try some values for a new weight \(a\) hoping to stumble on the weights of a wps in which \(C\) embeds. We start with \(a=4\), then try \(a=5\).

> HilbertNumerator(h,[1,1,4]);
-t^9 + t^5 - t^4 + 1
> HilbertNumerator(h,[1,1,5]);
-t^10 + 1

Run in calculator

The first answer made little sense. Having included a generator in degree 4 it demanded an equation of the same degree. That is certainly possible, but assuming the equation involves only the weight 1 variables, it would factorise and the result would not be a variety. However, the final answer is just what we hope for: it suggests that \(C\) is realised by a degree 10 curve in \({\bf P}(1,1,5)\), which makes perfect sense and is what we expected.

Now consider the modified Hilbert series of the second example of Section Hilbert Series and Graded Rings in which we changed the early coefficients from \(V=[1,2,3,4]\) to \([1,1,2,4]\), but kept the Hilbert polynomial \(p\).

> h1 := HilbertSeries(p,[1,1,2,4]);
> S ! h1;
1 + s + 2*s^2 + 4*s^3 + 5*s^4 + 7*s^5 + 9*s^6 + 11*s^7 + O(s^8)
> HilbertNumerator(h1,[1,1,5]);
-t^10 + t^9 - t^8 - t^7 + t^6 - t^4 + t^3 + t^2 - t + 1

Run in calculator

This implies that there is an equation in degree 1. Such an equation immediately eliminates one of the two degree 1 coordinates which would be daft, so we eliminate this redundancy right at the beginning by trying instead

> HilbertNumerator(h1,[1,5]);
t^9 + t^7 + 2*t^6 + t^5 + t^4 + 2*t^3 + t^2 + 1

Run in calculator

In short, this suggests a new variable in degree 2 and two new variables in degree 3: this could be done methodically by considering one generator at a time.

> HilbertNumerator(h1,[1,2,3,3,5]);
-t^17 + t^12 + 2*t^11 - 2*t^6 - t^5 + 1

Run in calculator

Now examining this Hilbert numerator, we see that the first equation is in degree 5. But there is a variable of degree 5. Although that is not a problem, we could try to remove the degree 5 variable, as we would, in practice, if we knew that it appeared linearly in the equation.

> HilbertNumerator(h1,[1,2,3,3]);
t^12 - 2*t^6 + 1

Run in calculator

Finally, this suggests \(B_{6,6}\subset{\bf P}(1,2,3,3)\), and again it is an easy exercise in wps to confirm that such a curve really does exist with the predicted properties.

FindFirstGenerators(g): FldFunRatUElt -> SeqEnum#

This intrinsic function returns a sequence containing the results of a first attempt to deduce plausible weights of generators for the variety with Hilbert series \(g\). The method used proceeds by advancing through the coefficients of \(g\), in order of increasing degree, adding generators of that degree for each positive coefficient. The algorithm stops when it first finds a negative coefficient.

Example: Gr Grfirstgens (ex-12902f)#

We first make a Hilbert series which has initial terms \(1+2t+3t^2+4t^3\).

> T<t> := PolynomialRing(Rationals());
> p := 2*t - 3;
> V := [ 1, 2, 3, 4 ];
> h := HilbertSeries(p,V);
> h;
(t^5 + 1)/(t^2 - 2*t + 1)
> S<s> := PowerSeriesRing(Rationals(),4);
> S ! h;
1 + 2*s + 3*s^2 + 4*s^3 + O(s^4)

Run in calculator

This \(h\) is, in fact, the Hilbert series of a graded ring generated by three elements in degrees 1,1,5.

> FindFirstGenerators(h);
[ 1, 1, 5 ]

Run in calculator

There is no guarantee that this intrinsic will always find suitable weights, but it does return a subset of the weights that must occur for any variety that realises the given Hilbert series.

ApparentCodimension(f): RngUPolElt -> RngIntElt#
ApparentEquationDegrees(f): RngUPolElt -> RngIntElt#
ApparentSyzygyDegrees(f): RngUPolElt -> RngIntElt#

If \(f=f(t)\) is a polynomial of the form

\[f = 1 - \sum_{i=1}^{N_0} a_{0,i} t^i + \sum_{k=N_0+1}^{N_1} a_{1,i} t^i - \dots +(-1)^{k-1} \sum_{i=N_{k-2}+1}^{N_{k-1}} a_{k-1,i} t^i +(-1)^k t^{N_k}\]

then the apparent codimension is \(k\), the apparent equation degrees are those \(i\) for which \(a_{0,i}\) is nonzero (with \(a_{0,i}\) equations having that degree \(i\)) and the apparent syzygy degrees are those \(i\) for which \(a_{1,i}\) is nonzero.