(* Lemmas bundling Aschbacher (23.10) with (19.1), (19.2), (19.12) and (20.8) *)
Section ExtraspecialFormspace.
Variable G : {group gT}.
Hypotheses (pG : p.-group G) (esG : extraspecial G).
Let p_pr := extraspecial_prime pG esG.
Let oZ := card_center_extraspecial pG esG.
Let p_gt1 := prime_gt1 p_pr.
Let p_gt0 := prime_gt0 p_pr.

(* Specifications: *)
(* This encasulates Aschbacher (23.10)(1). *)
Lemma cent1_extraspecial_maximal x :
x \in G -> x \notin 'Z(G) -> maximal 'C_G[x] G.
(* This is the tranposition of the hyperplane dimension theorem (Aschbacher   *)
(* (19.1)) to subgroups of an extraspecial group.                             *)
Lemma subcent1_extraspecial_maximal U x :
U \subset G -> x \in G :\: 'C(U) -> maximal 'C_U[x] U.
(* This is the tranposition of the orthogonal subspace dimension theorem      *)
(* (Aschbacher (19.2)) to subgroups of an extraspecial group.                 *)
Lemma card_subcent_extraspecial U :
U \subset G -> #|'C_G(U)| = (#|'Z(G) :&: U| * #|G : U|)%N.
(* This is the tranposition of the proof that a singular vector is contained  *)
(* in a hyperbolic plane (Aschbacher (19.12)) to subgroups of an extraspecial *)
(* group.                                                                     *)
Lemma split1_extraspecial x :
x \in G :\: 'Z(G) ->
{E : {group gT} & {R : {group gT} |
[/\ #|E| = (p ^ 3)%N /\ #|R| = #|G| %/ p ^ 2,
E \* R = G /\ E :&: R = 'Z(E),
'Z(E) = 'Z(G) /\ 'Z(R) = 'Z(G),
extraspecial E /\ x \in E
& if abelian R then R :=: 'Z(G) else extraspecial R]}}.
(* This is the tranposition of the proof that the dimension of any maximal    *)
(* totally singular subspace is equal to the Witt index (Aschbacher (20.8)),  *)
(* to subgroups of an extraspecial group (in a slightly more general form,    *)
(* since we allow for p != 2).                                                *)
(*   Note that Aschbacher derives this from the Witt lemma, which we avoid.   *)
Lemma pmaxElem_extraspecial : 'E*_p(G) = 'E_p^('r_p(G))(G).
End ExtraspecialFormspace.
(* This is B & G, Theorem 4.15, as done in Aschbacher (23.8) *)
Lemma critical_extraspecial R S :
p.-group R -> S \subset R -> extraspecial S -> [~: S, R] \subset S^`(1) ->
S \* 'C_R(S) = R.
(* This is part of Aschbacher (23.13) and (23.14). *)
Theorem extraspecial_structure S : p.-group S -> extraspecial S ->
{Es | all (fun E => (#|E| == p ^ 3)%N && ('Z(E) == 'Z(S))) Es
& \big[cprod/1%g]_(E <- Es) E \* 'Z(S) = S}.