group_theory.specific_groups.dihedralMathlib.GroupTheory.SpecificGroups.Dihedral

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -162,7 +162,7 @@ theorem r_one_pow_n : r (1 : ZMod n) ^ n = 1 :=
   by
   rw [r_one_pow, one_def]
   congr 1
-  exact ZMod.nat_cast_self _
+  exact ZMod.natCast_self _
 #align dihedral_group.r_one_pow_n DihedralGroup.r_one_pow_n
 -/
 
@@ -205,7 +205,7 @@ theorem orderOf_r_one : orderOf (r 1 : DihedralGroup n) = n :=
     have h1 : (r 1 : DihedralGroup n) ^ orderOf (r 1) = 1 := pow_orderOf_eq_one _
     rw [r_one_pow] at h1
     injection h1 with h2
-    rw [← ZMod.val_eq_zero, ZMod.val_nat_cast, Nat.mod_eq_of_lt h] at h2
+    rw [← ZMod.val_eq_zero, ZMod.val_natCast, Nat.mod_eq_of_lt h] at h2
     exact absurd h2.symm (orderOf_pos _).Ne
 #align dihedral_group.order_of_r_one DihedralGroup.orderOf_r_one
 -/
@@ -215,7 +215,7 @@ theorem orderOf_r_one : orderOf (r 1 : DihedralGroup n) = n :=
 -/
 theorem orderOf_r [NeZero n] (i : ZMod n) : orderOf (r i) = n / Nat.gcd n i.val :=
   by
-  conv_lhs => rw [← ZMod.nat_cast_zmod_val i]
+  conv_lhs => rw [← ZMod.natCast_zmod_val i]
   rw [← r_one_pow, orderOf_pow, order_of_r_one]
 #align dihedral_group.order_of_r DihedralGroup.orderOf_r
 -/
Diff
@@ -3,7 +3,7 @@ Copyright (c) 2020 Shing Tak Lam. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Shing Tak Lam
 -/
-import Data.Zmod.Basic
+import Data.ZMod.Basic
 import GroupTheory.Exponent
 
 #align_import group_theory.specific_groups.dihedral from "leanprover-community/mathlib"@"0b7c740e25651db0ba63648fbae9f9d6f941e31b"
@@ -149,7 +149,7 @@ theorem r_one_pow (k : ℕ) : (r 1 : DihedralGroup n) ^ k = r k :=
   by
   induction' k with k IH
   · rw [Nat.cast_zero]; rfl
-  · rw [pow_succ, IH, r_mul_r]
+  · rw [pow_succ', IH, r_mul_r]
     congr 1
     norm_cast
     rw [Nat.one_add]
Diff
@@ -203,9 +203,9 @@ theorem orderOf_r_one : orderOf (r 1 : DihedralGroup n) = n :=
             orderOf_dvd_of_pow_eq_one <| @r_one_pow_n n).lt_or_eq.resolve_left
     intro h
     have h1 : (r 1 : DihedralGroup n) ^ orderOf (r 1) = 1 := pow_orderOf_eq_one _
-    rw [r_one_pow] at h1 
+    rw [r_one_pow] at h1
     injection h1 with h2
-    rw [← ZMod.val_eq_zero, ZMod.val_nat_cast, Nat.mod_eq_of_lt h] at h2 
+    rw [← ZMod.val_eq_zero, ZMod.val_nat_cast, Nat.mod_eq_of_lt h] at h2
     exact absurd h2.symm (orderOf_pos _).Ne
 #align dihedral_group.order_of_r_one DihedralGroup.orderOf_r_one
 -/
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2020 Shing Tak Lam. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Shing Tak Lam
 -/
-import Mathbin.Data.Zmod.Basic
-import Mathbin.GroupTheory.Exponent
+import Data.Zmod.Basic
+import GroupTheory.Exponent
 
 #align_import group_theory.specific_groups.dihedral from "leanprover-community/mathlib"@"0b7c740e25651db0ba63648fbae9f9d6f941e31b"
 
Diff
@@ -75,7 +75,7 @@ instance : Group (DihedralGroup n) where
     exact congr_arg r (add_zero a)
     exact congr_arg sr (add_zero a)
   inv := inv
-  mul_left_inv := by
+  hMul_left_inv := by
     rintro (a | a)
     exact congr_arg r (neg_add_self a)
     exact congr_arg r (sub_self a)
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2020 Shing Tak Lam. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Shing Tak Lam
-
-! This file was ported from Lean 3 source module group_theory.specific_groups.dihedral
-! leanprover-community/mathlib commit 0b7c740e25651db0ba63648fbae9f9d6f941e31b
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Data.Zmod.Basic
 import Mathbin.GroupTheory.Exponent
 
+#align_import group_theory.specific_groups.dihedral from "leanprover-community/mathlib"@"0b7c740e25651db0ba63648fbae9f9d6f941e31b"
+
 /-!
 # Dihedral Groups
 
Diff
@@ -83,29 +83,39 @@ instance : Group (DihedralGroup n) where
     exact congr_arg r (neg_add_self a)
     exact congr_arg r (sub_self a)
 
+#print DihedralGroup.r_mul_r /-
 @[simp]
 theorem r_mul_r (i j : ZMod n) : r i * r j = r (i + j) :=
   rfl
 #align dihedral_group.r_mul_r DihedralGroup.r_mul_r
+-/
 
+#print DihedralGroup.r_mul_sr /-
 @[simp]
 theorem r_mul_sr (i j : ZMod n) : r i * sr j = sr (j - i) :=
   rfl
 #align dihedral_group.r_mul_sr DihedralGroup.r_mul_sr
+-/
 
+#print DihedralGroup.sr_mul_r /-
 @[simp]
 theorem sr_mul_r (i j : ZMod n) : sr i * r j = sr (i + j) :=
   rfl
 #align dihedral_group.sr_mul_r DihedralGroup.sr_mul_r
+-/
 
+#print DihedralGroup.sr_mul_sr /-
 @[simp]
 theorem sr_mul_sr (i j : ZMod n) : sr i * sr j = r (j - i) :=
   rfl
 #align dihedral_group.sr_mul_sr DihedralGroup.sr_mul_sr
+-/
 
+#print DihedralGroup.one_def /-
 theorem one_def : (1 : DihedralGroup n) = r 0 :=
   rfl
 #align dihedral_group.one_def DihedralGroup.one_def
+-/
 
 private def fintype_helper : Sum (ZMod n) (ZMod n) ≃ DihedralGroup n
     where
@@ -136,6 +146,7 @@ theorem card [NeZero n] : Fintype.card (DihedralGroup n) = 2 * n := by
 #align dihedral_group.card DihedralGroup.card
 -/
 
+#print DihedralGroup.r_one_pow /-
 @[simp]
 theorem r_one_pow (k : ℕ) : (r 1 : DihedralGroup n) ^ k = r k :=
   by
@@ -146,7 +157,9 @@ theorem r_one_pow (k : ℕ) : (r 1 : DihedralGroup n) ^ k = r k :=
     norm_cast
     rw [Nat.one_add]
 #align dihedral_group.r_one_pow DihedralGroup.r_one_pow
+-/
 
+#print DihedralGroup.r_one_pow_n /-
 @[simp]
 theorem r_one_pow_n : r (1 : ZMod n) ^ n = 1 :=
   by
@@ -154,11 +167,15 @@ theorem r_one_pow_n : r (1 : ZMod n) ^ n = 1 :=
   congr 1
   exact ZMod.nat_cast_self _
 #align dihedral_group.r_one_pow_n DihedralGroup.r_one_pow_n
+-/
 
+#print DihedralGroup.sr_mul_self /-
 @[simp]
 theorem sr_mul_self (i : ZMod n) : sr i * sr i = 1 := by rw [sr_mul_sr, sub_self, one_def]
 #align dihedral_group.sr_mul_self DihedralGroup.sr_mul_self
+-/
 
+#print DihedralGroup.orderOf_sr /-
 /-- If `0 < n`, then `sr i` has order 2.
 -/
 @[simp]
@@ -169,7 +186,9 @@ theorem orderOf_sr (i : ZMod n) : orderOf (sr i) = 2 :=
   rw [sq, sr_mul_self]
   decide
 #align dihedral_group.order_of_sr DihedralGroup.orderOf_sr
+-/
 
+#print DihedralGroup.orderOf_r_one /-
 /-- If `0 < n`, then `r 1` has order `n`.
 -/
 @[simp]
@@ -192,7 +211,9 @@ theorem orderOf_r_one : orderOf (r 1 : DihedralGroup n) = n :=
     rw [← ZMod.val_eq_zero, ZMod.val_nat_cast, Nat.mod_eq_of_lt h] at h2 
     exact absurd h2.symm (orderOf_pos _).Ne
 #align dihedral_group.order_of_r_one DihedralGroup.orderOf_r_one
+-/
 
+#print DihedralGroup.orderOf_r /-
 /-- If `0 < n`, then `i : zmod n` has order `n / gcd n i`.
 -/
 theorem orderOf_r [NeZero n] (i : ZMod n) : orderOf (r i) = n / Nat.gcd n i.val :=
@@ -200,7 +221,9 @@ theorem orderOf_r [NeZero n] (i : ZMod n) : orderOf (r i) = n / Nat.gcd n i.val
   conv_lhs => rw [← ZMod.nat_cast_zmod_val i]
   rw [← r_one_pow, orderOf_pow, order_of_r_one]
 #align dihedral_group.order_of_r DihedralGroup.orderOf_r
+-/
 
+#print DihedralGroup.exponent /-
 theorem exponent : Monoid.exponent (DihedralGroup n) = lcm n 2 :=
   by
   rcases eq_zero_or_neZero n with (rfl | hn)
@@ -220,6 +243,7 @@ theorem exponent : Monoid.exponent (DihedralGroup n) = lcm n 2 :=
     · convert Monoid.order_dvd_exponent (sr 0)
       exact (order_of_sr 0).symm
 #align dihedral_group.exponent DihedralGroup.exponent
+-/
 
 end DihedralGroup
 
Diff
@@ -187,9 +187,9 @@ theorem orderOf_r_one : orderOf (r 1 : DihedralGroup n) = n :=
             orderOf_dvd_of_pow_eq_one <| @r_one_pow_n n).lt_or_eq.resolve_left
     intro h
     have h1 : (r 1 : DihedralGroup n) ^ orderOf (r 1) = 1 := pow_orderOf_eq_one _
