Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version
sage: K.<a> = NumberField(x^2 +26);K;I = K.ideal(2)
Number Field in a with defining polynomial x^2 + 26
sage: I
Fractional ideal (2)
sage: res =  I.residues()
sage: res
xmrange_iter([[0, 1], [0, 1]], <function <lambda> at 0x111a0cc08>)
sage: type(res)
<type 'instance'>

What you see from this is that I.residues, as stated in its documentation,

   Returns a iterator through a complete list of residues modulo this
   integral ideal.

An iterator is basically something you can iterate through in a loop or list. If you just do

sage: list(res)
[0, a, 1, a + 1]

you get what you expect, I think. But when you just put res then it tells you what res it, instead of looping through it or listing it - and it's an xmrange_iter Sage object, complete with a Cartesian product and a function applied to them which is the type. See

sage: xmrange_iter?

for more details. It is not really something worry about, though; just make your lists as normal.