On Thu, Jun 12, 2014 at 12:50 AM, Marc Mezzarobba <m...@mezzarobba.net> wrote:

> But here is a similar example right from the Sage library (adapted from
> http://wiki.sagemath.org/EqualityCoercion):
>
> sage: FiniteEnumeratedSet(GF(3))
> {0, 1, 2}
> sage: add(FiniteEnumeratedSet([0,1,2]))
> 0

Um, isn't that what you want? The sum of the elements of GF(p^e) for
any odd prime is zero, which is a handy property.

>>> sage: {42, QQbar(42)}
>>> {42, 42}
>>> sage: {42, SR(42)}
>>> {42}
>>> sage: {2^100, SR(2^100)}
>>> {1267650600228229401496703205376, 1267650600228229401496703205376}
>>
>> Hash is not as good as it could/should be for large symbolic integers.
>> And for AA/QQbar.
>
> And do you honestly think this will ever be fixed for all sage objects?

For the common ones at least. And sometimes elements should not define
hash, as normalizing them is expensive, if even possible.

> Or that unexpected inconsistencies such as the above are better than
> "4/2!=2"? (After all, 4/2 and 2 *are not* equal.

Yes.

- Robert

-- 
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.

Reply via email to