[sage-devel] Re: Is Sage implementing mathematics?

2009-03-15 Thread Nicolas M. Thiery
On Fri, Mar 13, 2009 at 07:52:13PM -0700, William Stein wrote: This is ridiculous. If we made a==b true only if parent(a) == parent(b), we would get nonstop complaints and confusion from users, and would be doing something different and massively more *pedantic* than every other math

[sage-devel] Re: Is Sage implementing mathematics?

2009-03-14 Thread William Stein
On Fri, Mar 13, 2009 at 9:43 PM, Bill Page bill.p...@newsynthesis.org wrote: On Fri, Mar 13, 2009 at 11:02 PM, Craig Citro wrote: Indeed, even Python agrees: Python 3.0 (r30:67503, Jan 23 2009, 04:39:45) [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2 Type help, copyright, credits or

[sage-devel] Re: Is Sage implementing mathematics?

2009-03-14 Thread Bill Page
On Fri, Mar 13, 2009 at 9:43 PM, Bill Page wrote: Not that this really has much to do with computer algebra or mathematics per se, but I am curious if anyone can find a situation in pure Python (i.e. using only the standard Python library definitions for == ) that gives the following

[sage-devel] Re: Is Sage implementing mathematics?

2009-03-14 Thread Simon King
Hi! On Sat, Mar 14, 2009 at 3:38 AM, William Stein wrote: teragon:papers wstein$ sage -python Python 2.5.2 (r252:60911, Mar 12 2009, 23:58:30) [GCC 4.0.1 (Apple Inc. build 5488)] on darwin Type help, copyright, credits or license for more information. a = 10**22; b = 10**22+1; c =

[sage-devel] Re: Is Sage implementing mathematics?

2009-03-14 Thread Martin Rubey
Simon King k...@mathematik.uni-jena.de writes: Since the topic now changed into is Sage implementing Mathematics: IMHO it is frankly impossible for *any* CAS to implement a mathematically meaningful notion of == that is both useful and rigorous. This is certainly not true. The point is

[sage-devel] Re: Is Sage implementing mathematics?

2009-03-14 Thread Simon King
Dear Martin, On 14 Mrz., 16:08, Martin Rubey martin.ru...@math.uni-hannover.de wrote: IMHO it is frankly impossible for *any* CAS to implement a mathematically meaningful notion of == that is both useful and rigorous. This is certainly not true.  The point is that you have to make

[sage-devel] Re: Is Sage implementing mathematics?

2009-03-14 Thread Bill Page
Martin Rubey wrote: I must admit that I do not understand (yet) how Sage works here, but I thought it would define equality separately for every parent. Doesn't it, or did I miss something? On Sat, Mar 14, 2009 at 1:25 PM, Simon King wrote: ... yes, Sage does. But I wanted to point out

[sage-devel] Re: Is Sage implementing mathematics?

2009-03-13 Thread John Cremona
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

[sage-devel] Re: Is Sage implementing mathematics?

2009-03-13 Thread Ralf Hemmecke
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. It is easier than you think. x==y gives true if and only if y is the same object as x (basically memory

[sage-devel] Re: Is Sage implementing mathematics?

2009-03-13 Thread Robert Bradshaw
On Mar 13, 2009, at 2:00 PM, Ralf Hemmecke wrote: 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. It is easier than you think. x==y gives true if and

[sage-devel] Re: Is Sage implementing mathematics?

2009-03-13 Thread Robert Bradshaw
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

[sage-devel] Re: Is Sage implementing mathematics?

2009-03-13 Thread Ralf Hemmecke
Of course, then QQ(1)==ZZ(1) would return false. But I really don't see a problem with that. I would find that super inconvenient. Well, maybe later you'll appreciate my suggestion a bit more. How about parent(a) == parent(b) and a == b (of course a==b also must have

[sage-devel] Re: Is Sage implementing mathematics?

2009-03-13 Thread William Stein
On Fri, Mar 13, 2009 at 7:06 PM, Ralf Hemmecke r...@hemmecke.de wrote: Of course, then QQ(1)==ZZ(1) would return false. But I really don't see a problem with that. I would find that super inconvenient. Well, maybe later you'll appreciate my suggestion a bit more. How about parent(a) ==

[sage-devel] Re: Is Sage implementing mathematics?

2009-03-13 Thread Craig Citro
This is ridiculous.  If we made a==b true only if parent(a) == parent(b), we would get nonstop complaints and confusion from users, and would be doing something different and massively more *pedantic* than every other math software system I have ever used. Indeed, even Python agrees:

[sage-devel] Re: Is Sage implementing mathematics?

2009-03-13 Thread Robert Bradshaw
On Mar 13, 2009, at 6:54 PM, Ralf Hemmecke wrote: 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,

[sage-devel] Re: Is Sage implementing mathematics?

2009-03-13 Thread Robert Bradshaw
On Mar 13, 2009, at 7:52 PM, William Stein wrote: On Fri, Mar 13, 2009 at 7:06 PM, Ralf Hemmecke r...@hemmecke.de wrote: Of course, then QQ(1)==ZZ(1) would return false. But I really don't see a problem with that. I would find that super inconvenient. Well, maybe later you'll