Invariants of matrices (by simultaneous $\mathrm{GL}_n$ conjugation) over arbitrary rings $\DeclareMathOperator\GL{GL}$Let $R$ be a commutative ring, let $R[n] := R[M_d^{\oplus n}]$ be the polynomial ring on $nd^2$ variables corresponding to the coordinates of $n$-many $d\times d$ matrices. Let these matrix variables be $X_1,\ldots,X_n$. For an $d\times d$ matrix $A$, let $c_k(A)$ be the coefficient of $T^k$ in the characteristic polynomial $\det(A-TI)$.
The group scheme $\GL_{d,R}$ acts on $R[n]$ by simultaneous conjugation on the $d$ matrices. Clearly for any product $X_{i_1}X_{i_2}\cdots X_{i_r}$ (where $i_j\in[1\ldots n], r\ge 1$), the function $c_k(X_{i_1}\cdots X_{i_r})\in R[n]$ is invariant under $\GL_{d,R}$.
Is it true that for any commutative ring $R$, $R[n]^{\GL_{d,R}}$ is generated as an $R$-algebra by the functions $c_k(X_{i_1}\cdots X_{i_r})$?
Does anyone have a reference for this?
Remark - The statement over $\mathbb{C}$ is a classical result of Sibirski and Procesi. This was later extended to the case $R = \mathbb{Z}$ and $R$ any algebraically closed field by Donkin in Invariants of several matrices. In Concini-Procesi's The invariant theory of matrices, they also seem to obtain the result when $R$ is an infinite field.
 A: For the benefit of myself and other novices in the area, I wanted to add some details to Wilberd's excellent answer, citing Donkin's Invariants of several matrices and Jantzen's book Representations of Algebraic Groups as appropriate.
We work over a base ring $R$.
First, one checks that Donkin's definition of a "good filtration" on a $G$-module $V$ coincides with Jantzens (defined in II, 4.16). The latter uses the isomorphism $H^i(M) := R^i\text{Ind}^G_B(V)\cong H^i(G/B,\mathcal{L}(M))$ (Jantzen I, 5.12), where $B\subset G$ is a Borel, $M$ a $B$-module, and $\mathcal{L}(M)$ denotes the quasi-coherent sheaf on $G/B$ associated to $M$ (I, 5.8). If $M = R$ with trivial $G$-action, then $\mathcal{L}(R)$ is the structure sheaf $\mathcal{O}_{G/B}$.
Now write $R[n] = \bigoplus_{d\ge 0}R[n]_d$, where $R[n]_d$ consists of the polynomials of total degree $d$. One easily checks that each $R[n]_d$ is a $\text{GL}_{n,R}$-module.  We claim that the $\mathbb{Z}$-finite $G = \text{GL}_{n,\mathbb{Z}}$-modules $\mathbb{Z}[n]_{\le D} := \bigoplus_{0\le d\le D} \mathbb{Z}[n]_d$ have good filtrations for any $D\ge 0$. We use the following Lemma
Lemma (Appendix B.9 of Jantzen) Let $G$ be a split reductive algebraic group, and let $T$ be a maximal torus. Suppose that $R$ is a principal ideal domain. Let $M$ be a $G$-module which is free of finite rank over $R$. As explained in B.4, let $V(\lambda) := H^0(-w_0\lambda)^*)$ be the Weyl module, where $w_0$ is the longest element of the Weyl group (II, 1.5). The following are equivalent:
(i) $M$ has a good filtration.
(ii) $Ext^i_G(V(\lambda),M) = 0$ for all $\lambda\in X(T)_+$ and all $i > 0$
(iii) $Ext^1_G(V(\lambda),M) = 0$ for all $\lambda\in X(T)_+$.
(iv) For each maximal ideal $\mathfrak{m}$ in $k$, the $G_{R/\mathfrak{m}}$-module $M\otimes R/\mathfrak{m}$ has a good filtration.
By (iv), it suffices to check that the $G_{\mathbb{F}_p}$-modules $\mathbb{F}_p[n]_{\le D}$ all have good filtrations. Using flat base change for $G$-module cohomology (see Jantzen I, 4.13), (ii) (or (iii)) implies that it suffices to check the existence of good filtrations over algebraically closed fields $k$. By a result of Donkin (Donkin The normality of closures of conjugacy classes of matrices Proposition 1.2a (i) and (ii)), good filtrations behave well with respect to direct summands, so it suffices to check that $\overline{\mathbb{F}_p}[n]$ have good filtrations. This is done in $\S3$ of Donkin's Invariants of several matrices. Thus we conclude that $\mathbb{Z}[n]_{\le D}$ has a good filtration for any $D\ge 0$.
Let $T$ be a maximal torus of $G = GL_{n,\mathbb{Z}}$, and let $\lambda = 0\in X(T)$, then $\lambda$ is dominant and we have $V(0) = H^0(G/B,\mathcal{L}(0)) = H^0(G/B,\mathcal{O}_{G/B})$. Since $G/B$ is smooth proper over $\mathbb{Z}$ (use Jantzen I, 5.6(9) and I,5.7 to reduce to the classical case over algebraically closed fields), Stein factorization implies that $V(0) = \mathbb{Z}$ (with trivial $G$-action). By (ii) or (iii), we conclude that $Ext^1_G(\mathbb{Z},M) = H^1(G,M) = 0$. By a "universal coefficient theorem" (see Jantzen I, 4.18), vanishing of $H^1(G,M)$ implies that for any ring $R$, $\mathbb{Z}[n]^{GL_{2,\mathbb{Z}}}\otimes R = R[n]^{GL_{2,R}}$, as desired.
A: It is true. The standard reference is the Book by Jantzen, Representations of Algebraic Groups, Second edition. In particular we need the Appendix `Chapter B', and the base change Proposition in part I, 4.18. By Donkin the $G_{\mathbb Z}$ module $M={\mathbb Z}[n]$ has good filtration. So $H^1(G_{\mathbb Z},M)$ vanishes. And $H^0(G_{\mathbb Z},M)$ just means $M^{G_{\mathbb Z}}$. The base change Proposition tells that the map $M^{G_{\mathbb Z}}\otimes R\to (M\otimes R)^{G_{R}}$ is an isomorphism. The result follows.
