4.2 Procedures and LIB

The computation of the Milnor number (for an arbitrary isolated complete intersection singularity ICIS) and the Tjurina number (for an arbitrary isolated singularity) can be done by using procedures from the library sing.lib. For a hypersurface singularity it is very easy to write a procedure which computes the Milnor number and the Tjurina number.

We shall demonstrate:

LIB "sing.lib";
// you should get the information that sing.lib has been loaded
// together with some other libraries which are needed by sing.lib
ring r = 0,(x,y),ds;
poly f = x7+y7+(x-y)^2*x2y2;
milnor(f);
==> 28
tjurina(f);
==> 24

proc mil (poly g)
{
   "Milnor number:";
   return(vdim(std(jacob(g))));
}
mil(f);
==> Milnor number:
==> 28

proc tjur
{
   "Tjurina number:";
   return(vdim(std(jacob(#[1])+#[1])));
}
tjur(f);
==> Tjurina number:
==> 24

proc milrina (poly f)
{
   ideal j=jacob(f);
   list L=vdim(std(j)),vdim(std(j+f));
   return(L);
}
milrina(f);     // a list containing Milnor and Tjurina number
==> [1]:
==>    28
==> [2]:
==>    24
milrina(f)[2];  // the second element of the list
==> 24