Closed yewalenikhil65 closed 10 months ago
Why was this closed as completed? As far as I can see, this is still not working and in particular one cannot use it to simplify expressions in Symbolics.jl.
julia> r = @acrule(cos(-1(~x)) => 1*cos(~x))
ACRule(cos(-1 * ~x) => 1 * cos(~x))
julia> simplify(cos(a) - cos(-a),rewriter = r)
cos(a) - cos(-a)
julia> r = @rule cos(-(~x)) => cos(~x)
cos(-(~x)) => cos(~x)
julia> simplify(cos(a) - cos(-a),rewriter = r)
cos(a) - cos(-a)
arguably, these properties should be included in the standard rules, or at least there should be some mention in the docs if it is not possible to make them work.
@NilsNiggemann I was told by Symbolics code maintainer to close it since it was answered to me on slack.. I will post details how i did it as soon as possible next week and try to make a PR out of this
gives as expected
but for following, it doesn't work
gives nothing
Can any one help me to generalise this rule ?