Section SquareBlockMatrixZmod.
Context {V : zmodType} {p : nat} {p_ : 'I_p -> nat}.
Notation sp := (\sum_i p_ i)%N.
Implicit Type (s : 'I_sp).
Definition mxdiag (B_ : forall i, 'M[V]_(p_ i)) : 'M[V]_(\sum_i p_ i) :=
\mxblock_(j, k) if j == k then conform_mx 0 (B_ j) else 0.
Local Notation "\mxdiag_ i E" := (mxdiag (fun i => E)) : ring_scope.

Lemma col_mxdiag (B_ : forall i, 'M[V]_(p_ i)) k :
let B'_ i := if sig1 k == i then conform_mx 0 (B_ i) else 0 in
col k (\mxdiag_ i B_ i) = col (sig2 k) (\mxcol_i B'_ i).