-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
def= or equivalent. Way to define an equation for use and display #75
Comments
Excuse my clueless questions :) but what is a Wolf equation used for, and why would we want to assign it to a symbol? How/why is this useful? |
So a Wolfram equation is just Wolfram's way of writing mathematical equations. In Wolfram, I would write c^2 == a^2 + b^2 (if I was a friend of Pythagoras). It's about user convenience. If I wanted to find 'a' then I would copy it across to a Solve function, i.e. Solve[c^2 == a^2 + b^2, a]. If I want to use it in many places then I would have to give the equation a name, e.g. ptheorem=c^2 == a^2 + b^2 and then use that: Solve[ptheorem, a]. In this case, there isn't really a problem but when you're working with lots of equations and different steps through them then having to name them individually becomes a bit of an anti-pattern. It's also the case that there are different ways of representing such things. The solution above is given as a -> Sqrt[-b^2 + c^2], but you could equally write an actual equation, i.e. a== Sqrt[-b^2 + c^2]. You can see this in the cavity-physics ns where I have the symbol 'E4 and the expression E4 and at some point an equation, which is simply (w/== 'E4 E4). It seems like it would be more efficient to have a single definition of an equation that covers all of these bases. |
The idea is to make something like
possible, where def= would act like Clojure's (def ...) and yet automatically assign a Wolfram equation (w/== 'F (w/* m a)) to the symbol F. Ideally, this would also store 'kind' data such that it could automatically be visualised by literate programming tools like clay.
The text was updated successfully, but these errors were encountered: