[top][index]
search for:

codim -- calculate the codimension

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

Warning: over the integers, the computation effectively tensors first with the rational numbers, yielding the wrong answer in some cases.

Warning: we don't really compute the codimension when the ring has components of different dimension!

Class of returned value: ZZ -- the class of all integersWays to use codim :

  • codim CoherentSheaf -- codimension of support
  • codim Ideal
  • codim Module -- calculate the codimension
  • codim MonomialIdeal
  • codim PolynomialRing
  • codim ProjectiveVariety
  • codim QuotientRing

  • [top][index]
    search for: