Macaulay2 » Documentation
Packages » TestIdeals :: isCohenMacaulay
next | previous | forward | backward | up | index | toc

isCohenMacaulay -- whether a ring is Cohen-Macaulay

Synopsis

Description

The function isCohenMacaulay determines if a ring is Cohen-Macaulay. If the option AtOrigin (default value false) is set to true, isCohenMacaulay will simply call the isCM function in the Depth package, which checks whether the ring is Cohen-Macaulay at the origin; otherwise, isCohenMacaulay checks the Cohen-Macaulay property globally, which sometimes is much faster than the local computation.

i1 : T = ZZ/5[x,y];
i2 : S = ZZ/5[a,b,c,d];
i3 : g = map(T, S, {x^3, x^2*y, x*y^2, y^3});

o3 : RingMap T <-- S
i4 : R = S/(ker g);
i5 : time isCohenMacaulay(R)
     -- used 0.00133211 seconds

o5 = true
i6 : time isCohenMacaulay(R, AtOrigin => true)
     -- used 0.00354233 seconds

o6 = true
i7 : R = QQ[x,y,u,v]/(x*u, x*v, y*u, y*v);
i8 : isCohenMacaulay(R)

o8 = false

The function isCohenMacaulay considers $R$ as a quotient of a polynomial ring, $R = S/I$, and takes a resolution of $I$. If the resolution has length equal to dim $S$ - dim $R$, then $R$ is Cohen-Macaulay. If the resolution has a different length, and $I$ is homogeneous, then $R$ is not Cohen-Macaulay. Finally, if the resolution has a different length and $I$ is not homogeneous, the function looks at the Ext modules which compute the depth.

Caveat

This function assumes that the spectrum of the ring is connected. If given a non-equidimensional Cohen-Macaulay ring (e.g., a ring whose spectrum has two connected components of different dimensions), isCohenMacaulay will return false.

Ways to use isCohenMacaulay :

For the programmer

The object isCohenMacaulay is a method function with options.