On Dec 30, 2011 12:12 AM, "Simon King" <simon.k...@uni-jena.de> wrote: > > Hi Dima, > > On 30 Dez., 07:33, Dima Pasechnik <dimp...@gmail.com> wrote: > > On Friday, December 30, 2011 2:28:56 PM UTC+8, Dima Pasechnik wrote: > > > > > Is it legal to compare real elements of different number fields? > > It is certainly legal to compare for *equality*, provided that both > number fields are equipped with an embedding into the complex fields, > such that comparison can be done there (i.e., after coercion). > > > > E.g. on MacOSX: > > > sage: F = RealField() > > > sage: k.<i> = NumberField(x^3 +x + 1) > > > sage: F(1).abs() > 0*i > > > False > > > > > while on Linux the same code returns True (this is the reason for the bug > > > in #12208). > > Interesting. > > I think the answer "True" is wrong. > > Namely, ">" and "<" are relations, i.e., subsets of the cartesian > product of k with itself. Since k is not ordered, both subsets are > empty. Hence, I would prefer that both "F(1).abs() > 0*i" and > "F(1).abs() < 0*i" return False.
k can't be ordered in a way that preserves the field arithmetic rules. It is possible and useful to give k some other arbitrary order so things like lists of roots of polys then inherit a canonical order. > > Cheers, > Simon > > -- > 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 -- 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