$R$ Gorenstein implies $\operatorname{Proj}(R)$ Gorenstein

Let $k$ be a field and let R be a Gorenstein $k$-algebra which has a non-negative grading $R=\oplus_{k\geq 0} R_k.$ Assume further that $R_0=k$ and that $R$ is generated in degree one. I've seen it asserted without proof that the scheme $\operatorname{Proj}(R)$ is Gorenstein. How does one prove this?

To explain where I'm stuck: I know $\operatorname{Proj}(R)$ is covered by the degree zero pieces of localizations $R_f$ for homogeneous $f$ (these localizations are Gorenstein). However, I don't know why taking degree zero piece preserves Gorensteiness.


Here's a key lemma which is very important for understanding how Gorenstein-ness can be translated from one situation to another.

Lemma (Stacks 0BJL): Let $A\to B$ be a flat local homomorphism of noetherian local rings. The following are equivalent:

  1. $B$ is Gorenstein
  2. $A$ and $B/m_AB$ are Gorenstein.

Let $S=\{1,f,f^2,\cdots\}$ for $f$ homogeneous of degree one, and consider $S^{-1}R$. We can write $S^{-1}R=(S^{-1}R)_0[f,f^{-1}]$, where I mean "freely adjoining" - I claim that $f$ doesn't satisfy any nonzero polynomial equations with coefficients from $(S^{-1}R)_0$. Suppose $\sum_{i=0}^{i=n} c_if^i$ is such a polynomial and assume $c_n\neq 0$. Then $c_nf^n=0$ by degree reasons, which cannot be the case unless $c_n=0$ in $(S^{-1}R)_0$ already (unwind the definitions of the localization). This implies that the map $(S^{-1}R)_0\to S^{-1}R$ is flat.

Now for any prime ideal $\mathfrak{p}$ of $S^{-1}R$ lying above a prime ideal $\mathfrak{q}$ of $(S^{-1}R)_0$, we get an induced map of local rings between the localizations. The assumption that $R$ is Gorenstein implies all local rings of $R$ (and thus $S^{-1}R$) are Gorenstein, so all local rings of $(S^{-1}R)_0$ are Gorenstein by the lemma. So $(S^{-1}R)_0$ is Gorenstein, and as the spectra of such rings cover $\operatorname{Proj} R$ as $f$ varies, we have shown that $\operatorname{Proj} R$ is Gorenstein.