linear_algebra.matrix.charpoly.basicMathlib.LinearAlgebra.Matrix.Charpoly.Basic

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -139,18 +139,18 @@ theorem Matrix.aeval_self_charpoly (M : Matrix n n R) : aeval M M.charpoly = 0 :
     (adjugate_mul _).symm
   -- Using the algebra isomorphism `matrix n n R[X] ≃ₐ[R] polynomial (matrix n n R)`,
   -- we have the same identity in `polynomial (matrix n n R)`.
-  apply_fun matPolyEquiv at h 
-  simp only [mat_poly_equiv.map_mul, Matrix.matPolyEquiv_charmatrix] at h 
+  apply_fun matPolyEquiv at h
+  simp only [mat_poly_equiv.map_mul, Matrix.matPolyEquiv_charmatrix] at h
   -- Because the coefficient ring `matrix n n R` is non-commutative,
   -- evaluation at `M` is not multiplicative.
   -- However, any polynomial which is a product of the form $N * (t I - M)$
   -- is sent to zero, because the evaluation function puts the polynomial variable
   -- to the right of any coefficients, so everything telescopes.
-  apply_fun fun p => p.eval M at h 
-  rw [eval_mul_X_sub_C] at h 
+  apply_fun fun p => p.eval M at h
+  rw [eval_mul_X_sub_C] at h
   -- Now $χ_M (t) I$, when thought of as a polynomial of matrices
   -- and evaluated at some `N` is exactly $χ_M (N)$.
-  rw [matPolyEquiv_smul_one, eval_map] at h 
+  rw [matPolyEquiv_smul_one, eval_map] at h
   -- Thus we have $χ_M(M) = 0$, which is the desired result.
   exact h
 #align matrix.aeval_self_charpoly Matrix.aeval_self_charpoly
Diff
@@ -45,69 +45,70 @@ variable {n : Type w} [DecidableEq n] [Fintype n]
 
 open Finset
 
-#print charmatrix /-
+#print Matrix.charmatrix /-
 /-- The "characteristic matrix" of `M : matrix n n R` is the matrix of polynomials $t I - M$.
 The determinant of this matrix is the characteristic polynomial.
 -/
-def charmatrix (M : Matrix n n R) : Matrix n n R[X] :=
+def Matrix.charmatrix (M : Matrix n n R) : Matrix n n R[X] :=
   Matrix.scalar n (X : R[X]) - (C : R →+* R[X]).mapMatrix M
-#align charmatrix charmatrix
+#align charmatrix Matrix.charmatrix
 -/
 
-#print charmatrix_apply /-
-theorem charmatrix_apply (M : Matrix n n R) (i j : n) :
-    charmatrix M i j = X * (1 : Matrix n n R[X]) i j - C (M i j) :=
+#print Matrix.charmatrix_apply /-
+theorem Matrix.charmatrix_apply (M : Matrix n n R) (i j : n) :
+    Matrix.charmatrix M i j = X * (1 : Matrix n n R[X]) i j - C (M i j) :=
   rfl
-#align charmatrix_apply charmatrix_apply
+#align charmatrix_apply Matrix.charmatrix_apply
 -/
 
-#print charmatrix_apply_eq /-
+#print Matrix.charmatrix_apply_eq /-
 @[simp]
-theorem charmatrix_apply_eq (M : Matrix n n R) (i : n) :
-    charmatrix M i i = (X : R[X]) - C (M i i) := by
-  simp only [charmatrix, sub_left_inj, Pi.sub_apply, scalar_apply_eq, RingHom.mapMatrix_apply,
-    map_apply, DMatrix.sub_apply]
-#align charmatrix_apply_eq charmatrix_apply_eq
+theorem Matrix.charmatrix_apply_eq (M : Matrix n n R) (i : n) :
+    Matrix.charmatrix M i i = (X : R[X]) - C (M i i) := by
+  simp only [Matrix.charmatrix, sub_left_inj, Pi.sub_apply, scalar_apply_eq,
+    RingHom.mapMatrix_apply, map_apply, DMatrix.sub_apply]
+#align charmatrix_apply_eq Matrix.charmatrix_apply_eq
 -/
 
-#print charmatrix_apply_ne /-
+#print Matrix.charmatrix_apply_ne /-
 @[simp]
-theorem charmatrix_apply_ne (M : Matrix n n R) (i j : n) (h : i ≠ j) :
-    charmatrix M i j = -C (M i j) := by
-  simp only [charmatrix, Pi.sub_apply, scalar_apply_ne _ _ _ h, zero_sub, RingHom.mapMatrix_apply,
-    map_apply, DMatrix.sub_apply]
-#align charmatrix_apply_ne charmatrix_apply_ne
+theorem Matrix.charmatrix_apply_ne (M : Matrix n n R) (i j : n) (h : i ≠ j) :
+    Matrix.charmatrix M i j = -C (M i j) := by
+  simp only [Matrix.charmatrix, Pi.sub_apply, scalar_apply_ne _ _ _ h, zero_sub,
+    RingHom.mapMatrix_apply, map_apply, DMatrix.sub_apply]
+#align charmatrix_apply_ne Matrix.charmatrix_apply_ne
 -/
 
-#print matPolyEquiv_charmatrix /-
-theorem matPolyEquiv_charmatrix (M : Matrix n n R) : matPolyEquiv (charmatrix M) = X - C M :=
+#print Matrix.matPolyEquiv_charmatrix /-
+theorem Matrix.matPolyEquiv_charmatrix (M : Matrix n n R) :
+    matPolyEquiv (Matrix.charmatrix M) = X - C M :=
   by
   ext k i j
   simp only [matPolyEquiv_coeff_apply, coeff_sub, Pi.sub_apply]
   by_cases h : i = j
-  · subst h; rw [charmatrix_apply_eq, coeff_sub]
+  · subst h; rw [Matrix.charmatrix_apply_eq, coeff_sub]
     simp only [coeff_X, coeff_C]
     split_ifs <;> simp
-  · rw [charmatrix_apply_ne _ _ _ h, coeff_X, coeff_neg, coeff_C, coeff_C]
+  · rw [Matrix.charmatrix_apply_ne _ _ _ h, coeff_X, coeff_neg, coeff_C, coeff_C]
     split_ifs <;> simp [h]
-#align mat_poly_equiv_charmatrix matPolyEquiv_charmatrix
+#align mat_poly_equiv_charmatrix Matrix.matPolyEquiv_charmatrix
 -/
 
-#print charmatrix_reindex /-
-theorem charmatrix_reindex {m : Type v} [DecidableEq m] [Fintype m] (e : n ≃ m) (M : Matrix n n R) :
-    charmatrix (reindex e e M) = reindex e e (charmatrix M) :=
+#print Matrix.charmatrix_reindex /-
+theorem Matrix.charmatrix_reindex {m : Type v} [DecidableEq m] [Fintype m] (e : n ≃ m)
+    (M : Matrix n n R) : Matrix.charmatrix (reindex e e M) = reindex e e (Matrix.charmatrix M) :=
   by
   ext i j x
   by_cases h : i = j
   all_goals simp [h]
-#align charmatrix_reindex charmatrix_reindex
+#align charmatrix_reindex Matrix.charmatrix_reindex
 -/
 
 #print Matrix.charpoly /-
 /-- The characteristic polynomial of a matrix `M` is given by $\det (t I - M)$.
 -/
 def Matrix.charpoly (M : Matrix n n R) : R[X] :=
-  (charmatrix M).det
+  (Matrix.charmatrix M).det
 #align matrix.charpoly Matrix.charpoly
 -/
 
