In this tutorial, we describe how to work with modules in Macaulay2.
First, let's define a ring.
|
|
Use standard notation for cokernels, images and kernels (coker, cokernel, image, ker, kernel).
|
|
|
Given a module, one can find its presentation matrix.
|
|
To define a submodule $IN$ of a module $N$, where $I$ is an ideal, use
|
|
In order to define a submodule of N generated by some elements of N, one way is the following.
|
To understand what Macaulay2 is doing here, let's break this down. N_{i} defines a matrix $R^1 \to N$, which maps 1 to the i th generator of N. (See Section XX below for more information about module homomorphisms).
|
One could use a*N_{1}, but it turns out that a ** N_{1} works better:
|
Next, remember that the vertical bar concatenates matrices.
|
Now take the image of this matrix
|
The main advantage for using ** rather than * is that ** preservers homogeneity if possible.
|
Quotients are defined using standard mathematical notation.
|
Notice that this returns a subquotient module. We treat these later. Ideals and modules are treated differently in Macaulay2 (and in commutative algebra in general). For example, asking for the dimension of an ideal I in a ring R gives the dimension of the quotient R/I, but the dimension of the module I gives a potentially very different answer. Use ideal and module to move between the two.
|
|
|
|
|
Create a free resolution of an ideal (or module) using res.
|
View the differential
|
The (graded) betti numbers
|
Use help (betti,GradedModule) for a detailed description of what this display means. Basically, it says that I has three generators of degree 2, one syzygy of degree 3, 2 syzygies of degree 4, and one second syzygy of degree 5. The free resolution of a module that is not a cokernel:
|
|
|
Here is a problem to experiment with. What different betti diagrams are possible with an ideal generated by 3 homogeneous quadric polynomials, in a polynomial ring in any number of variables? Here is one to get you started.
|
|
|
After that, try ideals generated by 4 quadrics.
Recall that the module N/N0 above displayed as something called a subquotient module. As Macaulay2 often returns such objects, it is useful to understand and be able to manipulate them. P The most common modules are quotients of free modules, or submodules of free modules. A useful generalization, which covers both of these types, are subquotients: submodules of quotients of free modules. P A subquotient module is determined by two matrices $f : R^m \to R^n$ and $g : R^p \to R^n$. The subquotient module with generators f, relations g is by definition the module M = (image f) + (image g) / (image g). Thus, if f is the identity map, M = coker g, and if g = 0, then M = image f.
|
|
|
|
The two matrices f and g mentioned above are recovered using the routines: generators, relations.
|
|
It is often necessary to find a presentation matrix for such modules.
|
Often the given representation of a module is not very efficient. Use trim to keep the module as a subquotient of the same ambient free module, but change the generators and relations to be minimal, or in the nonlocal or non-graded case, at least more efficient.
|
Use minimalPresentation to also allow the ambient free module to be improved. This returns a quotient of a free module, but in the future might not do that.
|
prune is a synonym for minimalPresentation N
|
Given a subquotient module N, there are several useful modules associated to N. The free module of which N is a subquotient is obtained using ambient.
|
This is the same as the target of either the generator or relation matrix.
|
|
N is a submodule of a quotient module $R^n/image(g)$. The routine super returns this quotient module
|
This is the same as
|
The cover of N is basically the source of the matrix of generators.
|
|
A homomorphism $f : M \to N$ is represented as a matrix from the generators of M to the generators of N.
|
|
One homomorphism $F : M \to A$ is $x \mapsto y, y \mapsto x^2$ (multiplication by y/x) We write this as:
|
Notice that as is usual in Macaulay2, the target comes before the source.
|
|
|
The image of F lies in the submodule M of $A^1$. To obtain the map $M \to M$, we use //. But first we need the inclusion map of M into $A^1$: Later we explain this, but for now, we just write down this map:
|
Now we use // to lift $F : M \to A$ along $M \to A^1$, to get $M \to M$:
|
|
|
G is now a map from $M \to M$.
|
Let's start with a module M, and a submodule N.
|
|
|
|
If two modules have the same ambient free module, then there is often a canonical map between them. Some modules having the same ambient free module:
|
|
|
|
|
|
|
If two modules M and N have the same ambient module $R^n$, then inducedMap(M,N) makes the canonical map $N \to M$ between them, if one exists. If a map doesn't exist, the returned map might not be a homomorphism.
|
|
|
|
The projection map $M \to M/N$
|
The projection map $N \to M/N$, which is the zero map
|
Not all such maps can be defined. The functions 'inducedMap' normally checks that the result is a well-defined homomorphism. The option 'Verify' controls that behavior.
|
|
|
Before doing interesting homomorphisms, let's see how to write down some canonical homomorphisms associated to M. exercises: 1. isomorphism theorems. Given submodules M and N of a module P, (a) find $(M+N)/M$ (b) find $N/(M \cap N)$ (c) find in Macaulay2, an isomorphism between them.
2. Given a homomorphism $M \to A$. Suppose that the image lies in M (M is a submodule of $A^1$). Find the map $M \to M$.
|
|
|
The elements of H correspond to homomorphisms $M \to A$. The homomorphism associated to elements of H may be obtained using the routine homomorphism.
|
|
|
|
|
|
|
|
|
In Macaulay2, ** denotes the tensor product operator.
|
|
Notice that tensor products of matrices and of modules are very different.
|
|
|
|
Macaulay2 renames variables whose names collide. Alternatively, one can give the variables as an option to tensor.
|