#1163: assume seems to have some undesired side-effects
----------------------+-----------------------------------------------------
 Reporter:  zimmerma  |       Owner:  gfurnish  
     Type:  defect    |      Status:  assigned  
 Priority:  major     |   Milestone:  sage-4.1.2
Component:  calculus  |    Keywords:            
 Reviewer:            |      Author:            
   Merged:            |  
----------------------+-----------------------------------------------------

Comment(by kcrisman):

 A very interesting exchange on the Maxima list indicates that Maxima isn't
 so much at fault as Sage's use of it, even in the sketchy-looking cases.
 This is Robert Dodier's response:
 {{{
 Well, it's true that assume isn't very strong, but at least Maxima
 seems to be able to figure out these examples.
 What you want is equal(x, z) instead of x = z.
 "=" is essentially identity (i.e. are the left and right-hand sides
 the same expression), while equal is equivalence (equal value).
 Likewise the distinction between "#" and notequal.

 Here's what I get with Maxima 5.19.2.

 (%i2)  assume(x>=y,y>=z,z>=x);
 (%o2)                      [x >= y, y >= z, z >= x]
 (%i3) is(equal(x,z));
 (%o3)                                true
 (%i4) assume(a>=1,1>=a);
 (%o4)                          [a >= 1, a <= 1]
 (%i5) is(equal(a,1));
 (%o5)                                true
 (%i6) assume(b>1);
 (%o6)                               [b > 1]
 (%i7) is(equal(b,1));
 (%o7)                                false
 (%i8) is(notequal(b,1));
 (%o8)                                true

 I think %o3, %o5, %o7, and %o8 are all as expected, right?
 }}}

 So the real issue is that Sage's "==" is more at Maxima's equal(), while
 Sage's "is" is more at Maxima's "=".  Fixing this will probably require
 some interesting futzing with the Maxima parser, though, since usually we
 want == to become =, I think.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/1163#comment:10>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to