Open stasti opened 2 years ago
julia> @syms a b (a, b)
julia> rr1 = @acrule ~x + 1 --> 9999 ACRule(~x + 1 --> 9999)
julia> rr2 = @acrule ~x - 1 --> 8888 ACRule(~x - 1 --> 8888)
julia> rr1(a+1) 9999
julia> rr2(a-1) nothing
Another example: julia> @syms x y (x, y) julia> r1 = @acrule sin(~x)cos(~y) + cos(~x)sin(~y) --> sin(~x + ~y) ACRule(sin(~x) cos(~y) + cos(~x) sin(~y) --> sin(~x + ~y))
julia> r2 = @acrule sin(~x)cos(~y) - cos(~x)sin(~y) --> sin(~x - ~y) ACRule(sin(~x) cos(~y) - cos(~x) sin(~y) --> sin(~x - ~y))
julia> r1(sin(x)cos(y) + cos(x)sin(y)) sin(x + y)
julia> r2(sin(x)cos(y) - cos(x)sin(y)) nothing
try this: rr2 = @acrule ~x + -1 --> 8888
rr2 = @acrule ~x + -1 --> 8888
julia> @syms a b (a, b)
julia> rr1 = @acrule ~x + 1 --> 9999 ACRule(~x + 1 --> 9999)
julia> rr2 = @acrule ~x - 1 --> 8888 ACRule(~x - 1 --> 8888)
julia> rr1(a+1) 9999
julia> rr2(a-1) nothing
Another example: julia> @syms x y (x, y) julia> r1 = @acrule sin(~x)cos(~y) + cos(~x)sin(~y) --> sin(~x + ~y) ACRule(sin(~x) cos(~y) + cos(~x) sin(~y) --> sin(~x + ~y))
julia> r2 = @acrule sin(~x)cos(~y) - cos(~x)sin(~y) --> sin(~x - ~y) ACRule(sin(~x) cos(~y) - cos(~x) sin(~y) --> sin(~x - ~y))
julia> r1(sin(x)cos(y) + cos(x)sin(y)) sin(x + y)
julia> r2(sin(x)cos(y) - cos(x)sin(y)) nothing