2009/3/13 Ralf Hemmecke <r...@hemmecke.de>:
>
> On 03/12/2009 09:53 PM, Bill Page wrote:
>> But why doesn't the following constitute a ValueError?
>>
>> sage: a=GF(2)(1); b=GF(5)(1); c==11
>> True
>> sage: a==c
>> True
>> sage: b==c
>> True
>> sage: a==b
>> False
>>
>> ----
>>
>> Equality isn't even transitive! This False result could easily mask a
>> simple error in the coding of some algorithm.
>
> That non-transitivity basically means that == is not an equivalence
> function. Ehm, well, on which set anyway?

You are right, == is not an equivalnce relation, which used to bother me:
sage: 1 == Integers(3)(4)
True
sage: Integers(3)(4) == 7
True
sage: 1 == 7
False



>
> Is there a function in Sage that really behaves like mathematical equality?

If you think about it, this would be rather hard to implement in
general, in terms of complexity at least.

John

>
> Ralf
>
> >
>

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

Reply via email to