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.

Lemma expand_det_row n (A : 'M[R]_n) i0 :
\det A = \sum_j A i0 j * cofactor A i0 j.