Open bingao opened 2 months ago
I think the missing building block to check for equality of structurally different expressions are functions related to simplification. It is "just" a matter of someone e.g. porting some of the simplification routines present in sympy to SymEngine.
Relates issue:
EDIT: for this expression it might be possible to use cancel
to canonicalize the rational function so that it auto-simplifies?
https://github.com/symengine/symengine/blob/master/symengine/tests/polynomial/test_cancel.cpp
If not you can see if there's anything missing in the implementation here compared to cancel
from sympy's polytools
module.
Thank you @bjodah cancel
is a solution. But my code indeed compares elements of two 2x2 matrices, I have to use cancel
for each element and compare their denominators and numerators. It works but maybe a simplification function as you suggested will be better.
Hi.
I encountered an error when I tried to compare if two symbolic values are equal. They are expressed as $\frac{-x}{1-(y-z)}$ and $\frac{x}{(y-z)-1}$, which should be equal. But in the following code, the Boolean variable
is_eq
isfalse
.Any suggestion? Is it a bug? Thank you.