End ModularGroup.
(* Basic properties of dihedral groups; these will be refined for dihedral    *)
(* 2-groups in the section on extremal 2-groups.                              *)
Section DihedralGroup.
Variable q : nat.
Hypothesis q_gt1 : q > 1.
Let m := q.*2.
Let def2 : pdiv m = 2.
Let def_q : m %/ pdiv m = q. Proof. by rewrite def2 divn2 half_double. Qed.
Section Dihedral_extension.
Variable p : nat.
Hypotheses (p_gt1 : p > 1) (even_p : 2 %| p).
Local Notation ED := [set: gsort (Extremal.gtype q p q.-1)].

Lemma Grp_semidihedral n : n > 3 ->
'SD_(2 ^ n) \isog
Grp (x : y : (x ^+ (2 ^ n.-1), y ^+ 2, x ^ y = x ^+ (2 ^ n.-2).-1)).