-
-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wrong symbolic results in case the answer is not known #17700
Comments
comment:2
Thanks for opening this ticket! I think this is a huge problem in Sage symbolics. I can't remember what I did to change the behaviour so that when a comparison is made and the result can't be determined it raises an exception instead of returning I like the idea of having a three-valued logic (https://en.wikipedia.org/wiki/Three-valued_logic); unfortunately Python makes this very difficult, as the |
comment:3
I'll gladly do a review of this ticket. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:6
Btw., also the coercion framework occasionally leads to "surprising" results (because silently |
comment:7
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:
EDIT: |
comment:8
In pynac/pynac#80 we implement multistate for item 2 above. The Sage part raises a |
Dependencies: pynac-0.3.9.3/-0.4.3 |
comment:9
The second issue this ticket depends on concerns the Maxima interface in item 5. There is e.g.:
because in Maxima
so the 'false' result should raise a Moreover, trying to snatch this decision functionality from Maxima presupposes an independent assumption framework. EDIT: I is %i in Maxima |
comment:11
I started doing some work on this. Since Sage already has an |
comment:12
Great. See also #19040. |
A failing example is taken from
http://ask.sagemath.org/question/10388/testing-inequalities-in-sage/
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
Dependencies: pynac-0.3.9.3/-0.4.3
CC: @eviatarbach @sagetrac-tmonteil @slel @videlec
Component: symbolics
Stopgaps: todo
Issue created by migration from https://trac.sagemath.org/ticket/17700
The text was updated successfully, but these errors were encountered: