#17700: wrong symbolic results in case the answer is not known
--------------------------------+------------------------
       Reporter:  jakobkroeker  |        Owner:
           Type:  defect        |       Status:  new
       Priority:  critical      |    Milestone:  sage-6.7
      Component:  symbolics     |   Resolution:
       Keywords:                |    Merged in:
        Authors:                |    Reviewers:
Report Upstream:  N/A           |  Work issues:
         Branch:                |       Commit:
   Dependencies:                |     Stopgaps:  todo
--------------------------------+------------------------

Comment (by rws):

 The ticket is about symbolics so let's get concrete. It happens that at
 the moment I'm implementing more logic affecting
 comparisons/relations/zero tests of expressions in Pynac. The decision
 process for the logic in Sage is:

 `Expression.__nonzero__()` is called on input of `bool` but also (!)
 indirectly from Pynac for any call of `numeric::is_zero()` which is a lot
 of times. `__nonzero__` is the one that should throw an exception for
 unknown results. In `__nonzero__`,
  1. first the relations of constants are decided
  1. Pynac's `relational_to_bool` is called (`relational::safe_bool()`), it
 does:
    1. relations with one or two infinities; any result gets returned by
 `__nonzero__` right away
    1. if l.h.s - r.h.s is a Python object (other than `Expression`)
 compare it to zero, i.e., delegate to the resp. class
  1. the previous result may now get changed in case of not-equal; already
 here Maxima may be called (I think this is wrong, Maxima should always be
 the last resort)
  1. if no assumptions are needed now is time for `test_relation` which has
 some detailed logic and uses interval fields to disprove relations
 ("interval fields never return false positives"); it already has tristate
 logic by returning `NotImplemented` if unsure
  1. if the previous neither returns `True/False` return what
 `symbolic/relation.py:test_relation_maxima()` returns
    1. the relation is tested and any `True` is returned immediately
    1. simplification is attempted before returning the final `True/False`

--
Ticket URL: <http://trac.sagemath.org/ticket/17700#comment:7>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to