This post is about Hilbert Polynomials and how they can be computed using free resolutions, and is based on a talk I gave on 7/4. There is a pdf version: Free Resolutions and Hilbert Polynomials. For more detail and historical background, see [Eis05, Ch. 1] (this was also used as the basis for this talk); for general facts about commutative algebra that are used, see [AM69, Eis95].

Let be a field and be a standard graded polynomial ring, i.e.,

We will be working with *homogeneous* ideals and *graded* modules and rings. Geometrically, we are working with *projective* varieties in *projective* space .

Let be a finitely generated graded -module. Graded means the module can be decomposed as follows:

Since we haven’t really discussed this yet, just think of as a quotient ring by a homogeneous ideal, or the homogeneous ideal itself.

Recall the following definition:

**Definition.** The (projective) *Hilbert function of * is .

This is non-trivial to compute, and so we’d like a better way to compute this. The motivation to do so stems from the fact that the Hilbert function is an invariant on modules, and also because it (asymptotically) contains other geometric invariants like dimension, degree, and genus.

**Example** (Free modules)**.** Recall that a module is *free* if it is the direct sum of copies of . Thus, its Hilbert function is just its rank times the Hilbert function of .

Consider when the rank is one. Then, we claim that . We just have to count the ways to get degree monomials from variables by using the “stars and bars” argument. We have “stars” that we want to separate into “bins” which we separate by “bars.” To count how many ways to do this, we count the number of ways we can put stars into bins that are non-empty, and then subtract one star from each bin to allow for empty ones. But this is the same as considering the way you can put bars in gaps to make the bins. Thus, we have as desired.

Hilbert’s idea was to compute by comparing with free modules, using a *free resolution*, since as we have seen the free case is very easy to understand. To adapt the corresponding notion for affine/ungraded objects to graded modules in graded polynomial rings, we need some new terminology.

For any graded module , denote the module shifted by : , i.e., the degree elements in become degree (); think of this as shifting every summand in the decomposition into graded parts to the left spots.

**Example** (a principal ideal)**.** The free -module of rank generated by an element of degree is . The easy example is that the ideal is isomorphic as a graded -module to .

**Definition.** A *graded free resolution* of is an exact sequence of degree-0 maps between graded free modules such that : .

**How to compute the (graded) free resolution:**

- Given homogeneous elements of degree that generate as an -module, we can define a map from the graded free module onto by sending the th generator to . Note we need the grade shifts to make sure our maps are degree-preserving.
- Let be defined as ; this is also finitely generated by the Hilbert basis theorem. The elements of are called the
*syzygies*of . This can be done with Buchberger’s algorithm. - Choosing finitely many homogeneous syzygies that generate , we can define map of graded -modules with image . Continuing in this way we construct a graded free resolution of . Programs like Macaulay2 use an improvement of Buchberger’s algorithm for free resolutions due to Schreyer [Sch91, App.].
- Note that this process stops because of the Hilbert syzygy theorem [Eis05, Thm. 1.1].

A free resolution is an example of a *complex* of graded modules, i.e., a chain of graded modules with (grade-preserving) maps between them such that the composition of two adjacent maps is always zero.

**Example** (twisted cubic, [Eis05, Exc. 2.8])**.** Recall that the (projective) twisted cubic is defined by the ideal [Har95, Ex. 1.10]. You can also see this by taking the projective closure of the affine twisted cubic. This is a Gröbner basis (check e.g. with Macaulay2) with the GrRevLex order in the usual ordering .

This gives our first map in the free resolution:

This completes to a free resolution as follows:

To show this is exact, since our maps are grade-preserving, it suffices to show that the maps between the degree pieces of each free module are exact as -linear maps. Exactness at since the matrix

is of full rank. Exactness at follows since the matrix

has rank , and by the rank-nullity theorem.

We can check this with Macaulay2 (modulo change of bases):