@@ -116,7 +117,7 @@ theorem Matrix.charpoly_reindex {m : Type v} [DecidableEq m] [Fintype m] (e : n
     (M : Matrix n n R) : (reindex e e M).charpoly = M.charpoly :=
   by
   unfold Matrix.charpoly
-  rw [charmatrix_reindex, Matrix.det_reindex_self]
+  rw [Matrix.charmatrix_reindex, Matrix.det_reindex_self]
 #align matrix.charpoly_reindex Matrix.charpoly_reindex
 -/
 
@@ -133,12 +134,13 @@ theorem Matrix.aeval_self_charpoly (M : Matrix n n R) : aeval M M.charpoly = 0 :
   by
   -- We begin with the fact $χ_M(t) I = adjugate (t I - M) * (t I - M)$,
   -- as an identity in `matrix n n R[X]`.
-  have h : M.charpoly • (1 : Matrix n n R[X]) = adjugate (charmatrix M) * charmatrix M :=
+  have h :
+    M.charpoly • (1 : Matrix n n R[X]) = adjugate (Matrix.charmatrix M) * Matrix.charmatrix M :=
     (adjugate_mul _).symm
   -- Using the algebra isomorphism `matrix n n R[X] ≃ₐ[R] polynomial (matrix n n R)`,
   -- we have the same identity in `polynomial (matrix n n R)`.
   apply_fun matPolyEquiv at h 
-  simp only [mat_poly_equiv.map_mul, matPolyEquiv_charmatrix] at h 
+  simp only [mat_poly_equiv.map_mul, Matrix.matPolyEquiv_charmatrix] at h 
   -- Because the coefficient ring `matrix n n R` is non-commutative,
   -- evaluation at `M` is not multiplicative.
   -- However, any polynomial which is a product of the form $N * (t I - M)$
Diff
@@ -3,10 +3,10 @@ Copyright (c) 2020 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison
 -/
-import Mathbin.LinearAlgebra.Matrix.Adjugate
-import Mathbin.RingTheory.PolynomialAlgebra
-import Mathbin.Tactic.ApplyFun
-import Mathbin.Tactic.Squeeze
+import LinearAlgebra.Matrix.Adjugate
+import RingTheory.PolynomialAlgebra
+import Tactic.ApplyFun
+import Tactic.Squeeze
 
 #align_import linear_algebra.matrix.charpoly.basic from "leanprover-community/mathlib"@"4280f5f32e16755ec7985ce11e189b6cd6ff6735"
 
Diff
@@ -2,17 +2,14 @@
 Copyright (c) 2020 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison
-
-! This file was ported from Lean 3 source module linear_algebra.matrix.charpoly.basic
-! leanprover-community/mathlib commit 4280f5f32e16755ec7985ce11e189b6cd6ff6735
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.LinearAlgebra.Matrix.Adjugate
 import Mathbin.RingTheory.PolynomialAlgebra
 import Mathbin.Tactic.ApplyFun
 import Mathbin.Tactic.Squeeze
 
+#align_import linear_algebra.matrix.charpoly.basic from "leanprover-community/mathlib"@"4280f5f32e16755ec7985ce11e189b6cd6ff6735"
+
 /-!
 # Characteristic polynomials and the Cayley-Hamilton theorem
 
Diff
@@ -85,7 +85,7 @@ theorem charmatrix_apply_ne (M : Matrix n n R) (i j : n) (h : i ≠ j) :
 #print matPolyEquiv_charmatrix /-
 theorem matPolyEquiv_charmatrix (M : Matrix n n R) : matPolyEquiv (charmatrix M) = X - C M :=
   by
-  ext (k i j)
+  ext k i j
   simp only [matPolyEquiv_coeff_apply, coeff_sub, Pi.sub_apply]
   by_cases h : i = j
   · subst h; rw [charmatrix_apply_eq, coeff_sub]
@@ -100,7 +100,7 @@ theorem matPolyEquiv_charmatrix (M : Matrix n n R) : matPolyEquiv (charmatrix M)
 theorem charmatrix_reindex {m : Type v} [DecidableEq m] [Fintype m] (e : n ≃ m) (M : Matrix n n R) :
     charmatrix (reindex e e M) = reindex e e (charmatrix M) :=
   by
-  ext (i j x)
+  ext i j x
   by_cases h : i = j
   all_goals simp [h]
 #align charmatrix_reindex charmatrix_reindex
Diff
@@ -57,25 +57,32 @@ def charmatrix (M : Matrix n n R) : Matrix n n R[X] :=
 #align charmatrix charmatrix
 -/
 
+#print charmatrix_apply /-
 theorem charmatrix_apply (M : Matrix n n R) (i j : n) :
     charmatrix M i j = X * (1 : Matrix n n R[X]) i j - C (M i j) :=
   rfl
 #align charmatrix_apply charmatrix_apply
+-/
 
+#print charmatrix_apply_eq /-
 @[simp]
 theorem charmatrix_apply_eq (M : Matrix n n R) (i : n) :
     charmatrix M i i = (X : R[X]) - C (M i i) := by
   simp only [charmatrix, sub_left_inj, Pi.sub_apply, scalar_apply_eq, RingHom.mapMatrix_apply,
     map_apply, DMatrix.sub_apply]
 #align charmatrix_apply_eq charmatrix_apply_eq
+-/
 
+#print charmatrix_apply_ne /-
 @[simp]
 theorem charmatrix_apply_ne (M : Matrix n n R) (i j : n) (h : i ≠ j) :
     charmatrix M i j = -C (M i j) := by
   simp only [charmatrix, Pi.sub_apply, scalar_apply_ne _ _ _ h, zero_sub, RingHom.mapMatrix_apply,
     map_apply, DMatrix.sub_apply]
 #align charmatrix_apply_ne charmatrix_apply_ne
+-/
 
+#print matPolyEquiv_charmatrix /-
 theorem matPolyEquiv_charmatrix (M : Matrix n n R) : matPolyEquiv (charmatrix M) = X - C M :=
   by
   ext (k i j)
@@ -87,6 +94,7 @@ theorem matPolyEquiv_charmatrix (M : Matrix n n R) : matPolyEquiv (charmatrix M)
   · rw [charmatrix_apply_ne _ _ _ h, coeff_X, coeff_neg, coeff_C, coeff_C]
     split_ifs <;> simp [h]
 #align mat_poly_equiv_charmatrix matPolyEquiv_charmatrix
+-/
 
 #print charmatrix_reindex /-
 theorem charmatrix_reindex {m : Type v} [DecidableEq m] [Fintype m] (e : n ≃ m) (M : Matrix n n R) :
@@ -115,6 +123,7 @@ theorem Matrix.charpoly_reindex {m : Type v} [DecidableEq m] [Fintype m] (e : n
 #align matrix.charpoly_reindex Matrix.charpoly_reindex
 -/
 
+#print Matrix.aeval_self_charpoly /-
 -- This proof follows http://drorbn.net/AcademicPensieve/2015-12/CayleyHamilton.pdf
 /-- The **Cayley-Hamilton Theorem**, that the characteristic polynomial of a matrix,
 applied to the matrix itself, is zero.
@@ -146,4 +155,5 @@ theorem Matrix.aeval_self_charpoly (M : Matrix n n R) : aeval M M.charpoly = 0 :
   -- Thus we have $χ_M(M) = 0$, which is the desired result.
   exact h
 #align matrix.aeval_self_charpoly Matrix.aeval_self_charpoly
+-/
 
Diff
@@ -131,14 +131,14 @@ theorem Matrix.aeval_self_charpoly (M : Matrix n n R) : aeval M M.charpoly = 0 :
     (adjugate_mul _).symm
   -- Using the algebra isomorphism `matrix n n R[X] ≃ₐ[R] polynomial (matrix n n R)`,
   -- we have the same identity in `polynomial (matrix n n R)`.
-  apply_fun matPolyEquiv  at h 
+  apply_fun matPolyEquiv at h 
   simp only [mat_poly_equiv.map_mul, matPolyEquiv_charmatrix] at h 
   -- Because the coefficient ring `matrix n n R` is non-commutative,
   -- evaluation at `M` is not multiplicative.
   -- However, any polynomial which is a product of the form $N * (t I - M)$
   -- is sent to zero, because the evaluation function puts the polynomial variable
   -- to the right of any coefficients, so everything telescopes.
-  apply_fun fun p => p.eval M  at h 
+  apply_fun fun p => p.eval M at h 
   rw [eval_mul_X_sub_C] at h 
   -- Now $χ_M (t) I$, when thought of as a polynomial of matrices
   -- and evaluated at some `N` is exactly $χ_M (N)$.
Diff
@@ -131,18 +131,18 @@ theorem Matrix.aeval_self_charpoly (M : Matrix n n R) : aeval M M.charpoly = 0 :
     (adjugate_mul _).symm
   -- Using the algebra isomorphism `matrix n n R[X] ≃ₐ[R] polynomial (matrix n n R)`,
   -- we have the same identity in `polynomial (matrix n n R)`.
-  apply_fun matPolyEquiv  at h
-  simp only [mat_poly_equiv.map_mul, matPolyEquiv_charmatrix] at h
+  apply_fun matPolyEquiv  at h 
+  simp only [mat_poly_equiv.map_mul, matPolyEquiv_charmatrix] at h 
   -- Because the coefficient ring `matrix n n R` is non-commutative,
   -- evaluation at `M` is not multiplicative.
   -- However, any polynomial which is a product of the form $N * (t I - M)$
   -- is sent to zero, because the evaluation function puts the polynomial variable
   -- to the right of any coefficients, so everything telescopes.
-  apply_fun fun p => p.eval M  at h
-  rw [eval_mul_X_sub_C] at h
+  apply_fun fun p => p.eval M  at h 
+  rw [eval_mul_X_sub_C] at h 
   -- Now $χ_M (t) I$, when thought of as a polynomial of matrices
   -- and evaluated at some `N` is exactly $χ_M (N)$.
-  rw [matPolyEquiv_smul_one, eval_map] at h
+  rw [matPolyEquiv_smul_one, eval_map] at h 
   -- Thus we have $χ_M(M) = 0$, which is the desired result.
   exact h
 #align matrix.aeval_self_charpoly Matrix.aeval_self_charpoly
Diff
@@ -115,7 +115,6 @@ theorem Matrix.charpoly_reindex {m : Type v} [DecidableEq m] [Fintype m] (e : n
 #align matrix.charpoly_reindex Matrix.charpoly_reindex
 -/
 
-#print Matrix.aeval_self_charpoly /-
 -- This proof follows http://drorbn.net/AcademicPensieve/2015-12/CayleyHamilton.pdf
 /-- The **Cayley-Hamilton Theorem**, that the characteristic polynomial of a matrix,
 applied to the matrix itself, is zero.
@@ -147,5 +146,4 @@ theorem Matrix.aeval_self_charpoly (M : Matrix n n R) : aeval M M.charpoly = 0 :
   -- Thus we have $χ_M(M) = 0$, which is the desired result.
   exact h
 #align matrix.aeval_self_charpoly Matrix.aeval_self_charpoly
--/
 
Diff
@@ -40,7 +40,7 @@ universe u v w
 
 open Polynomial Matrix
 
-open BigOperators Polynomial
+open scoped BigOperators Polynomial
 
 variable {R : Type u} [CommRing R]
 
Diff
@@ -57,20 +57,11 @@ def charmatrix (M : Matrix n n R) : Matrix n n R[X] :=
 #align charmatrix charmatrix
 -/
 
-/- warning: charmatrix_apply -> charmatrix_apply is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align charmatrix_apply charmatrix_applyₓ'. -/
 theorem charmatrix_apply (M : Matrix n n R) (i j : n) :
     charmatrix M i j = X * (1 : Matrix n n R[X]) i j - C (M i j) :=
   rfl
 #align charmatrix_apply charmatrix_apply
 
-/- warning: charmatrix_apply_eq -> charmatrix_apply_eq is a dubious translation:
-lean 3 declaration is
-  forall {R : Type.{u1}} [_inst_1 : CommRing.{u1} R] {n : Type.{u2}} [_inst_2 : DecidableEq.{succ u2} n] [_inst_3 : Fintype.{u2} n] (M : Matrix.{u2, u2, u1} n n R) (i : n), Eq.{succ u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (charmatrix.{u1, u2} R _inst_1 n (fun (a : n) (b : n) => _inst_2 a b) _inst_3 M i i) (HSub.hSub.{u1, u1, u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (instHSub.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.sub.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.X.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (coeFn.{succ u1, succ u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))) (fun (_x : RingHom.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))) => R -> (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)))) (RingHom.hasCoeToFun.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))) (Polynomial.C.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (M i i)))
-but is expected to have type
-  forall {R : Type.{u1}} [_inst_1 : CommRing.{u1} R] {n : Type.{u2}} [_inst_2 : DecidableEq.{succ u2} n] [_inst_3 : Fintype.{u2} n] (M : Matrix.{u2, u2, u1} n n R) (i : n), Eq.{succ u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (charmatrix.{u1, u2} R _inst_1 n (fun (a : n) (b : n) => _inst_2 a b) _inst_3 M i i) (HSub.hSub.{u1, u1, u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : R) => Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (M i i)) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (instHSub.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.sub.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.X.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (FunLike.coe.{succ u1, succ u1, succ u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : R) => Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _x) (MulHomClass.toFunLike.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (RingHom.instRingHomClassRingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))))) (Polynomial.C.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (M i i)))
-Case conversion may be inaccurate. Consider using '#align charmatrix_apply_eq charmatrix_apply_eqₓ'. -/
 @[simp]
 theorem charmatrix_apply_eq (M : Matrix n n R) (i : n) :
     charmatrix M i i = (X : R[X]) - C (M i i) := by
@@ -78,12 +69,6 @@ theorem charmatrix_apply_eq (M : Matrix n n R) (i : n) :
     map_apply, DMatrix.sub_apply]
 #align charmatrix_apply_eq charmatrix_apply_eq
 
