How to obtain val.argument of KeySet of OrderCollection?

julia> v
(v(t))[1:2]

julia> Symbolics.value(v)
v(t)

julia> arguments(Symbolics.value(v))
1-element Vector{Any}:
 t

julia> only(arguments(Symbolics.value(v)))
t
julia> zt
3-element Vector{Num}:
 (z(t))[1]
 (z(t))[2]
 (z(t))[3]

julia> only(arguments(arguments(Symbolics.value(zt[1]))[1]))
t

I don’t use Symbolics.jl but there’s probably a better way than this, but it works. You could define a function get_farg (or whatever) and use multiple dispatch to give convenient methods for the different forms of your symbolic variables

2 Likes