module of the relations between generators of the first syzygy module. By continuing in this way, one may define the th syzygy module for every positive integer . If the th syzygy module is free for some , then by taking a basis as a generating set, the next syzygy module (and every subsequent one) is the zero module. If one does not take a basis as a generating set, then all subsequent syzygy modules are free. Let be the smallest integer, if any, such that the th syzygy module of a module is free or projective. The above property of invariance, up to the sum direct with free modules, implies that does not depend on the choice of generating sets. The projective dimension of is this integer, if it exists, or if not. This is equivalent with the existence of an exact sequence where the modules are free and is projective. It can be shown that one may always choose the generating sets for being free, that is for the above exact sequence to be a free resolution. Statement Hilbert's syzygy theorem states that, if is a finitely generated module over a polynomial ring in indeterminates over a field , then the th syzygy module of is always a free module. In modern language, this implies that the projective dimension of is at most , and thus that there exists a free resolution of length . This upper bound on the projective dimension is sharp, that is, there are modules of projective dimension exactly . The standard example is the field , which may be considered as a -module by setting for every and every . For this module, the th syzygy module is free, but not the th one (for a proof, see , below). The theorem is also true for modules that are not finitely generated. As the global dimension of a ring is the supremum of the projective dimensions of all modules, Hilbert's syzygy theorem may be restated as: the global dimension of is . Low dimension In the case of zero indeterminates, Hilbert's syzygy theorem is simply the fact that every vector space has a basis. In the case of a single indeterminate, Hilbert's syzygy theorem is an instance of the theorem asserting that over a principal ideal ring, every submodule of a free module is itself free. Koszul complex The Koszul complex, also called