-    rw [r_one_pow] at h1
+    rw [r_one_pow] at h1 
     injection h1 with h2
-    rw [← ZMod.val_eq_zero, ZMod.val_nat_cast, Nat.mod_eq_of_lt h] at h2
+    rw [← ZMod.val_eq_zero, ZMod.val_nat_cast, Nat.mod_eq_of_lt h] at h2 
     exact absurd h2.symm (orderOf_pos _).Ne
 #align dihedral_group.order_of_r_one DihedralGroup.orderOf_r_one
 
Diff
@@ -83,56 +83,26 @@ instance : Group (DihedralGroup n) where
     exact congr_arg r (neg_add_self a)
     exact congr_arg r (sub_self a)
 
-/- warning: dihedral_group.r_mul_r -> DihedralGroup.r_mul_r is a dubious translation:
-lean 3 declaration is
-  forall {n : Nat} (i : ZMod n) (j : ZMod n), Eq.{1} (DihedralGroup n) (HMul.hMul.{0, 0, 0} (DihedralGroup n) (DihedralGroup n) (DihedralGroup n) (instHMul.{0} (DihedralGroup n) (MulOneClass.toHasMul.{0} (DihedralGroup n) (Monoid.toMulOneClass.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n)))))) (DihedralGroup.r n i) (DihedralGroup.r n j)) (DihedralGroup.r n (HAdd.hAdd.{0, 0, 0} (ZMod n) (ZMod n) (ZMod n) (instHAdd.{0} (ZMod n) (Distrib.toHasAdd.{0} (ZMod n) (Ring.toDistrib.{0} (ZMod n) (CommRing.toRing.{0} (ZMod n) (ZMod.commRing n))))) i j))
-but is expected to have type
-  forall {n : Nat} (i : ZMod n) (j : ZMod n), Eq.{1} (DihedralGroup n) (HMul.hMul.{0, 0, 0} (DihedralGroup n) (DihedralGroup n) (DihedralGroup n) (instHMul.{0} (DihedralGroup n) (MulOneClass.toMul.{0} (DihedralGroup n) (Monoid.toMulOneClass.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n)))))) (DihedralGroup.r n i) (DihedralGroup.r n j)) (DihedralGroup.r n (HAdd.hAdd.{0, 0, 0} (ZMod n) (ZMod n) (ZMod n) (instHAdd.{0} (ZMod n) (Distrib.toAdd.{0} (ZMod n) (NonUnitalNonAssocSemiring.toDistrib.{0} (ZMod n) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} (ZMod n) (NonAssocRing.toNonUnitalNonAssocRing.{0} (ZMod n) (Ring.toNonAssocRing.{0} (ZMod n) (CommRing.toRing.{0} (ZMod n) (ZMod.commRing n)))))))) i j))
-Case conversion may be inaccurate. Consider using '#align dihedral_group.r_mul_r DihedralGroup.r_mul_rₓ'. -/
 @[simp]
 theorem r_mul_r (i j : ZMod n) : r i * r j = r (i + j) :=
   rfl
 #align dihedral_group.r_mul_r DihedralGroup.r_mul_r
 
-/- warning: dihedral_group.r_mul_sr -> DihedralGroup.r_mul_sr is a dubious translation:
-lean 3 declaration is
-  forall {n : Nat} (i : ZMod n) (j : ZMod n), Eq.{1} (DihedralGroup n) (HMul.hMul.{0, 0, 0} (DihedralGroup n) (DihedralGroup n) (DihedralGroup n) (instHMul.{0} (DihedralGroup n) (MulOneClass.toHasMul.{0} (DihedralGroup n) (Monoid.toMulOneClass.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n)))))) (DihedralGroup.r n i) (DihedralGroup.sr n j)) (DihedralGroup.sr n (HSub.hSub.{0, 0, 0} (ZMod n) (ZMod n) (ZMod n) (instHSub.{0} (ZMod n) (SubNegMonoid.toHasSub.{0} (ZMod n) (AddGroup.toSubNegMonoid.{0} (ZMod n) (AddGroupWithOne.toAddGroup.{0} (ZMod n) (AddCommGroupWithOne.toAddGroupWithOne.{0} (ZMod n) (Ring.toAddCommGroupWithOne.{0} (ZMod n) (CommRing.toRing.{0} (ZMod n) (ZMod.commRing n)))))))) j i))
-but is expected to have type
-  forall {n : Nat} (i : ZMod n) (j : ZMod n), Eq.{1} (DihedralGroup n) (HMul.hMul.{0, 0, 0} (DihedralGroup n) (DihedralGroup n) (DihedralGroup n) (instHMul.{0} (DihedralGroup n) (MulOneClass.toMul.{0} (DihedralGroup n) (Monoid.toMulOneClass.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n)))))) (DihedralGroup.r n i) (DihedralGroup.sr n j)) (DihedralGroup.sr n (HSub.hSub.{0, 0, 0} (ZMod n) (ZMod n) (ZMod n) (instHSub.{0} (ZMod n) (Ring.toSub.{0} (ZMod n) (CommRing.toRing.{0} (ZMod n) (ZMod.commRing n)))) j i))
-Case conversion may be inaccurate. Consider using '#align dihedral_group.r_mul_sr DihedralGroup.r_mul_srₓ'. -/
 @[simp]
 theorem r_mul_sr (i j : ZMod n) : r i * sr j = sr (j - i) :=
   rfl
 #align dihedral_group.r_mul_sr DihedralGroup.r_mul_sr
 
-/- warning: dihedral_group.sr_mul_r -> DihedralGroup.sr_mul_r is a dubious translation:
-lean 3 declaration is
-  forall {n : Nat} (i : ZMod n) (j : ZMod n), Eq.{1} (DihedralGroup n) (HMul.hMul.{0, 0, 0} (DihedralGroup n) (DihedralGroup n) (DihedralGroup n) (instHMul.{0} (DihedralGroup n) (MulOneClass.toHasMul.{0} (DihedralGroup n) (Monoid.toMulOneClass.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n)))))) (DihedralGroup.sr n i) (DihedralGroup.r n j)) (DihedralGroup.sr n (HAdd.hAdd.{0, 0, 0} (ZMod n) (ZMod n) (ZMod n) (instHAdd.{0} (ZMod n) (Distrib.toHasAdd.{0} (ZMod n) (Ring.toDistrib.{0} (ZMod n) (CommRing.toRing.{0} (ZMod n) (ZMod.commRing n))))) i j))
-but is expected to have type
-  forall {n : Nat} (i : ZMod n) (j : ZMod n), Eq.{1} (DihedralGroup n) (HMul.hMul.{0, 0, 0} (DihedralGroup n) (DihedralGroup n) (DihedralGroup n) (instHMul.{0} (DihedralGroup n) (MulOneClass.toMul.{0} (DihedralGroup n) (Monoid.toMulOneClass.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n)))))) (DihedralGroup.sr n i) (DihedralGroup.r n j)) (DihedralGroup.sr n (HAdd.hAdd.{0, 0, 0} (ZMod n) (ZMod n) (ZMod n) (instHAdd.{0} (ZMod n) (Distrib.toAdd.{0} (ZMod n) (NonUnitalNonAssocSemiring.toDistrib.{0} (ZMod n) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} (ZMod n) (NonAssocRing.toNonUnitalNonAssocRing.{0} (ZMod n) (Ring.toNonAssocRing.{0} (ZMod n) (CommRing.toRing.{0} (ZMod n) (ZMod.commRing n)))))))) i j))
-Case conversion may be inaccurate. Consider using '#align dihedral_group.sr_mul_r DihedralGroup.sr_mul_rₓ'. -/
 @[simp]
 theorem sr_mul_r (i j : ZMod n) : sr i * r j = sr (i + j) :=
   rfl
 #align dihedral_group.sr_mul_r DihedralGroup.sr_mul_r
 
-/- warning: dihedral_group.sr_mul_sr -> DihedralGroup.sr_mul_sr is a dubious translation:
-lean 3 declaration is
-  forall {n : Nat} (i : ZMod n) (j : ZMod n), Eq.{1} (DihedralGroup n) (HMul.hMul.{0, 0, 0} (DihedralGroup n) (DihedralGroup n) (DihedralGroup n) (instHMul.{0} (DihedralGroup n) (MulOneClass.toHasMul.{0} (DihedralGroup n) (Monoid.toMulOneClass.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n)))))) (DihedralGroup.sr n i) (DihedralGroup.sr n j)) (DihedralGroup.r n (HSub.hSub.{0, 0, 0} (ZMod n) (ZMod n) (ZMod n) (instHSub.{0} (ZMod n) (SubNegMonoid.toHasSub.{0} (ZMod n) (AddGroup.toSubNegMonoid.{0} (ZMod n) (AddGroupWithOne.toAddGroup.{0} (ZMod n) (AddCommGroupWithOne.toAddGroupWithOne.{0} (ZMod n) (Ring.toAddCommGroupWithOne.{0} (ZMod n) (CommRing.toRing.{0} (ZMod n) (ZMod.commRing n)))))))) j i))
-but is expected to have type
-  forall {n : Nat} (i : ZMod n) (j : ZMod n), Eq.{1} (DihedralGroup n) (HMul.hMul.{0, 0, 0} (DihedralGroup n) (DihedralGroup n) (DihedralGroup n) (instHMul.{0} (DihedralGroup n) (MulOneClass.toMul.{0} (DihedralGroup n) (Monoid.toMulOneClass.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n)))))) (DihedralGroup.sr n i) (DihedralGroup.sr n j)) (DihedralGroup.r n (HSub.hSub.{0, 0, 0} (ZMod n) (ZMod n) (ZMod n) (instHSub.{0} (ZMod n) (Ring.toSub.{0} (ZMod n) (CommRing.toRing.{0} (ZMod n) (ZMod.commRing n)))) j i))
-Case conversion may be inaccurate. Consider using '#align dihedral_group.sr_mul_sr DihedralGroup.sr_mul_srₓ'. -/
 @[simp]
 theorem sr_mul_sr (i j : ZMod n) : sr i * sr j = r (j - i) :=
   rfl
 #align dihedral_group.sr_mul_sr DihedralGroup.sr_mul_sr
 
