isCM takes a homogeneous ideal I in a polynomial ring R and, by computing the projective dimension and codimension of I, determines whether R/I is Cohen-Macaulay. Of course, isCM works only if Macaulay 2 can compute the projective dimension of I.
i1 : R=ZZ/32003[a..c]; |
i2 : isCM(ideal(a^2,b^4)) --complete intersection o2 = true |
i3 : isCM(ideal(a^3,b^5,c^4,a*c^3)) --Artinian o3 = true |
i4 : isCM(ideal(a^3,a*b^2)) o4 = false |
The object isCM is a method function.