I am considering formal functions of lists and used ** to define the concatination product:
bb /: bb[X_] ** bb[Y_] := be[Join[X, Y]];
So that for example bb[{a,b}]**bb[{c}] evaluates to bb[{a,b,c}]. Now I have a term of the form
bb[{a}]**((bb[{b}]-bb[{c}])/(b-c))
And I want to evaluate this to (bb[{a,b}]-bb[{c}])/(b-c). But Mathematica does not evaluate it, even if I use Distribute or Expand. I tried to use the NCAlgebra package but with this NCExpand I get problems at other places in my code.
How can I tell mathematica to expand the above term the way I want? Is there a better way to define the concatination product for my purpose (as a noncommutative algebra over rational functions) ?
NonCommutativeMultiply
, such as this or this. $\endgroup$