> Thanks for the pointer to that ticket, which explains the change in the the > "is_unit()" behavior. > > Why should the inverse of "four" succeed when the result is not in K? > > sage: four^-1 in K > False
The order K is analogous to the ring of integers inside QQ. So even though the inverse of four exists in the number field, it's not in the order and thus four is not a unit. See http://en.wikipedia.org/wiki/Order_%28ring_theory%29 > On #12242 (a follow-on to the ticket above), David Loeffler argues that the > following is the wrong behavior, and that the last command should raise an > error. > > sage: K.<a> = NumberField(x^2 - x - 1); OK = K.ring_of_integers() > sage: OK(12).divides(OK(13)) > True > sage: OK(12) // OK(13) > 12/13 Again, it's a question of where the arithmetic is taking place. The issue is that 12/13, while an element of K, is not in OK. David -- -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org