Ask Your Question
0

On power residue symbol

asked 2023-11-05 09:12:56 +0200

Ys1123 gravatar image

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 )

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2023-11-05 19:18:02 +0200

Max Alekseyev gravatar image

updated 2023-11-23 14:44:44 +0200

UPDATED. Per clarifications from DaveWitteMorris the code should use not a.is_zero() instead of a not in P, and a.parent().lift_map()(a) instead of K(a):

def new_residue_symbol(a,P,N):
    Ka = a.parent().lift_map()(a)
    return Ka.residue_symbol(P,N) if not a.is_zero() else 0
edit flag offensive delete link more

Comments

I reported https://github.com/sagemath/sage/issues/36734 (there), but that’s not a bug.

Ys1123 gravatar imageYs1123 ( 2023-11-21 07:14:07 +0200 )edit

I see.. You can post a corrected code here as an answer to your own question, to save it for future references. I'll then remove mine.

Max Alekseyev gravatar imageMax Alekseyev ( 2023-11-21 13:03:57 +0200 )edit

If you don’t mind, you can edit your answer with some description. Your answer will be better than mine :).

Ys1123 gravatar imageYs1123 ( 2023-11-22 06:44:40 +0200 )edit

@Ys1123: Done!

Max Alekseyev gravatar imageMax Alekseyev ( 2023-11-23 14:45:31 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2023-11-05 09:12:56 +0200

Seen: 111 times

Last updated: Nov 23 '23