Skip to content

Commit 7e31c21

Browse files
committed
feat(Perm/Fin): generalize sign_finRotate (leanprover-community#39209)
1 parent eab0863 commit 7e31c21

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

Mathlib/GroupTheory/Perm/Fin.lean

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,15 @@ theorem finRotate_succ_eq_decomposeFin {n : ℕ} :
9292
swap_apply_of_ne_of_ne (Nat.succ_ne_zero _) (Nat.succ_succ_ne_one _)]
9393

9494
@[simp]
95-
theorem sign_finRotate (n : ℕ) : Perm.sign (finRotate (n + 1)) = (-1) ^ n := by
96-
induction n with
95+
theorem sign_finRotate (n : ℕ) : Perm.sign (finRotate n) = (-1) ^ (n - 1) := by
96+
cases n with
9797
| zero => simp
98-
| succ n ih =>
99-
rw [finRotate_succ_eq_decomposeFin]
100-
simp [ih, pow_succ]
98+
| succ n =>
99+
induction n with
100+
| zero => simp
101+
| succ n ih =>
102+
rw [finRotate_succ_eq_decomposeFin]
103+
simp [ih, pow_succ]
101104

102105
@[simp]
103106
theorem support_finRotate {n : ℕ} : support (finRotate (n + 2)) = Finset.univ := by

Mathlib/GroupTheory/SpecificGroups/Alternating.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ theorem IsThreeCycle.mem_alternatingGroup {f : Perm α} (h : IsThreeCycle f) :
105105

106106
theorem finRotate_bit1_mem_alternatingGroup {n : ℕ} :
107107
finRotate (2 * n + 1) ∈ alternatingGroup (Fin (2 * n + 1)) := by
108-
rw [mem_alternatingGroup, sign_finRotate, pow_mul, pow_two, Int.units_mul_self, one_pow]
108+
simp [mem_alternatingGroup]
109109

110110
end Equiv.Perm
111111

0 commit comments

Comments
 (0)