Section SquareBlockMatrixRing.
Context {R : ringType} {p : nat} {p_ : 'I_p -> nat}.
Notation sp := (\sum_i p_ i)%N.
Implicit Type (s : 'I_sp).

Lemma mxtrace_mxblock (B_ : forall i j, 'M[R]_(p_ i, p_ j)) :
\tr (\mxblock_(i, j) B_ i j) = \sum_i \tr (B_ i i).