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
    def instDecidableEqDihedralGroup.decEq {n✝ : } (x✝ x✝¹ : DihedralGroup n✝) :
    Decidable (x✝ = x✝¹)
    Equations
      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
          @[simp]
          theorem DihedralGroup.r_zero {n : } :
          r 0 = 1
          theorem DihedralGroup.one_def {n : } :
          1 = r 0
          @[simp]
          theorem DihedralGroup.r_pow {n : } (i : ZMod n) (k : ) :
          r i ^ k = r (i * k)
          @[simp]
          theorem DihedralGroup.r_zpow {n : } (i : ZMod n) (k : ) :
          r i ^ k = r (i * k)

          If 0 < n, then DihedralGroup n is a finite group.

          Equations

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

            theorem DihedralGroup.r_one_pow {n : } (k : ) :
            r 1 ^ k = r k
            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

            sr i has order 2.

            @[simp]

            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 r i 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
              Instances For
                @[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)))
                @[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),
                theorem DihedralGroup.card_commute_odd {n : } (hn : Odd n) :

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