On power residue symbol
I computed sum of power residue symbol in N
th cyclotomic field:
def new_residue_symbol(a,P,N):
if a not in P:
return K(a).residue_symbol(P,N)
else:
return 0
N=3
K.<z>=CyclotomicField(N)
p=5
P =(K.ideal(p).factor())[0][0]#P is prime ideal above p
sum(new_residue_symbol(a,P,N) for a in P.residue_field())
This must be $0$ but sage put error typeerror: unable to convert 0 to Cyclotomic Field of order 3 and degree 2
. How can I fix this?
(When you change $p=7$, then sage put $0$. This might be lifting problem of representatives of residue field )