Hacker News new | ask | show | jobs
by 6gvONxR4sf7o 771 days ago
Thanks for the quick answer! I had only looked at the python API docs, so I missed that. I’ve just been wrapping up learning a bunch of Lie theory and will keep symbolica in mind next time I want to play with some big nasty expressions!

> Non-commutativity can be emulated by adding an extra argument that determines the ordering or by giving them different names.

Would you mind giving an example? (or just tell me it’s in the docs and i’ll look deeper)

1 comments

It's not a language specific feature, but you can do the bookkeeping yourself. In the simplest form you can write:

    f(1,...)*f(2,...)
Then when you do pattern matching with wildcards x_ and y_ you can do

   f(x_,...)*f(y_,..)
with the requirement that x_ < y_. This way you will know you match them in the expected order and not the other way around.