Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question
0

On power residue symbol

asked 1 year ago

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 )

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 1 year ago

Max Alekseyev gravatar image

updated 1 year ago

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
Preview: (hide)
link

Comments

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

Ys1123 gravatar imageYs1123 ( 1 year ago )

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 ( 1 year ago )

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

Ys1123 gravatar imageYs1123 ( 1 year ago )

@Ys1123: Done!

Max Alekseyev gravatar imageMax Alekseyev ( 1 year ago )

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: 1 year ago

Seen: 207 times

Last updated: Nov 23 '23