hcju/stacksqa huggingface dataset:
A PID is a Noetherian B\'ezout ring. By Lemma \ref{lemma-split-off-free-part} it suffices to prove the result if $M$ is torsion. Since $M$ is finite, this means that the annihilator of $M$ is nonzero. Say $fM = 0$ for some $f \in R$ nonzero. Then we can think of $M$ as a module over $R/fR$. Since $R/fR$ is Noetherian of dimension $0$ (small detail omitted) we see that $R/fR = \prod R_j$ is a finite product of Artinian local rings $R_i$ (Algebra, Proposition \ref{algebra-proposition-dimension-zero-ring}). Each $R_i$, being a local ring and a quotient of a PID, is a generalized valuation ring in the sense of Lemma \ref{lemma-generalized-valuation-ring} (small detail omitted). Write $M = \prod M_j$ with $M_j = e_j M$ where $e_j \in R/fR$ is the idempotent corresponding to the factor $R_j$. By Lemma \ref{lemma-generalized-valuation-ring-modules} we see that $M_j = \bigoplus_{i = 1, \ldots, n_j} R_j/\overline{f}_{ji}R_j$ for some $\overline{f}_{ji} \in R_j$. Choose lifts $f_{ji} \in R$ and choose $g_{ji} \in R$ with $(g_{ji}) = (f_j, f_{ji})$. Then we conclude that $$ M \cong \bigoplus R/g_{ji}R $$ as an $R$-module which finishes the proof.
This follows from Lemma \ref{lemma-split-off-free-part} but we can also prove it directly as follows. By induction on $n$. The result holds for $n = 1$. Assume $n > 1$. We may assume $f_1 \not = 0$ after renumbering. Choose $f \in R$ such that $(f) = (f_1, \ldots, f_{n - 1})$. Let $A$ be an $(n - 1) \times (n - 1)$ matrix whose first row is $f_1/f, \ldots, f_{n - 1}/f$. Choose $a, b \in R$ such that $af - bf_n = 1$ which is possible because $1 \in (f_1, \ldots, f_n) = (f, f_n)$. Then a solution is the matrix $$ \left( \begin{matrix} f & 0 & \ldots & 0 & f_n \\ 0 & 1 & \ldots & 0 & 0 \\   &   & \ldots \\ 0 & 0 & \ldots & 1 & 0 \\ b & 0 & \ldots & 0 & a \end{matrix} \right) \left( \begin{matrix}   & & & 0 \\   & A \\   & & & 0 \\ 0 & \ldots & 0 & 1 \end{matrix} \right) $$ Observe that the left matrix is invertible because it has determinant $1$.
Since $\dim(R) = 1$, we have $\dim(R/x^n R) = 0$ and so $\text{length}_R(R/x^n R)$ is finite for each $n$ (Algebra, Lemma \ref{algebra-lemma-support-point}). To show the lemma we will induct on $n$. Since $x^0 R = R$, we have that $P(0) = \text{length}_R(R/x^0R) = \text{length}_R 0 = 0$. The statement also holds for $n = 1$. Now let $n \geq 2$ and suppose the statement holds for $n - 1$. The following sequence is exact $$ R/x^{n-1}R \xrightarrow{x} R/x^nR \to R/xR \to 0 $$ where $x$ denotes the multiplication by $x$ map. Since length is additive (Algebra, Lemma \ref{algebra-lemma-length-additive}), we have that $P(n) \leq P(n - 1) + P(1)$. By induction $P(n - 1) \leq (n - 1)P(1)$, whence $P(n) \leq nP(1)$. This proves the induction step. \medskip\noindent If $x$ is a nonzerodivisor, then the displayed exact sequence above is exact on the left also. Hence we get $P(n) = P(n - 1) + P(1)$ for all $n \geq 1$.
Let $\mathfrak p_1, \ldots, \mathfrak p_t$ be the minimal prime ideals of $R$. Set $R' = R/\sqrt{0} = R/(\bigcap_{i = 1}^t \mathfrak p_i)$. We claim it suffices to prove the lemma for $R'$. Namely, it is clear that $R'$ has $t$ minimal primes too and $\text{length}_{R'}(R'/xR') = \text{length}_R(R'/xR')$ is less than $\text{length}_R(R/xR)$ as there is a surjection $R/xR \to R'/xR'$. Thus we may assume $R$ is reduced. \medskip\noindent Assume $R$ is reduced with minimal primes $\mathfrak p_1, \ldots, \mathfrak p_t$. This means there is an exact sequence $$ 0 \to R \to \prod\nolimits_{i = 1}^t R/\mathfrak p_i \to Q \to 0 $$ Here $Q$ is the cokernel of the first map. Write $M = \prod_{i = 1}^t R/\mathfrak p_i$. Localizing at $\mathfrak p_j$ we see that $$ R_{\mathfrak p_j} \to M_{\mathfrak p_j} = \left(\prod\nolimits_{i=1}^t R/\mathfrak p_i\right)_{\mathfrak p_j} = (R/\mathfrak p_j)_{\mathfrak p_j} $$ is surjective. Thus $Q_{\mathfrak p_j} = 0$ for all $j$. We conclude that $\text{Supp}(Q) = \{\mathfrak m\}$ as $\mathfrak m$ is the only prime of $R$ different from the $\mathfrak p_i$. It follows that $Q$ has finite length (Algebra, Lemma \ref{algebra-lemma-support-point}). Since $\text{Supp}(Q) = \{\mathfrak m\}$ we can pick an $n \gg 0$ such that $x^n$ acts as $0$ on $Q$ (Algebra, Lemma \ref{algebra-lemma-Noetherian-power-ideal-kills-module}). Now consider the diagram $$ \xymatrix{ 0 \ar[r] & R \ar[r] \ar[d]^-{x^n} & M \ar[r] \ar[d]^-{x^n} & Q \ar[r] \ar[d]^-{x^n} & 0 \\ 0 \ar[r] & R \ar[r] & M \ar[r] & Q \ar[r] & 0 } $$ where the vertical maps are multiplication by $x^n$. This is injective on $R$ and on $M$ since $x$ is not contained in any of the $\mathfrak p_i$. By the snake lemma (Algebra, Lemma \ref{algebra-lemma-snake}), the following sequence is exact: $$ 0 \to Q \to R/x^nR \to M/x^nM \to Q \to 0 $$ Hence we find that $\text{length}_R(R/x^nR) = \text{length}_R(M/x^nM)$ for large enough $n$. Writing $R_i = R/\mathfrak p_i$ we see that $\text{length}(M/x^nM) = \sum_{i = 1}^t \text{length}_R(R_i/x^nR_i)$. Applying Lemma \ref{lemma-polypoly} and the fact that $x$ is a nonzerodivisor on $R$ and $R_i$, we conclude that $$ n \text{length}_R(R/xR) = \sum\nolimits_{i = 1}^t n \text{length}_{R_i}(R_i/x R_i) $$ Since $\text{length}_{R_i}(R_i/x R_i) \geq 1$ the lemma is proved.
We have $\dim(R/fR) = d - 1$ by Algebra, Lemma \ref{algebra-lemma-one-equation}. Choose a system of parameters $\overline{g}_1, \ldots, \overline{g}_{d - 1}$ in $R/fR$ (Algebra, Proposition \ref{algebra-proposition-dimension}) and take lifts $g_1, \ldots, g_{d - 1}$ in $R$. It is straightforward to see that $f, g_1, \ldots, g_{d - 1}$ is a system of parameters in $R$. Then $f, g_1^k, \ldots, g_{d - 1}^k$ is also a system of parameters and the proof is complete.
By Lemma \ref{lemma-sopexists} there exists a $g \in \mathfrak m$ such that $f, g$ is a system of parameters for $R$. Then $\mathfrak m = \sqrt{(f, g)}$. Thus there exists an $n$ such that $\mathfrak m^n \subset (f, g)$, see Algebra, Lemma \ref{algebra-lemma-Noetherian-power}. We claim that $N = n + 1$ works. Namely, let $h \in \mathfrak m^N$. By our choice of $N$ we can write $h = af + bg$ with $a, b \in \mathfrak m$. Thus $$ (f + h, g) = (f + af + bg, g) = ((1 + a)f, g) = (f, g) $$ because $1 + a$ is a unit in $R$. This proves the equality of lengths and the fact that $f + h, g$ is a system of parameters.
Let $\text{div}(a) = \sum_{i = 1, \ldots, r} n_i \mathfrak p_i$ with notation as in the proof of Lemma \ref{lemma-radical-element}. Choose $c \in \mathfrak p_1 \cap \ldots \cap \mathfrak p_r$ with $A/cA$ reduced, see Lemma \ref{lemma-radical-element}. For $n \geq \max(n_i)$ we see that $-\text{div}(a) + \text{div}(c^n)$ is an effective divisor (all coefficients nonnegative). Thus $c^n/a \in A$ by Algebra, Lemma \ref{algebra-lemma-normal-domain-intersection-localizations-height-1}.
The function is a numerical polynomial by Algebra, Proposition \ref{algebra-proposition-hilbert-function-polynomial}. It has degree $d$ by Algebra, Proposition \ref{algebra-proposition-dimension}. If $d = 0$, then the result is trivial. If $d = 1$, then the result is Lemma \ref{lemma-polypoly}. To prove it in general, observe that there is a surjection $$ \bigoplus\nolimits_{i_1, \ldots, i_d \geq 0,\ \sum i_j = n} R/I \longrightarrow I^n/I^{n + 1} $$ sending the basis element corresponding to $i_1, \ldots, i_d$ to the class of $g_1^{i_1} \ldots g_d^{i_d}$ in $I^n/I^{n + 1}$. Thus we see that $$ \text{length}_R(R/I^{n + 1}) - \text{length}_R(R/I^n) \leq  \text{length}_R(R/I) {n + d - 1 \choose d - 1} $$ Since $d \geq 2$ the numerical polynomial on the left has degree $d - 1$ with leading coefficient $e_I / (d - 1)!$. The polynomial on the right has degree $d - 1$ and its leading coefficient is $\text{length}_R(R/I)/ (d - 1)!$. This proves the lemma.
If $d = 0$ the lemma is trivial. If $d = 1$ the lemma is Lemma \ref{lemma-minprimespoly}. Thus we may assume $d > 1$. Let $\mathfrak p_1, \ldots, \mathfrak p_s$ be the minimal prime ideals of $R$ where the first $t$ have dimension $d$, and denote $I = (g_1, \ldots, g_n)$. Arguing in exactly the same way as in the proof of Lemma \ref{lemma-minprimespoly} we can assume $R$ is reduced. \medskip\noindent Assume $R$ is reduced with minimal primes $\mathfrak p_1, \ldots, \mathfrak p_t$. This means there is an exact sequence $$ 0 \to R \to \prod\nolimits_{i = 1}^t R/\mathfrak p_i \to Q \to 0 $$ Here $Q$ is the cokernel of the first map. Write $M = \prod_{i = 1}^t R/\mathfrak p_i$. Localizing at $\mathfrak p_j$ we see that $$ R_{\mathfrak p_j} \to M_{\mathfrak p_j} = \left(\prod\nolimits_{i=1}^t R/\mathfrak p_i\right)_{\mathfrak p_j} = (R/\mathfrak p_j)_{\mathfrak p_j} $$ is surjective. Thus $Q_{\mathfrak p_j} = 0$ for all $j$. Therefore no height $0$ prime of $R$ is in the support of $Q$. It follows that the degree of the numerical polynomial $n \mapsto \text{length}_R(Q/I^nQ)$ equals $\dim(\text{Supp}(Q)) < d$, see Algebra, Lemma \ref{algebra-lemma-support-dimension-d}. By Algebra, Lemma \ref{algebra-lemma-hilbert-ses-chi} (which applies as $R$ does not have finite length) the polynomial $$ n \longmapsto \text{length}_R(M/I^nM) - \text{length}_R(R/I^n) - \text{length}_R(Q/I^nQ) $$ has degree $< d$. Since $M = \prod R/\mathfrak p_i$ and since $n \to \text{length}_R(R/\mathfrak p_i + I^n)$ is a numerical polynomial of degree exactly(!) $d$ for $i = 1, \ldots, t$ (by Algebra, Lemma \ref{algebra-lemma-support-dimension-d}) we see that the leading coefficient of $n \mapsto \text{length}_R(M/I^nM)$ is at least $t/d!$. Thus we conclude by Lemma \ref{lemma-multiplicity}.
By Lemma \ref{lemma-sopexists} there exist $g_1, \ldots, g_{d - 1} \in \mathfrak m$ such that $f, g_1, \ldots, g_{d - 1}$ is a system of parameters for $R$. Then $\mathfrak m = \sqrt{(f, g_1, \ldots, g_{d - 1})}$. Thus there exists an $n$ such that $\mathfrak m^n \subset (f, g)$, see Algebra, Lemma \ref{algebra-lemma-Noetherian-power}. We claim that $N = n + 1$ works. Namely, let $h \in \mathfrak m^N$. By our choice of $N$ we can write $h = af + \sum b_ig_i$ with $a, b_i \in \mathfrak m$. Thus \begin{align*} (f + h, g_1, \ldots, g_{d - 1}) & = (f + af + \sum b_ig_i, g_1, \ldots, g_{d - 1}) \\ & = ((1 + a)f, g_1, \ldots, g_{d - 1}) \\ & = (f, g_1, \ldots, g_{d - 1}) \end{align*} because $1 + a$ is a unit in $R$. This proves the equality of lengths and the fact that $f + h, g_1, \ldots, g_{d - 1}$ is a system of parameters.
If $M$ is perfect, then we can represent $M$ by a bounded complex $M^\bullet$ of finite projective $R$-modules. In this case $M^\bullet$ has a left dual in the category of complexes by Lemma \ref{lemma-left-dual-complex} which is a fortiori a left dual in $D(R)$. \medskip\noindent Assume (1). Say $N$, $\eta : R \to M \otimes_R^\mathbf{L} N$, and $\epsilon : M \otimes_R^\mathbf{L} N \to R$ is a left dual as in Categories, Definition \ref{categories-definition-dual}. Choose a complex $M^\bullet$ representing $M$. Choose a K-flat complexes $N^\bullet$ with flat terms representing $N$, see Lemma \ref{lemma-K-flat-resolution}. Then $\eta$ is given by a map of complexes $$ \eta : R \longrightarrow \text{Tot}(M^\bullet \otimes_R N^\bullet) $$ We can write the image of $1$ as a finite sum $$ \eta(1) = \sum\nolimits_n \sum\nolimits_i m_{n, i} \otimes n_{-n, i} $$ with $m_{n, i} \in M^n$ and $n_{-n, i} \in N^{-n}$. Let $K^\bullet \subset M^\bullet$ be the subcomplex generated by all the elements $m_{n, i}$ and $\text{d}(m_{n, i})$. By our choice of $N^\bullet$ we find that $\text{Tot}(K^\bullet \otimes_R N^\bullet) \subset \text{Tot}(M^\bullet \otimes_R N^\bullet)$ and $\eta(1)$ is in the subcomplex by our choice above. Denote $K$ the object of $D(R)$ represented by $K^\bullet$. Then we see that $\eta$ factors over a map $\tilde \eta : R \longrightarrow K \otimes_R^\mathbf{L} N$. Since $(1 \otimes \epsilon) \circ (\eta \otimes 1) = \text{id}_M$ we conclude that the identity on $M$ factors through $K$ by the commutative diagram $$ \xymatrix{ M \ar[rr]_-{\eta \otimes 1} \ar[rrd]_{\tilde \eta \otimes 1} & & M \otimes_R^\mathbf{L} N \otimes_R^\mathbf{L} M \ar[r]_-{1 \otimes \epsilon} & M \\ & & K \otimes_R^\mathbf{L} N \otimes_R^\mathbf{L} M \ar[u] \ar[r]^-{1 \otimes \epsilon} & K \ar[u] } $$ Since $K$ is bounded above it follows that $M \in D^-(R)$. Thus we can represent $M$ by a bounded above complex $M^\bullet$ of free $R$-modules, see for example Derived Categories, Lemma \ref{derived-lemma-subcategory-left-resolution}. Write $\eta(1) = \sum\nolimits_n \sum\nolimits_i m_{n, i} \otimes n_{-n, i}$ as before. By Lemma \ref{lemma-complex-bounded-above-free-colim-bounded-finite-free} we can find a subcomplex $K^\bullet \subset M^\bullet$ containing all the elements $m_{n, i}$ which is bounded and consists of finite free $R$-modules. As above we find that the identity on $M$ factors through $K$. Since $K$ is perfect we conclude $M$ is perfect too, see Lemma \ref{lemma-summands-perfect}.
Assume (2). Consider the object $R\Hom_R(M, R)$ and the composition map $$ R\Hom(M, R) \otimes_R^\mathbf{L} M \to R $$ Checking locally we see that this is an isomorphism; we omit the details. Because $D(R)$ is symmetric monoidal we see that $M$ is invertible. \medskip\noindent Assume (1). Observe that an invertible object of a monoidal category has a left dual, namely, its inverse. Thus $M$ is perfect by Lemma \ref{lemma-have-dual-derived}. Consider a prime ideal $\mathfrak p \subset R$ with residue field $\kappa$. Then we see that $M \otimes_R^\mathbf{L} \kappa$ is an invertible object of $D(\kappa)$. Clearly this implies that $\dim H^i(M \otimes_R^\mathbf{L} \kappa)$ is nonzero exactly for one $i$ and equal to $1$ in that case. By Lemma \ref{lemma-lift-perfect-from-residue-field} this gives (2). \medskip\noindent In the proof above we have seen that (a) holds. Let $U_n \subset \Spec(R)$ be the union of the opens of the form $D(f)$ such that $M_f \cong R_f[-n]$. Clearly, $U_n \cap U_{n'} = \emptyset$ if $n \not = n'$. If $M$ has tor amplitude in $[a, b]$, then $U_n = \emptyset$ if $n \not \in [a, b]$. Hence we see that we have a product decomposition $R = \prod_{a \leq n \leq b} R_n$ as in (d) such that $U_n$ corresponds to $\Spec(R_n)$, see Algebra, Lemma \ref{algebra-lemma-disjoint-implies-product}. Since $D(R) = \prod_{a \leq n \leq b} D(R_n)$ and similary for the category of modules parts (b), (c), and (d) follow immediately.
For cases (1), (3), (5), and (6) this is proved by checking condition (4) of Lemma \ref{lemma-J-2}. We will only do this in case $R$ is a Nagata ring of dimension $1$. Let $\mathfrak p \subset R$ be a prime ideal and let $\kappa(\mathfrak p) \subset L$ be a finite purely inseparable extension. If $\mathfrak p \subset R$ is a maximal ideal, then $R \to L$ is finite and $L$ is a regular ring and we've checked the condition. If $\mathfrak p \subset R$ is a minimal prime, then the Nagata condition insures that the integral closure $R' \subset L$ of $R$ in $L$ is finite over $R$. Then $R'$ is a normal domain of dimension $1$ (Algebra, Lemma \ref{algebra-lemma-integral-dim-up}) hence regular (Algebra, Lemma \ref{algebra-lemma-criterion-normal}) and we've checked the condition in this case as well. \medskip\noindent For case (2), we will use condition (3) of Lemma \ref{lemma-J-2}. Let $R$ be a Noetherian complete local ring. Note that if $R \to R'$ is finite, then $R'$ is a product of Noetherian complete local rings, see Algebra, Lemma \ref{algebra-lemma-quotient-complete-local}. Hence it suffices to prove that a Noetherian complete local ring which is a domain is J-0, which is Lemma \ref{lemma-complete-Noetherian-domain-J-0}. \medskip\noindent For case (4), we also use condition (3) of Lemma \ref{lemma-J-2}. Namely, if $R$ is a local Noetherian ring of dimension $1$ and $R \to R'$ is finite, then $\Spec(R')$ is finite. Since the regular locus is stable under generalization, we see that $R'$ is J-1.
We have seen the equivalence of (2), (3), and (4) in Proposition \ref{proposition-fs-flat-fibre-fs}. It is clear that (1) implies (2). Thus we assume the equivalent conditions (2), (3), and (4) hold and we prove (1). \medskip\noindent Let $\mathfrak p$ be a prime of $A$. We will show that $B \otimes_A \kappa(\mathfrak p)$ is geometrically regular over $\kappa(\mathfrak p)$. By Lemma \ref{lemma-base-change-fs} we may replace $A$ by $A/\mathfrak p$ and $B$ by $B/\mathfrak pB$. Thus we may assume that $A$ is a domain and that $\mathfrak p = (0)$. \medskip\noindent Choose $A_0 \subset A$ as in Algebra, Lemma \ref{algebra-lemma-complete-local-Noetherian-domain-finite-over-regular}. We will use all the properties stated in that lemma without further mention. As $A_0 \to A$ induces an isomorphism on residue fields, and as $B/\mathfrak m_A B$ is geometrically regular over $A/\mathfrak m_A$ we can find a diagram $$ \xymatrix{ C \ar[r] & B \\ A_0 \ar[r] \ar[u] & A \ar[u] } $$ with $A_0 \to C$ formally smooth in the $\mathfrak m_C$-adic topology such that $B = C \otimes_{A_0} A$, see Remark \ref{remark-what-does-it-mean}. (Completion in the tensor product is not needed as $A_0 \to A$ is finite, see Algebra, Lemma \ref{algebra-lemma-completion-tensor}.) Hence it suffices to show that $C \otimes_{A_0} K_0$ is a geometrically regular algebra over the fraction field $K_0$ of $A_0$. \medskip\noindent The upshot of the preceding paragraph is that we may assume that $A = k[[x_1, \ldots, x_n]]$ where $k$ is a field or $A = \Lambda[[x_1, \ldots, x_n]]$ where $\Lambda$ is a Cohen ring. In this case $B$ is a regular ring, see Algebra, Lemma \ref{algebra-lemma-flat-over-regular-with-regular-fibre}. Hence $B \otimes_A K$ is a regular ring too (where $K$ is the fraction field of $A$) and we win if the characteristic of $K$ is zero. \medskip\noindent Thus we are left with the case where $A = k[[x_1, \ldots, x_n]]$ and $k$ is a field of characteristic $p > 0$. Let $L \supset K$ be a finite purely inseparable field extension. We will show by induction on $[L : K]$ that $B \otimes_A L$ is regular. The base case is $L = K$ which we've seen above. Let $K \subset M \subset L$ be a subfield such that $L$ is a degree $p$ extension of $M$ obtained by adjoining a $p$th root of an element $f \in M$. Let $A'$ be a finite $A$-subalgebra of $M$ with fraction field $M$. Clearing denominators, we may and do assume $f \in A'$. Set $A'' = A'[z]/(z^p -f)$ and note that $A' \subset A''$ is finite and that the fraction field of $A''$ is $L$. By induction we know that $B \otimes_A M$ ring is regular. We have $$ B \otimes_A L = B \otimes_A M[z]/(z^p - f) $$ By Lemma \ref{lemma-find-D} we know there exists a derivation $D : A' \to A'$ such that $D(f) \not = 0$. As $A' \to B \otimes_A A'$ is formally smooth in the $\mathfrak m$-adic topology by Lemma \ref{lemma-descent-fs} we can use Lemma \ref{lemma-lift-derivation-through-fs} to extend $D$ to a derivation $D' : B \otimes_A A' \to B \otimes_A A'$. Note that $D'(f) = D(f)$ is a unit in $B \otimes_A M$ as $D(f)$ is not zero in $A' \subset M$. Hence $B \otimes_A L$ is regular by Lemma \ref{lemma-degree-p-extension-regular} and we win.
Let $A$ be a Noetherian complete local ring. By Lemma \ref{lemma-check-G-ring-easy} it suffices to check that $B = A/\mathfrak q$ has geometrically regular formal fibres over the minimal prime $(0)$ of $B$. Thus we may assume that $A$ is a domain and it suffices to check the condition for the formal fibres over the minimal prime $(0)$ of $A$. Let $K$ be the fraction field of $A$. \medskip\noindent We can choose a subring $A_0 \subset A$ which is a regular complete local ring such that $A$ is finite over $A_0$, see Algebra, Lemma \ref{algebra-lemma-complete-local-Noetherian-domain-finite-over-regular}. Moreover, we may assume that $A_0$ is a power series ring over a field or a Cohen ring. By Lemma \ref{lemma-G-ring-goes-up-quasi-finite} we see that it suffices to prove the result for $A_0$. \medskip\noindent Assume that $A$ is a power series ring over a field or a Cohen ring. Since $A$ is regular the localizations $A_\mathfrak p$ are regular (see Algebra, Definition \ref{algebra-definition-regular} and the discussion preceding it). Hence the completions $A_\mathfrak p^\wedge$ are regular, see Lemma \ref{lemma-completion-regular}. Hence the fibre $A_{\mathfrak p}^\wedge \otimes_A K$ is, as a localization of $A_\mathfrak p^\wedge$, also regular. Thus we are done if the characteristic of $K$ is $0$. The positive characteristic case is the case $A = k[[x_1, \ldots, x_d]]$ which is a special case of Lemma \ref{lemma-helper-G-ring}.
For fields, $\mathbf{Z}$ and Dedekind domains of characteristic zero this follows immediately from the definition and the fact that the completion of a discrete valuation ring is a discrete valuation ring. A Noetherian complete local ring is a G-ring by Proposition \ref{proposition-Noetherian-complete-G-ring}. The statement on finite type overrings is Proposition \ref{proposition-finite-type-over-G-ring}.
Since being a $P$-ring is a property of the local rings it is clear that a localization of a $P$-ring is a $P$-ring. Conversely, if every localization at a prime is a $P$-ring, then the ring is a $P$-ring. Thus it suffices to show that $S_\mathfrak q$ is a $P$-ring for every finite type $R$-algebra $S$ and every prime $\mathfrak q$ of $S$. Writing $S$ as a quotient of $R[x_1, \ldots, x_n]$ we see from Lemma \ref{lemma-P-ring-goes-up-quasi-finite} that it suffices to prove that $R[x_1, \ldots, x_n]$ is a $P$-ring. By induction on $n$ it suffices to prove that $R[x]$ is a $P$-ring. Let $\mathfrak q \subset R[x]$ be a maximal ideal. By Lemma \ref{lemma-check-P-ring-maximal-ideals} it suffices to show that the fibres of $$ R[x]_\mathfrak q \longrightarrow R[x]_\mathfrak q^\wedge $$ have $P$. If $\mathfrak q$ lies over $\mathfrak p \subset R$, then we may replace $R$ by $R_\mathfrak p$. Hence we may assume that $R$ is a Noetherian local $P$-ring with maximal ideal $\mathfrak m$ and that $\mathfrak q \subset R[x]$ lies over $\mathfrak m$. Note that there is a unique prime $\mathfrak q' \subset R^\wedge[x]$ lying over $\mathfrak q$. Consider the diagram $$ \xymatrix{ R[x]_\mathfrak q^\wedge \ar[r] & (R^\wedge[x]_{\mathfrak q'})^\wedge \\ R[x]_\mathfrak q \ar[r] \ar[u] & R^\wedge[x]_{\mathfrak q'} \ar[u] } $$ Since $R$ is a $P$-ring the fibres of $R[x] \to R^\wedge[x]$ have $P$ because they are base changes of the fibres of $R \to R^\wedge$ by a finitely generated field extension so (A) applies. Hence the fibres of the lower horizontal arrow have $P$ for example by Lemma \ref{lemma-P-local}. The right vertical arrow is regular because $R^\wedge$ is a G-ring (Propositions \ref{proposition-Noetherian-complete-G-ring} and \ref{proposition-finite-type-over-G-ring}). It follows that the fibres of the composition $R[x]_\mathfrak q \to (R^\wedge[x]_{\mathfrak q'})^\wedge$ have $P$ by (C). Hence the fibres of the left vertical arrow have $P$ by (D) and the proof is complete.
See Propositions \ref{proposition-ubiquity-G-ring} and \ref{proposition-ubiquity-J-2} to see that these rings are G-rings and have J-2. Any Cohen-Macaulay ring is universally catenary, see Algebra, Lemma \ref{algebra-lemma-CM-ring-catenary}. In particular fields, Dedekind rings, and more generally regular rings are universally catenary. Via the Cohen structure theorem  we see that complete local rings are universally catenary, see Algebra, Remark \ref{algebra-remark-Noetherian-complete-local-ring-universally-catenary}.