1 | initial version |
Perhaps, the easiest approach would be extending $GF(p)$ with $zeta_n$ - like in the following example, where z
stands for $zeta_n$:
p, n = 7, 5
Fp.<x> = GF(p)[]
K.<z> = GF(p).extension(cyclotomic_polynomial(n))
f = x^2 + x + 1
print( f(z)*f(1/z) )
2 | No.2 Revision |
Perhaps, the easiest approach would be extending $GF(p)$ with $zeta_n$ $\zeta_n$ - like in the following example, where z
stands for $zeta_n$:$\zeta_n$:
p, n = 7, 5
Fp.<x> = GF(p)[]
K.<z> = GF(p).extension(cyclotomic_polynomial(n))
f = x^2 + x + 1
print( f(z)*f(1/z) )