On 4/4/07, Kyle Schalm <[EMAIL PROTECTED]> wrote: > perhaps there's been a discussion about this that i didn't pay attention > to, but i just realized that equality (==) is not always transitive: > > In [109]: mod(2,5)==mod(2,10) > Out[109]: True > > In [110]: mod(2,5)==mod(7,10) > Out[110]: True > > In [111]: mod(2,10)==mod(7,10) > Out[111]: False > > what is the rationale for this?
I'm not sure what to say except: (1) the definition of equality in SAGE is "equal images under a canonical map", (2) both MAGMA and PARI are the same way regarding equality not being transitive: sage: magma.eval('Integers(5)!2 eq 2') 'true' sage: magma.eval('Integers(10)!2 eq 2') 'true' sage: magma.eval('Integers(5)!2 eq 7') 'true' sage: magma.eval('2 eq 7') 'false' sage: gp.eval('Mod(2,5) == 2') '1' sage: gp.eval('Mod(2,5) == 7') '1' sage: gp.eval('2 == 7') '0' William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---