I have something simple that there seems to be no answer anywhere. I make a symbolic function and none of the re-writing rules work on it.
using SymbolicUtils
using Symbolics
using Latexify
using Plots
using LaTeXStrings
using SymbolicUtils.Rewriters
@variables x t Tinv(..)
test = Tinv(x)
r = @rule Tinv(~a) => ~a/2
r2 = @rule Tinv(~~a) => ~~a/2
r(test) #returns nothing
r(Symbolics.value(test)) #returns nothing
r(test.val) #returns nothing
r2(test) #returns nothing
r2(Symbolics.value(test)) #returns nothing
r2(test.val) #returns nothing
simplify(test, rewriter=r) # returns test unmodified
simplify(test.val, rewriter=r) # returns test unmodified
simplify(Symbolics.value(test), rewriter=r) #returns test unmodified
#similar when using r2
So what’s the issue and why isn’t there compatibility with the SymbolicUtils.jl rewriting functions?