Variables x y : gT.
Implicit Type M : {group gT}.
Let X := <[x]>.
Let Y := <[y]>.
Let yG := y ^: G.
Let xyG := (x * y) ^: G.
Let My := <<yG>>.
Let Mxy := <<xyG>>.

(* Specifications: *)
Theorem dihedral2_structure :
n > 1 -> extremal_generators G 2 n (x, y) -> G \isog 'D_m ->
[/\ [/\ X ><| Y = G, {in G :\: X, forall t, #[t] = 2}
& {in X & G :\: X, forall z t, z ^ t = z^-1}],
[/\ G ^`(1) = <[x ^+ 2]>, 'Phi(G) = G ^`(1), #|G^`(1)| = r
& nil_class G = n.-1],
'Ohm_1(G) = G /\ (forall k, k > 0 -> 'Mho^k(G) = <[x ^+ (2 ^ k)]>),
[/\ yG :|: xyG = G :\: X, [disjoint yG & xyG]
& forall M, maximal M G = pred3 X My Mxy M]
& if n == 2 then (2.-abelem G : Prop) else
[/\ 'Z(G) = <[x ^+ r]>, #|'Z(G)| = 2,
My \isog 'D_q, Mxy \isog 'D_q
& forall U, cyclic U -> U \subset G -> #|G : U| = 2 -> U = X]].
Theorem quaternion_structure :
n > 2 -> extremal_generators G 2 n (x, y) -> G \isog 'Q_m ->
[/\ [/\ pprod X Y = G, {in G :\: X, forall t, #[t] = 4}
& {in X & G :\: X, forall z t, z ^ t = z^-1}],
[/\ G ^`(1) = <[x ^+ 2]>, 'Phi(G) = G ^`(1), #|G^`(1)| = r
& nil_class G = n.-1],
[/\ 'Z(G) = <[x ^+ r]>, #|'Z(G)| = 2,
forall u, u \in G -> #[u] = 2 -> u = x ^+ r,
'Ohm_1(G) = <[x ^+ r]> /\ 'Ohm_2(G) = G
& forall k, k > 0 -> 'Mho^k(G) = <[x ^+ (2 ^ k)]>],
[/\ yG :|: xyG = G :\: X /\ [disjoint yG & xyG]
& forall M, maximal M G = pred3 X My Mxy M]
& n > 3 ->
[/\ My \isog 'Q_q, Mxy \isog 'Q_q
& forall U, cyclic U -> U \subset G -> #|G : U| = 2 -> U = X]].
Theorem semidihedral_structure :
n > 3 -> extremal_generators G 2 n (x, y) -> G \isog 'SD_m -> #[y] = 2 ->
[/\ [/\ X ><| Y = G, #[x * y] = 4
& {in X & G :\: X, forall z t, z ^ t = z ^+ r.-1}],
[/\ G ^`(1) = <[x ^+ 2]>, 'Phi(G) = G ^`(1), #|G^`(1)| = r
& nil_class G = n.-1],
[/\ 'Z(G) = <[x ^+ r]>, #|'Z(G)| = 2,
'Ohm_1(G) = My /\ 'Ohm_2(G) = G
& forall k, k > 0 -> 'Mho^k(G) = <[x ^+ (2 ^ k)]>],
[/\ yG :|: xyG = G :\: X /\ [disjoint yG & xyG]
& forall H, maximal H G = pred3 X My Mxy H]
& [/\ My \isog 'D_q, Mxy \isog 'Q_q
& forall U, cyclic U -> U \subset G -> #|G : U| = 2 -> U = X]].