(* For us, "semisimple" means "sum of simple modules"; this is classically,   *)
(* but not intuitionistically, equivalent to the "completely reducible"       *)
(* alternate characterization.                                                *)
Implicit Type I : finType.
Variant mxsemisimple (V : 'M_n) :=
MxSemisimple I U (W := (\sum_(i : I) U i)%MS) of
forall i, mxsimple (U i) & (W :=: V)%MS & mxdirect W.

Lemma sum_mxsimple_direct_sub I W (V : 'M_n) :
(forall i : I, mxsimple (W i)) -> (\sum_i W i :=: V)%MS ->
{J : {set I} | let S := \sum_(i in J) W i in S :=: V /\ mxdirect S}%MS.