Non commutative variables Symbolics.jl

I don’t understand how to work with variables that don’t commute.
It would be nice if there was documentation with examples of non-commutativity with Symbolics.jl.
Two particular examples would be useful:
-there are various variables (a, b, c, d, …) and we know that a and b do not commute with each other, but commute with the others. how do you simplify expressions taking into account non-commutativity?
-there are several variables and we know that some do not commute with each other, also we know the value of commutators of pairs of variables, how to simplify expressions by also using the commutation rules between variables?
I saw a discussion here, but the user was defining his own operator, is it possible to use just the * instead? Thank you

2 Likes

If things are happening inside a monoid on the letters you might try to use KnuthBendix.jl (my package) to define the Monoid and then run a Knuth-Bendix completion on the monoid. If this succeeds (and that’s a big IF) you can compute normal forms in the monoid. Otherwise you get only approximations of those.

If the values you want to substitute are not from the monoid e.g. are whole expressions (i.e. elements of the monoid algebra, if that means anything to you :slight_smile: ) it’s a really hard problem: the same question with commuting variables boils down to computing normal forms in the quotient R/I of a polynomial ring by an ideal. Which means computing Gröbner basis :wink:

3 Likes