Macaulay2 is built with the algebraic geometry in mind. Many of the commutative algebra functionalities have a natural extension to schemes. For example, let’s build our beloved projective space \(\mathbb P^3\text{.}\)
In \(\mathbb P^3\text{,}\) let’s make a rational quartic curve given in local coordinates as \((t, t^3, t^4)\text{.}\)
Figure2.1.A friend of the twisted cubic
Was eine Kurve ist, glaubt jeder Mensch zu wissen, bis er so viel Mathematik gelernt hat, daß ihn die unzähligen möglichen Abnormalitäten verwirrt gemacht haben.
Everyone knows what a curve is, until he has studied enough mathematics to become confused through the countless number of possible exceptions.
―Felix C. Klein
We can make the sheaf of regular functions \(\mathcal{O}_C\) with ease.
... and the ideal sheaf \(\mathcal{I}_{C/\mathbb P^3}\text{.}\)
We can do most things we want with coherent sheaves. For example, we can construct the line bundles \(\mathcal O_C(d)\text{.}\)
and do direct sums \(\oplus\) or tensor products \(\otimes\text{.}\)
We can do all sorts of homological algebra with sheaves. Just do a few lines of code instead of calculating everything by hand! (which can be either good or bad, depending on what your goals are ..)
Even the tangent/cotangent sheaves are built-in.
... and of course, we are tempted to calculate some sheaf cohomology!
... and we have an instance of Serre duality.
Subsection2.2The Koszul Complex
Many standard +notions in commutative algebra are built-in, including regular sequences. Let’s ask M2 to check for us whether the following sequences are regular in the ring \(\mathbb Z/2[x,y,z]\text{.}\)
For regular local rings, the Koszul complex is exact, so it provides a finite free resolution. Let’s try to carry this out for our projective curve \(C\text{.}\) Recall that \(S = \mathbb Q[x,y,z,w]\) and \(I = (y z-x w, z^3-y w^2, x z^2-y^2 w, y^3-x^2 z)\text{.}\)
What does this mean geometrically? If we sheafify everything, then the Koszul complex becomes
Here, \(\mathcal O_C\) means the proper pushforward \(i_*\mathcal O_C\) along the inclusion \(i: C\to \mathbb P^3\text{.}\) Therefore, the Koszul resolution upgrades to a locally free resolution of a coherent sheaf.
Theorem2.2.Auslander-Buchsbaum, Sheaf Version.
If \(X\) is a smooth variety, then every coherent \(\mathcal O_X\)-module has a finite resolution by vector bundles.