-/- warning: charmatrix_apply_ne -> charmatrix_apply_ne is a dubious translation:
-lean 3 declaration is
-  forall {R : Type.{u1}} [_inst_1 : CommRing.{u1} R] {n : Type.{u2}} [_inst_2 : DecidableEq.{succ u2} n] [_inst_3 : Fintype.{u2} n] (M : Matrix.{u2, u2, u1} n n R) (i : n) (j : n), (Ne.{succ u2} n i j) -> (Eq.{succ u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (charmatrix.{u1, u2} R _inst_1 n (fun (a : n) (b : n) => _inst_2 a b) _inst_3 M i j) (Neg.neg.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.neg'.{u1} R (CommRing.toRing.{u1} R _inst_1)) (coeFn.{succ u1, succ u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))) (fun (_x : RingHom.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))) => R -> (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)))) (RingHom.hasCoeToFun.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))) (Polynomial.C.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (M i j))))
-but is expected to have type
-  forall {R : Type.{u1}} [_inst_1 : CommRing.{u1} R] {n : Type.{u2}} [_inst_2 : DecidableEq.{succ u2} n] [_inst_3 : Fintype.{u2} n] (M : Matrix.{u2, u2, u1} n n R) (i : n) (j : n), (Ne.{succ u2} n i j) -> (Eq.{succ u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (charmatrix.{u1, u2} R _inst_1 n (fun (a : n) (b : n) => _inst_2 a b) _inst_3 M i j) (Neg.neg.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : R) => Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (M i j)) (Polynomial.neg'.{u1} R (CommRing.toRing.{u1} R _inst_1)) (FunLike.coe.{succ u1, succ u1, succ u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : R) => Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _x) (MulHomClass.toFunLike.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (RingHom.instRingHomClassRingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))))) (Polynomial.C.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (M i j))))
-Case conversion may be inaccurate. Consider using '#align charmatrix_apply_ne charmatrix_apply_neₓ'. -/
 @[simp]
 theorem charmatrix_apply_ne (M : Matrix n n R) (i j : n) (h : i ≠ j) :
     charmatrix M i j = -C (M i j) := by
@@ -91,9 +76,6 @@ theorem charmatrix_apply_ne (M : Matrix n n R) (i j : n) (h : i ≠ j) :
     map_apply, DMatrix.sub_apply]
 #align charmatrix_apply_ne charmatrix_apply_ne
 
-/- warning: mat_poly_equiv_charmatrix -> matPolyEquiv_charmatrix is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align mat_poly_equiv_charmatrix matPolyEquiv_charmatrixₓ'. -/
 theorem matPolyEquiv_charmatrix (M : Matrix n n R) : matPolyEquiv (charmatrix M) = X - C M :=
   by
   ext (k i j)
Diff
@@ -99,8 +99,7 @@ theorem matPolyEquiv_charmatrix (M : Matrix n n R) : matPolyEquiv (charmatrix M)
   ext (k i j)
   simp only [matPolyEquiv_coeff_apply, coeff_sub, Pi.sub_apply]
   by_cases h : i = j
-  · subst h
-    rw [charmatrix_apply_eq, coeff_sub]
+  · subst h; rw [charmatrix_apply_eq, coeff_sub]
     simp only [coeff_X, coeff_C]
     split_ifs <;> simp
   · rw [charmatrix_apply_ne _ _ _ h, coeff_X, coeff_neg, coeff_C, coeff_C]
Diff
@@ -58,10 +58,7 @@ def charmatrix (M : Matrix n n R) : Matrix n n R[X] :=
 -/
 
 /- warning: charmatrix_apply -> charmatrix_apply is a dubious translation:
-lean 3 declaration is
-  forall {R : Type.{u1}} [_inst_1 : CommRing.{u1} R] {n : Type.{u2}} [_inst_2 : DecidableEq.{succ u2} n] [_inst_3 : Fintype.{u2} n] (M : Matrix.{u2, u2, u1} n n R) (i : n) (j : n), Eq.{succ u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (charmatrix.{u1, u2} R _inst_1 n (fun (a : n) (b : n) => _inst_2 a b) _inst_3 M i j) (HSub.hSub.{u1, u1, u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (instHSub.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.sub.{u1} R (CommRing.toRing.{u1} R _inst_1))) (HMul.hMul.{u1, u1, u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (instHMul.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.mul'.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)))) (Polynomial.X.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (One.one.{max u2 u1} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)))) (Matrix.hasOne.{u1, u2} n (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (fun (a : n) (b : n) => _inst_2 a b) (Polynomial.zero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.hasOne.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)))) i j)) (coeFn.{succ u1, succ u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))) (fun (_x : RingHom.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))) => R -> (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)))) (RingHom.hasCoeToFun.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))) (Polynomial.C.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (M i j)))
-but is expected to have type
-  forall {R : Type.{u1}} [_inst_1 : CommRing.{u1} R] {n : Type.{u2}} [_inst_2 : DecidableEq.{succ u2} n] [_inst_3 : Fintype.{u2} n] (M : Matrix.{u2, u2, u1} n n R) (i : n) (j : n), Eq.{succ u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (charmatrix.{u1, u2} R _inst_1 n (fun (a : n) (b : n) => _inst_2 a b) _inst_3 M i j) (HSub.hSub.{u1, u1, u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : R) => Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (M i j)) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (instHSub.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.sub.{u1} R (CommRing.toRing.{u1} R _inst_1))) (HMul.hMul.{u1, u1, u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (instHMul.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.mul'.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.X.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (OfNat.ofNat.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) 1 (One.toOfNat1.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.one.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (fun (a : n) (b : n) => _inst_2 a b) (Polynomial.zero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.one.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) i j)) (FunLike.coe.{succ u1, succ u1, succ u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : R) => Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _x) (MulHomClass.toFunLike.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (RingHom.instRingHomClassRingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))))) (Polynomial.C.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (M i j)))
+<too large>
 Case conversion may be inaccurate. Consider using '#align charmatrix_apply charmatrix_applyₓ'. -/
 theorem charmatrix_apply (M : Matrix n n R) (i j : n) :
     charmatrix M i j = X * (1 : Matrix n n R[X]) i j - C (M i j) :=
@@ -95,10 +92,7 @@ theorem charmatrix_apply_ne (M : Matrix n n R) (i j : n) (h : i ≠ j) :
 #align charmatrix_apply_ne charmatrix_apply_ne
 
 /- warning: mat_poly_equiv_charmatrix -> matPolyEquiv_charmatrix is a dubious translation:
-lean 3 declaration is
-  forall {R : Type.{u1}} [_inst_1 : CommRing.{u1} R] {n : Type.{u2}} [_inst_2 : DecidableEq.{succ u2} n] [_inst_3 : Fintype.{u2} n] (M : Matrix.{u2, u2, u1} n n R), Eq.{succ (max u2 u1)} (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (coeFn.{succ (max u2 u1), succ (max u2 u1)} (AlgEquiv.{u1, max u2 u1, max u2 u1} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.algebra.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.algebra.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (fun (_x : AlgEquiv.{u1, max u2 u1, max u2 u1} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.algebra.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.algebra.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) => (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) -> (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))) (AlgEquiv.hasCoeToFun.{u1, max u2 u1, max u2 u1} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.algebra.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.algebra.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (matPolyEquiv.{u2, u1} R (CommRing.toCommSemiring.{u1} R _inst_1) n (fun (a : n) (b : n) => _inst_2 a b) _inst_3) (charmatrix.{u1, u2} R _inst_1 n (fun (a : n) (b : n) => _inst_2 a b) _inst_3 M)) (HSub.hSub.{max u2 u1, max u2 u1, max u2 u1} (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (instHSub.{max u2 u1} (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.sub.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.ring.{u1, u2} n R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toRing.{u1} R _inst_1)))) (Polynomial.X.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (coeFn.{succ (max u2 u1), succ (max u2 u1)} (RingHom.{max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u2 u1} (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (fun (_x : RingHom.{max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u2 u1} (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) => (Matrix.{u2, u2, u1} n n R) -> (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))) (RingHom.hasCoeToFun.{max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u2 u1} (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Polynomial.C.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) M))
-but is expected to have type
-  forall {R : Type.{u1}} [_inst_1 : CommRing.{u1} R] {n : Type.{u2}} [_inst_2 : DecidableEq.{succ u2} n] [_inst_3 : Fintype.{u2} n] (M : Matrix.{u2, u2, u1} n n R), Eq.{max (succ u1) (succ u2)} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2187 : Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) => Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (charmatrix.{u1, u2} R _inst_1 n (fun (a : n) (b : n) => _inst_2 a b) _inst_3 M)) (FunLike.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2), max (succ u1) (succ u2)} (AlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (fun (_x : Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2187 : Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) => Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) _x) (SMulHomClass.toFunLike.{max u1 u2, u1, max u1 u2, max u1 u2} (AlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (SMulZeroClass.toSMul.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddMonoid.toZero.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))))) (DistribSMul.toSMulZeroClass.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddMonoid.toAddZeroClass.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))))) (DistribMulAction.toDistribSMul.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))) (Module.toDistribMulAction.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Algebra.toModule.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))))))) (SMulZeroClass.toSMul.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (AddMonoid.toZero.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))))) (DistribSMul.toSMulZeroClass.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (AddMonoid.toAddZeroClass.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))))) (DistribMulAction.toDistribSMul.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))))) (Module.toDistribMulAction.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))) (Algebra.toModule.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))))))) (DistribMulActionHomClass.toSMulHomClass.{max u1 u2, u1, max u1 u2, max u1 u2} (AlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))))) (Module.toDistribMulAction.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Algebra.toModule.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (Module.toDistribMulAction.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))) (Algebra.toModule.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u1 u2, u1, max u1 u2, max u1 u2} (AlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Module.toDistribMulAction.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Algebra.toModule.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (Module.toDistribMulAction.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))) (Algebra.toModule.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u1, max u1 u2, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (AlgEquivClass.toAlgHomClass.{max u1 u2, u1, max u1 u2, max u1 u2} (AlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AlgEquiv.instAlgEquivClassAlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))))))) (matPolyEquiv.{u2, u1} R (CommRing.toCommSemiring.{u1} R _inst_1) n (fun (a : n) (b : n) => _inst_2 a b) _inst_3) (charmatrix.{u1, u2} R _inst_1 n (fun (a : n) (b : n) => _inst_2 a b) _inst_3 M)) (HSub.hSub.{max u1 u2, max u1 u2, max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Matrix.{u2, u2, u1} n n R) => Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) M) ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2187 : Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) => Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (charmatrix.{u1, u2} R _inst_1 n (fun (a : n) (b : n) => _inst_2 a b) _inst_3 M)) (instHSub.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.sub.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.instRingMatrix.{u1, u2} n R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toRing.{u1} R _inst_1)))) (Polynomial.X.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (FunLike.coe.{succ (max u1 u2), succ (max u1 u2), succ (max u1 u2)} (RingHom.{max u1 u2, max u1 u2} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Matrix.{u2, u2, u1} n n R) (fun (_x : Matrix.{u2, u2, u1} n n R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Matrix.{u2, u2, u1} n n R) => Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) _x) (MulHomClass.toFunLike.{max u1 u2, max u1 u2, max u1 u2} (RingHom.{max u1 u2, max u1 u2} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonUnitalNonAssocSemiring.toMul.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (NonUnitalNonAssocSemiring.toMul.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))) (NonUnitalRingHomClass.toMulHomClass.{max u1 u2, max u1 u2, max u1 u2} (RingHom.{max u1 u2, max u1 u2} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (RingHomClass.toNonUnitalRingHomClass.{max u1 u2, max u1 u2, max u1 u2} (RingHom.{max u1 u2, max u1 u2} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))) (RingHom.instRingHomClassRingHom.{max u1 u2, max u1 u2} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))))) (Polynomial.C.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) M))
+<too large>
 Case conversion may be inaccurate. Consider using '#align mat_poly_equiv_charmatrix matPolyEquiv_charmatrixₓ'. -/
 theorem matPolyEquiv_charmatrix (M : Matrix n n R) : matPolyEquiv (charmatrix M) = X - C M :=
   by
