Open bmyerz opened 10 years ago
Yes the following works in sympy
In [23]: And(Eq(x,y), Eq(x,y))
Out[23]: x == y
Not yet clear where the optimization belongs.
Depending on the backend, it might also support this optimization. Taking C++ as an example, however, there could be cases in the c-compiler where some expression simplifications are not recognized given the lower level of the code.
BooleanExpression
and symplify it.BooleanExpression
I'd at least like to cover cases where the parser produces things like
$0 = $1 and $0 = $1
Perhaps we can use something like Sympy