Macaulay2 » Documentation
Packages » Depth :: isCM
next | previous | forward | backward | up | index | toc

# isCM -- whether a ring or module is Cohen-Macaulay

- Usage:
    `isCM(A)`
- Inputs:
  - A, a Ring or Module
- Outputs:
  - Boolean

## Description

This command merely checks if the depth of A equals the Krull dimension of A.

    i1 : A = ZZ/2[x,y,z];

    i2 : isCM(A)

    o2 = true

    i3 : A = ZZ/2[x,y]/(x^2,x*y);

    i4 : isCM(A)

    o4 = false

    i5 : A =  ZZ/101[a_1,a_2,b_1,b_2,c_1]/ideal(a_1*b_1,a_2*b_2,b_1*c_1);

    i6 : isCM(A)

    o6 = false

This symbol is provided by the package Depth.

## Caveat

Typically when one thinks of a Cohen-Macaulay ring or module, one is in the local case. Since the local case is not yet implemented into Macaulay 2, we compute over the ideal generated by by generators(Ring).

## Ways to use isCM:

- `isCM(Module)`
- `isCM(Ring)`

## For the programmer

The object isCM is a method function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Depth.m2:836:0.