Polynomials which are invariant to the cyclic permutation of variables I'm trying to solve the following problem from this book. I can find the Gröbner basis of $J$ using Buchberger’s algorithm, and so I don't have any problem with the first part of this problem. But my problem is about the second part. Could you please say how it is related to the Gröbner basis?

Let $\eta_{0}=x_{1}+x_{2}+x_{3}, \eta_{1}=x_{1} \varepsilon+x_{2} \varepsilon^{2}+x_{3}, \eta_{2}=x_{1} \varepsilon^{2}+$
$x_{2} \varepsilon+x_{3} \in \mathbb{C}\left[x_{1}, x_{2}, x_{3}\right]$, where $\varepsilon \in \mathbb{C}$ is a primitive 3-root of unity.


(i) Compute the reduced Gröbner basis of
$$
J=\left(t_{1}-\eta_{0}, t_{2}-\eta_{1}, t_{3}-\eta_{2}\right) \subset \mathbb{C}\left[x_{1}, x_{2}, x_{3}, t_{1}, t_{2}, t_{3}\right]
$$
with respect to an elimination order for $x_{1}, x_{2}, x_{3}$.


(ii) Let $f \in \mathbb{C}\left[x_{1}, x_{2}, x_{3}\right]$ be a polynomial. Show that $f$ is invariant to the cyclic permutation of variables if and only if
$$
f=\sum_{\mathbf{a}=\left(a_{0}, a_{1}, a_{2}\right)} c_{\mathbf{a}} \eta_{0}^{a_{0}} \eta_{1}^{a_{1}} \eta_{2}^{a_{2}}
$$
where $a_{1}+2 a_{2} \equiv 0 \bmod 3$ for every a such that $c_{\mathbf{a}} \neq 0$.


In part (i) you effectively express $x_1,x_2,x_3$ in terms of $\eta_0, \eta_1, \eta_2$. Namely you get $$\left[x_{1} - \frac{1}{3} t_{1} + \frac{1}{3} t_{2} \varepsilon + \frac{1}{3} t_{2} - \frac{1}{3} t_{3} \varepsilon, x_{2} - \frac{1}{3} t_{1} - \frac{1}{3} t_{2} \varepsilon + \frac{1}{3} t_{3} \varepsilon + \frac{1}{3} t_{3}, x_{3} - \frac{1}{3} t_{1} - \frac{1}{3} t_{2} - \frac{1}{3} t_{3}\right]$$ which implies $$x_1 = \tfrac{1}{3}\left(\eta_0-\eta_1\varepsilon-\eta_1+\eta_2\varepsilon\right),\quad x_2 = \tfrac{1}{3}\left(\eta_0+\eta_1\varepsilon-\eta_2\varepsilon-\eta_2\right),\quad x_3=\tfrac{1}{3}\left(\eta_0+\eta_1+\eta_2\right).$$
Hence, by substitution, a polynomial in $x_1,x_2,x_3$ can be expressed as a polynomial in $\eta_0,\eta_1,\eta_2$, say $$f(x_1,x_2,x_3) = \sum_{\boldsymbol{a}=(a_0,a_1,a_2)} c_\boldsymbol{a} \eta_0^{a_0}\eta_1^{a_1}\eta_2^{a_2}.$$
The cyclic permutation $(x_1,x_2,x_3)\mapsto(x_2,x_3,x_1)$ maps $$\eta_0 \mapsto \eta_0,\quad \eta_1 \mapsto x_2\varepsilon + x_3\varepsilon^2 + x_1 = \eta_1\varepsilon^2,\quad \eta_2 \mapsto x_2\varepsilon^2 + x_3\varepsilon + x_1 = \eta_2\varepsilon,$$ and hence $f(x_1,x_2,x_3)$ is mapped to $$f(x_2,x_3,x_1) = \sum_{\boldsymbol{a}=(a_0,a_1,a_2)} c_\boldsymbol{a}\eta_0^{a_0}\eta_1^{a_1}\eta_2^{a_2}\varepsilon^{2a_1+a_2}.$$
Finally, $f$ is invariant under the cyclic permutation exactly when $2a_1 + a_2 \equiv 0 \pmod 3$ for all $\boldsymbol{a}$. That condition is equivalent to $a_1 + 2a_2 \equiv 0 \pmod 3$. This can be seen by multiplying by the invertible constant $2 \pmod 3$, or by considering the cyclic permutation in the other direction.
