
D.6.13.1 codim
Procedure from library sing.lib (see sing_lib).
 Usage:
 codim(id1,id2); id1,id2 ideal or module, both must be standard bases
 Return:
 int, which is:
1. the vectorspace dimension of id1/id2 if id2 is contained in id1
and if this number is finite
2. 1 if the dimension of id1/id2 is infinite
3. 2 if id2 is not contained in id1
 Compute:
 consider the Hilbert series iv1(t) of id1 and iv2(t) of id2.
If codim(id1,id2) is finite, q(t)=(iv2(t)iv1(t))/(1t)^n is
rational, and the codimension is the sum of the coefficients of q(t)
(n = dimension of basering).
Example:
 LIB "sing.lib";
ring r = 0,(x,y),dp;
ideal j = y6,x4;
ideal m = x,y;
attrib(m,"isSB",1); //let Singular know that ideals are a standard basis
attrib(j,"isSB",1);
codim(m,j); // should be 23 (Milnor number 1 of y7x5)
==> 23

