-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
Structural comparison of expressions #24236
Comments
Author: Ralf Stephan |
Commit: |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:4
Thanks for implementing this! A quick question: is this strictly equivalent to |
comment:5
One case is:
When I tried to construct another I found a segfault:
which is fixed in the next commit. Nice question! It turns out this gives True as well. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:7
So to answer your question, no, except for objects that can't be subtracted the result is the same, and for those objects the answer is now correct. |
comment:8
LGTM. Thanks! One last question: |
Reviewer: Eric Gourgoulhon |
comment:9
Replying to @egourgoulhon:
Yes, it's a tree walk in C++ that returns as soon as a difference in the tree is seen. |
Changed branch from u/rws/structural_comparison_of_expressions to |
In many cases it is not necessary to prove equality of expressions but just check structural identity. An undocumented trick for doing this is
(ex1-ex2).is_trivial_zero()
. This ticket implements a well visible member function for this task.Component: symbolics
Author: Ralf Stephan
Branch/Commit:
5955d56
Reviewer: Eric Gourgoulhon
Issue created by migration from https://trac.sagemath.org/ticket/24236
The text was updated successfully, but these errors were encountered: