Symbolics istree returning false when there is a tree

The issue is TermInterface.jl/TermInterface.jl at 91f77ff2babaaad22a6a2a0c6adbb6a2b7ccb149 · JuliaSymbolics/TermInterface.jl · GitHub combined with

istree(x::Num) = istree(ModelingToolkit.unwrap(x))

or equivalent not being defined anywhere.

If you call

istree(ModelingToolkit.unwrap(D(x)))

it works.

Seems like this is a missing dispatch in Symbolics.

1 Like