[next][previous][up][top][index]
search for:

codim Module -- calculate the codimension

Synopsis:

  • Usage: c = codim M
  • Function: codim -- calculate the codimension
  • Input:
  • M, an instance of class Module: A module over a ring R.
  • Output:
  • c, an instance of class ZZ: The number dim R - dim M.
  • The returned value is the usual codimension if R is an integral domain, or all components have the same dimension.

    i1 : R = ZZ/101[a..d];
    i2 : M = coker matrix{{a,b},{c,d}}

    o2 = cokernel | a b |
                  | c d |

                                2
    o2 : R-module, quotient of R
    i3 : codim M

    o3 = 1

    Caveat:

  • If R is ZZ, then the computation effectively tensors first with the rational numbers, yielding the wrong answers in some cases.R must be a quotient of a commutative polynomial ring.

  • [next][previous][up][top][index]
    search for: