Let's say we have GP[v],GM[v]: two noncommutative objects depending on the commutative variable v.
<< NC`;
<< NCAlgebra`;
SetCommutative[v];
SetNonCommutative[GP, GM]
NCCollect[
GM[v] ** GP[3 v]/(30 v^4) + (243 v^4 GM[v] ** GP[3 v])/10 -
3 GP[v/3] ** GM[v] + GP[v/3] ** GM[v]/(30 v^4) + (
243 v^4 GP[v/3] ** GM[v])/10 - (82 GP[v/3] ** GM[3 v])/3 + (
3 GP[v/3] ** GM[3 v])/ (v^4) + (3 v^4 GP[v/3] ** GM[3 v])/ - (
82 GP[v/3] ** GP[v])/3 + (3 GP[v/3] ** GP[v])/ (v^4) +
3 v^4 GP[v/3] ** GP[v] - 3 GP[v/3] ** GP[3 v] + GP[v/3] ** GP[3 v]/(
30 v^4) + (243 v^4 GP[v/3] ** GP[3 v])/10 - (
82 GP[v] ** GM[3 v])/3 + (82 GP[v] ** GM[v] ** GP[v/3])/3 -
2 GP[v] ** GM[v] ** GP[v/3], {GP, GM}]
it returns the error : NCCollect::NotPolynomial: Could not transform expression into nc polynomial
I would like to collect it withGM[v]**GP[3 v], GP[v/3]**GM[v],GP[v/3]**GP[3 v], etc
but without having to write all the terms by hand. How can I do that ?