What are all invariant polynomials on the space of algebraic curvature tensors?

I think this is unlikely to have a very nice answer. When $n=2$ and $n=3$, the answer is simple, but, already for $n=4$, it's not likely to be easy to give a set of generators and relations for the $\mathrm{O}(n)$-invariant polynomials on the vector space $\mathcal{R}_n$ of algebraic curvature tensors in dimension $n$. (I'm avoiding the OP's notation of $W$ for this space because it doesn't explicitly reference the dimension $n$ and I don't want to confuse it with the space of Weyl curvature tensors.)

Since $\mathcal{R}_n$ has dimension $\tfrac1{12}n^2(n^2-1)$ and since, for $n>2$ the generic element of $\mathcal{R}_n$ has only a finite stabilizer in $\mathrm{O}(n)$, the dimension of the ring of $\mathrm{O}(n)$-invariant polynomials on $\mathcal{R}_n$ will be $$ \frac1{12}n^2(n^2-1) - \frac12n(n-1) = \frac1{12}(n+3)n(n-1)(n-2), $$ so there will always be at least that many independent generators and, when $n>3$, many more, plus a bunch of relations, since the quotient space will not be 'smooth' near the origin.

Once one gets above the low degrees when $n>3$, to compute the dimensions of the graded pieces of this ring will be complicated (essentially, one is asking for the Hilbert series of the ring of invariants). (However, the dimension of the grade 1 piece is 1, and the dimension of the grade $2$ piece is $2$ for $n=3$ and $3$ for $n>3$. If one were using $\mathrm{SO}(4)$ for $n=4$, the dimension of the grade $2$ piece would be $4$.)

I imagine that the answers for $n=4$ are known (though I don't know them) since it is, in principle, just a representation-theoretic computation.


I am not sure that this has a "nice" answer. Your question can be reformulated as follows. Let $\mathcal{A}_n$ be the space of algebraic curvature tensors on $\mathbb{R}^n$. A homogenous polynomial $P$ on $\mathcal{A}_n$ is the same as an element of $S^k\mathcal{A}_n$, the $k$-th symmetric tensor power of $\mathcal{A}_n$. Now if $H_k$ is the space of homogeneous polynomials of degree $k$ on $\mathcal{A}_n$, then $H_k \subset S^k \mathcal{A}_n$ is a subrepresentation of $G$.

In other words, a recipe to obtain an answer to your question for specific $k$, $n$, is the following. Decompose the $G$-representation $S^k \mathcal{A}_n$ into irreducible $G$-representations and count the number of trivial representations among those. This can be done for low $k$, $n$ using software such as LiE.

Note that as a $G$-representation, the space $\mathcal{A}_n$ splits into the direct sum of three irreducible representations: $$ \mathcal{A}_n = \mathbb{R} \oplus S^2_0(\mathbb{R}^n) \oplus \mathcal{W},$$ where $\mathcal{W}$ is the space of Weyl curvature tensors (i.e. those curvature tensors that are additionally entirely trace-free).

A quick check on LiE shows that there are plenty such polynomials: For example, looking for polynomials that depend on the Weyl part alone and $n$ large, there is one of degree 2 and four of degree 3. I doubt there is a good general answer.