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 *)

Lemma det_diag n (d : 'rV[R]_n) : \det (diag_mx d) = \prod_i d 0 i.