-/- warning: dihedral_group.one_def -> DihedralGroup.one_def is a dubious translation:
-lean 3 declaration is
-  forall {n : Nat}, Eq.{1} (DihedralGroup n) (OfNat.ofNat.{0} (DihedralGroup n) 1 (OfNat.mk.{0} (DihedralGroup n) 1 (One.one.{0} (DihedralGroup n) (MulOneClass.toHasOne.{0} (DihedralGroup n) (Monoid.toMulOneClass.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n)))))))) (DihedralGroup.r n (OfNat.ofNat.{0} (ZMod n) 0 (OfNat.mk.{0} (ZMod n) 0 (Zero.zero.{0} (ZMod n) (MulZeroClass.toHasZero.{0} (ZMod n) (NonUnitalNonAssocSemiring.toMulZeroClass.{0} (ZMod n) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} (ZMod n) (NonAssocRing.toNonUnitalNonAssocRing.{0} (ZMod n) (Ring.toNonAssocRing.{0} (ZMod n) (CommRing.toRing.{0} (ZMod n) (ZMod.commRing n)))))))))))
-but is expected to have type
-  forall {n : Nat}, Eq.{1} (DihedralGroup n) (OfNat.ofNat.{0} (DihedralGroup n) 1 (One.toOfNat1.{0} (DihedralGroup n) (InvOneClass.toOne.{0} (DihedralGroup n) (DivInvOneMonoid.toInvOneClass.{0} (DihedralGroup n) (DivisionMonoid.toDivInvOneMonoid.{0} (DihedralGroup n) (Group.toDivisionMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n))))))) (DihedralGroup.r n (OfNat.ofNat.{0} (ZMod n) 0 (Zero.toOfNat0.{0} (ZMod n) (CommMonoidWithZero.toZero.{0} (ZMod n) (CommSemiring.toCommMonoidWithZero.{0} (ZMod n) (CommRing.toCommSemiring.{0} (ZMod n) (ZMod.commRing n)))))))
-Case conversion may be inaccurate. Consider using '#align dihedral_group.one_def DihedralGroup.one_defₓ'. -/
 theorem one_def : (1 : DihedralGroup n) = r 0 :=
   rfl
 #align dihedral_group.one_def DihedralGroup.one_def
@@ -166,12 +136,6 @@ theorem card [NeZero n] : Fintype.card (DihedralGroup n) = 2 * n := by
 #align dihedral_group.card DihedralGroup.card
 -/
 
-/- warning: dihedral_group.r_one_pow -> DihedralGroup.r_one_pow is a dubious translation:
-lean 3 declaration is
-  forall {n : Nat} (k : Nat), Eq.{1} (DihedralGroup n) (HPow.hPow.{0, 0, 0} (DihedralGroup n) Nat (DihedralGroup n) (instHPow.{0, 0} (DihedralGroup n) Nat (Monoid.Pow.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n))))) (DihedralGroup.r n (OfNat.ofNat.{0} (ZMod n) 1 (OfNat.mk.{0} (ZMod n) 1 (One.one.{0} (ZMod n) (AddMonoidWithOne.toOne.{0} (ZMod n) (AddGroupWithOne.toAddMonoidWithOne.{0} (ZMod n) (AddCommGroupWithOne.toAddGroupWithOne.{0} (ZMod n) (Ring.toAddCommGroupWithOne.{0} (ZMod n) (CommRing.toRing.{0} (ZMod n) (ZMod.commRing n)))))))))) k) (DihedralGroup.r n ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat (ZMod n) (HasLiftT.mk.{1, 1} Nat (ZMod n) (CoeTCₓ.coe.{1, 1} Nat (ZMod n) (Nat.castCoe.{0} (ZMod n) (AddMonoidWithOne.toNatCast.{0} (ZMod n) (AddGroupWithOne.toAddMonoidWithOne.{0} (ZMod n) (AddCommGroupWithOne.toAddGroupWithOne.{0} (ZMod n) (Ring.toAddCommGroupWithOne.{0} (ZMod n) (CommRing.toRing.{0} (ZMod n) (ZMod.commRing n))))))))) k))
-but is expected to have type
-  forall {n : Nat} (k : Nat), Eq.{1} (DihedralGroup n) (HPow.hPow.{0, 0, 0} (DihedralGroup n) Nat (DihedralGroup n) (instHPow.{0, 0} (DihedralGroup n) Nat (Monoid.Pow.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n))))) (DihedralGroup.r n (OfNat.ofNat.{0} (ZMod n) 1 (One.toOfNat1.{0} (ZMod n) (Semiring.toOne.{0} (ZMod n) (CommSemiring.toSemiring.{0} (ZMod n) (CommRing.toCommSemiring.{0} (ZMod n) (ZMod.commRing n))))))) k) (DihedralGroup.r n (Nat.cast.{0} (ZMod n) (Semiring.toNatCast.{0} (ZMod n) (CommSemiring.toSemiring.{0} (ZMod n) (CommRing.toCommSemiring.{0} (ZMod n) (ZMod.commRing n)))) k))
-Case conversion may be inaccurate. Consider using '#align dihedral_group.r_one_pow DihedralGroup.r_one_powₓ'. -/
 @[simp]
 theorem r_one_pow (k : ℕ) : (r 1 : DihedralGroup n) ^ k = r k :=
   by
@@ -183,12 +147,6 @@ theorem r_one_pow (k : ℕ) : (r 1 : DihedralGroup n) ^ k = r k :=
     rw [Nat.one_add]
 #align dihedral_group.r_one_pow DihedralGroup.r_one_pow
 
-/- warning: dihedral_group.r_one_pow_n -> DihedralGroup.r_one_pow_n is a dubious translation:
-lean 3 declaration is
-  forall {n : Nat}, Eq.{1} (DihedralGroup n) (HPow.hPow.{0, 0, 0} (DihedralGroup n) Nat (DihedralGroup n) (instHPow.{0, 0} (DihedralGroup n) Nat (Monoid.Pow.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n))))) (DihedralGroup.r n (OfNat.ofNat.{0} (ZMod n) 1 (OfNat.mk.{0} (ZMod n) 1 (One.one.{0} (ZMod n) (AddMonoidWithOne.toOne.{0} (ZMod n) (AddGroupWithOne.toAddMonoidWithOne.{0} (ZMod n) (AddCommGroupWithOne.toAddGroupWithOne.{0} (ZMod n) (Ring.toAddCommGroupWithOne.{0} (ZMod n) (CommRing.toRing.{0} (ZMod n) (ZMod.commRing n)))))))))) n) (OfNat.ofNat.{0} (DihedralGroup n) 1 (OfNat.mk.{0} (DihedralGroup n) 1 (One.one.{0} (DihedralGroup n) (MulOneClass.toHasOne.{0} (DihedralGroup n) (Monoid.toMulOneClass.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n))))))))
-but is expected to have type
-  forall {n : Nat}, Eq.{1} (DihedralGroup n) (HPow.hPow.{0, 0, 0} (DihedralGroup n) Nat (DihedralGroup n) (instHPow.{0, 0} (DihedralGroup n) Nat (Monoid.Pow.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n))))) (DihedralGroup.r n (OfNat.ofNat.{0} (ZMod n) 1 (One.toOfNat1.{0} (ZMod n) (Semiring.toOne.{0} (ZMod n) (CommSemiring.toSemiring.{0} (ZMod n) (CommRing.toCommSemiring.{0} (ZMod n) (ZMod.commRing n))))))) n) (OfNat.ofNat.{0} (DihedralGroup n) 1 (One.toOfNat1.{0} (DihedralGroup n) (InvOneClass.toOne.{0} (DihedralGroup n) (DivInvOneMonoid.toInvOneClass.{0} (DihedralGroup n) (DivisionMonoid.toDivInvOneMonoid.{0} (DihedralGroup n) (Group.toDivisionMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n)))))))
-Case conversion may be inaccurate. Consider using '#align dihedral_group.r_one_pow_n DihedralGroup.r_one_pow_nₓ'. -/
 @[simp]
 theorem r_one_pow_n : r (1 : ZMod n) ^ n = 1 :=
   by
@@ -197,22 +155,10 @@ theorem r_one_pow_n : r (1 : ZMod n) ^ n = 1 :=
   exact ZMod.nat_cast_self _
 #align dihedral_group.r_one_pow_n DihedralGroup.r_one_pow_n
 
-/- warning: dihedral_group.sr_mul_self -> DihedralGroup.sr_mul_self is a dubious translation:
-lean 3 declaration is
-  forall {n : Nat} (i : ZMod n), Eq.{1} (DihedralGroup n) (HMul.hMul.{0, 0, 0} (DihedralGroup n) (DihedralGroup n) (DihedralGroup n) (instHMul.{0} (DihedralGroup n) (MulOneClass.toHasMul.{0} (DihedralGroup n) (Monoid.toMulOneClass.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n)))))) (DihedralGroup.sr n i) (DihedralGroup.sr n i)) (OfNat.ofNat.{0} (DihedralGroup n) 1 (OfNat.mk.{0} (DihedralGroup n) 1 (One.one.{0} (DihedralGroup n) (MulOneClass.toHasOne.{0} (DihedralGroup n) (Monoid.toMulOneClass.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n))))))))
-but is expected to have type
-  forall {n : Nat} (i : ZMod n), Eq.{1} (DihedralGroup n) (HMul.hMul.{0, 0, 0} (DihedralGroup n) (DihedralGroup n) (DihedralGroup n) (instHMul.{0} (DihedralGroup n) (MulOneClass.toMul.{0} (DihedralGroup n) (Monoid.toMulOneClass.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n)))))) (DihedralGroup.sr n i) (DihedralGroup.sr n i)) (OfNat.ofNat.{0} (DihedralGroup n) 1 (One.toOfNat1.{0} (DihedralGroup n) (InvOneClass.toOne.{0} (DihedralGroup n) (DivInvOneMonoid.toInvOneClass.{0} (DihedralGroup n) (DivisionMonoid.toDivInvOneMonoid.{0} (DihedralGroup n) (Group.toDivisionMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n)))))))
-Case conversion may be inaccurate. Consider using '#align dihedral_group.sr_mul_self DihedralGroup.sr_mul_selfₓ'. -/
 @[simp]
 theorem sr_mul_self (i : ZMod n) : sr i * sr i = 1 := by rw [sr_mul_sr, sub_self, one_def]
 #align dihedral_group.sr_mul_self DihedralGroup.sr_mul_self
 
