2.3.5 Modules and their annihilator
-----------------------------------

Now we shall give three more advanced examples.

SINGULAR is able to handle modules over all the rings,
which can be defined as a basering. A free module of rank n
is defined as follows:

ring rr;
int n = 4;
freemodule(4);
==> _[1]=gen(1)
==> _[2]=gen(2)
==> _[3]=gen(3)
==> _[4]=gen(4)
typeof(_);
==> module
print(freemodule(4));
==> 1,0,0,0,
==> 0,1,0,0,
==> 0,0,1,0,
==> 0,0,0,1

To define a module, we give a list of vectors generating a submodule of
a free module. Then this set of vectors may be identified with the
columns of a matrix.  For that reason in SINGULAR matrices and
modules may be interchanged. However, the representation is different
(modules may be considered as sparse represented matrices).

ring r =0,(x,y,z),dp;
module MD = [x,0,x],[y,z,-y],[0,z,-2y];
matrix MM = MD;
print(MM);
==> x,y,0,
==> 0,z,z,
==> x,-y,-2y

However the submodule 
$MD$
 may also be considered as the module
of relations of the factor module
$r^3/MD$.
In this way, SINGULAR can treat arbitrary finitely generated modules
over the
basering (see Representation of mathematical objects).

In order to get the module of relations of 
$MD$
,
we use the command syz.

syz(MD);
==> _[1]=x*gen(3)-x*gen(2)+y*gen(1)

We want to calculate, as an application, the annihilator of a given module.
Let
$M = r^3/U$,
where U is our defining module of relations for the module
$M$.

module U = [z3,xy2,x3],[yz2,1,xy5z+z3],[y2z,0,x3],[xyz+x2,y2,0],[xyz,x2y,1];

Then, by definition, the annihilator of M is the ideal
$\hbox{ann}(M) = \{a \mid aM = 0 \}$
which is by the description of M the same as
$\{ a \mid ar^3 \in U \}$.
Hence we have to calculate the quotient
$U \colon r^3 $.
The rank of the free module is determined by the choice of U and is the
number of rows of the corresponding matrix. This may be determined by
the function nrows. All we have to do now is the following:

quotient(U,freemodule(nrows(U)));

The result is too big to be shown here.

<font size="-1">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; User manual for <a href="http://www.singular.uni-kl.de/"><i>Singular</i></a> version 2-0-4, October 2002,
generated by <a href="http://www.gnu.org/software/texinfo/"><i>texi2html</i></a>.
</font>

</body>
</html>
