Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Your original question was (I think) about how to get a module basis for an order. The output format seems to have changed since the book from which you quote was written, but it is still possible:

sage: K.<a> = QuadraticField(5)
sage: OK = K.ring_of_integers(); OK
Maximal Order in Number Field in a with defining polynomial x^2 - 5
sage: OK.basis()
[1/2*a + 1/2, a]

The last line gives a Z-basis for OK.

I don't know what you are asking in the follow-up question. Can you explain?