-/- warning: dihedral_group.order_of_sr -> DihedralGroup.orderOf_sr is a dubious translation:
-lean 3 declaration is
-  forall {n : Nat} (i : ZMod n), Eq.{1} Nat (orderOf.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n))) (DihedralGroup.sr n i)) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne))))
-but is expected to have type
-  forall {n : Nat} (i : ZMod n), Eq.{1} Nat (orderOf.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n))) (DihedralGroup.sr n i)) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2))
-Case conversion may be inaccurate. Consider using '#align dihedral_group.order_of_sr DihedralGroup.orderOf_srₓ'. -/
 /-- If `0 < n`, then `sr i` has order 2.
 -/
 @[simp]
@@ -224,12 +170,6 @@ theorem orderOf_sr (i : ZMod n) : orderOf (sr i) = 2 :=
   decide
 #align dihedral_group.order_of_sr DihedralGroup.orderOf_sr
 
-/- warning: dihedral_group.order_of_r_one -> DihedralGroup.orderOf_r_one is a dubious translation:
-lean 3 declaration is
-  forall {n : Nat}, Eq.{1} Nat (orderOf.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n))) (DihedralGroup.r n (OfNat.ofNat.{0} (ZMod n) 1 (OfNat.mk.{0} (ZMod n) 1 (One.one.{0} (ZMod n) (AddMonoidWithOne.toOne.{0} (ZMod n) (AddGroupWithOne.toAddMonoidWithOne.{0} (ZMod n) (AddCommGroupWithOne.toAddGroupWithOne.{0} (ZMod n) (Ring.toAddCommGroupWithOne.{0} (ZMod n) (CommRing.toRing.{0} (ZMod n) (ZMod.commRing n))))))))))) n
-but is expected to have type
-  forall {n : Nat}, Eq.{1} Nat (orderOf.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n))) (DihedralGroup.r n (OfNat.ofNat.{0} (ZMod n) 1 (One.toOfNat1.{0} (ZMod n) (Semiring.toOne.{0} (ZMod n) (CommSemiring.toSemiring.{0} (ZMod n) (CommRing.toCommSemiring.{0} (ZMod n) (ZMod.commRing n)))))))) n
-Case conversion may be inaccurate. Consider using '#align dihedral_group.order_of_r_one DihedralGroup.orderOf_r_oneₓ'. -/
 /-- If `0 < n`, then `r 1` has order `n`.
 -/
 @[simp]
@@ -253,12 +193,6 @@ theorem orderOf_r_one : orderOf (r 1 : DihedralGroup n) = n :=
     exact absurd h2.symm (orderOf_pos _).Ne
 #align dihedral_group.order_of_r_one DihedralGroup.orderOf_r_one
 
-/- warning: dihedral_group.order_of_r -> DihedralGroup.orderOf_r is a dubious translation:
-lean 3 declaration is
-  forall {n : Nat} [_inst_1 : NeZero.{0} Nat Nat.hasZero n] (i : ZMod n), Eq.{1} Nat (orderOf.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n))) (DihedralGroup.r n i)) (HDiv.hDiv.{0, 0, 0} Nat Nat Nat (instHDiv.{0} Nat Nat.hasDiv) n (Nat.gcd n (ZMod.val n i)))
-but is expected to have type
-  forall {n : Nat} [_inst_1 : NeZero.{0} Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero) n] (i : ZMod n), Eq.{1} Nat (orderOf.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n))) (DihedralGroup.r n i)) (HDiv.hDiv.{0, 0, 0} Nat Nat Nat (instHDiv.{0} Nat Nat.instDivNat) n (Nat.gcd n (ZMod.val n i)))
-Case conversion may be inaccurate. Consider using '#align dihedral_group.order_of_r DihedralGroup.orderOf_rₓ'. -/
 /-- If `0 < n`, then `i : zmod n` has order `n / gcd n i`.
 -/
 theorem orderOf_r [NeZero n] (i : ZMod n) : orderOf (r i) = n / Nat.gcd n i.val :=
@@ -267,12 +201,6 @@ theorem orderOf_r [NeZero n] (i : ZMod n) : orderOf (r i) = n / Nat.gcd n i.val
   rw [← r_one_pow, orderOf_pow, order_of_r_one]
 #align dihedral_group.order_of_r DihedralGroup.orderOf_r
 
-/- warning: dihedral_group.exponent -> DihedralGroup.exponent is a dubious translation:
-lean 3 declaration is
-  forall {n : Nat}, Eq.{1} Nat (Monoid.exponent.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n)))) (GCDMonoid.lcm.{0} Nat Nat.cancelCommMonoidWithZero Nat.gcdMonoid n (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))))
-but is expected to have type
-  forall {n : Nat}, Eq.{1} Nat (Monoid.exponent.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n)))) (GCDMonoid.lcm.{0} Nat Nat.cancelCommMonoidWithZero instGCDMonoidNatCancelCommMonoidWithZero n (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)))
-Case conversion may be inaccurate. Consider using '#align dihedral_group.exponent DihedralGroup.exponentₓ'. -/
 theorem exponent : Monoid.exponent (DihedralGroup n) = lcm n 2 :=
   by
   rcases eq_zero_or_neZero n with (rfl | hn)
Diff
@@ -176,8 +176,7 @@ Case conversion may be inaccurate. Consider using '#align dihedral_group.r_one_p
 theorem r_one_pow (k : ℕ) : (r 1 : DihedralGroup n) ^ k = r k :=
   by
   induction' k with k IH
-  · rw [Nat.cast_zero]
-    rfl
+  · rw [Nat.cast_zero]; rfl
   · rw [pow_succ, IH, r_mul_r]
     congr 1
     norm_cast
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Shing Tak Lam
 
 ! This file was ported from Lean 3 source module group_theory.specific_groups.dihedral
-! leanprover-community/mathlib commit 70fd9563a21e7b963887c9360bd29b2393e6225a
+! leanprover-community/mathlib commit 0b7c740e25651db0ba63648fbae9f9d6f941e31b
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -14,6 +14,9 @@ import Mathbin.GroupTheory.Exponent
 /-!
 # Dihedral Groups
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 We define the dihedral groups `dihedral_group n`, with elements `r i` and `sr i` for `i : zmod n`.
 
 For `n ≠ 0`, `dihedral_group n` represents the symmetry group of the regular `n`-gon. `r i`
@@ -45,13 +48,11 @@ private def mul : DihedralGroup n → DihedralGroup n → DihedralGroup n
   | r i, sr j => sr (j - i)
   | sr i, r j => sr (i + j)
   | sr i, sr j => r (j - i)
-#align dihedral_group.mul dihedral_group.mul
 
 /-- The identity `1` is the rotation by `0`.
 -/
 private def one : DihedralGroup n :=
   r 0
-#align dihedral_group.one dihedral_group.one
 
 instance : Inhabited (DihedralGroup n) :=
   ⟨one⟩
@@ -61,7 +62,6 @@ instance : Inhabited (DihedralGroup n) :=
 private def inv : DihedralGroup n → DihedralGroup n
   | r i => r (-i)
   | sr i => sr i
-#align dihedral_group.inv dihedral_group.inv
 
 /-- The group structure on `dihedral_group n`.
 -/
@@ -149,7 +149,6 @@ private def fintype_helper : Sum (ZMod n) (ZMod n) ≃ DihedralGroup n
     | Sum.inr j => sr j
   left_inv := by rintro (x | x) <;> rfl
   right_inv := by rintro (x | x) <;> rfl
-#align dihedral_group.fintype_helper dihedral_group.fintype_helper
 
 /-- If `0 < n`, then `dihedral_group n` is a finite group.
 -/
Diff
@@ -22,6 +22,7 @@ represents the rotations of the `n`-gon by `2πi/n`, and `sr i` represents the r
 -/
 
 
