Section CentMxDef.
Variables (m n : nat) (R : 'A[F]_(m, n)).
Definition cent_mx_fun (B : 'M[F]_n) := R *m lin_mx (mulmxr B \- mulmx B).
Canonical cent_mx_fun_additive := Additive cent_mx_fun_is_linear.
Canonical cent_mx_fun_linear := Linear cent_mx_fun_is_linear.
Definition cent_mx := kermx (lin_mx cent_mx_fun).
Definition center_mx := (R :&: cent_mx)%MS.
End CentMxDef.
Local Notation "''C' ( R )" := (cent_mx R) : matrix_set_scope.
Local Notation "''Z' ( R )" := (center_mx R) : matrix_set_scope.
Arguments cent_rowP {m n B R}.
Arguments cent_mxP {m n B R}.
Arguments center_mxP {m n A R}.

Lemma mxdirect_sums_center (I : finType) m n (R : 'A_(m, n)) R_ :
(\sum_i R_ i :=: R)%MS -> mxdirect (\sum_i R_ i) ->
(forall i : I, mx_ideal R (R_ i)) ->
('Z(R) :=: \sum_i 'Z(R_ i))%MS.