(* Matrix multiplication using bigops. *)
Definition mulmx {m n p} (A : 'M_(m, n)) (B : 'M_(n, p)) : 'M[R]_(m, p) :=
\matrix[mulmx_key]_(i, k) \sum_j (A i j * B j k).
Local Notation "A *m B" := (mulmx A B) : ring_scope.

(* Specifications: *)
Lemma mulmxA m n p q (A : 'M_(m, n)) (B : 'M_(n, p)) (C : 'M_(p, q)) :
A *m (B *m C) = A *m B *m C.
Lemma mul0mx m n p (A : 'M_(n, p)) : 0 *m A = 0 :> 'M_(m, p).
Lemma mulmx0 m n p (A : 'M_(m, n)) : A *m 0 = 0 :> 'M_(m, p).
Lemma mulmxN m n p (A : 'M_(m, n)) (B : 'M_(n, p)) : A *m (- B) = - (A *m B).
Lemma mulNmx m n p (A : 'M_(m, n)) (B : 'M_(n, p)) : - A *m B = - (A *m B).
Lemma mulmxDl m n p (A1 A2 : 'M_(m, n)) (B : 'M_(n, p)) :
(A1 + A2) *m B = A1 *m B + A2 *m B.
Lemma mulmxDr m n p (A : 'M_(m, n)) (B1 B2 : 'M_(n, p)) :
A *m (B1 + B2) = A *m B1 + A *m B2.
Lemma mulmxBl m n p (A1 A2 : 'M_(m, n)) (B : 'M_(n, p)) :
(A1 - A2) *m B = A1 *m B - A2 *m B.
Lemma mulmx_sumr m n p (A : 'M_(m, n)) I r P (B_ : I -> 'M_(n, p)) :
A *m (\sum_(i <- r | P i) B_ i) = \sum_(i <- r | P i) A *m B_ i.
Lemma scalemxAl m n p a (A : 'M_(m, n)) (B : 'M_(n, p)) :
a *: (A *m B) = (a *: A) *m B.