Evaluating a polynomial at root of unity over finite fields
Hi everyone!
I need to do some simulations for a project that I am working on. This involves the following "puzzle" which I don't know how to resolve. Your help is much appreciated.
Suppose I have a polynomial F∈Z[x]. Let p be a prime number and Fp be the reduction of F modulo p. In other words, Fp∈Fp[x]. Let n be a number relatively prime to p and ζn is an n-primitive root of unity over Fp. I want to compute the following number Fp(ζn)Fp(ζ−1n).
I searched on this website and the closest answer that I got is the following
I tried to modify this approach without success. More precisely, I do the following.
Step 1: To get Fp, I use F.change_ring(GF(p))
.
Step 2: Define K=GF(p)
and K.<w> = CyclotomicField(n)
.
Step 3: Compute F_p(w)*F_p(1/w)
It seems to me that Step 2 causes some problems. Additionally, the term 1/w also causes an issue as 1 is recognized here as an integer and not an element over Fp.
Please let me know if you have any comments or suggestions. Thank you very much!
Best wishes, Tung