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 card_dihedral : #|'D_m| = m.
End DihedralGroup.