Symbolic rewriter rules for symbolic functions

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?

It’s just a current issue. I believe someone has already recently opened an issue for it. It just needs bodies.

Got it. I’ll try to find the issue on github and see where it’s at.