Open mahrud opened 1 year ago
with univariate polynomials, I think this is a good idea and should be implemented. not sure about multivariate polynomials, since the matrices you feed may not commute and then it's ambiguous how to take products.
I main had linear combinations of variables in mind, but you could use a multivariate free algebra instead.
This issue is inspired by this Stack Exchange question that I randomly ran into.
Would be great if the following worked:
The easiest workaround I can think of is still too complicated:
But more generally, if I have a polynomial in some number of variables, it shouldn't be too difficult to substitute matrices (or even ring maps) for the variables or return an error if the matrices are not compatible in some way.
Related: #2863, #2792