It really bothers me that "less than" comparisons are allowed without transitivity. I understand the benefits of being able to "sort" output, and transitivity is essential for that. [a different school promotes to randomize the order of output whenever there is no inherent order to the answer. It discourages careless programming style. However, the automated testing in sage is such a benefit that it's probably worth it] Being able to sort the pickle jar is probably one of the most outlandish things one might try, so I was hoping that in more restricted domain, life might still be good. Unfortunately it already goes wrong for elements of number fields:
P.<x>=Rationals()[] def h(): while true: while true: f=P.random_element() if f != 0: break f=f/f.leading_coefficient() if f.is_irreducible(): K.<g>=NumberField(f) return K.random_element() L=[h() for i in [1..100]] L.sort() #any pairs printed here are not in order and hence show failure of transitivity #there's usually a bunch of them. [[i,j] for j in [1..len(L)-1] for i in range(j) if L[i]> L[j]] The notebook with auto-indent and block-indent is nearly ideal by now, by the way. A pleasure to work with. --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---