-
-
Notifications
You must be signed in to change notification settings - Fork 489
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
Don't call Maxima with no-variable symbolic relation tests #24658
Comments
New commits:
|
This comment has been minimized.
This comment has been minimized.
Commit: |
Author: Ralf Stephan |
comment:5
It should be easy to review (after all, it is just working around a short-coming of maxima), and to me it looks good. However, I do not feel particularly confident about symbolic expressions (which I normally try to avoid by all means). Also, I wonder about that change: diff --git a/src/sage/symbolic/expression.pyx b/src/sage/symbolic/expression.pyx
index 7130898..0f943d9 100644
--- a/src/sage/symbolic/expression.pyx
+++ b/src/sage/symbolic/expression.pyx
@@ -2612,7 +2612,7 @@ cdef class Expression(CommutativeRingElement):
The :meth:`~sage.structure.element.Element.is_zero` method
is more capable::
- sage: t = pi + (pi - 1)*pi - pi^2
+ sage: t = pi + x*pi + (pi - 1 - x)*pi - pi^2
sage: t.is_trivial_zero()
False
sage: t.is_zero() Why did you change it? Apparently in order to have a variable in it. So, without the variable, |
comment:6
PS: Also I think that in the new test |
comment:7
Replying to @simon-king-jena:
Because getting what we want (avoid Maxima numeric) and keeping the doctest would need more involved code, basically checking if there are constants, if so substituting them for variables, and then calling Maxima with that. Note that the changed result is not wrong so I'll add it again. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:9
Replying to @simon-king-jena:
No |
comment:10
Hm. If I understand correctly, the underlying bug is in Maxima's test for positivity/negativity. Is there a corresponding bug in Maxima's test for being zero as well? If it isn't, then I guess one should return to using Maxima for |
comment:11
Or, alternatively,
Thus, we have a real number (it is not !NaN) that is neither positive nor negative, and thus it would make sense to treat it as zero, although RIF is careful enough to not assert that it actually is zero. Or prepend it by a simplification?
After all, presumably |
comment:12
Replying to @simon-king-jena:
Your own example (
That is probably best. One can always construct cases that need long time like |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:14
OK, this looks fine in symbolics, there may be failing doctests elsewhere. |
comment:15
There is a doctest in manifolds that relies on |
comment:16
Maxima cannot simplify |
Dependencies: #24668 |
comment:17
The new Pynac has the atanh simpifications and so we depend on that upgrade to fix the manifolds doctest fail. |
comment:18
This one is serious because it does happen only when doctesting, and
It goes away if I replace |
comment:19
Got it, it comes from the doctest |
comment:20
Replying to @rwst:
|
comment:21
I meant to write |
comment:27
The manifolds test passes now so we trigger the sleeping patchbots. |
comment:30
Ticket retargeted after milestone closed (if you don't believe this ticket is appropriate for the Sage 8.8 release please retarget manually) |
comment:31
Moving tickets from the Sage 8.8 milestone that have been actively worked on in the last six months to the next release milestone (optimistically). |
comment:32
Ticket retargeted after milestone closed |
comment:33
Moving tickets to milestone sage-9.2 based on a review of last modification date, branch status, and severity. |
Reviewer: Simon King, Matthias Koeppe |
comment:34
This is a clear improvement. |
Changed branch from u/rws/24658 to |
In the case a relation without variables is to be decided, the procedure is to use Pynac, then RIF and, if it cannot be decided, Maxima. This is fine with expressions containing variables as Maxima can do some proofs. Expressions without variables are handled poorly as the example shows:
This ticket changes the procedure to no longer try the unreliable Maxima after RIF has failed in a relation without variables. It will just return False.
CC: @simon-king-jena
Component: symbolics
Author: Ralf Stephan
Branch/Commit:
e78e84b
Reviewer: Simon King, Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/24658
The text was updated successfully, but these errors were encountered: