Ask Your Question

# Revision history [back]

### Interpreting an element of CyclotomicField as an element of polynomial ring

I am trying to write a function that sums up numbers in different cyclotomic field formally, i.e., as expressions in $z$ where $z$ is the corresponding primitive root of unity. I run into a type error, however, as sage wouldn't let me sum elements of two different cyclotomic fields. Is there a way to typecast an expression in one cyclotomic field into the other, or, better yet, to a polynomial ring?

 2 retagged tmonteil 19318 ●22 ●137 ●360 http://wiki.sagemath.o...

### Interpreting an element of CyclotomicField as an element of polynomial ring

I am trying to write a function that sums up numbers in different cyclotomic field formally, i.e., as expressions in $z$ where $z$ is the corresponding primitive root of unity. I run into a type error, however, as sage wouldn't let me sum elements of two different cyclotomic fields. Is there a way to typecast an expression in one cyclotomic field into the other, or, better yet, to a polynomial ring?