Open sangongs opened 3 years ago
Matrix expressions generally follow the noncommutative algebra and I'm not sure that sympy have much framework built for noncommutative polynomials yet. Someone could try to implement such simplification as some word matching problems, but there could be some better systemic way.
When simplifying a scalar expression, SymPy smartly applies the distributive property:
But it is not the case for matrix expressions:
Although
factor()
function works:Reproduced with SymPy 1.7.1.