Multiplication over a cyclotomic field in terms of polynomials over the generators.

152 Views Asked by At

I'm currently experimenting with multiplication over cyclotomic fields with SageMath. Say we take the example $K=\mathbb{Q}(\zeta_8)$. Then taking the generator of the field as $z$, we define this in Sage as

sage: K.<z>=CyclotomicField(8)

If I take linear combinations of polynomials over the generator $z$ for specific numbers, Sage will perform the multiplication and output a polynomial in terms of the $z$-basis, e.g.

sage: 4*(1+z)
4*z + 4
sage: (1-z)*(4+z^2)
-z^3 + 5*z + 6

However, when using symbolic variables Sage will perform multiplication over the general complex domain instead of outputting the answer in terms of the $z$-basis. For example:

sage: var('x0 x1 x2 x3')
(x0, x1, x2, x3)
sage: x1*z
(1/2*I + 1/2)*sqrt(2)*x1

I have tried forcing Sage to assume the symbols are rationals but this doesn't seem to work. Maybe I'm just being stupid, but how do I get Sage to perform multiplication over symbolic variables in terms of the basis for the field?

1

There are 1 best solutions below

4
On BEST ANSWER

Try something like

K.=CyclotomicField(8)

R=PolynomialRing(K,'t')

t=R.0

(z*t)^8

I get t^8 for the answer.