JuliaSymbolics / Metatheory.jl

Makes Julia reason with equations. General purpose metaprogramming, symbolic computation and algebraic equational reasoning library for the Julia programming language: E-Graphs & equality saturation, term rewriting and more.
https://juliasymbolics.github.io/Metatheory.jl/dev/
MIT License
356 stars 47 forks source link

OddEvenAnalysis in the docs is implemented incorrectly #146

Closed xitology closed 1 year ago

xitology commented 1 year ago

OddEvenAnalysis incorrectly assumes that multiplication by an odd number makes the result odd. It is even demonstrated in the very first test case:

custom_analysis(:(3*a)) # :odd

However 3*a could be either even or odd depending on the value of a.

0x0f0f0f commented 1 year ago

Thanks. I'm currently very busy. If you have the time to open a MR targeting the 2.0 branch I'd be super grateful. Thanks