ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 11 Mar 2019 21:07:03 -0500How to compute the sums of squares of elements of a quotient ring?http://ask.sagemath.org/question/45767/how-to-compute-the-sums-of-squares-of-elements-of-a-quotient-ring/ Hi,
I'm new to Sage, and I would like to be able to test, given some $q$, whether $$\sum_{p(t) \in \mathbb{F}_{q}[t]/(f)}^{}{p^2(t)}=k \bmod (f)$$
for some fixed $f \in \mathbb{F}_q [t]$ and $k \in \mathbb{F}_q$.
I can get as far as (for $q=3$ and $f=x^2+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?
LlewMon, 11 Mar 2019 21:07:03 -0500http://ask.sagemath.org/question/45767/