Diff
@@ -98,7 +98,7 @@ theorem charmatrix_apply_ne (M : Matrix n n R) (i j : n) (h : i ≠ j) :
 lean 3 declaration is
   forall {R : Type.{u1}} [_inst_1 : CommRing.{u1} R] {n : Type.{u2}} [_inst_2 : DecidableEq.{succ u2} n] [_inst_3 : Fintype.{u2} n] (M : Matrix.{u2, u2, u1} n n R), Eq.{succ (max u2 u1)} (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (coeFn.{succ (max u2 u1), succ (max u2 u1)} (AlgEquiv.{u1, max u2 u1, max u2 u1} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.algebra.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.algebra.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (fun (_x : AlgEquiv.{u1, max u2 u1, max u2 u1} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.algebra.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.algebra.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) => (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) -> (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))) (AlgEquiv.hasCoeToFun.{u1, max u2 u1, max u2 u1} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.algebra.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.algebra.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (matPolyEquiv.{u2, u1} R (CommRing.toCommSemiring.{u1} R _inst_1) n (fun (a : n) (b : n) => _inst_2 a b) _inst_3) (charmatrix.{u1, u2} R _inst_1 n (fun (a : n) (b : n) => _inst_2 a b) _inst_3 M)) (HSub.hSub.{max u2 u1, max u2 u1, max u2 u1} (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (instHSub.{max u2 u1} (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.sub.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.ring.{u1, u2} n R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toRing.{u1} R _inst_1)))) (Polynomial.X.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (coeFn.{succ (max u2 u1), succ (max u2 u1)} (RingHom.{max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u2 u1} (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (fun (_x : RingHom.{max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u2 u1} (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) => (Matrix.{u2, u2, u1} n n R) -> (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))) (RingHom.hasCoeToFun.{max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u2 u1} (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Polynomial.C.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) M))
 but is expected to have type
-  forall {R : Type.{u1}} [_inst_1 : CommRing.{u1} R] {n : Type.{u2}} [_inst_2 : DecidableEq.{succ u2} n] [_inst_3 : Fintype.{u2} n] (M : Matrix.{u2, u2, u1} n n R), Eq.{max (succ u1) (succ u2)} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) => Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (charmatrix.{u1, u2} R _inst_1 n (fun (a : n) (b : n) => _inst_2 a b) _inst_3 M)) (FunLike.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2), max (succ u1) (succ u2)} (AlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (fun (_x : Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) => Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) _x) (SMulHomClass.toFunLike.{max u1 u2, u1, max u1 u2, max u1 u2} (AlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (SMulZeroClass.toSMul.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddMonoid.toZero.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))))) (DistribSMul.toSMulZeroClass.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddMonoid.toAddZeroClass.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))))) (DistribMulAction.toDistribSMul.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))) (Module.toDistribMulAction.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Algebra.toModule.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))))))) (SMulZeroClass.toSMul.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (AddMonoid.toZero.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))))) (DistribSMul.toSMulZeroClass.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (AddMonoid.toAddZeroClass.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))))) (DistribMulAction.toDistribSMul.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))))) (Module.toDistribMulAction.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))) (Algebra.toModule.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))))))) (DistribMulActionHomClass.toSMulHomClass.{max u1 u2, u1, max u1 u2, max u1 u2} (AlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))))) (Module.toDistribMulAction.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Algebra.toModule.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (Module.toDistribMulAction.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))) (Algebra.toModule.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u1 u2, u1, max u1 u2, max u1 u2} (AlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Module.toDistribMulAction.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Algebra.toModule.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (Module.toDistribMulAction.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))) (Algebra.toModule.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u1, max u1 u2, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (AlgEquivClass.toAlgHomClass.{max u1 u2, u1, max u1 u2, max u1 u2} (AlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AlgEquiv.instAlgEquivClassAlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))))))) (matPolyEquiv.{u2, u1} R (CommRing.toCommSemiring.{u1} R _inst_1) n (fun (a : n) (b : n) => _inst_2 a b) _inst_3) (charmatrix.{u1, u2} R _inst_1 n (fun (a : n) (b : n) => _inst_2 a b) _inst_3 M)) (HSub.hSub.{max u1 u2, max u1 u2, max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Matrix.{u2, u2, u1} n n R) => Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) M) ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) => Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (charmatrix.{u1, u2} R _inst_1 n (fun (a : n) (b : n) => _inst_2 a b) _inst_3 M)) (instHSub.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.sub.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.instRingMatrix.{u1, u2} n R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toRing.{u1} R _inst_1)))) (Polynomial.X.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (FunLike.coe.{succ (max u1 u2), succ (max u1 u2), succ (max u1 u2)} (RingHom.{max u1 u2, max u1 u2} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Matrix.{u2, u2, u1} n n R) (fun (_x : Matrix.{u2, u2, u1} n n R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Matrix.{u2, u2, u1} n n R) => Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) _x) (MulHomClass.toFunLike.{max u1 u2, max u1 u2, max u1 u2} (RingHom.{max u1 u2, max u1 u2} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonUnitalNonAssocSemiring.toMul.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (NonUnitalNonAssocSemiring.toMul.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))) (NonUnitalRingHomClass.toMulHomClass.{max u1 u2, max u1 u2, max u1 u2} (RingHom.{max u1 u2, max u1 u2} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (RingHomClass.toNonUnitalRingHomClass.{max u1 u2, max u1 u2, max u1 u2} (RingHom.{max u1 u2, max u1 u2} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))) (RingHom.instRingHomClassRingHom.{max u1 u2, max u1 u2} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))))) (Polynomial.C.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) M))
+  forall {R : Type.{u1}} [_inst_1 : CommRing.{u1} R] {n : Type.{u2}} [_inst_2 : DecidableEq.{succ u2} n] [_inst_3 : Fintype.{u2} n] (M : Matrix.{u2, u2, u1} n n R), Eq.{max (succ u1) (succ u2)} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2187 : Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) => Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (charmatrix.{u1, u2} R _inst_1 n (fun (a : n) (b : n) => _inst_2 a b) _inst_3 M)) (FunLike.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2), max (succ u1) (succ u2)} (AlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (fun (_x : Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2187 : Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) => Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) _x) (SMulHomClass.toFunLike.{max u1 u2, u1, max u1 u2, max u1 u2} (AlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (SMulZeroClass.toSMul.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddMonoid.toZero.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))))) (DistribSMul.toSMulZeroClass.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddMonoid.toAddZeroClass.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))))) (DistribMulAction.toDistribSMul.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))) (Module.toDistribMulAction.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Algebra.toModule.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))))))) (SMulZeroClass.toSMul.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (AddMonoid.toZero.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))))) (DistribSMul.toSMulZeroClass.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (AddMonoid.toAddZeroClass.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))))) (DistribMulAction.toDistribSMul.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))))) (Module.toDistribMulAction.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))) (Algebra.toModule.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))))))) (DistribMulActionHomClass.toSMulHomClass.{max u1 u2, u1, max u1 u2, max u1 u2} (AlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))))) (Module.toDistribMulAction.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Algebra.toModule.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (Module.toDistribMulAction.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))) (Algebra.toModule.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u1 u2, u1, max u1 u2, max u1 u2} (AlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Module.toDistribMulAction.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Algebra.toModule.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (Module.toDistribMulAction.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))) (Algebra.toModule.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u1, max u1 u2, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (AlgEquivClass.toAlgHomClass.{max u1 u2, u1, max u1 u2, max u1 u2} (AlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AlgEquiv.instAlgEquivClassAlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))))))) (matPolyEquiv.{u2, u1} R (CommRing.toCommSemiring.{u1} R _inst_1) n (fun (a : n) (b : n) => _inst_2 a b) _inst_3) (charmatrix.{u1, u2} R _inst_1 n (fun (a : n) (b : n) => _inst_2 a b) _inst_3 M)) (HSub.hSub.{max u1 u2, max u1 u2, max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Matrix.{u2, u2, u1} n n R) => Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) M) ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2187 : Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) => Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (charmatrix.{u1, u2} R _inst_1 n (fun (a : n) (b : n) => _inst_2 a b) _inst_3 M)) (instHSub.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.sub.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.instRingMatrix.{u1, u2} n R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toRing.{u1} R _inst_1)))) (Polynomial.X.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (FunLike.coe.{succ (max u1 u2), succ (max u1 u2), succ (max u1 u2)} (RingHom.{max u1 u2, max u1 u2} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Matrix.{u2, u2, u1} n n R) (fun (_x : Matrix.{u2, u2, u1} n n R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Matrix.{u2, u2, u1} n n R) => Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) _x) (MulHomClass.toFunLike.{max u1 u2, max u1 u2, max u1 u2} (RingHom.{max u1 u2, max u1 u2} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonUnitalNonAssocSemiring.toMul.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (NonUnitalNonAssocSemiring.toMul.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))) (NonUnitalRingHomClass.toMulHomClass.{max u1 u2, max u1 u2, max u1 u2} (RingHom.{max u1 u2, max u1 u2} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (RingHomClass.toNonUnitalRingHomClass.{max u1 u2, max u1 u2, max u1 u2} (RingHom.{max u1 u2, max u1 u2} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))) (RingHom.instRingHomClassRingHom.{max u1 u2, max u1 u2} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))))) (Polynomial.C.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) M))
 Case conversion may be inaccurate. Consider using '#align mat_poly_equiv_charmatrix matPolyEquiv_charmatrixₓ'. -/
 theorem matPolyEquiv_charmatrix (M : Matrix n n R) : matPolyEquiv (charmatrix M) = X - C M :=
   by
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison
 
 ! This file was ported from Lean 3 source module linear_algebra.matrix.charpoly.basic
-! leanprover-community/mathlib commit 70fd9563a21e7b963887c9360bd29b2393e6225a
+! leanprover-community/mathlib commit 4280f5f32e16755ec7985ce11e189b6cd6ff6735
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -16,6 +16,9 @@ import Mathbin.Tactic.Squeeze
 /-!
 # Characteristic polynomials and the Cayley-Hamilton theorem
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 We define characteristic polynomials of matrices and
 prove the Cayley–Hamilton theorem over arbitrary commutative rings.
 
