proposition: Lemma ex_maxgroup : (exists G, gP G) -> {G : {group gT} | maxgroup G gP}.
proof: Proof. move=> exP; have [A maxA]: {A | maxgroup A gP}. apply: ex_maxset; case: exP => G gPG. by exists (G : {set gT}); rewrite groupP genGidG. by exists <<A>>%G; rewrite /= gen_set_id; case/andP: (maxsetp maxA). Qed.
imports: HB(structures) mathcomp(ssreflect ssrbool ssrfun eqtype ssrnat seq choice) mathcomp(fintype div path tuple bigop prime finset)