proposition: Lemma diag_mxrow (B_ : forall j, 'rV[R]_(p_ j)) : diag_mx (\mxrow_j B_ j) = \mxdiag_j (diag_mx (B_ j)).
proof: Proof. apply/matrixP => s s'; rewrite !mxE/= -(can_eq sigK) /sig1 /sig2. case: (sig s) (sig s') => [/= i j] [/= i' j']. rewrite -tag_eqE /tag_eq/=; case: (eqVneq i i') => ii'; rewrite ?mxE//=. by case: _ / ii' in j' *; rewrite tagged_asE/= conform_mx_id mxE. 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)