+#print DihedralGroup /-
 /-- For `n ≠ 0`, `dihedral_group 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. `dihedral_group 0` corresponds to the infinite dihedral group.
@@ -31,6 +32,7 @@ inductive DihedralGroup (n : ℕ) : Type
   | sr : ZMod n → DihedralGroup
   deriving DecidableEq
 #align dihedral_group DihedralGroup
+-/
 
 namespace DihedralGroup
 
@@ -81,26 +83,56 @@ instance : Group (DihedralGroup n) where
     exact congr_arg r (neg_add_self a)
     exact congr_arg r (sub_self a)
 
+/- warning: dihedral_group.r_mul_r -> DihedralGroup.r_mul_r is a dubious translation:
+lean 3 declaration is
+  forall {n : Nat} (i : ZMod n) (j : ZMod n), Eq.{1} (DihedralGroup n) (HMul.hMul.{0, 0, 0} (DihedralGroup n) (DihedralGroup n) (DihedralGroup n) (instHMul.{0} (DihedralGroup n) (MulOneClass.toHasMul.{0} (DihedralGroup n) (Monoid.toMulOneClass.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n)))))) (DihedralGroup.r n i) (DihedralGroup.r n j)) (DihedralGroup.r n (HAdd.hAdd.{0, 0, 0} (ZMod n) (ZMod n) (ZMod n) (instHAdd.{0} (ZMod n) (Distrib.toHasAdd.{0} (ZMod n) (Ring.toDistrib.{0} (ZMod n) (CommRing.toRing.{0} (ZMod n) (ZMod.commRing n))))) i j))
+but is expected to have type
+  forall {n : Nat} (i : ZMod n) (j : ZMod n), Eq.{1} (DihedralGroup n) (HMul.hMul.{0, 0, 0} (DihedralGroup n) (DihedralGroup n) (DihedralGroup n) (instHMul.{0} (DihedralGroup n) (MulOneClass.toMul.{0} (DihedralGroup n) (Monoid.toMulOneClass.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n)))))) (DihedralGroup.r n i) (DihedralGroup.r n j)) (DihedralGroup.r n (HAdd.hAdd.{0, 0, 0} (ZMod n) (ZMod n) (ZMod n) (instHAdd.{0} (ZMod n) (Distrib.toAdd.{0} (ZMod n) (NonUnitalNonAssocSemiring.toDistrib.{0} (ZMod n) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} (ZMod n) (NonAssocRing.toNonUnitalNonAssocRing.{0} (ZMod n) (Ring.toNonAssocRing.{0} (ZMod n) (CommRing.toRing.{0} (ZMod n) (ZMod.commRing n)))))))) i j))
+Case conversion may be inaccurate. Consider using '#align dihedral_group.r_mul_r DihedralGroup.r_mul_rₓ'. -/
 @[simp]
 theorem r_mul_r (i j : ZMod n) : r i * r j = r (i + j) :=
   rfl
 #align dihedral_group.r_mul_r DihedralGroup.r_mul_r
 
+/- warning: dihedral_group.r_mul_sr -> DihedralGroup.r_mul_sr is a dubious translation:
+lean 3 declaration is
+  forall {n : Nat} (i : ZMod n) (j : ZMod n), Eq.{1} (DihedralGroup n) (HMul.hMul.{0, 0, 0} (DihedralGroup n) (DihedralGroup n) (DihedralGroup n) (instHMul.{0} (DihedralGroup n) (MulOneClass.toHasMul.{0} (DihedralGroup n) (Monoid.toMulOneClass.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n)))))) (DihedralGroup.r n i) (DihedralGroup.sr n j)) (DihedralGroup.sr n (HSub.hSub.{0, 0, 0} (ZMod n) (ZMod n) (ZMod n) (instHSub.{0} (ZMod n) (SubNegMonoid.toHasSub.{0} (ZMod n) (AddGroup.toSubNegMonoid.{0} (ZMod n) (AddGroupWithOne.toAddGroup.{0} (ZMod n) (AddCommGroupWithOne.toAddGroupWithOne.{0} (ZMod n) (Ring.toAddCommGroupWithOne.{0} (ZMod n) (CommRing.toRing.{0} (ZMod n) (ZMod.commRing n)))))))) j i))
+but is expected to have type
+  forall {n : Nat} (i : ZMod n) (j : ZMod n), Eq.{1} (DihedralGroup n) (HMul.hMul.{0, 0, 0} (DihedralGroup n) (DihedralGroup n) (DihedralGroup n) (instHMul.{0} (DihedralGroup n) (MulOneClass.toMul.{0} (DihedralGroup n) (Monoid.toMulOneClass.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n)))))) (DihedralGroup.r n i) (DihedralGroup.sr n j)) (DihedralGroup.sr n (HSub.hSub.{0, 0, 0} (ZMod n) (ZMod n) (ZMod n) (instHSub.{0} (ZMod n) (Ring.toSub.{0} (ZMod n) (CommRing.toRing.{0} (ZMod n) (ZMod.commRing n)))) j i))
+Case conversion may be inaccurate. Consider using '#align dihedral_group.r_mul_sr DihedralGroup.r_mul_srₓ'. -/
 @[simp]
 theorem r_mul_sr (i j : ZMod n) : r i * sr j = sr (j - i) :=
   rfl
 #align dihedral_group.r_mul_sr DihedralGroup.r_mul_sr
 
+/- warning: dihedral_group.sr_mul_r -> DihedralGroup.sr_mul_r is a dubious translation:
+lean 3 declaration is
+  forall {n : Nat} (i : ZMod n) (j : ZMod n), Eq.{1} (DihedralGroup n) (HMul.hMul.{0, 0, 0} (DihedralGroup n) (DihedralGroup n) (DihedralGroup n) (instHMul.{0} (DihedralGroup n) (MulOneClass.toHasMul.{0} (DihedralGroup n) (Monoid.toMulOneClass.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n)))))) (DihedralGroup.sr n i) (DihedralGroup.r n j)) (DihedralGroup.sr n (HAdd.hAdd.{0, 0, 0} (ZMod n) (ZMod n) (ZMod n) (instHAdd.{0} (ZMod n) (Distrib.toHasAdd.{0} (ZMod n) (Ring.toDistrib.{0} (ZMod n) (CommRing.toRing.{0} (ZMod n) (ZMod.commRing n))))) i j))
+but is expected to have type
+  forall {n : Nat} (i : ZMod n) (j : ZMod n), Eq.{1} (DihedralGroup n) (HMul.hMul.{0, 0, 0} (DihedralGroup n) (DihedralGroup n) (DihedralGroup n) (instHMul.{0} (DihedralGroup n) (MulOneClass.toMul.{0} (DihedralGroup n) (Monoid.toMulOneClass.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n)))))) (DihedralGroup.sr n i) (DihedralGroup.r n j)) (DihedralGroup.sr n (HAdd.hAdd.{0, 0, 0} (ZMod n) (ZMod n) (ZMod n) (instHAdd.{0} (ZMod n) (Distrib.toAdd.{0} (ZMod n) (NonUnitalNonAssocSemiring.toDistrib.{0} (ZMod n) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} (ZMod n) (NonAssocRing.toNonUnitalNonAssocRing.{0} (ZMod n) (Ring.toNonAssocRing.{0} (ZMod n) (CommRing.toRing.{0} (ZMod n) (ZMod.commRing n)))))))) i j))
+Case conversion may be inaccurate. Consider using '#align dihedral_group.sr_mul_r DihedralGroup.sr_mul_rₓ'. -/
 @[simp]
 theorem sr_mul_r (i j : ZMod n) : sr i * r j = sr (i + j) :=
   rfl
 #align dihedral_group.sr_mul_r DihedralGroup.sr_mul_r
 
+/- warning: dihedral_group.sr_mul_sr -> DihedralGroup.sr_mul_sr is a dubious translation:
+lean 3 declaration is
+  forall {n : Nat} (i : ZMod n) (j : ZMod n), Eq.{1} (DihedralGroup n) (HMul.hMul.{0, 0, 0} (DihedralGroup n) (DihedralGroup n) (DihedralGroup n) (instHMul.{0} (DihedralGroup n) (MulOneClass.toHasMul.{0} (DihedralGroup n) (Monoid.toMulOneClass.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n)))))) (DihedralGroup.sr n i) (DihedralGroup.sr n j)) (DihedralGroup.r n (HSub.hSub.{0, 0, 0} (ZMod n) (ZMod n) (ZMod n) (instHSub.{0} (ZMod n) (SubNegMonoid.toHasSub.{0} (ZMod n) (AddGroup.toSubNegMonoid.{0} (ZMod n) (AddGroupWithOne.toAddGroup.{0} (ZMod n) (AddCommGroupWithOne.toAddGroupWithOne.{0} (ZMod n) (Ring.toAddCommGroupWithOne.{0} (ZMod n) (CommRing.toRing.{0} (ZMod n) (ZMod.commRing n)))))))) j i))
+but is expected to have type
+  forall {n : Nat} (i : ZMod n) (j : ZMod n), Eq.{1} (DihedralGroup n) (HMul.hMul.{0, 0, 0} (DihedralGroup n) (DihedralGroup n) (DihedralGroup n) (instHMul.{0} (DihedralGroup n) (MulOneClass.toMul.{0} (DihedralGroup n) (Monoid.toMulOneClass.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n)))))) (DihedralGroup.sr n i) (DihedralGroup.sr n j)) (DihedralGroup.r n (HSub.hSub.{0, 0, 0} (ZMod n) (ZMod n) (ZMod n) (instHSub.{0} (ZMod n) (Ring.toSub.{0} (ZMod n) (CommRing.toRing.{0} (ZMod n) (ZMod.commRing n)))) j i))
+Case conversion may be inaccurate. Consider using '#align dihedral_group.sr_mul_sr DihedralGroup.sr_mul_srₓ'. -/
 @[simp]
 theorem sr_mul_sr (i j : ZMod n) : sr i * sr j = r (j - i) :=
   rfl
 #align dihedral_group.sr_mul_sr DihedralGroup.sr_mul_sr
 
+/- warning: dihedral_group.one_def -> DihedralGroup.one_def is a dubious translation:
+lean 3 declaration is
+  forall {n : Nat}, Eq.{1} (DihedralGroup n) (OfNat.ofNat.{0} (DihedralGroup n) 1 (OfNat.mk.{0} (DihedralGroup n) 1 (One.one.{0} (DihedralGroup n) (MulOneClass.toHasOne.{0} (DihedralGroup n) (Monoid.toMulOneClass.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n)))))))) (DihedralGroup.r n (OfNat.ofNat.{0} (ZMod n) 0 (OfNat.mk.{0} (ZMod n) 0 (Zero.zero.{0} (ZMod n) (MulZeroClass.toHasZero.{0} (ZMod n) (NonUnitalNonAssocSemiring.toMulZeroClass.{0} (ZMod n) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} (ZMod n) (NonAssocRing.toNonUnitalNonAssocRing.{0} (ZMod n) (Ring.toNonAssocRing.{0} (ZMod n) (CommRing.toRing.{0} (ZMod n) (ZMod.commRing n)))))))))))
+but is expected to have type
+  forall {n : Nat}, Eq.{1} (DihedralGroup n) (OfNat.ofNat.{0} (DihedralGroup n) 1 (One.toOfNat1.{0} (DihedralGroup n) (InvOneClass.toOne.{0} (DihedralGroup n) (DivInvOneMonoid.toInvOneClass.{0} (DihedralGroup n) (DivisionMonoid.toDivInvOneMonoid.{0} (DihedralGroup n) (Group.toDivisionMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n))))))) (DihedralGroup.r n (OfNat.ofNat.{0} (ZMod n) 0 (Zero.toOfNat0.{0} (ZMod n) (CommMonoidWithZero.toZero.{0} (ZMod n) (CommSemiring.toCommMonoidWithZero.{0} (ZMod n) (CommRing.toCommSemiring.{0} (ZMod n) (ZMod.commRing n)))))))
+Case conversion may be inaccurate. Consider using '#align dihedral_group.one_def DihedralGroup.one_defₓ'. -/
 theorem one_def : (1 : DihedralGroup n) = r 0 :=
   rfl
 #align dihedral_group.one_def DihedralGroup.one_def
@@ -127,12 +159,20 @@ instance [NeZero n] : Fintype (DihedralGroup n) :=
 instance : Nontrivial (DihedralGroup n) :=
   ⟨⟨r 0, sr 0, by decide⟩⟩
 
+#print DihedralGroup.card /-
 /-- If `0 < n`, then `dihedral_group n` has `2n` elements.
 -/
 theorem card [NeZero n] : Fintype.card (DihedralGroup n) = 2 * n := by
   rw [← fintype.card_eq.mpr ⟨fintype_helper⟩, Fintype.card_sum, ZMod.card, two_mul]
 #align dihedral_group.card DihedralGroup.card
+-/
 
+/- warning: dihedral_group.r_one_pow -> DihedralGroup.r_one_pow is a dubious translation:
+lean 3 declaration is
+  forall {n : Nat} (k : Nat), Eq.{1} (DihedralGroup n) (HPow.hPow.{0, 0, 0} (DihedralGroup n) Nat (DihedralGroup n) (instHPow.{0, 0} (DihedralGroup n) Nat (Monoid.Pow.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n))))) (DihedralGroup.r n (OfNat.ofNat.{0} (ZMod n) 1 (OfNat.mk.{0} (ZMod n) 1 (One.one.{0} (ZMod n) (AddMonoidWithOne.toOne.{0} (ZMod n) (AddGroupWithOne.toAddMonoidWithOne.{0} (ZMod n) (AddCommGroupWithOne.toAddGroupWithOne.{0} (ZMod n) (Ring.toAddCommGroupWithOne.{0} (ZMod n) (CommRing.toRing.{0} (ZMod n) (ZMod.commRing n)))))))))) k) (DihedralGroup.r n ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat (ZMod n) (HasLiftT.mk.{1, 1} Nat (ZMod n) (CoeTCₓ.coe.{1, 1} Nat (ZMod n) (Nat.castCoe.{0} (ZMod n) (AddMonoidWithOne.toNatCast.{0} (ZMod n) (AddGroupWithOne.toAddMonoidWithOne.{0} (ZMod n) (AddCommGroupWithOne.toAddGroupWithOne.{0} (ZMod n) (Ring.toAddCommGroupWithOne.{0} (ZMod n) (CommRing.toRing.{0} (ZMod n) (ZMod.commRing n))))))))) k))
+but is expected to have type
+  forall {n : Nat} (k : Nat), Eq.{1} (DihedralGroup n) (HPow.hPow.{0, 0, 0} (DihedralGroup n) Nat (DihedralGroup n) (instHPow.{0, 0} (DihedralGroup n) Nat (Monoid.Pow.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n))))) (DihedralGroup.r n (OfNat.ofNat.{0} (ZMod n) 1 (One.toOfNat1.{0} (ZMod n) (Semiring.toOne.{0} (ZMod n) (CommSemiring.toSemiring.{0} (ZMod n) (CommRing.toCommSemiring.{0} (ZMod n) (ZMod.commRing n))))))) k) (DihedralGroup.r n (Nat.cast.{0} (ZMod n) (Semiring.toNatCast.{0} (ZMod n) (CommSemiring.toSemiring.{0} (ZMod n) (CommRing.toCommSemiring.{0} (ZMod n) (ZMod.commRing n)))) k))
+Case conversion may be inaccurate. Consider using '#align dihedral_group.r_one_pow DihedralGroup.r_one_powₓ'. -/
 @[simp]
 theorem r_one_pow (k : ℕ) : (r 1 : DihedralGroup n) ^ k = r k :=
   by
@@ -145,6 +185,12 @@ theorem r_one_pow (k : ℕ) : (r 1 : DihedralGroup n) ^ k = r k :=
     rw [Nat.one_add]
 #align dihedral_group.r_one_pow DihedralGroup.r_one_pow
 
+/- warning: dihedral_group.r_one_pow_n -> DihedralGroup.r_one_pow_n is a dubious translation:
+lean 3 declaration is
+  forall {n : Nat}, Eq.{1} (DihedralGroup n) (HPow.hPow.{0, 0, 0} (DihedralGroup n) Nat (DihedralGroup n) (instHPow.{0, 0} (DihedralGroup n) Nat (Monoid.Pow.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n))))) (DihedralGroup.r n (OfNat.ofNat.{0} (ZMod n) 1 (OfNat.mk.{0} (ZMod n) 1 (One.one.{0} (ZMod n) (AddMonoidWithOne.toOne.{0} (ZMod n) (AddGroupWithOne.toAddMonoidWithOne.{0} (ZMod n) (AddCommGroupWithOne.toAddGroupWithOne.{0} (ZMod n) (Ring.toAddCommGroupWithOne.{0} (ZMod n) (CommRing.toRing.{0} (ZMod n) (ZMod.commRing n)))))))))) n) (OfNat.ofNat.{0} (DihedralGroup n) 1 (OfNat.mk.{0} (DihedralGroup n) 1 (One.one.{0} (DihedralGroup n) (MulOneClass.toHasOne.{0} (DihedralGroup n) (Monoid.toMulOneClass.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n))))))))
+but is expected to have type
+  forall {n : Nat}, Eq.{1} (DihedralGroup n) (HPow.hPow.{0, 0, 0} (DihedralGroup n) Nat (DihedralGroup n) (instHPow.{0, 0} (DihedralGroup n) Nat (Monoid.Pow.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n))))) (DihedralGroup.r n (OfNat.ofNat.{0} (ZMod n) 1 (One.toOfNat1.{0} (ZMod n) (Semiring.toOne.{0} (ZMod n) (CommSemiring.toSemiring.{0} (ZMod n) (CommRing.toCommSemiring.{0} (ZMod n) (ZMod.commRing n))))))) n) (OfNat.ofNat.{0} (DihedralGroup n) 1 (One.toOfNat1.{0} (DihedralGroup n) (InvOneClass.toOne.{0} (DihedralGroup n) (DivInvOneMonoid.toInvOneClass.{0} (DihedralGroup n) (DivisionMonoid.toDivInvOneMonoid.{0} (DihedralGroup n) (Group.toDivisionMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n)))))))
+Case conversion may be inaccurate. Consider using '#align dihedral_group.r_one_pow_n DihedralGroup.r_one_pow_nₓ'. -/
 @[simp]
 theorem r_one_pow_n : r (1 : ZMod n) ^ n = 1 :=
   by
@@ -153,10 +199,22 @@ theorem r_one_pow_n : r (1 : ZMod n) ^ n = 1 :=
   exact ZMod.nat_cast_self _
 #align dihedral_group.r_one_pow_n DihedralGroup.r_one_pow_n
 
+/- warning: dihedral_group.sr_mul_self -> DihedralGroup.sr_mul_self is a dubious translation:
+lean 3 declaration is
+  forall {n : Nat} (i : ZMod n), Eq.{1} (DihedralGroup n) (HMul.hMul.{0, 0, 0} (DihedralGroup n) (DihedralGroup n) (DihedralGroup n) (instHMul.{0} (DihedralGroup n) (MulOneClass.toHasMul.{0} (DihedralGroup n) (Monoid.toMulOneClass.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n)))))) (DihedralGroup.sr n i) (DihedralGroup.sr n i)) (OfNat.ofNat.{0} (DihedralGroup n) 1 (OfNat.mk.{0} (DihedralGroup n) 1 (One.one.{0} (DihedralGroup n) (MulOneClass.toHasOne.{0} (DihedralGroup n) (Monoid.toMulOneClass.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n))))))))
+but is expected to have type
+  forall {n : Nat} (i : ZMod n), Eq.{1} (DihedralGroup n) (HMul.hMul.{0, 0, 0} (DihedralGroup n) (DihedralGroup n) (DihedralGroup n) (instHMul.{0} (DihedralGroup n) (MulOneClass.toMul.{0} (DihedralGroup n) (Monoid.toMulOneClass.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n)))))) (DihedralGroup.sr n i) (DihedralGroup.sr n i)) (OfNat.ofNat.{0} (DihedralGroup n) 1 (One.toOfNat1.{0} (DihedralGroup n) (InvOneClass.toOne.{0} (DihedralGroup n) (DivInvOneMonoid.toInvOneClass.{0} (DihedralGroup n) (DivisionMonoid.toDivInvOneMonoid.{0} (DihedralGroup n) (Group.toDivisionMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n)))))))
+Case conversion may be inaccurate. Consider using '#align dihedral_group.sr_mul_self DihedralGroup.sr_mul_selfₓ'. -/
 @[simp]
 theorem sr_mul_self (i : ZMod n) : sr i * sr i = 1 := by rw [sr_mul_sr, sub_self, one_def]
 #align dihedral_group.sr_mul_self DihedralGroup.sr_mul_self
 
+/- warning: dihedral_group.order_of_sr -> DihedralGroup.orderOf_sr is a dubious translation:
+lean 3 declaration is
+  forall {n : Nat} (i : ZMod n), Eq.{1} Nat (orderOf.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n))) (DihedralGroup.sr n i)) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne))))
+but is expected to have type
+  forall {n : Nat} (i : ZMod n), Eq.{1} Nat (orderOf.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n))) (DihedralGroup.sr n i)) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2))
+Case conversion may be inaccurate. Consider using '#align dihedral_group.order_of_sr DihedralGroup.orderOf_srₓ'. -/
 /-- If `0 < n`, then `sr i` has order 2.
 -/
 @[simp]
@@ -168,6 +226,12 @@ theorem orderOf_sr (i : ZMod n) : orderOf (sr i) = 2 :=
   decide
 #align dihedral_group.order_of_sr DihedralGroup.orderOf_sr
 
+/- warning: dihedral_group.order_of_r_one -> DihedralGroup.orderOf_r_one is a dubious translation:
+lean 3 declaration is
+  forall {n : Nat}, Eq.{1} Nat (orderOf.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n))) (DihedralGroup.r n (OfNat.ofNat.{0} (ZMod n) 1 (OfNat.mk.{0} (ZMod n) 1 (One.one.{0} (ZMod n) (AddMonoidWithOne.toOne.{0} (ZMod n) (AddGroupWithOne.toAddMonoidWithOne.{0} (ZMod n) (AddCommGroupWithOne.toAddGroupWithOne.{0} (ZMod n) (Ring.toAddCommGroupWithOne.{0} (ZMod n) (CommRing.toRing.{0} (ZMod n) (ZMod.commRing n))))))))))) n
+but is expected to have type
+  forall {n : Nat}, Eq.{1} Nat (orderOf.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n))) (DihedralGroup.r n (OfNat.ofNat.{0} (ZMod n) 1 (One.toOfNat1.{0} (ZMod n) (Semiring.toOne.{0} (ZMod n) (CommSemiring.toSemiring.{0} (ZMod n) (CommRing.toCommSemiring.{0} (ZMod n) (ZMod.commRing n)))))))) n
+Case conversion may be inaccurate. Consider using '#align dihedral_group.order_of_r_one DihedralGroup.orderOf_r_oneₓ'. -/
 /-- If `0 < n`, then `r 1` has order `n`.
 -/
 @[simp]
@@ -191,6 +255,12 @@ theorem orderOf_r_one : orderOf (r 1 : DihedralGroup n) = n :=
     exact absurd h2.symm (orderOf_pos _).Ne
 #align dihedral_group.order_of_r_one DihedralGroup.orderOf_r_one
 
+/- warning: dihedral_group.order_of_r -> DihedralGroup.orderOf_r is a dubious translation:
+lean 3 declaration is
+  forall {n : Nat} [_inst_1 : NeZero.{0} Nat Nat.hasZero n] (i : ZMod n), Eq.{1} Nat (orderOf.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n))) (DihedralGroup.r n i)) (HDiv.hDiv.{0, 0, 0} Nat Nat Nat (instHDiv.{0} Nat Nat.hasDiv) n (Nat.gcd n (ZMod.val n i)))
+but is expected to have type
+  forall {n : Nat} [_inst_1 : NeZero.{0} Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero) n] (i : ZMod n), Eq.{1} Nat (orderOf.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n))) (DihedralGroup.r n i)) (HDiv.hDiv.{0, 0, 0} Nat Nat Nat (instHDiv.{0} Nat Nat.instDivNat) n (Nat.gcd n (ZMod.val n i)))
+Case conversion may be inaccurate. Consider using '#align dihedral_group.order_of_r DihedralGroup.orderOf_rₓ'. -/
 /-- If `0 < n`, then `i : zmod n` has order `n / gcd n i`.
 -/
 theorem orderOf_r [NeZero n] (i : ZMod n) : orderOf (r i) = n / Nat.gcd n i.val :=
@@ -199,6 +269,12 @@ theorem orderOf_r [NeZero n] (i : ZMod n) : orderOf (r i) = n / Nat.gcd n i.val
   rw [← r_one_pow, orderOf_pow, order_of_r_one]
 #align dihedral_group.order_of_r DihedralGroup.orderOf_r
 
+/- warning: dihedral_group.exponent -> DihedralGroup.exponent is a dubious translation:
+lean 3 declaration is
+  forall {n : Nat}, Eq.{1} Nat (Monoid.exponent.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.group n)))) (GCDMonoid.lcm.{0} Nat Nat.cancelCommMonoidWithZero Nat.gcdMonoid n (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))))
+but is expected to have type
+  forall {n : Nat}, Eq.{1} Nat (Monoid.exponent.{0} (DihedralGroup n) (DivInvMonoid.toMonoid.{0} (DihedralGroup n) (Group.toDivInvMonoid.{0} (DihedralGroup n) (DihedralGroup.instGroupDihedralGroup n)))) (GCDMonoid.lcm.{0} Nat Nat.cancelCommMonoidWithZero instGCDMonoidNatCancelCommMonoidWithZero n (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)))
+Case conversion may be inaccurate. Consider using '#align dihedral_group.exponent DihedralGroup.exponentₓ'. -/
 theorem exponent : Monoid.exponent (DihedralGroup n) = lcm n 2 :=
   by
   rcases eq_zero_or_neZero n with (rfl | hn)
Diff
@@ -195,7 +195,7 @@ theorem orderOf_r_one : orderOf (r 1 : DihedralGroup n) = n :=
 -/
 theorem orderOf_r [NeZero n] (i : ZMod n) : orderOf (r i) = n / Nat.gcd n i.val :=
   by
-  conv_lhs => rw [← ZMod.nat_cast_zMod_val i]
+  conv_lhs => rw [← ZMod.nat_cast_zmod_val i]
   rw [← r_one_pow, orderOf_pow, order_of_r_one]
 #align dihedral_group.order_of_r DihedralGroup.orderOf_r
 

Changes in mathlib4

mathlib3
mathlib4
chore: adapt to multiple goal linter 3 (#12372)

A PR analogous to #12338 and #12361: reformatting proofs following the multiple goals linter of #12339.

Diff
@@ -63,17 +63,17 @@ instance : Group (DihedralGroup n) where
   one := one
   one_mul := by
     rintro (a | a)
-    exact congr_arg r (zero_add a)
-    exact congr_arg sr (sub_zero a)
+    · exact congr_arg r (zero_add a)
+    · exact congr_arg sr (sub_zero a)
   mul_one := by
     rintro (a | a)
-    exact congr_arg r (add_zero a)
-    exact congr_arg sr (add_zero a)
+    · exact congr_arg r (add_zero a)
+    · exact congr_arg sr (add_zero a)
   inv := inv
   mul_left_inv := by
     rintro (a | a)
-    exact congr_arg r (neg_add_self a)
-    exact congr_arg r (sub_self a)
+    · exact congr_arg r (neg_add_self a)
+    · exact congr_arg r (sub_self a)
 
 @[simp]
 theorem r_mul_r (i j : ZMod n) : r i * r j = r (i + j) :=
chore: Rename nat_cast/int_cast/rat_cast to natCast/intCast/ratCast (#11486)

Now that I am defining NNRat.cast, I want a definitive answer to this naming issue. Plenty of lemmas in mathlib already use natCast/intCast/ratCast over nat_cast/int_cast/rat_cast, and this matches with the general expectation that underscore-separated name parts correspond to a single declaration.

Diff
@@ -146,7 +146,7 @@ theorem r_one_pow (k : ℕ) : (r 1 : DihedralGroup n) ^ k = r k := by
 theorem r_one_pow_n : r (1 : ZMod n) ^ n = 1 := by
   rw [r_one_pow, one_def]
   congr 1
-  exact ZMod.nat_cast_self _
+  exact ZMod.natCast_self _
 #align dihedral_group.r_one_pow_n DihedralGroup.r_one_pow_n
 
 -- @[simp] -- Porting note: simp changes the goal to `r 0 = 1`. `sr_mul_self` is no longer useful.
@@ -180,14 +180,14 @@ theorem orderOf_r_one : orderOf (r 1 : DihedralGroup n) = n := by
     have h1 : (r 1 : DihedralGroup n) ^ orderOf (r 1) = 1 := pow_orderOf_eq_one _
     rw [r_one_pow] at h1
     injection h1 with h2
-    rw [← ZMod.val_eq_zero, ZMod.val_nat_cast, Nat.mod_eq_of_lt h] at h2
+    rw [← ZMod.val_eq_zero, ZMod.val_natCast, Nat.mod_eq_of_lt h] at h2
     exact absurd h2.symm (orderOf_pos _).ne
 #align dihedral_group.order_of_r_one DihedralGroup.orderOf_r_one
 
 /-- If `0 < n`, then `i : ZMod n` has order `n / gcd n i`.
 -/
 theorem orderOf_r [NeZero n] (i : ZMod n) : orderOf (r i) = n / Nat.gcd n i.val := by
-  conv_lhs => rw [← ZMod.nat_cast_zmod_val i]
+  conv_lhs => rw [← ZMod.natCast_zmod_val i]
   rw [← r_one_pow, orderOf_pow, orderOf_r_one]
 #align dihedral_group.order_of_r DihedralGroup.orderOf_r
 
change the order of operation in zsmulRec and nsmulRec (#11451)

We change the following field in the definition of an additive commutative monoid:

 nsmul_succ : ∀ (n : ℕ) (x : G),
-  AddMonoid.nsmul (n + 1) x = x + AddMonoid.nsmul n x
+  AddMonoid.nsmul (n + 1) x = AddMonoid.nsmul n x + x

where the latter is more natural

We adjust the definitions of ^ in monoids, groups, etc. Originally there was a warning comment about why this natural order was preferred

use x * npowRec n x and not npowRec n x * x in the definition to make sure that definitional unfolding of npowRec is blocked, to avoid deep recursion issues.

but it seems to no longer apply.

Remarks on the PR :

  • pow_succ and pow_succ' have switched their meanings.
  • Most of the time, the proofs were adjusted by priming/unpriming one lemma, or exchanging left and right; a few proofs were more complicated to adjust.
  • In particular, [Mathlib/NumberTheory/RamificationInertia.lean] used Ideal.IsPrime.mul_mem_pow which is defined in [Mathlib/RingTheory/DedekindDomain/Ideal.lean]. Changing the order of operation forced me to add the symmetric lemma Ideal.IsPrime.mem_pow_mul.
  • the docstring for Cauchy condensation test in [Mathlib/Analysis/PSeries.lean] was mathematically incorrect, I added the mention that the function is antitone.
Diff
@@ -136,7 +136,7 @@ theorem r_one_pow (k : ℕ) : (r 1 : DihedralGroup n) ^ k = r k := by
   induction' k with k IH
   · rw [Nat.cast_zero]
     rfl
-  · rw [pow_succ, IH, r_mul_r]
+  · rw [pow_succ', IH, r_mul_r]
     congr 1
     norm_cast
     rw [Nat.one_add]
chore(*): replace $ with <| (#9319)

See Zulip thread for the discussion.

Diff
@@ -241,7 +241,7 @@ def OddCommuteEquiv (hn : Odd n) : { p : DihedralGroup n × DihedralGroup n // C
       | .inl i => rfl
       | .inr (.inl j) => rfl
       | .inr (.inr (.inl k)) =>
-        congrArg (Sum.inr ∘ Sum.inr ∘ Sum.inl) $ two_mul (u⁻¹ * k) ▸ u.mul_inv_cancel_left k
+        congrArg (Sum.inr ∘ Sum.inr ∘ Sum.inl) <| two_mul (u⁻¹ * k) ▸ u.mul_inv_cancel_left k
       | .inr (.inr (.inr ⟨i, j⟩)) => rfl }
 
 /-- If n is odd, then the Dihedral group of order $2n$ has $n(n+3)$ pairs of commuting elements. -/
chore: space after (#8178)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -234,8 +234,8 @@ def OddCommuteEquiv (hn : Odd n) : { p : DihedralGroup n × DihedralGroup n // C
         simpa [sub_eq_add_neg, eq_neg_iff_add_eq_zero, hu, eq_comm (a := j) (b := 0)] using h.eq
       | ⟨⟨sr i, sr j⟩, h⟩ => by
         replace h := r.inj h
-        rw [←neg_sub, neg_eq_iff_add_eq_zero, hu, sub_eq_zero] at h
-        rw [Subtype.ext_iff, Prod.ext_iff, sr.injEq, sr.injEq, h, and_self, ←two_mul]
+        rw [← neg_sub, neg_eq_iff_add_eq_zero, hu, sub_eq_zero] at h
+        rw [Subtype.ext_iff, Prod.ext_iff, sr.injEq, sr.injEq, h, and_self, ← two_mul]
         exact u.inv_mul_cancel_left j
     right_inv := fun
       | .inl i => rfl
@@ -253,7 +253,7 @@ lemma card_commute_odd (hn : Odd n) :
 
 lemma card_conjClasses_odd (hn : Odd n) :
     Nat.card (ConjClasses (DihedralGroup n)) = (n + 3) / 2 := by
-  rw [←Nat.mul_div_mul_left _ 2 hn.pos, ← card_commute_odd hn, mul_comm,
+  rw [← Nat.mul_div_mul_left _ 2 hn.pos, ← card_commute_odd hn, mul_comm,
     card_comm_eq_card_conjClasses_mul_card, nat_card, Nat.mul_div_left _ (mul_pos two_pos hn.pos)]
 
 
chore: bump to v4.3.0-rc2 (#8366)

PR contents

This is the supremum of

along with some minor fixes from failures on nightly-testing as Mathlib master is merged into it.

Note that some PRs for changes that are already compatible with the current toolchain and will be necessary have already been split out: #8380.

I am hopeful that in future we will be able to progressively merge adaptation PRs into a bump/v4.X.0 branch, so we never end up with a "big merge" like this. However one of these adaptation PRs (#8056) predates my new scheme for combined CI, and it wasn't possible to keep that PR viable in the meantime.

Lean PRs involved in this bump

In particular this includes adjustments for the Lean PRs

leanprover/lean4#2778

We can get rid of all the

local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue [lean4#2220](https://github.com/leanprover/lean4/pull/2220)

macros across Mathlib (and in any projects that want to write natural number powers of reals).

leanprover/lean4#2722

Changes the default behaviour of simp to (config := {decide := false}). This makes simp (and consequentially norm_num) less powerful, but also more consistent, and less likely to blow up in long failures. This requires a variety of changes: changing some previously by simp or norm_num to decide or rfl, or adding (config := {decide := true}).

leanprover/lean4#2783

This changed the behaviour of simp so that simp [f] will only unfold "fully applied" occurrences of f. The old behaviour can be recovered with simp (config := { unfoldPartialApp := true }). We may in future add a syntax for this, e.g. simp [!f]; please provide feedback! In the meantime, we have made the following changes:

  • switching to using explicit lemmas that have the intended level of application
  • (config := { unfoldPartialApp := true }) in some places, to recover the old behaviour
  • Using @[eqns] to manually adjust the equation lemmas for a particular definition, recovering the old behaviour just for that definition. See #8371, where we do this for Function.comp and Function.flip.

This change in Lean may require further changes down the line (e.g. adding the !f syntax, and/or upstreaming the special treatment for Function.comp and Function.flip, and/or removing this special treatment). Please keep an open and skeptical mind about these changes!

Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Mauricio Collares <mauricio@collares.org>

Diff
@@ -118,7 +118,7 @@ instance : Infinite (DihedralGroup 0) :=
   DihedralGroup.fintypeHelper.infinite_iff.mp inferInstance
 
 instance : Nontrivial (DihedralGroup n) :=
-  ⟨⟨r 0, sr 0, by simp_rw [ne_eq]⟩⟩
+  ⟨⟨r 0, sr 0, by simp_rw [ne_eq, not_false_eq_true]⟩⟩
 
 /-- If `0 < n`, then `DihedralGroup n` has `2n` elements.
 -/
@@ -161,7 +161,7 @@ theorem orderOf_sr (i : ZMod n) : orderOf (sr i) = 2 := by
   · rw [sq, sr_mul_self]
   · -- Porting note: Previous proof was `decide`
     revert n
-    simp_rw [one_def, ne_eq, forall_const]
+    simp_rw [one_def, ne_eq, forall_const, not_false_eq_true]
 #align dihedral_group.order_of_sr DihedralGroup.orderOf_sr
 
 /-- If `0 < n`, then `r 1` has order `n`.
feat(GroupTheory/SpecificGroups/Dihedral): Conjugacy classes in odd dihedral groups (#6502)

This PR counts conjugacy classes in odd dihedral groups. The even case is a bit harder due to the half-rotation being central.

Diff
@@ -126,6 +126,11 @@ theorem card [NeZero n] : Fintype.card (DihedralGroup n) = 2 * n := by
   rw [← Fintype.card_eq.mpr ⟨fintypeHelper⟩, Fintype.card_sum, ZMod.card, two_mul]
 #align dihedral_group.card DihedralGroup.card
 
+theorem nat_card : Nat.card (DihedralGroup n) = 2 * n := by
+  cases n
+  · rw [Nat.card_eq_zero_of_infinite]
+  · rw [Nat.card_eq_fintype_card, card]
+
 @[simp]
 theorem r_one_pow (k : ℕ) : (r 1 : DihedralGroup n) ^ k = r k := by
   induction' k with k IH
@@ -204,4 +209,52 @@ theorem exponent : Monoid.exponent (DihedralGroup n) = lcm n 2 := by
       exact (orderOf_sr 0).symm
 #align dihedral_group.exponent DihedralGroup.exponent
 
+/-- 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. -/
+@[simps]
+def OddCommuteEquiv (hn : Odd n) : { p : DihedralGroup n × DihedralGroup n // Commute p.1 p.2 } ≃
+    ZMod n ⊕ ZMod n ⊕ ZMod n ⊕ ZMod n × ZMod n :=
+  let u := ZMod.unitOfCoprime 2 (Nat.prime_two.coprime_iff_not_dvd.mpr hn.not_two_dvd_nat)
+  have hu : ∀ a : ZMod n, a + a = 0 ↔ a = 0 := fun a => ZMod.add_self_eq_zero_iff_eq_zero hn
+  { toFun := fun
+      | ⟨⟨sr i, r _⟩, _⟩ => Sum.inl i
+      | ⟨⟨r _, sr j⟩, _⟩ => Sum.inr (Sum.inl j)
+      | ⟨⟨sr i, sr j⟩, _⟩ => Sum.inr (Sum.inr (Sum.inl (i + j)))
+      | ⟨⟨r i, r j⟩, _⟩ => Sum.inr (Sum.inr (Sum.inr ⟨i, j⟩))
+    invFun := fun
+      | .inl i => ⟨⟨sr i, r 0⟩, congrArg sr ((add_zero i).trans (sub_zero i).symm)⟩
+      | .inr (.inl j) => ⟨⟨r 0, sr j⟩, congrArg sr ((sub_zero j).trans (add_zero j).symm)⟩
+      | .inr (.inr (.inl k)) => ⟨⟨sr (u⁻¹ * k), sr (u⁻¹ * k)⟩, rfl⟩
+      | .inr (.inr (.inr ⟨i, j⟩)) => ⟨⟨r i, r j⟩, congrArg r (add_comm i j)⟩
+    left_inv := fun
+      | ⟨⟨r i, r j⟩, h⟩ => rfl
+      | ⟨⟨r i, sr j⟩, h⟩ => by
+        simpa [sub_eq_add_neg, neg_eq_iff_add_eq_zero, hu, eq_comm (a := i) (b := 0)] using h.eq
+      | ⟨⟨sr i, r j⟩, h⟩ => by
+        simpa [sub_eq_add_neg, eq_neg_iff_add_eq_zero, hu, eq_comm (a := j) (b := 0)] using h.eq
+      | ⟨⟨sr i, sr j⟩, h⟩ => by
+        replace h := r.inj h
+        rw [←neg_sub, neg_eq_iff_add_eq_zero, hu, sub_eq_zero] at h
+        rw [Subtype.ext_iff, Prod.ext_iff, sr.injEq, sr.injEq, h, and_self, ←two_mul]
+        exact u.inv_mul_cancel_left j
+    right_inv := fun
+      | .inl i => rfl
+      | .inr (.inl j) => rfl
+      | .inr (.inr (.inl k)) =>
+        congrArg (Sum.inr ∘ Sum.inr ∘ Sum.inl) $ two_mul (u⁻¹ * k) ▸ u.mul_inv_cancel_left k
+      | .inr (.inr (.inr ⟨i, j⟩)) => rfl }
+
+/-- If n is odd, then the Dihedral group of order $2n$ has $n(n+3)$ pairs of commuting elements. -/
+lemma card_commute_odd (hn : Odd n) :
+    Nat.card { p : DihedralGroup n × DihedralGroup n // Commute p.1 p.2 } = n * (n + 3) := by
+  have hn' : NeZero n := ⟨hn.pos.ne'⟩
+  simp_rw [Nat.card_congr (OddCommuteEquiv hn), Nat.card_sum, Nat.card_prod, Nat.card_zmod]
+  ring
+
+lemma card_conjClasses_odd (hn : Odd n) :
+    Nat.card (ConjClasses (DihedralGroup n)) = (n + 3) / 2 := by
+  rw [←Nat.mul_div_mul_left _ 2 hn.pos, ← card_commute_odd hn, mul_comm,
+    card_comm_eq_card_conjClasses_mul_card, nat_card, Nat.mul_div_left _ (mul_pos two_pos hn.pos)]
+
+
 end DihedralGroup
feat: DihedralGroup 0 is infinite (#6082)

This PR adds an instance stating that DihedralGroup 0 is infinite.

Diff
@@ -114,6 +114,9 @@ private def fintypeHelper : Sum (ZMod n) (ZMod n) ≃ DihedralGroup n where
 instance [NeZero n] : Fintype (DihedralGroup n) :=
   Fintype.ofEquiv _ fintypeHelper
 
+instance : Infinite (DihedralGroup 0) :=
+  DihedralGroup.fintypeHelper.infinite_iff.mp inferInstance
+
 instance : Nontrivial (DihedralGroup n) :=
   ⟨⟨r 0, sr 0, by simp_rw [ne_eq]⟩⟩
 
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2020 Shing Tak Lam. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Shing Tak Lam
-
-! This file was ported from Lean 3 source module group_theory.specific_groups.dihedral
-! leanprover-community/mathlib commit 70fd9563a21e7b963887c9360bd29b2393e6225a
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Data.ZMod.Basic
 import Mathlib.GroupTheory.Exponent
 
+#align_import group_theory.specific_groups.dihedral from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
+
 /-!
 # Dihedral Groups
 
chore: fix grammar 2/3 (#5002)

Part 2 of #5001

Diff
@@ -52,7 +52,7 @@ private def one : DihedralGroup n :=
 instance : Inhabited (DihedralGroup n) :=
   ⟨one⟩
 
-/-- The inverse of a an element of the dihedral group.
+/-- The inverse of an element of the dihedral group.
 -/
 private def inv : DihedralGroup n → DihedralGroup n
   | r i => r (-i)
feat: port GroupTheory.SpecificGroups.Dihedral (#4370)

Dependencies 8 + 510

511 files ported (98.5%)
210026 lines ported (98.5%)
Show graph

The unported dependencies are