Equals is not transitive in Sage. Addition (of floating point numbers) is not commutative either. And many, many other things that are different from our perfect abstractions when you try to model infinite objects in a finite machine. I definitely do not consider this a bug:
sage: K1 = GF(8,'x') sage: K2 = GF(8,'y') sage: K1(1) == K2(1) False It is because there is no "canonical coercion" (renamed now-a-days to "coercion") between K1 and K2, so there's no way to compare elements automatically. == always says false when it can't decide right now. The other option is to throw an exception, which is very painful in code. On Thu, Sep 17, 2015 at 5:38 AM, Jeroen Demeyer <jdeme...@cage.ugent.be> wrote: > This one is also fun: > > sage: K = GF(8, 'a') > sage: K(1) == ZZ(1) == QQ(1) > True This follows exactly the same rule above: in each case above there is a canonical codomain that 1 gets mapped to that can be used to compare. > sage: K(1) == QQ(1) > False There is no canonical map from K and QQ into something, so no comparison is possible. William > > > -- > You received this message because you are subscribed to the Google Groups > "sage-devel" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-devel+unsubscr...@googlegroups.com. > To post to this group, send email to sage-devel@googlegroups.com. > Visit this group at http://groups.google.com/group/sage-devel. > For more options, visit https://groups.google.com/d/optout. -- William (http://wstein.org) -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.