Macaulay2 » Documentation
Packages » Macaulay2Doc » modules » Hilbert functions and free resolutions » codim(Module)
next | previous | forward | backward | up | index | toc

# codim(Module) -- codimension of the support of a module

- Function: codim
- Usage:
    `codim M`
- Inputs:
  - M, a module, a module over a ring R
- Optional inputs:
  - Generic => ..., default value false,
- Outputs:
  - an integer

## Description

Computes the codimension of the support of the module as given by dim(R) - dim(M).

    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

The returned value is the usual codimension if R is an integral domain or, more generally, equidimensional.

## See also

- dim(Module) -- compute the Krull dimension

## Ways to use this method:

- codim(Module) -- codimension of the support of a module

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Macaulay2Doc/functions/codim-doc.m2:68:0.