Diff
@@ -45,18 +45,32 @@ variable {n : Type w} [DecidableEq n] [Fintype n]
 
 open Finset
 
+#print charmatrix /-
 /-- The "characteristic matrix" of `M : matrix n n R` is the matrix of polynomials $t I - M$.
 The determinant of this matrix is the characteristic polynomial.
 -/
 def charmatrix (M : Matrix n n R) : Matrix n n R[X] :=
   Matrix.scalar n (X : R[X]) - (C : R →+* R[X]).mapMatrix M
 #align charmatrix charmatrix
+-/
 
+/- warning: charmatrix_apply -> charmatrix_apply is a dubious translation:
+lean 3 declaration is
+  forall {R : Type.{u1}} [_inst_1 : CommRing.{u1} R] {n : Type.{u2}} [_inst_2 : DecidableEq.{succ u2} n] [_inst_3 : Fintype.{u2} n] (M : Matrix.{u2, u2, u1} n n R) (i : n) (j : n), Eq.{succ u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (charmatrix.{u1, u2} R _inst_1 n (fun (a : n) (b : n) => _inst_2 a b) _inst_3 M i j) (HSub.hSub.{u1, u1, u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (instHSub.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.sub.{u1} R (CommRing.toRing.{u1} R _inst_1))) (HMul.hMul.{u1, u1, u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (instHMul.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.mul'.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)))) (Polynomial.X.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (One.one.{max u2 u1} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)))) (Matrix.hasOne.{u1, u2} n (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (fun (a : n) (b : n) => _inst_2 a b) (Polynomial.zero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.hasOne.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)))) i j)) (coeFn.{succ u1, succ u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))) (fun (_x : RingHom.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))) => R -> (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)))) (RingHom.hasCoeToFun.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))) (Polynomial.C.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (M i j)))
+but is expected to have type
+  forall {R : Type.{u1}} [_inst_1 : CommRing.{u1} R] {n : Type.{u2}} [_inst_2 : DecidableEq.{succ u2} n] [_inst_3 : Fintype.{u2} n] (M : Matrix.{u2, u2, u1} n n R) (i : n) (j : n), Eq.{succ u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (charmatrix.{u1, u2} R _inst_1 n (fun (a : n) (b : n) => _inst_2 a b) _inst_3 M i j) (HSub.hSub.{u1, u1, u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : R) => Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (M i j)) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (instHSub.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.sub.{u1} R (CommRing.toRing.{u1} R _inst_1))) (HMul.hMul.{u1, u1, u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (instHMul.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.mul'.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.X.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (OfNat.ofNat.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) 1 (One.toOfNat1.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.one.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (fun (a : n) (b : n) => _inst_2 a b) (Polynomial.zero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.one.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) i j)) (FunLike.coe.{succ u1, succ u1, succ u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : R) => Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _x) (MulHomClass.toFunLike.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (RingHom.instRingHomClassRingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))))) (Polynomial.C.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (M i j)))
+Case conversion may be inaccurate. Consider using '#align charmatrix_apply charmatrix_applyₓ'. -/
 theorem charmatrix_apply (M : Matrix n n R) (i j : n) :
     charmatrix M i j = X * (1 : Matrix n n R[X]) i j - C (M i j) :=
   rfl
 #align charmatrix_apply charmatrix_apply
 
+/- warning: charmatrix_apply_eq -> charmatrix_apply_eq is a dubious translation:
+lean 3 declaration is
+  forall {R : Type.{u1}} [_inst_1 : CommRing.{u1} R] {n : Type.{u2}} [_inst_2 : DecidableEq.{succ u2} n] [_inst_3 : Fintype.{u2} n] (M : Matrix.{u2, u2, u1} n n R) (i : n), Eq.{succ u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (charmatrix.{u1, u2} R _inst_1 n (fun (a : n) (b : n) => _inst_2 a b) _inst_3 M i i) (HSub.hSub.{u1, u1, u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (instHSub.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.sub.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.X.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (coeFn.{succ u1, succ u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))) (fun (_x : RingHom.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))) => R -> (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)))) (RingHom.hasCoeToFun.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))) (Polynomial.C.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (M i i)))
+but is expected to have type
+  forall {R : Type.{u1}} [_inst_1 : CommRing.{u1} R] {n : Type.{u2}} [_inst_2 : DecidableEq.{succ u2} n] [_inst_3 : Fintype.{u2} n] (M : Matrix.{u2, u2, u1} n n R) (i : n), Eq.{succ u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (charmatrix.{u1, u2} R _inst_1 n (fun (a : n) (b : n) => _inst_2 a b) _inst_3 M i i) (HSub.hSub.{u1, u1, u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : R) => Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (M i i)) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (instHSub.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.sub.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.X.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (FunLike.coe.{succ u1, succ u1, succ u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : R) => Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _x) (MulHomClass.toFunLike.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (RingHom.instRingHomClassRingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))))) (Polynomial.C.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (M i i)))
+Case conversion may be inaccurate. Consider using '#align charmatrix_apply_eq charmatrix_apply_eqₓ'. -/
 @[simp]
 theorem charmatrix_apply_eq (M : Matrix n n R) (i : n) :
     charmatrix M i i = (X : R[X]) - C (M i i) := by
@@ -64,6 +78,12 @@ theorem charmatrix_apply_eq (M : Matrix n n R) (i : n) :
     map_apply, DMatrix.sub_apply]
 #align charmatrix_apply_eq charmatrix_apply_eq
 
+/- warning: charmatrix_apply_ne -> charmatrix_apply_ne is a dubious translation:
+lean 3 declaration is
+  forall {R : Type.{u1}} [_inst_1 : CommRing.{u1} R] {n : Type.{u2}} [_inst_2 : DecidableEq.{succ u2} n] [_inst_3 : Fintype.{u2} n] (M : Matrix.{u2, u2, u1} n n R) (i : n) (j : n), (Ne.{succ u2} n i j) -> (Eq.{succ u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (charmatrix.{u1, u2} R _inst_1 n (fun (a : n) (b : n) => _inst_2 a b) _inst_3 M i j) (Neg.neg.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.neg'.{u1} R (CommRing.toRing.{u1} R _inst_1)) (coeFn.{succ u1, succ u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))) (fun (_x : RingHom.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))) => R -> (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)))) (RingHom.hasCoeToFun.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))) (Polynomial.C.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (M i j))))
+but is expected to have type
+  forall {R : Type.{u1}} [_inst_1 : CommRing.{u1} R] {n : Type.{u2}} [_inst_2 : DecidableEq.{succ u2} n] [_inst_3 : Fintype.{u2} n] (M : Matrix.{u2, u2, u1} n n R) (i : n) (j : n), (Ne.{succ u2} n i j) -> (Eq.{succ u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (charmatrix.{u1, u2} R _inst_1 n (fun (a : n) (b : n) => _inst_2 a b) _inst_3 M i j) (Neg.neg.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : R) => Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (M i j)) (Polynomial.neg'.{u1} R (CommRing.toRing.{u1} R _inst_1)) (FunLike.coe.{succ u1, succ u1, succ u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : R) => Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _x) (MulHomClass.toFunLike.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (RingHom.instRingHomClassRingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))))) (Polynomial.C.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (M i j))))
+Case conversion may be inaccurate. Consider using '#align charmatrix_apply_ne charmatrix_apply_neₓ'. -/
 @[simp]
 theorem charmatrix_apply_ne (M : Matrix n n R) (i j : n) (h : i ≠ j) :
     charmatrix M i j = -C (M i j) := by
@@ -71,6 +91,12 @@ theorem charmatrix_apply_ne (M : Matrix n n R) (i j : n) (h : i ≠ j) :
     map_apply, DMatrix.sub_apply]
 #align charmatrix_apply_ne charmatrix_apply_ne
 
+/- warning: mat_poly_equiv_charmatrix -> matPolyEquiv_charmatrix is a dubious translation:
+lean 3 declaration is
+  forall {R : Type.{u1}} [_inst_1 : CommRing.{u1} R] {n : Type.{u2}} [_inst_2 : DecidableEq.{succ u2} n] [_inst_3 : Fintype.{u2} n] (M : Matrix.{u2, u2, u1} n n R), Eq.{succ (max u2 u1)} (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (coeFn.{succ (max u2 u1), succ (max u2 u1)} (AlgEquiv.{u1, max u2 u1, max u2 u1} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.algebra.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.algebra.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (fun (_x : AlgEquiv.{u1, max u2 u1, max u2 u1} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.algebra.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.algebra.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) => (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) -> (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))) (AlgEquiv.hasCoeToFun.{u1, max u2 u1, max u2 u1} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.algebra.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.algebra.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (matPolyEquiv.{u2, u1} R (CommRing.toCommSemiring.{u1} R _inst_1) n (fun (a : n) (b : n) => _inst_2 a b) _inst_3) (charmatrix.{u1, u2} R _inst_1 n (fun (a : n) (b : n) => _inst_2 a b) _inst_3 M)) (HSub.hSub.{max u2 u1, max u2 u1, max u2 u1} (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (instHSub.{max u2 u1} (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.sub.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.ring.{u1, u2} n R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toRing.{u1} R _inst_1)))) (Polynomial.X.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (coeFn.{succ (max u2 u1), succ (max u2 u1)} (RingHom.{max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u2 u1} (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (fun (_x : RingHom.{max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u2 u1} (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) => (Matrix.{u2, u2, u1} n n R) -> (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))) (RingHom.hasCoeToFun.{max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u2 u1} (Polynomial.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Polynomial.C.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) M))
+but is expected to have type
+  forall {R : Type.{u1}} [_inst_1 : CommRing.{u1} R] {n : Type.{u2}} [_inst_2 : DecidableEq.{succ u2} n] [_inst_3 : Fintype.{u2} n] (M : Matrix.{u2, u2, u1} n n R), Eq.{max (succ u1) (succ u2)} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) => Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (charmatrix.{u1, u2} R _inst_1 n (fun (a : n) (b : n) => _inst_2 a b) _inst_3 M)) (FunLike.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2), max (succ u1) (succ u2)} (AlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (fun (_x : Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) => Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) _x) (SMulHomClass.toFunLike.{max u1 u2, u1, max u1 u2, max u1 u2} (AlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (SMulZeroClass.toSMul.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddMonoid.toZero.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))))) (DistribSMul.toSMulZeroClass.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddMonoid.toAddZeroClass.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))))) (DistribMulAction.toDistribSMul.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))) (Module.toDistribMulAction.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Algebra.toModule.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))))))) (SMulZeroClass.toSMul.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (AddMonoid.toZero.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))))) (DistribSMul.toSMulZeroClass.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (AddMonoid.toAddZeroClass.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))))) (DistribMulAction.toDistribSMul.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))))) (Module.toDistribMulAction.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))) (Algebra.toModule.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))))))) (DistribMulActionHomClass.toSMulHomClass.{max u1 u2, u1, max u1 u2, max u1 u2} (AlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))) (AddCommMonoid.toAddMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))))) (Module.toDistribMulAction.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Algebra.toModule.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (Module.toDistribMulAction.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))) (Algebra.toModule.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u1 u2, u1, max u1 u2, max u1 u2} (AlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Module.toDistribMulAction.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Algebra.toModule.{u1, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (Module.toDistribMulAction.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))) (Algebra.toModule.{u1, max u1 u2} R (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u1, max u1 u2, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (AlgEquivClass.toAlgHomClass.{max u1 u2, u1, max u1 u2, max u1 u2} (AlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (AlgEquiv.instAlgEquivClassAlgEquiv.{u1, max u1 u2, max u1 u2} R (Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Polynomial.semiring.{max u2 u1} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Polynomial.algebraOfAlgebra.{u1, max u2 u1} R (Matrix.{u2, u2, u1} n n R) (CommRing.toCommSemiring.{u1} R _inst_1) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)) (Matrix.instAlgebraMatrixSemiring.{u1, u2, u1} n R R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toCommSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))))))) (matPolyEquiv.{u2, u1} R (CommRing.toCommSemiring.{u1} R _inst_1) n (fun (a : n) (b : n) => _inst_2 a b) _inst_3) (charmatrix.{u1, u2} R _inst_1 n (fun (a : n) (b : n) => _inst_2 a b) _inst_3 M)) (HSub.hSub.{max u1 u2, max u1 u2, max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Matrix.{u2, u2, u1} n n R) => Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) M) ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Matrix.{u2, u2, u1} n n (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) => Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (charmatrix.{u1, u2} R _inst_1 n (fun (a : n) (b : n) => _inst_2 a b) _inst_3 M)) (instHSub.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.sub.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.instRingMatrix.{u1, u2} n R _inst_3 (fun (a : n) (b : n) => _inst_2 a b) (CommRing.toRing.{u1} R _inst_1)))) (Polynomial.X.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (FunLike.coe.{succ (max u1 u2), succ (max u1 u2), succ (max u1 u2)} (RingHom.{max u1 u2, max u1 u2} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Matrix.{u2, u2, u1} n n R) (fun (_x : Matrix.{u2, u2, u1} n n R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Matrix.{u2, u2, u1} n n R) => Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) _x) (MulHomClass.toFunLike.{max u1 u2, max u1 u2, max u1 u2} (RingHom.{max u1 u2, max u1 u2} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonUnitalNonAssocSemiring.toMul.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (NonUnitalNonAssocSemiring.toMul.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))) (NonUnitalRingHomClass.toMulHomClass.{max u1 u2, max u1 u2, max u1 u2} (RingHom.{max u1 u2, max u1 u2} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (RingHomClass.toNonUnitalRingHomClass.{max u1 u2, max u1 u2, max u1 u2} (RingHom.{max u1 u2, max u1 u2} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))))) (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))) (RingHom.instRingHomClassRingHom.{max u1 u2, max u1 u2} (Matrix.{u2, u2, u1} n n R) (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Semiring.toNonAssocSemiring.{max u1 u2} (Polynomial.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) (Polynomial.semiring.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b)))))))) (Polynomial.C.{max u1 u2} (Matrix.{u2, u2, u1} n n R) (Matrix.semiring.{u1, u2} n R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) _inst_3 (fun (a : n) (b : n) => _inst_2 a b))) M))
+Case conversion may be inaccurate. Consider using '#align mat_poly_equiv_charmatrix matPolyEquiv_charmatrixₓ'. -/
 theorem matPolyEquiv_charmatrix (M : Matrix n n R) : matPolyEquiv (charmatrix M) = X - C M :=
   by
   ext (k i j)
