Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit ffacd12

Browse files
committed
feat(algebra/iterate_hom): add equiv.perm.coe_pow (#6698)
Also rewrite `equiv.perm.perm_group` in a more explicit manner.
1 parent 900963c commit ffacd12

File tree

2 files changed

+22
-12
lines changed

2 files changed

+22
-12
lines changed

src/algebra/iterate_hom.lean

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Author: Yury Kudryashov
66

77
import algebra.group_power
88
import logic.function.iterate
9+
import group_theory.perm.basic
910

1011
/-!
1112
# Iterates of monoid and ring homomorphisms
@@ -28,6 +29,12 @@ open function
2829

2930
variables {M : Type*} {N : Type*} {G : Type*} {H : Type*}
3031

32+
/-- An auxiliary lemma that can be used to prove `⇑(f ^ n) = (⇑f^[n])`. -/
33+
lemma hom_coe_pow {F : Type*} [monoid F] (c : F → M → M) (h1 : c 1 = id)
34+
(hmul : ∀ f g, c (f * g) = c f ∘ c g) (f : F) : ∀ n, c (f ^ n) = (c f^[n])
35+
| 0 := h1
36+
| (n + 1) := by rw [pow_succ, iterate_succ', hmul, hom_coe_pow]
37+
3138
namespace monoid_hom
3239

3340
variables [monoid M] [monoid N] [group G] [group H]
@@ -52,6 +59,9 @@ commute.iterate_left (λ x, f.map_pow x m) n a
5259
theorem iterate_map_gpow (f : G →* G) (a) (n : ℕ) (m : ℤ) : f^[n] (a^m) = (f^[n] a)^m :=
5360
commute.iterate_left (λ x, f.map_gpow x m) n a
5461

62+
lemma coe_pow {M} [comm_monoid M] (f : monoid.End M) (n : ℕ) : ⇑(f^n) = (f^[n]) :=
63+
hom_coe_pow _ rfl (λ f g, rfl) _ _
64+
5565
end monoid_hom
5666

5767
namespace add_monoid_hom
@@ -79,9 +89,8 @@ section semiring
7989

8090
variables {R : Type*} [semiring R] (f : R →+* R) (n : ℕ) (x y : R)
8191

82-
lemma coe_pow : ∀ n : ℕ, ⇑(f^n) = (f^[n])
83-
| 0 := rfl
84-
| (n+1) := by { simp only [function.iterate_succ, pow_succ', coe_mul, coe_pow n] }
92+
lemma coe_pow (n : ℕ) : ⇑(f^n) = (f^[n]) :=
93+
hom_coe_pow _ rfl (λ f g, rfl) f n
8594

8695
theorem iterate_map_one : f^[n] 1 = 1 := f.to_monoid_hom.iterate_map_one n
8796

@@ -116,6 +125,9 @@ f.to_add_monoid_hom.iterate_map_gsmul n m x
116125

117126
end ring_hom
118127

128+
lemma equiv.perm.coe_pow {α : Type*} (f : equiv.perm α) (n : ℕ) : ⇑(f ^ n) = (f^[n]) :=
129+
hom_coe_pow _ rfl (λ _ _, rfl) _ _
130+
119131
@[simp] lemma mul_left_iterate [monoid M] (a : M) (n : ℕ) : ((*) a)^[n] = (*) (a^n) :=
120132
nat.rec_on n (funext $ λ x, by simp) $ λ n ihn,
121133
funext $ λ x, by simp [iterate_succ, ihn, pow_succ', mul_assoc]

src/group_theory/perm/basic.lean

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,13 @@ variables {α : Type u}
2323
namespace perm
2424

2525
instance perm_group : group (perm α) :=
26-
begin
27-
refine { mul := λ f g, equiv.trans g f,
28-
one := equiv.refl α,
29-
inv := equiv.symm,
30-
div_eq_mul_inv := λ _ _, rfl,
31-
..};
32-
intros; apply equiv.ext; try { apply trans_apply },
33-
apply symm_apply_apply
34-
end
26+
{ mul := λ f g, equiv.trans g f,
27+
one := equiv.refl α,
28+
inv := equiv.symm,
29+
mul_assoc := λ f g h, (trans_assoc _ _ _).symm,
30+
one_mul := trans_refl,
31+
mul_one := refl_trans,
32+
mul_left_inv := trans_symm }
3533

3634
theorem mul_apply (f g : perm α) (x) : (f * g) x = f (g x) :=
3735
equiv.trans_apply _ _ _

0 commit comments

Comments
 (0)