I am starting to work with non-commutative algebra in Mathematica and had a look at the NCAlgebra package. I installed it and can use its functions. However, what I am struggling with is the
SetCommutingOperators command, described in I.4.6.4 of the documentation. Honestly,
SetCommutingOperators just reference themselves in a cycle if I am not mistaken - which disallows me to fully understand the important note about using
How do I properly define that two symbols
b commute, such that
a**b-b**a==0. Some code with (as it appears) no effect of
ClearAll["Global`*"]; << NC` << NCAlgebra` SetCommutingOperators[a, b] a ** b == b ** a` (* a ** b == b ** a *) NCE[b ** a - a ** b] (* -a ** b + b ** a *)
It is important, that
b are not commutative in general.
It was suggested in a comment to use
SetCommutative[a,b] which achieves the desired result in this case. However, this is the wrong approach as you can see if there is a second operator
c with that
b should not commute:
SetCommutative[a, b] a**c-c**a (* 0 *)
This is not desired; it should be
b commutative in general, but they should only commute with each other.