Section MatrixAlgType.
Variable n' : nat.
Local Notation n := n'.+1.
Canonical matrix_algType :=
Eval hnf in AlgType R 'M[R]_n (fun k => scalemxAr k).
End MatrixAlgType.
(* The theory of determinants *)
End MatrixInv.
Prenex Implicits unitmx invmx invmxK.

Lemma block_diag_mx_unit (R : comUnitRingType) n1 n2
(Aul : 'M[R]_n1) (Adr : 'M[R]_n2) :
(block_mx Aul 0 0 Adr \in unitmx) = (Aul \in unitmx) && (Adr \in unitmx).