proposition: Lemma mxtrace_mxdiag (B_ : forall i, 'M[R]_(p_ i)) : \tr (\mxdiag_i B_ i) = \sum_i \tr (B_ i).
proof: Proof. by rewrite mxtrace_mxblock; apply: eq_bigr => i _; rewrite eqxx/= conform_mx_id. Qed.
imports: HB(structures) mathcomp(ssreflect ssrbool ssrfun eqtype ssrnat seq choice) mathcomp(fintype finfun bigop finset fingroup perm order) mathcomp(div prime binomial ssralg countalg finalg zmodp)