Macaulay2 » Documentation
Packages » Macaulay2Doc :: codim(Ideal)
next | previous | forward | backward | up | index | toc

codim(Ideal) -- compute the codimension

Synopsis

Description

When R is equidimensional, this quantity is the codimension of the ideal I.

i1 : R = ZZ/101[a..e];
i2 : I = monomialCurveIdeal(R,{2,3,5,7})

             2                               2     2    3           3      2
o2 = ideal (d  - c*e, b*d - a*e, b*c - a*d, c d - b e, c  - a*b*e, b  - a*c )

o2 : Ideal of R
i3 : J = ideal presentation singularLocus(R/I);

o3 : Ideal of R
i4 : codim J

o4 = 4
i5 : radical J

o5 = ideal (d, c, b, a*e)

o5 : Ideal of R
The following may not be the expected result, because the ring is not equidimensional.
i6 : R = QQ[x,y]/(ideal(x,y) * ideal(x-1))

o6 = R

o6 : QuotientRing
i7 : codim ideal(x,y)

o7 = 1

See also

Ways to use this method: