Definition mkfactors (G : {group gT}) (s : seq {group gT}) :=
map section_repr (pairmap (@mkSec _) G s).
End Sections.
Section CompositionSeries.
Variable gT : finGroupType.
Local Notation gTg := {group gT}.
Implicit Types (G : gTg) (s : seq gTg).
Local Notation compo := [rel x y : {set gT} | maxnormal y x x].
Definition comps G s := ((last G s) == 1%G) && compo.-series G s.

(* Specifications: *)
Lemma compsP G s :
reflect (last G s = 1%G /\  path [rel x y : gTg | maxnormal y x x] G s)
(comps G s).
Lemma comps_cons G H s : comps G (H :: s) -> comps H s.
Lemma exists_comps (G : gTg) : exists s, comps G s.
(******************************************************************************)
(* The factors associated to two composition series of the same group are     *)
(* the same up to isomorphism and permutation                                 *)
(******************************************************************************)
Lemma JordanHolderUniqueness (G : gTg) (s1 s2 : seq gTg) :
comps G s1 -> comps G s2 -> perm_eq (mkfactors G s1) (mkfactors G s2).