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 involutions_gen_dihedral gT (x y : gT) :
let G := <<[set x; y]>> in
#[x] = 2 -> #[y] = 2 -> x != y -> G \isog 'D_#|G|.