Documentation

Mathlib.GroupTheory.SpecificGroups.Dihedral

Dihedral Groups #

We define the dihedral groups DihedralGroup n, with elements r i and sr i for i : ZMod n.

For n ≠ 0, DihedralGroup n represents the symmetry group of the regular n-gon. r i represents the rotations of the n-gon by 2πi/n, and sr i represents the reflections of the n-gon. DihedralGroup 0 corresponds to the infinite dihedral group.

inductive DihedralGroup (n : ) :

For n ≠ 0, DihedralGroup n represents the symmetry group of the regular n-gon. r i represents the rotations of the n-gon by 2πi/n, and sr i represents the reflections of the n-gon. DihedralGroup 0 corresponds to the infinite dihedral group.

Instances For

    The group structure on DihedralGroup n.

    Equations
    @[simp]
    theorem DihedralGroup.r_mul_r {n : } (i j : ZMod n) :
    r i * r j = r (i + j)
    @[simp]
    theorem DihedralGroup.r_mul_sr {n : } (i j : ZMod n) :
    r i * sr j = sr (j - i)
    @[simp]
    theorem DihedralGroup.sr_mul_r {n : } (i j : ZMod n) :
    sr i * r j = sr (i + j)
    @[simp]
    theorem DihedralGroup.sr_mul_sr {n : } (i j : ZMod n) :
    sr i * sr j = r (j - i)
    @[simp]
    theorem DihedralGroup.inv_r {n : } (i : ZMod n) :
    (r i)⁻¹ = r (-i)
    @[simp]
    theorem DihedralGroup.inv_sr {n : } (i : ZMod n) :
    (sr i)⁻¹ = sr i
    theorem DihedralGroup.one_def {n : } :
    1 = r 0

    If 0 < n, then DihedralGroup n has 2n elements.

    @[simp]
    theorem DihedralGroup.r_one_pow {n : } (k : ) :
    r 1 ^ k = r k
    @[simp]
    theorem DihedralGroup.r_one_zpow {n : } (k : ) :
    r 1 ^ k = r k
    theorem DihedralGroup.r_one_pow_n {n : } :
    r 1 ^ n = 1
    theorem DihedralGroup.sr_mul_self {n : } (i : ZMod n) :
    sr i * sr i = 1
    @[simp]
    theorem DihedralGroup.orderOf_sr {n : } (i : ZMod n) :
    orderOf (sr i) = 2

    If 0 < n, then sr i has order 2.

    @[simp]

    If 0 < n, then r 1 has order n.

    theorem DihedralGroup.orderOf_r {n : } [NeZero n] (i : ZMod n) :
    orderOf (r i) = n / n.gcd i.val

    If 0 < n, then i : ZMod n has order n / gcd n i.

    theorem DihedralGroup.not_commutative {n : } :
    n 1n 2¬Std.Commutative fun (x y : DihedralGroup n) => x * y
    theorem DihedralGroup.commutative_iff {n : } :
    (Std.Commutative fun (x y : DihedralGroup n) => x * y) n = 1 n = 2

    If n is odd, then the Dihedral group of order $2n$ has $n(n+3)$ pairs (represented as $n + n + n + n*n$) of commuting elements.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[simp]
      theorem DihedralGroup.OddCommuteEquiv_symm_apply {n : } (hn : Odd n) (x✝ : ZMod n ZMod n ZMod n ZMod n × ZMod n) :
      (OddCommuteEquiv hn).symm x✝ = match x✝ with | Sum.inl i => (sr i, r 0), | Sum.inr (Sum.inl j) => (r 0, sr j), | Sum.inr (Sum.inr (Sum.inl k)) => (sr ((ZMod.unitOfCoprime 2 )⁻¹ * k), sr ((ZMod.unitOfCoprime 2 )⁻¹ * k)), | Sum.inr (Sum.inr (Sum.inr (i, j))) => (r i, r j),
      @[simp]
      theorem DihedralGroup.OddCommuteEquiv_apply {n : } (hn : Odd n) (x✝ : { p : DihedralGroup n × DihedralGroup n // Commute p.1 p.2 }) :
      (OddCommuteEquiv hn) x✝ = match x✝ with | (sr i, r a), property => Sum.inl i | (r a, sr j), property => Sum.inr (Sum.inl j) | (sr i, sr j), property => Sum.inr (Sum.inr (Sum.inl (i + j))) | (r i, r j), property => Sum.inr (Sum.inr (Sum.inr (i, j)))
      theorem DihedralGroup.card_commute_odd {n : } (hn : Odd n) :
      Nat.card { p : DihedralGroup n × DihedralGroup n // Commute p.1 p.2 } = n * (n + 3)

      If n is odd, then the Dihedral group of order $2n$ has $n(n+3)$ pairs of commuting elements.