Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question
0

How to compute the sums of squares of elements of a quotient ring?

asked 6 years ago

Llew gravatar image

updated 4 years ago

FrédéricC gravatar image

Hi,

I'm new to Sage, and I would like to be able to test, given some q, whether p(t)Fq[t]/(f)p2(t)=kmod(f) for some fixed fFq[t] and kFq.

I can get as far as (for q=3 and f=x2+1):

sage:    R = PolynomialRing(GF(3),'x'); x = R.gen()
sage:    S = R.quotient(x^2 + 1)

But I'm not sure how to sum over all the elements of the quotient ring, let alone their squares.

Any hints?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered 6 years ago

rburing gravatar image

updated 6 years ago

You can do it like this (also simplifying the notation a bit):

sage: R.<x> = PolynomialRing(GF(3))
sage: S.<i> = R.quotient(x^2 + 1)
sage: sum(p^2 for p in S)
0

We can explain the result (for this choice of f) as follows: p(i)=a+bi implies p(i)2=a2b2+2abi and the sum runs over all a and b, so the "real part" of the sum is a,ba2b2=aa2bb2=0, and the "imaginary part" is a,b2ab=a,bab+a,bab=a,bab+a,b(a)b=a,babab=0.

Preview: (hide)
link

Comments

1

Thank you, that is very helpful.

Llew gravatar imageLlew ( 6 years 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

Stats

Asked: 6 years ago

Seen: 410 times

Last updated: Mar 12 '19