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
    @[implicit_reducible]
    instance instDecidableEqDihedralGroup {nโœ : โ„•} :
    DecidableEq (DihedralGroup nโœ)
    def instDecidableEqDihedralGroup.decEq {nโœ : โ„•} (xโœ xโœยน : DihedralGroup nโœ) :
    Decidable (xโœ = xโœยน)
    Instances For
      @[implicit_reducible]
      instance DihedralGroup.instInhabited {n : โ„•} :
      Inhabited (DihedralGroup n)
      @[implicit_reducible]
      instance DihedralGroup.instGroup {n : โ„•} :

      The group structure on DihedralGroup n.

      @[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) :
      @[simp]
      theorem DihedralGroup.inv_sr {n : โ„•} (i : ZMod n) :
      @[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)
      def DihedralGroup.equivSum {n : โ„•} :

      The equivalence between the dihedral group and the sum of ZMods.

      Instances For
        @[simp]
        theorem DihedralGroup.equivSum_symm_apply {n : โ„•} (xโœ : ZMod n โŠ• ZMod n) :
        equivSum.symm xโœ = match xโœ with | Sum.inl j => r j | Sum.inr j => sr j
        @[simp]
        theorem DihedralGroup.equivSum_apply {n : โ„•} (xโœ : DihedralGroup n) :
        equivSum xโœ = match xโœ with | r j => Sum.inl j | sr j => Sum.inr j
        @[implicit_reducible]
        instance DihedralGroup.instFintypeOfNeZeroNat {n : โ„•} [NeZero n] :

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

        theorem DihedralGroup.card {n : โ„•} [NeZero n] :

        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]
        theorem DihedralGroup.orderOf_r_one {n : โ„•} :
        orderOf (r 1) = n

        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 โ‰  1 โ†’ n โ‰  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
        theorem DihedralGroup.not_isCyclic {n : โ„•} (h1 : n โ‰  1) :
        def DihedralGroup.oddCommuteEquiv {n : โ„•} (hn : Odd n) :
        { p : DihedralGroup n ร— DihedralGroup n // Commute p.1 p.2 } โ‰ƒ ZMod n โŠ• ZMod n โŠ• ZMod n โŠ• ZMod n ร— ZMod n

        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.

        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.