#17700: wrong symbolic results in case the answer is not known
--------------------------------+------------------------
Reporter: jakobkroeker | Owner:
Type: defect | Status: new
Priority: critical | Milestone: sage-6.5
Component: symbolics | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps: todo
--------------------------------+------------------------
Description changed by jakobkroeker:
Old description:
> A failing example is taken from
>
> http://ask.sagemath.org/question/10388/testing-inequalities-in-sage/
> {{{
>
> var('a','b')
> bool( abs(a+b) <= abs(a) + abs(b) ) # False, expected True or 'Unknown'
> assert (not False == bool( abs(a+b) <= abs(a) + abs(b) ) ) #fails
> }}}
>
> see also discussion at
> https://groups.google.com/d/msg/sage-devel/vNxnHSeRBW4/0OpeL0yv9YUJ
>
> In that thread the exception variant is preferred in case of 'don't know'
>
> Please also take into consideration Tristate variants
> ( A sandbox for a Tristate class:
> https://github.com/jakobkroeker/Tristate.py )
>
> See also https://groups.google.com/forum/?hl=en#!topic/sage-
> devel/4DUsgt670MA
New description:
A failing example is taken from
http://ask.sagemath.org/question/10388/testing-inequalities-in-sage/
{{{
var('a','b')
bool( abs(a+b) <= abs(a) + abs(b) ) # False, expected True or 'Unknown'
assert (not False == bool( abs(a+b) <= abs(a) + abs(b) ) ) #fails
}}}
The documentation of bool() says "Returns True when the argument x is
true, False otherwise."
Formally this includes returning False in case the answer is unknown and
it seems
that bool() was specified to behave like it does. But I find that is very
unfortunate
and even improving the documentation (explicitly mention the 'answer is
unknown' case) is not sufficient.
see also discussion at
https://groups.google.com/d/msg/sage-devel/vNxnHSeRBW4/0OpeL0yv9YUJ
In that thread the exception variant is preferred in case of 'don't know'
Please also take into consideration Tristate variants
( A sandbox for a Tristate class:
https://github.com/jakobkroeker/Tristate.py )
See also https://groups.google.com/forum/?hl=en#!topic/sage-
devel/4DUsgt670MA
--
--
Ticket URL: <http://trac.sagemath.org/ticket/17700#comment:5>
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.