Opened 4 years ago
Last modified 20 months ago
#18883 needs_work defect
use Pynac for some symbolic comparisons instead of Maxima
Reported by:  rws  Owned by:  

Priority:  major  Milestone:  sage8.2 
Component:  symbolics  Keywords:  
Cc:  Merged in:  
Authors:  Ralf Stephan  Reviewers:  
Report Upstream:  N/A  Work issues:  
Branch:  u/rws/use_pynac_for_some_symbolic_comparisons_instead_of_maxima (Commits)  Commit:  18c27680eace1c3ac6933a912817a8822d4311d7 
Dependencies:  #22219  Stopgaps: 
Description
This:
sage: bool(exp(x)>=0) True
unexpectedly uses Maxima, and gets it wrong, too (the already known complex domain problem, see e.g. #14305).
Since Pynac can now assign info flags to function expressions the possible cases for abs
, factorial
, binomial
, real
, imag
, step
should be implemented in Pynac (this is https://github.com/pynac/pynac/issues/78) and the cases like above handled in Pynac.
The repercussions are not limited to such comparisons. The more expressions have info flags set the more expressions with more complicated structure can be decided and more questions answered.
Change History (14)
comment:1 Changed 4 years ago by
comment:2 Changed 4 years ago by
 Summary changed from use Pynac for symbolic comparison instead of Maxima to use Pynac for some symbolic comparisons instead of Maxima
comment:3 Changed 4 years ago by
 Branch set to pynac0.4.3
 Report Upstream changed from N/A to Fixed upstream, in a later stable release.
comment:5 Changed 3 years ago by
 Report Upstream changed from Fixed upstream, in a later stable release. to Reported upstream. Developers acknowledge bug.
This was NOT fixed as claimed in the ticket field.
comment:6 Changed 3 years ago by
 Branch set to u/rws/use_pynac_for_some_symbolic_comparisons_instead_of_maxima
comment:7 Changed 3 years ago by
 Commit set to 5abe68e0989b84c6ddb46dd5209aa53307279266
 Dependencies set to pynac0.7.4
This commit enables all Pynac relational logic improvements and only falls back on Maxima if Pynac returns Not Implemented.
New commits:
5abe68e  18883: take advantage of more finegrained logic results from Pynac

comment:8 Changed 3 years ago by
To fix the Maximarelated problem, as a solution to the complex/real domain issue is not expected it might be possible to use only Pynac with relations, and use both with equality questions.
comment:9 Changed 3 years ago by
If Pynac should take over all questions on relations then it must be able to also answer this:
sage: (x > 2).assume() sage: bool(x > 0) True
because it's impossible do separate domainonly questions from more general ones. That means the workaround mentioned in comment:8 depends on https://github.com/pynac/pynac/issues/227
comment:10 Changed 3 years ago by
 Commit changed from 5abe68e0989b84c6ddb46dd5209aa53307279266 to 18c27680eace1c3ac6933a912817a8822d4311d7
Branch pushed to git repo; I updated commit sha1. New commits:
18c2768  18883: depend on Pynac handling all inequalities

comment:11 Changed 3 years ago by
 Dependencies changed from pynac0.7.4 to #22219
 Milestone changed from sage6.8 to sage7.6
 Report Upstream changed from Reported upstream. Developers acknowledge bug. to N/A
 Status changed from new to needs_review
comment:12 Changed 22 months ago by
 Milestone changed from sage7.6 to sage8.2
comment:13 Changed 20 months ago by
 Status changed from needs_review to needs_work
comment:14 Changed 20 months ago by
Lots of doctest errors. Back to the drawing board.
Turns out that, additionally, an explicit
nonzero
info flag is needed in Pynac because without anonzero
flag the above test in the reals is always delegated to Maxima, as well. https://github.com/pynac/pynac/issues/79EDIT: remove nonsense