@@ -84,6 +110,7 @@ theorem matPolyEquiv_charmatrix (M : Matrix n n R) : matPolyEquiv (charmatrix M)
     split_ifs <;> simp [h]
 #align mat_poly_equiv_charmatrix matPolyEquiv_charmatrix
 
+#print charmatrix_reindex /-
 theorem charmatrix_reindex {m : Type v} [DecidableEq m] [Fintype m] (e : n ≃ m) (M : Matrix n n R) :
     charmatrix (reindex e e M) = reindex e e (charmatrix M) :=
   by
@@ -91,20 +118,26 @@ theorem charmatrix_reindex {m : Type v} [DecidableEq m] [Fintype m] (e : n ≃ m
   by_cases h : i = j
   all_goals simp [h]
 #align charmatrix_reindex charmatrix_reindex
+-/
 
+#print Matrix.charpoly /-
 /-- The characteristic polynomial of a matrix `M` is given by $\det (t I - M)$.
 -/
 def Matrix.charpoly (M : Matrix n n R) : R[X] :=
   (charmatrix M).det
 #align matrix.charpoly Matrix.charpoly
+-/
 
+#print Matrix.charpoly_reindex /-
 theorem Matrix.charpoly_reindex {m : Type v} [DecidableEq m] [Fintype m] (e : n ≃ m)
     (M : Matrix n n R) : (reindex e e M).charpoly = M.charpoly :=
   by
   unfold Matrix.charpoly
   rw [charmatrix_reindex, Matrix.det_reindex_self]
 #align matrix.charpoly_reindex Matrix.charpoly_reindex
+-/
 
+#print Matrix.aeval_self_charpoly /-
 -- This proof follows http://drorbn.net/AcademicPensieve/2015-12/CayleyHamilton.pdf
 /-- The **Cayley-Hamilton Theorem**, that the characteristic polynomial of a matrix,
 applied to the matrix itself, is zero.
@@ -136,4 +169,5 @@ theorem Matrix.aeval_self_charpoly (M : Matrix n n R) : aeval M M.charpoly = 0 :
   -- Thus we have $χ_M(M) = 0$, which is the desired result.
   exact h
 #align matrix.aeval_self_charpoly Matrix.aeval_self_charpoly
+-/
 
Diff
@@ -49,29 +49,29 @@ open Finset
 The determinant of this matrix is the characteristic polynomial.
 -/
 def charmatrix (M : Matrix n n R) : Matrix n n R[X] :=
-  Matrix.scalar n (x : R[X]) - (c : R →+* R[X]).mapMatrix M
+  Matrix.scalar n (X : R[X]) - (C : R →+* R[X]).mapMatrix M
 #align charmatrix charmatrix
 
 theorem charmatrix_apply (M : Matrix n n R) (i j : n) :
-    charmatrix M i j = x * (1 : Matrix n n R[X]) i j - c (M i j) :=
+    charmatrix M i j = X * (1 : Matrix n n R[X]) i j - C (M i j) :=
   rfl
 #align charmatrix_apply charmatrix_apply
 
 @[simp]
 theorem charmatrix_apply_eq (M : Matrix n n R) (i : n) :
-    charmatrix M i i = (x : R[X]) - c (M i i) := by
+    charmatrix M i i = (X : R[X]) - C (M i i) := by
   simp only [charmatrix, sub_left_inj, Pi.sub_apply, scalar_apply_eq, RingHom.mapMatrix_apply,
     map_apply, DMatrix.sub_apply]
 #align charmatrix_apply_eq charmatrix_apply_eq
 
 @[simp]
 theorem charmatrix_apply_ne (M : Matrix n n R) (i j : n) (h : i ≠ j) :
-    charmatrix M i j = -c (M i j) := by
+    charmatrix M i j = -C (M i j) := by
   simp only [charmatrix, Pi.sub_apply, scalar_apply_ne _ _ _ h, zero_sub, RingHom.mapMatrix_apply,
     map_apply, DMatrix.sub_apply]
 #align charmatrix_apply_ne charmatrix_apply_ne
 
-theorem matPolyEquiv_charmatrix (M : Matrix n n R) : matPolyEquiv (charmatrix M) = x - c M :=
+theorem matPolyEquiv_charmatrix (M : Matrix n n R) : matPolyEquiv (charmatrix M) = X - C M :=
   by
   ext (k i j)
   simp only [matPolyEquiv_coeff_apply, coeff_sub, Pi.sub_apply]

Changes in mathlib4

mathlib3
mathlib4
chore: tidy various files (#12316)
Diff
@@ -25,10 +25,6 @@ See the file `Mathlib/LinearAlgebra/Matrix/Charpoly/Coeff.lean` for corollaries
 We follow a nice proof from http://drorbn.net/AcademicPensieve/2015-12/CayleyHamilton.pdf
 -/
 
--- Porting note: these imports are no longer needed
---import Mathlib.Tactic.ApplyFun
---import Mathlib.Tactic.Squeeze
-
 noncomputable section
 
 universe u v w
@@ -112,8 +108,8 @@ theorem charpoly_reindex (e : n ≃ m)
 
 lemma charpoly_map (M : Matrix n n R) (f : R →+* S) :
     (M.map f).charpoly = M.charpoly.map f := by
-  rw [charpoly, charmatrix_map, ← Polynomial.coe_mapRingHom, charpoly, RingHom.map_det]
-  rfl
+  rw [charpoly, charmatrix_map, ← Polynomial.coe_mapRingHom, charpoly, RingHom.map_det,
+    RingHom.mapMatrix_apply]
 
 @[simp]
 lemma charpoly_fromBlocks_zero₁₂ :
chore(LinearAlgebra/Matrix/Charpoly): fix swapped lines (#12162)
Diff
@@ -114,8 +114,8 @@ lemma charpoly_map (M : Matrix n n R) (f : R →+* S) :
     (M.map f).charpoly = M.charpoly.map f := by
   rw [charpoly, charmatrix_map, ← Polynomial.coe_mapRingHom, charpoly, RingHom.map_det]
   rfl
-@[simp]
 
+@[simp]
 lemma charpoly_fromBlocks_zero₁₂ :
     (fromBlocks M₁₁ 0 M₂₁ M₂₂).charpoly = (M₁₁.charpoly * M₂₂.charpoly) := by
   simp only [charpoly, charmatrix_fromBlocks, Matrix.map_zero _ (Polynomial.C_0), neg_zero,
style: homogenise porting notes (#11145)

Homogenises porting notes via capitalisation and addition of whitespace.

It makes the following changes:

  • converts "--porting note" into "-- Porting note";
  • converts "porting note" into "Porting note".
Diff
@@ -25,7 +25,7 @@ See the file `Mathlib/LinearAlgebra/Matrix/Charpoly/Coeff.lean` for corollaries
 We follow a nice proof from http://drorbn.net/AcademicPensieve/2015-12/CayleyHamilton.pdf
 -/
 
--- porting note: these imports are no longer needed
+-- Porting note: these imports are no longer needed
 --import Mathlib.Tactic.ApplyFun
 --import Mathlib.Tactic.Squeeze
 
chore(LinearAlgebra/Matrix/Charpoly): place more decls in Matrix namespace (#10488)
Diff
@@ -33,39 +33,40 @@ noncomputable section
 
 universe u v w
 
-open Polynomial Matrix BigOperators Polynomial
+namespace Matrix
+
+open BigOperators Finset Matrix Polynomial
 
 variable {R S : Type*} [CommRing R] [CommRing S]
 variable {m n : Type*} [DecidableEq m] [DecidableEq n] [Fintype m] [Fintype n]
 variable (M₁₁ : Matrix m m R) (M₁₂ : Matrix m n R) (M₂₁ : Matrix n m R) (M₂₂ M : Matrix n n R)
 variable (i j : n)
 
-open Finset
 
 /-- The "characteristic matrix" of `M : Matrix n n R` is the matrix of polynomials $t I - M$.
 The determinant of this matrix is the characteristic polynomial.
 -/
 def charmatrix (M : Matrix n n R) : Matrix n n R[X] :=
   Matrix.scalar n (X : R[X]) - (C : R →+* R[X]).mapMatrix M
-#align charmatrix charmatrix
+#align charmatrix Matrix.charmatrix
 
 theorem charmatrix_apply :
     charmatrix M i j = (Matrix.diagonal fun _ : n => X) i j - C (M i j) :=
   rfl
-#align charmatrix_apply charmatrix_apply
+#align charmatrix_apply Matrix.charmatrix_apply
 
 @[simp]
 theorem charmatrix_apply_eq : charmatrix M i i = (X : R[X]) - C (M i i) := by
   simp only [charmatrix, RingHom.mapMatrix_apply, sub_apply, scalar_apply, map_apply,
     diagonal_apply_eq]
 
-#align charmatrix_apply_eq charmatrix_apply_eq
+#align charmatrix_apply_eq Matrix.charmatrix_apply_eq
 
 @[simp]
 theorem charmatrix_apply_ne (h : i ≠ j) : charmatrix M i j = -C (M i j) := by
   simp only [charmatrix, RingHom.mapMatrix_apply, sub_apply, scalar_apply, diagonal_apply_ne _ h,
     map_apply, sub_eq_neg_self]
-#align charmatrix_apply_ne charmatrix_apply_ne
+#align charmatrix_apply_ne Matrix.charmatrix_apply_ne
 
 theorem matPolyEquiv_charmatrix : matPolyEquiv (charmatrix M) = X - C M := by
   ext k i j
@@ -77,14 +78,14 @@ theorem matPolyEquiv_charmatrix : matPolyEquiv (charmatrix M) = X - C M := by
     split_ifs <;> simp
   · rw [charmatrix_apply_ne _ _ _ h, coeff_X, coeff_neg, coeff_C, coeff_C]
     split_ifs <;> simp [h]
-#align mat_poly_equiv_charmatrix matPolyEquiv_charmatrix
+#align mat_poly_equiv_charmatrix Matrix.matPolyEquiv_charmatrix
 
 theorem charmatrix_reindex (e : n ≃ m) :
     charmatrix (reindex e e M) = reindex e e (charmatrix M) := by
   ext i j x
   by_cases h : i = j
   all_goals simp [h]
-#align charmatrix_reindex charmatrix_reindex
+#align charmatrix_reindex Matrix.charmatrix_reindex
 
 lemma charmatrix_map (M : Matrix n n R) (f : R →+* S) :
     charmatrix (M.map f) = (charmatrix M).map (Polynomial.map f) := by
@@ -97,8 +98,6 @@ lemma charmatrix_fromBlocks :
   simp only [charmatrix]
   ext (i|i) (j|j) : 2 <;> simp [diagonal]
 
-namespace Matrix
-
 /-- The characteristic polynomial of a matrix `M` is given by $\det (t I - M)$.
 -/
 def charpoly (M : Matrix n n R) : R[X] :=
feat(LinearAlgebra/Charpoly): the universal characteristic polynomial (#10358)
Diff
@@ -35,7 +35,7 @@ universe u v w
 
 open Polynomial Matrix BigOperators Polynomial
 
-variable {R : Type u} [CommRing R]
+variable {R S : Type*} [CommRing R] [CommRing S]
 variable {m n : Type*} [DecidableEq m] [DecidableEq n] [Fintype m] [Fintype n]
 variable (M₁₁ : Matrix m m R) (M₁₂ : Matrix m n R) (M₂₁ : Matrix n m R) (M₂₂ M : Matrix n n R)
 variable (i j : n)
@@ -86,6 +86,11 @@ theorem charmatrix_reindex (e : n ≃ m) :
   all_goals simp [h]
 #align charmatrix_reindex charmatrix_reindex
 
+lemma charmatrix_map (M : Matrix n n R) (f : R →+* S) :
+    charmatrix (M.map f) = (charmatrix M).map (Polynomial.map f) := by
+  ext i j
+  by_cases h : i = j <;> simp [h, charmatrix, diagonal]
+
 lemma charmatrix_fromBlocks :
     charmatrix (fromBlocks M₁₁ M₁₂ M₂₁ M₂₂) =
       fromBlocks (charmatrix M₁₁) (- M₁₂.map C) (- M₂₁.map C) (charmatrix M₂₂) := by
@@ -106,7 +111,12 @@ theorem charpoly_reindex (e : n ≃ m)
   rw [charmatrix_reindex, Matrix.det_reindex_self]
 #align matrix.charpoly_reindex Matrix.charpoly_reindex
 
+lemma charpoly_map (M : Matrix n n R) (f : R →+* S) :
+    (M.map f).charpoly = M.charpoly.map f := by
+  rw [charpoly, charmatrix_map, ← Polynomial.coe_mapRingHom, charpoly, RingHom.map_det]
+  rfl
 @[simp]
+
 lemma charpoly_fromBlocks_zero₁₂ :
     (fromBlocks M₁₁ 0 M₂₁ M₂₂).charpoly = (M₁₁.charpoly * M₂₂.charpoly) := by
   simp only [charpoly, charmatrix_fromBlocks, Matrix.map_zero _ (Polynomial.C_0), neg_zero,
chore(LinearAlgebra/Matrix/Charpoly): charpoly of block matrix (#10480)
Diff
@@ -36,8 +36,9 @@ universe u v w
 open Polynomial Matrix BigOperators Polynomial
 
 variable {R : Type u} [CommRing R]
-
-variable {n : Type w} [DecidableEq n] [Fintype n]
+variable {m n : Type*} [DecidableEq m] [DecidableEq n] [Fintype m] [Fintype n]
+variable (M₁₁ : Matrix m m R) (M₁₂ : Matrix m n R) (M₂₁ : Matrix n m R) (M₂₂ M : Matrix n n R)
+variable (i j : n)
 
 open Finset
 
@@ -48,27 +49,25 @@ def charmatrix (M : Matrix n n R) : Matrix n n R[X] :=
   Matrix.scalar n (X : R[X]) - (C : R →+* R[X]).mapMatrix M
 #align charmatrix charmatrix
 
-theorem charmatrix_apply (M : Matrix n n R) (i j : n) :
+theorem charmatrix_apply :
     charmatrix M i j = (Matrix.diagonal fun _ : n => X) i j - C (M i j) :=
   rfl
 #align charmatrix_apply charmatrix_apply
 
 @[simp]
-theorem charmatrix_apply_eq (M : Matrix n n R) (i : n) :
-    charmatrix M i i = (X : R[X]) - C (M i i) := by
+theorem charmatrix_apply_eq : charmatrix M i i = (X : R[X]) - C (M i i) := by
   simp only [charmatrix, RingHom.mapMatrix_apply, sub_apply, scalar_apply, map_apply,
     diagonal_apply_eq]
 
 #align charmatrix_apply_eq charmatrix_apply_eq
 
 @[simp]
-theorem charmatrix_apply_ne (M : Matrix n n R) (i j : n) (h : i ≠ j) :
-    charmatrix M i j = -C (M i j) := by
+theorem charmatrix_apply_ne (h : i ≠ j) : charmatrix M i j = -C (M i j) := by
   simp only [charmatrix, RingHom.mapMatrix_apply, sub_apply, scalar_apply, diagonal_apply_ne _ h,
     map_apply, sub_eq_neg_self]
 #align charmatrix_apply_ne charmatrix_apply_ne
 
-theorem matPolyEquiv_charmatrix (M : Matrix n n R) : matPolyEquiv (charmatrix M) = X - C M := by
+theorem matPolyEquiv_charmatrix : matPolyEquiv (charmatrix M) = X - C M := by
   ext k i j
   simp only [matPolyEquiv_coeff_apply, coeff_sub, Pi.sub_apply]
   by_cases h : i = j
@@ -80,25 +79,45 @@ theorem matPolyEquiv_charmatrix (M : Matrix n n R) : matPolyEquiv (charmatrix M)
     split_ifs <;> simp [h]
 #align mat_poly_equiv_charmatrix matPolyEquiv_charmatrix
 
-theorem charmatrix_reindex {m : Type v} [DecidableEq m] [Fintype m] (e : n ≃ m) (M : Matrix n n R) :
+theorem charmatrix_reindex (e : n ≃ m) :
     charmatrix (reindex e e M) = reindex e e (charmatrix M) := by
   ext i j x
   by_cases h : i = j
   all_goals simp [h]
 #align charmatrix_reindex charmatrix_reindex
 
+lemma charmatrix_fromBlocks :
+    charmatrix (fromBlocks M₁₁ M₁₂ M₂₁ M₂₂) =
+      fromBlocks (charmatrix M₁₁) (- M₁₂.map C) (- M₂₁.map C) (charmatrix M₂₂) := by
+  simp only [charmatrix]
+  ext (i|i) (j|j) : 2 <;> simp [diagonal]
+
+namespace Matrix
+
 /-- The characteristic polynomial of a matrix `M` is given by $\det (t I - M)$.
 -/
-def Matrix.charpoly (M : Matrix n n R) : R[X] :=
+def charpoly (M : Matrix n n R) : R[X] :=
   (charmatrix M).det
 #align matrix.charpoly Matrix.charpoly
 
-theorem Matrix.charpoly_reindex {m : Type v} [DecidableEq m] [Fintype m] (e : n ≃ m)
+theorem charpoly_reindex (e : n ≃ m)
     (M : Matrix n n R) : (reindex e e M).charpoly = M.charpoly := by
   unfold Matrix.charpoly
   rw [charmatrix_reindex, Matrix.det_reindex_self]
 #align matrix.charpoly_reindex Matrix.charpoly_reindex
 
+@[simp]
+lemma charpoly_fromBlocks_zero₁₂ :
+    (fromBlocks M₁₁ 0 M₂₁ M₂₂).charpoly = (M₁₁.charpoly * M₂₂.charpoly) := by
+  simp only [charpoly, charmatrix_fromBlocks, Matrix.map_zero _ (Polynomial.C_0), neg_zero,
+    det_fromBlocks_zero₁₂]
+
+@[simp]
+lemma charpoly_fromBlocks_zero₂₁ :
+    (fromBlocks M₁₁ M₁₂ 0 M₂₂).charpoly = (M₁₁.charpoly * M₂₂.charpoly) := by
+  simp only [charpoly, charmatrix_fromBlocks, Matrix.map_zero _ (Polynomial.C_0), neg_zero,
+    det_fromBlocks_zero₂₁]
+
 -- This proof follows http://drorbn.net/AcademicPensieve/2015-12/CayleyHamilton.pdf
 /-- The **Cayley-Hamilton Theorem**, that the characteristic polynomial of a matrix,
 applied to the matrix itself, is zero.
@@ -107,7 +126,7 @@ This holds over any commutative ring.
 
 See `LinearMap.aeval_self_charpoly` for the equivalent statement about endomorphisms.
 -/
-theorem Matrix.aeval_self_charpoly (M : Matrix n n R) : aeval M M.charpoly = 0 := by
+theorem aeval_self_charpoly (M : Matrix n n R) : aeval M M.charpoly = 0 := by
   -- We begin with the fact $χ_M(t) I = adjugate (t I - M) * (t I - M)$,
   -- as an identity in `Matrix n n R[X]`.
   have h : M.charpoly • (1 : Matrix n n R[X]) = adjugate (charmatrix M) * charmatrix M :=
@@ -129,3 +148,5 @@ theorem Matrix.aeval_self_charpoly (M : Matrix n n R) : aeval M M.charpoly = 0 :
   -- Thus we have $χ_M(M) = 0$, which is the desired result.
   exact h
 #align matrix.aeval_self_charpoly Matrix.aeval_self_charpoly
+
+end Matrix
refactor(Data/Matrix/Basic): use a defeq for scalar that matches its docstring (#8115)

This changes the defeq from scalar a = a • 1 to scalar a = diagonal fun _ => a, which has the nice bonus of making algebraMap_eq_diagonal true by rfl.

As a result, we need a new smul_one_eq_diagonal lemma to rewrite diagonal fun _ => a back into a • 1, along with some variants for convenience.

In the long term we could generalize this to non-unital rings, now that it needs no 1.

Diff
@@ -49,22 +49,23 @@ def charmatrix (M : Matrix n n R) : Matrix n n R[X] :=
 #align charmatrix charmatrix
 
 theorem charmatrix_apply (M : Matrix n n R) (i j : n) :
-    charmatrix M i j = X * (1 : Matrix n n R[X]) i j - C (M i j) :=
+    charmatrix M i j = (Matrix.diagonal fun _ : n => X) i j - C (M i j) :=
   rfl
 #align charmatrix_apply charmatrix_apply
 
 @[simp]
 theorem charmatrix_apply_eq (M : Matrix n n R) (i : n) :
     charmatrix M i i = (X : R[X]) - C (M i i) := by
-  simp only [charmatrix, RingHom.mapMatrix_apply, sub_apply, scalar_apply_eq, map_apply]
+  simp only [charmatrix, RingHom.mapMatrix_apply, sub_apply, scalar_apply, map_apply,
+    diagonal_apply_eq]
 
 #align charmatrix_apply_eq charmatrix_apply_eq
 
 @[simp]
 theorem charmatrix_apply_ne (M : Matrix n n R) (i j : n) (h : i ≠ j) :
     charmatrix M i j = -C (M i j) := by
-  simp only [charmatrix, RingHom.mapMatrix_apply, sub_apply, scalar_apply_ne _ _ _ h, map_apply,
-    sub_eq_neg_self]
+  simp only [charmatrix, RingHom.mapMatrix_apply, sub_apply, scalar_apply, diagonal_apply_ne _ h,
+    map_apply, sub_eq_neg_self]
 #align charmatrix_apply_ne charmatrix_apply_ne
 
 theorem matPolyEquiv_charmatrix (M : Matrix n n R) : matPolyEquiv (charmatrix M) = X - C M := by
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2020 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison
-
-! This file was ported from Lean 3 source module linear_algebra.matrix.charpoly.basic
-! leanprover-community/mathlib commit 70fd9563a21e7b963887c9360bd29b2393e6225a
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.LinearAlgebra.Matrix.Adjugate
 import Mathlib.RingTheory.PolynomialAlgebra
 
+#align_import linear_algebra.matrix.charpoly.basic from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
+
 /-!
 # Characteristic polynomials and the Cayley-Hamilton theorem
 
chore: clean up spacing around at and goals (#5387)

Changes are of the form

  • some_tactic at h⊢ -> some_tactic at h ⊢
  • some_tactic at h -> some_tactic at h
Diff
@@ -116,14 +116,14 @@ theorem Matrix.aeval_self_charpoly (M : Matrix n n R) : aeval M M.charpoly = 0 :
     (adjugate_mul _).symm
   -- Using the algebra isomorphism `Matrix n n R[X] ≃ₐ[R] Polynomial (Matrix n n R)`,
   -- we have the same identity in `Polynomial (Matrix n n R)`.
-  apply_fun matPolyEquiv  at h
+  apply_fun matPolyEquiv at h
   simp only [matPolyEquiv.map_mul, matPolyEquiv_charmatrix] at h
   -- Because the coefficient ring `Matrix n n R` is non-commutative,
   -- evaluation at `M` is not multiplicative.
   -- However, any polynomial which is a product of the form $N * (t I - M)$
   -- is sent to zero, because the evaluation function puts the polynomial variable
   -- to the right of any coefficients, so everything telescopes.
-  apply_fun fun p => p.eval M  at h
+  apply_fun fun p => p.eval M at h
   rw [eval_mul_X_sub_C] at h
   -- Now $χ_M (t) I$, when thought of as a polynomial of matrices
   -- and evaluated at some `N` is exactly $χ_M (N)$.
chore: remove superfluous parentheses in calls to ext (#5258)

Co-authored-by: Xavier Roblot <46200072+xroblot@users.noreply.github.com> Co-authored-by: Joël Riou <joel.riou@universite-paris-saclay.fr> Co-authored-by: Riccardo Brasca <riccardo.brasca@gmail.com> Co-authored-by: Yury G. Kudryashov <urkud@urkud.name> Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com> Co-authored-by: Pol'tta / Miyahara Kō <pol_tta@outlook.jp> Co-authored-by: Jason Yuen <jason_yuen2007@hotmail.com> Co-authored-by: Mario Carneiro <di.gama@gmail.com> Co-authored-by: Jireh Loreaux <loreaujy@gmail.com> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com> Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: Heather Macbeth <25316162+hrmacbeth@users.noreply.github.com> Co-authored-by: Jujian Zhang <jujian.zhang1998@outlook.com> Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>

Diff
@@ -71,7 +71,7 @@ theorem charmatrix_apply_ne (M : Matrix n n R) (i j : n) (h : i ≠ j) :
 #align charmatrix_apply_ne charmatrix_apply_ne
 
 theorem matPolyEquiv_charmatrix (M : Matrix n n R) : matPolyEquiv (charmatrix M) = X - C M := by
-  ext (k i j)
+  ext k i j
   simp only [matPolyEquiv_coeff_apply, coeff_sub, Pi.sub_apply]
   by_cases h : i = j
   · subst h
@@ -84,7 +84,7 @@ theorem matPolyEquiv_charmatrix (M : Matrix n n R) : matPolyEquiv (charmatrix M)
 
 theorem charmatrix_reindex {m : Type v} [DecidableEq m] [Fintype m] (e : n ≃ m) (M : Matrix n n R) :
     charmatrix (reindex e e M) = reindex e e (charmatrix M) := by
-  ext (i j x)
+  ext i j x
   by_cases h : i = j
   all_goals simp [h]
 #align charmatrix_reindex charmatrix_reindex
chore: tidy various files (#4757)
Diff
@@ -17,7 +17,7 @@ import Mathlib.RingTheory.PolynomialAlgebra
 We define characteristic polynomials of matrices and
 prove the Cayley–Hamilton theorem over arbitrary commutative rings.
 
-See the file `matrix/charpoly/coeff` for corollaries of this theorem.
+See the file `Mathlib/LinearAlgebra/Matrix/Charpoly/Coeff.lean` for corollaries of this theorem.
 
 ## Main definitions
 
@@ -36,9 +36,7 @@ noncomputable section
 
 universe u v w
 
-open Polynomial Matrix
-
-open BigOperators Polynomial
+open Polynomial Matrix BigOperators Polynomial
 
 variable {R : Type u} [CommRing R]
 
chore: fix upper/lowercase in comments (#4360)
  • Run a non-interactive version of fix-comments.py on all files.
  • Go through the diff and manually add/discard/edit chunks.
Diff
@@ -21,7 +21,7 @@ See the file `matrix/charpoly/coeff` for corollaries of this theorem.
 
 ## Main definitions
 
-* `matrix.charpoly` is the characteristic polynomial of a matrix.
+* `Matrix.charpoly` is the characteristic polynomial of a matrix.
 
 ## Implementation details
 
@@ -46,7 +46,7 @@ variable {n : Type w} [DecidableEq n] [Fintype n]
 
 open Finset
 
-/-- The "characteristic matrix" of `M : matrix n n R` is the matrix of polynomials $t I - M$.
+/-- The "characteristic matrix" of `M : Matrix n n R` is the matrix of polynomials $t I - M$.
 The determinant of this matrix is the characteristic polynomial.
 -/
 def charmatrix (M : Matrix n n R) : Matrix n n R[X] :=
@@ -109,18 +109,18 @@ applied to the matrix itself, is zero.
 
 This holds over any commutative ring.
 
-See `linear_map.aeval_self_charpoly` for the equivalent statement about endomorphisms.
+See `LinearMap.aeval_self_charpoly` for the equivalent statement about endomorphisms.
 -/
 theorem Matrix.aeval_self_charpoly (M : Matrix n n R) : aeval M M.charpoly = 0 := by
   -- We begin with the fact $χ_M(t) I = adjugate (t I - M) * (t I - M)$,
-  -- as an identity in `matrix n n R[X]`.
+  -- as an identity in `Matrix n n R[X]`.
   have h : M.charpoly • (1 : Matrix n n R[X]) = adjugate (charmatrix M) * charmatrix M :=
     (adjugate_mul _).symm
-  -- Using the algebra isomorphism `matrix n n R[X] ≃ₐ[R] polynomial (matrix n n R)`,
-  -- we have the same identity in `polynomial (matrix n n R)`.
+  -- Using the algebra isomorphism `Matrix n n R[X] ≃ₐ[R] Polynomial (Matrix n n R)`,
+  -- we have the same identity in `Polynomial (Matrix n n R)`.
   apply_fun matPolyEquiv  at h
   simp only [matPolyEquiv.map_mul, matPolyEquiv_charmatrix] at h
-  -- Because the coefficient ring `matrix n n R` is non-commutative,
+  -- Because the coefficient ring `Matrix n n R` is non-commutative,
   -- evaluation at `M` is not multiplicative.
   -- However, any polynomial which is a product of the form $N * (t I - M)$
   -- is sent to zero, because the evaluation function puts the polynomial variable
feat: port LinearAlgebra.Matrix.Charpoly.Basic (#4118)

Very few fixes were needed for this file!

Co-authored-by: ChrisHughes24 <chrishughes24@gmail.com> Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Dependencies 10 + 608

609 files ported (98.4%)
257449 lines ported (98.7%)
Show graph

The unported dependencies are