Section JordanHolder.
Variables (gT : finGroupType) (G : {group gT}).
Variables (n : nat) (rG : mx_representation F G n).
Local Notation modG := ((mxmodule rG) n).
Definition section_repr U V (modU : modG U) (modV : modG V) :=
submod_repr (section_module modU modV).
Definition max_submod (U V : 'M_n) :=
(U < V)%MS /\ (forall W, ~ [/\ modG W, U < W & W < V])%MS.
Definition mx_subseries := all modG.
Definition mx_composition_series V :=
mx_subseries V /\ (forall i, i < size V -> max_submod (0 :: V)`_i V`_i).
Local Notation mx_series := mx_composition_series.
Fact mx_subseries_module V i : mx_subseries V -> mxmodule rG V`_i.
Fact mx_subseries_module' V i : mx_subseries V -> mxmodule rG (0 :: V)`_i.
Let rsim_rcons U V compU compUV i : i < size U ->
mx_rsim (@series_repr U i compU) (@series_repr (rcons U V) i compUV).
Let last_mod U (compU : mx_series U) : modG (last 0 U).
Let rsim_last U V modUm modV compUV :
mx_rsim (@section_repr (last 0 U) V modUm modV)
(@series_repr (rcons U V) (size U) compUV).
Local Notation rsimT := mx_rsim_trans.
Local Notation rsimC := mx_rsim_sym.

Lemma mx_JordanHolder U V compU compV :
let m := size U in (last 0 U :=: last 0 V)%MS ->
m = size V  /\ (exists p : 'S_m, forall i : 'I_m,
mx_rsim (@series_repr U i compU) (@series_repr V (p i) compV)).