I would like to be able to look at the ring $R=\mathbb{Z}[x\_1,x\_2,\ldots,x\_n]/\mathcal{I},$ where $\mathcal{I}$ is generated by a finite number of monomials and say whether $R$ is a Gorenstein ring. Is there a way to do so? Gorenstein rings seem complicated in the general setting, but may be there are some results for this particular case.


(Actually, what I am really trying to do is to find an easy and/or conceptual way to check whether the face ring $\mathbb{Z}[K]$ of a simplicial complex $K$ is Gorenstein. I am familiar with Stanley's results, but they all check this property in terms of combinatorics/topology of $K$, while I am more interested in the properties of the ring $R$ by itself. Although I am looking for more algebraic conditions, I will be glad to learn any relevant criteria which are not written in Stanley's "Combinatorics and Commutative Algebra".)


Thank you!



Determining when quotient of a polynomial ring is a Gorenstein ring
Yes, this is possible. I think there are general criterion for checking whether such a toric ring is Gorenstein. Maybe check out the book of Cox-Little-Schenck. That's over a field, but I think many things will work over $\mathbb{Z}$ with minimal change (note those criteria are still going to be combinatorial in nature, which is probably not what you want).


Let me give a much more general answer though.


To check whether *any* quotient ring of $\mathbb{Z}[x\_1, \dots, x\_n]$ is Gorenstein you need to check it is Cohen-Macaulay and the canonical module is projective. Probably Cohen-Macaulay is automatic in your case?


In particular, for simplicity suppose that $R$ is of equidimension $d$. In particular, we don't have two connected components of the Spec of different dimensions. If you have two such components, you need to work modulo one at a time in what follows.


Set $S = \mathbb{Z}[x\_1, \dots, x\_n]$ with $R = S/I$. Compute whether


$$\mathrm{Ext}^{n+1-d+i}(R, S) = 0$$


for $i = 1, \dots, d$. If those Ext groups vanish, then you are Cohen-Macaulay.


Next compute whether or not


$$\omega\_R = \mathrm{Ext}^{n+1-d}(R, S)$$


is projective.


In fact, computing whether such a module is projective is typically easier than computing whether it is free (unless you are graded in some way, which you might be...). If the ring is normal, a fast way to check this is to check if $\omega\_R \cdot \omega\_R^{-1} = R$ as fractional ideals (a variant can be done without normality, and there are other ways to check whether a module is projectives). There are other ways to check this too.


Anayways, Macaulay2 is actually able to compute these $\mathrm{Ext}$ groups.


For instance, here we have a 2-dimensional ring as a quotient of a 4-dimensional ambient.



```
i1 : S = ZZ[x,y,z];

i2 : I = intersect(ideal(5, x), ideal(y,z));

o2 : Ideal of S

i3 : Ext^(4-2+1)(S^1/I, S^1)

o3 = cokernel {-3} | 5 z y x |

                            1
o3 : S-module, quotient of S

i4 : ann o3

o4 = ideal (5, z, y, x)

o4 : Ideal of S

```

And so this ring is not Cohen-Macaulay. The divisor package will let you actually compute whether a module over a normal ring is projective via the method outlined above.



```
i1 : S = ZZ[x,y,z];

i2 : I = ideal(5*x-y*z);

o2 : Ideal of S

i3 : omega=Ext^1(S^1/I, S^1)

o3 = cokernel | yz-5x |

                            1
o3 : S-module, quotient of S

i4 : loadPackage "Divisor";

i5 : omegaIdeal = embedAsIdeal(S/I, omega**(S/I))

o5 = ideal 1

                   S
o5 : Ideal of ----------
              - y*z + 5x

i6 : omegaIdeal*dualize(omegaIdeal)

o6 = ideal 1

                   S
o6 : Ideal of ----------
              - y*z + 5x

```

The module is principal so the ring is Gorenstein (which we knew already).


In this case, I don't even need to do the inverse, in fact I could have stopped after command 3 since the module omega is clearly principal. There are cases where you have to do such computations though (maybe not for toric things you are interested in though, you might just be able to stop at i3).


**Note:** There is nothing special in the above work about $S = \mathbb{Z}[x\_1, \dots, x\_n]$ except it is Gorenstein. A variant of the above can be checked for any quotient of a Gorenstein ring (although in that case one must be much more careful about dimension than I was).


