Suppose I have a ring $R$ defined by generators and relations;
for example,
$ C [A, b\_0, b\_1, b\_2, b\_3]$
with relations


* $b\_2\*A-b\_1\*b\_0=0$,
* $b\_3\*A-b\_1\*b\_2=0$,
* $b\_2^2-b\_0\*b\_3=0$.




---


Using Macaulay2 package "Depth" I'm able to check if ring is Cohen-Macaulay, but I also need to compute for example $Ext^3\_R(C, R)$. Only package I found for counting Ext's (namely Ext ) does it only for complete intersections (which are already Gorenstein). Is there a way to check if a commutative ring is Gorenstein?



How to check if a commutative ring is Gorenstein.

```
Macaulay2, version 1.3.1
i1 : S = QQ[A,b0,b1,b2,b3]

o1 = S

o1 : PolynomialRing

i2 : I=ideal(b2*A-b1*b0, b3*A-b1*b2, b2^2-b0*b3)

                                              2
o2 = ideal (- b0*b1 + A*b2, - b1*b2 + A*b3, b2  - b0*b3)

o2 : Ideal of S

i3 : R = S/I

o3 = R

o3 : QuotientRing

i4 : k = coker vars R

o4 = cokernel | A b0 b1 b2 b3 |

                            1
o4 : R-module, quotient of R

i5 : Ext^3(k,R^1)

o5 = cokernel {-2} | b3 b2 b1 b0 A 0  0  0  0  0 |
              {-2} | 0  0  0  0  0 b3 b2 b1 b0 A |

                            2
o5 : R-module, quotient of R

```

Socle dimension 2. Not Gorenstein.


Alternative method: find a regular sequence of length 3 and kill it. Here's one found by trial and error:



```
i27 : J=ideal (b1 - b2, A, b0 - b3)

o27 = ideal (b1 - b2, A, b0 - b3)

o27 : Ideal of R

i28 : res J

       1      3      3      1
o28 = R  <-- R  <-- R  <-- R  <-- 0

      0      1      2      3      4

o28 : ChainComplex

i29 : T = R/J

o29 = T

o29 : QuotientRing

i31 : Hom(coker vars T,T^1)

o31 = image | b3 b2 |

                              1
o31 : T-module, submodule of T

i32 : prune oo

o32 = cokernel {1} | b3 b2 0  0  |
               {1} | 0  0  b3 b2 |

```

