Ask Your Question

Revision history [back]

It is fairly straightforward once you know Sage standards

sage: K = CyclotomicField(9)
sage: O = K.ring_of_integers()
sage: zeta9 = O.gen(1)

At this point you have three objects defined in the console/notebook: the cyclotomic field K, its ring of integers O and the generator zeta9. Now you can defined ideals and quotients as follows.

sage: I = O.ideal(3*zeta9^2 + 2*zeta9^3 + 5)
sage: R = O.quotient(I, 'a')

note: I am not sure why, but the arguemnt 'a' is mandatory in the method quotient.

To check equality modulo I just do it in the quotient

sage: R(3*zeta9^2 + 7) == R(2 - 2*zeta9^3)
True
sage: R(zeta9) == R(2)
False

Vincent