#1163: [with patch, needs review] make assume behave more consistently and catch
inconsistent assumptions
----------------------+-----------------------------------------------------
 Reporter:  zimmerma  |       Owner:  gfurnish           
     Type:  defect    |      Status:  assigned           
 Priority:  major     |   Milestone:  sage-4.1.2         
Component:  calculus  |    Keywords:                     
 Reviewer:            |      Author:  Karl-Dieter Crisman
   Merged:            |  
----------------------+-----------------------------------------------------
Changes (by newvalueoldvalue):

 * cc: jason (added)
  * author:  => Karl-Dieter Crisman


Comment:

 The non-experimental patch resolves all but one of the issues above (about
 which more below).   It also fixes a SLEW of subtle problems and provides
 better checking in the assumptions code, and fixes a variety of doctests
 which are improvements (!) based on making assumptions better.   I didn't
 end up changing the documentation to tell people to use forget, but
 instead gave lots of examples of what Errors you get if you assume
 something redundant or inconsistent.

 The one "problem" which is still extant is the following:
 {{{
 sage: assume(x>0)
 sage: bool(x!=1)
 True
 }}}

 This is something to which Maxima replies 'unknown', which is a lot better
 than True or False.  However, Sage doesn't currently have that as an
 option (that would be a separate ticket, and not necessarily a desirable
 one).   Further, since anytime one compares a symbolic variable, e.g.
 {{{
 def func(x,y):
     if x is not y:
         do something great
     else:
         blow a gasket
 }}}
 Expression.__nonzero__ is called, we are forced to have x!=1 be True,
 since x==1 is False, seeing as != and == have opposite truth tables.  For
 an example of what can go wrong, see the change made in this patch to
 desolvers.py, where having x!=1 be False originally meant there was no
 dependent variable; this one was fixable, but the fact that symbolic
 matrices essentially all go to zero (!) after making that change was much
 worse.

 So I have left it alone after checking as many cases as I could, and we'll
 just have to live with it, unless someone can figure out how to get around
 this.  I think it's really just a conflict between wanting to say that
 x!=1 is True unless you are sure that x==1, and wanting to say that x!=1
 is False unless you are sure that x!=1; there is no nonstandard logic
 option for Python.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/1163#comment:14>
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