codim

codim M -- calculate the codimension of the support of a module M.
codim I -- calculate the codimension of the quotient ring R/I.

If M is an R-module, then the number return by this routine is dim R - dim M. This does not agree with the usual definition of codimension unless Spec R is irreducible.

i1 : R = QQ[x,y]/(ideal(x,y) * ideal(x-1))

o1 = R

o1 : QuotientRing
i2 : codim (R^1/(x,y))

o2 = 1


topindexpreviousupnext