On 03/14/2009 02:26 AM, Robert Bradshaw wrote:
> On Mar 13, 2009, at 1:09 PM, John Cremona wrote:
> 
>> 2009/3/13 Ralf Hemmecke <r...@hemmecke.de>:
>>
>>> 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.
> 
> Indeed, it is hard to nail down what one means by equality. For  
> example, is R[x] equal to R[y]. What about the commutative rings R 
> [x,y] and R[y,x]. What about sparse R[x] vs. dense R[x]. Do you  
> consider all vector spaces over K of the same dimension equal, or do  
> they have to have a specified basis? Nailing down questions like  
> these is unclear.

As I said, different type/parent must lead to a==b returning false.

If you implement R[x] different from R[y] then no element from R[x] can 
be equal to an element from R[y]. If you implement R[x] and R[y] as just 
finite sequences over R then there is only one type and elements compare 
as the would as finite sequences. Now whether u==v for u\in R[x] and 
v\in R[y] returns true or false must clearly be written in the 
specification of the domain R[.].

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