(* Simple modules (we reserve the term "irreducible" for representations).    *)
Definition mxnonsimple (U : 'M_n) :=
exists V : 'M_n, [&& mxmodule V, (V <= U)%MS, V != 0 & \rank V < \rank U].

(* Specifications: *)
Lemma mxsimpleP U :
[/\ mxmodule U, U != 0 & ~ mxnonsimple U] <-> mxsimple U.
Lemma mxsimple_module U : mxsimple U -> mxmodule U.
Lemma mx_iso_simple U V : mx_iso U V -> mxsimple U -> mxsimple V.
Lemma mxsimple_cyclic u U :
mxsimple U -> u != 0 -> (u <= U)%MS -> (U :=: cyclic_mx u)%MS.
(* The surjective part of Schur's lemma. *)
Lemma mx_Schur_onto m (U : 'M_(m, n)) V f :
mxmodule U -> mxsimple V -> (U <= dom_hom_mx f)%MS ->
(U *m f <= V)%MS -> U *m f != 0 -> (U *m f :=: V)%MS.
(* The injective part of Schur's lemma. *)
Lemma mx_Schur_inj U f :
mxsimple U -> (U <= dom_hom_mx f)%MS -> U *m f != 0 -> (U :&: kermx f)%MS = 0.
(* The injectve part of Schur's lemma, stated as isomorphism with the image. *)
Lemma mx_Schur_inj_iso U f :
mxsimple U -> (U <= dom_hom_mx f)%MS -> U *m f != 0 -> mx_iso U (U *m f).
(* The isomorphism part of Schur's lemma. *)
Lemma mx_Schur_iso U V f :
mxsimple U -> mxsimple V -> (U <= dom_hom_mx f)%MS ->
(U *m f <= V)%MS -> U *m f != 0 -> mx_iso U V.