i1 : R = QQ[x_0..x_3,MonomialOrder=>GLex] o1 = R o1 : PolynomialRing i2 : M = coker matrix{{x_1*x_3-x_2^2,-x_0*x_3+x_1*x_2,x_0*x_2-x_1^2}} o2 = cokernel | x_1x_3-x_2^2 -x_0x_3+x_1x_2 x_0x_2-x_1^2 | 1 o2 : R-module, quotient of R i3 : d = res M 1 3 2 o3 = R <-- R <-- R <-- 0 0 1 2 3 o3 : ChainComplex i4 : d.dd 1 3 o4 = 0 : R <----------------------------------------------- R : 1 | x_0x_2-x_1^2 x_0x_3-x_1x_2 x_1x_3-x_2^2 | 3 2 1 : R <--------------------- R : 2 {2} | x_2 -x_3 | {2} | -x_1 x_2 | {2} | x_0 -x_1 | 2 2 : R <----- 0 : 3 0 o4 : ChainComplexMap

Note that in general, a graded complex of graded modules (e.g. a free resolution) is exact if and only if the maps restricted to each degree piece of the modules is exact. We used above the fact that a short exact sequence of vector spaces is exact if and only if (the rank-nullity theorem). By splitting up a complex into short exact sequences like the one above, we have that a complex of vector spaces is exact if and only if , nothing that we require that our complex is finite.

This suggests that we can write the Hilbert function as , and this sum makes sense since our resolution is finite by the Hilbert syzygy theorem.

**Theorem.**If the graded -module has finite free resolution , with each a finitely generated free module , then .

*Proof.*, so it suffices to show , but decomposing as a direct sum and shifting back gives us *exactly* the calculation we did as before.

**Corollary.** There is a polynomial (called the *Hilbert polynomial of *) such that, if has free resolution as above, then for .

*Proof.* The binomial coefficient is a polynomial when .

**Example** (the twisted cubic, continued)**.** The Hilbert function for the twisted cubic is given by , which for is the polynomial . The in the first term corresponds to the degree, the largest exponent corresponds to the dimension, and the genus is .

We can check this with Macaulay2:

i5 : hilbertPolynomial(M) o5 = - 2*P + 3*P 0 1 o5 : ProjectiveHilbertPolynomial i6 : hilbertPolynomial(M, Projective => false) o6 = 3i + 1 o6 : QQ[i]

**Example** (Koszul complexes, [Eis05, p. 4])**.** When our polynomials are sufficiently different (precisely, if they form a *regular sequence*), then computing the free resolution becomes *much* easier, by using something called *Koszul complexes*. For example, let , and consider the quotient ring . We then have the resolution

**Example** (Monomial ideals, [BPS98, Ex. 3.4])**.**For a sufficiently general monomial ideals, we can can calculate the free resolution using simplicial methods. Let . Then, we can construct what is called the Scarf complex:

The basic idea is to connect vertexes that represent generators when they share variables. The triangle is labeled by , the edges of the triangle by , and the other edge by . Then the free resolution becomes

Note that this is the simplicial homology complex. This ends up having a Hilbert polynomial of .

### References

[AM69] | M. F. Atiyah and I. G. Macdonald. Introduction to commutative algebra. Reading, Mass.: Addison-Wesley Publishing Co., 1969. |

[BPS98] | D. Bayer, I. Peeva, and B. Sturmfels. “Monomial resolutions.” Math. Res. Lett. 5.1-2 (1998), pp. 31–46. |

[Eis05] | D. Eisenbud. The geometry of syzygies: A second course in commutative algebra and algebraic geometry. Graduate Texts in Mathematics 229. New York: Springer-Verlag, 2005. |

[Eis95] | D. Eisenbud. Commutative algebra: With a view toward algebraic geometry. Graduate Texts in Mathematics 150. New York: Springer-Verlag, 1995. |

[Har95] | J. Harris. Algebraic geometry: A first course. Graduate Texts in Mathematics 133. Corrected reprint of the 1992 original. New York: Springer-Verlag, 1995. |

[Sch91] | F.-O. Schreyer. “A standard basis approach to syzygies of canonical curves.” J. Reine Angew. Math. 421 (1991), pp. 83–123. |