| 1 | initial version |
Roots of unity are best defined as generator of the cyclotomic field. That is, a good start for your code would be
F.<w> = CyclotomicField(q)
TwoPolyRing.<t> = F[]
and then you don't need to worry about the relation w^q - 1 as it automatically holds for w.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.