Understanding display of equations and computation with Symbolics.jl

I am not entirely sure what the questions are here? I haven’t answered because I’m trying to parse what you’re saying and a lot of it doesn’t make sense, so I’m just going to post what I can answer and see if that helps.

If you need them to stay scoped, then yes do that.

@variables x, y creates lines of code like x = Symbolics.variable(...). I’m not sure how else it could work. It has to create a Julia variable. There’s nothing different about them from a normal Julia variable. It just has dispatches for mathematical operations and display overrides for Latex.

That’s just Julia’s standard behavior with shadowing base variables. I just wouldn’t shadow variables exported from Base.

1 Like