First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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

sage: R.<x> = PolynomialRing(GF(3))
sage: S.<t> = R.quotient(x^2 + 1)
sage: sum(p^2 for p in S)
0
click to hide/show revision 2
No.2 Revision

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

sage: R.<x> = PolynomialRing(GF(3))
sage: S.<t> 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.