Canonical lin_mulmxr_linear := Linear lin_mulmxr_is_linear.
End Mulmxr.
(* The trace. *)
Section Trace.
Variable n : nat.
Definition mxtrace (A : 'M[R]_n) := \sum_i A i i.
Local Notation "'\tr' A" := (mxtrace A) : ring_scope.

(* Specifications: *)
Lemma mxtrace_tr A : \tr A^T = \tr A.
Canonical mxtrace_additive := Additive mxtrace_is_scalar.