Definition mxnonsimple_form (U : 'M[term F]_n) :=
let V := vec_mx (row_var F (n * n) 0) in
let nzV := (~ mxrank_form 0 V)%T in
let properVU := (submx_form V U /\ ~ submx_form U V)%T in
(Exists_row_form (n * n) 0 (mxmodule_form V /\ nzV /\ properVU))%T.
End Definitions.
Variables (F : decFieldType) (gT : finGroupType) (G : {group gT}) (n : nat).
Variable rG : mx_representation F G n.
Definition mxnonsimple_sat U :=
GRing.sat (@row_env _ (n * n) [::]) (mxnonsimple_form rG (mx_term U)).

(* Specifications: *)
Lemma mxnonsimpleP U :
U != 0 -> reflect (mxnonsimple rG U) (mxnonsimple_sat U).
Lemma dec_mxsimple_exists (U : 'M_n) :
mxmodule rG U -> U != 0 -> {V | mxsimple rG V & V <= U}%MS.
Lemma dec_mx_reducible_semisimple U :
mxmodule rG U -> mx_completely_reducible rG U -> mxsemisimple rG U.
Lemma DecSocleType : socleType rG.
End DecideRed.