1 | initial version |
An alternative way to think about the problem, shifting the solution on the mathematical side, is as follows. I will denote by $g$ the given polynomial with integer coefficients (instead of $F$), and by $\Bbb F=\Bbb F_p$ the field with $p$ elements. Let $\Phi_n$ be the $n$.th cyclotomic polynomial. So instead of $\zeta_n$, seen as an element of the field $\Bbb Q(\zeta_n)$ we will work with a variable $w$, seen as an element of the field $K=\Bbb Z(w)=\Bbb Z[W]/(\Phi_n(W))$, constructed as quotient of the polynomial ring in $W$, and $w$ is the class of $W$ modulo the ideal $J$ generated by $\Phi_n(W)$. We can build then $g(W)g(W^{n-1})$ as an element in the polynomial ring $\Bbb Z[W]$, then consider $g(w)g(w^{n-1})=g(w)g(w^{-1})$ by working in $\Bbb Z[W]$ modulo $J$. Now we pass to the quotient modulo $p$. This could have been done also earlier, sooner or later, we work in the ring $$ R = \Bbb Z[W]/(\Phi_n(W),\ p) = \Bbb Z[W]/p/(\Phi_n(W)) = \Bbb F_p[W]/(\Phi_n(W)) $$ The question tacitly assumes that the result does not depend on $W$. Let's see if this is the case in some example with $p=5$ and $n=2022$, my sample polynomial is $W+1$:
p, n = 5, 30
R.<W> = PolynomialRing(GF(p))
g = W + 1
Q.<w> = R.quotient(cyclotomic_polynomial(n)(W))
g(w) * g(w^(n-1))
I'm getting
4*w^7 + 4*w^6 + w^4 + w^3 + w^2 + w + 1
(I hope i have correctly understood the algebraic situation... do not see the reason why some corresponding Galois automorphisms in $w$ should invariate the expression $g(W)g(W^{-1})$ for a general $g$.)