Skip to content

Commit 48d1fe2

Browse files
committed
refactor: make ⇑e⁻¹ = ⇑e.symm simp (#27433)
The motivation here is that the spelling `⇑e⁻¹` is only available when `e` is an automorphism, while the `⇑e.symm` one is available for all isomorphisms. However we do not want to simplify `e⁻¹ = e.symm` (without the coercions to function) since `e⁻¹` is an algebraic expression and `e.symm` is not. We consider that applying the coercion to functions gets us out of algebra land, and therefore it is okay to "dealgebraise" the expression further. From BrauerGroup and ClassFieldTheory
1 parent 84671ef commit 48d1fe2

File tree

13 files changed

+89
-65
lines changed

13 files changed

+89
-65
lines changed

Mathlib/Algebra/Algebra/Equiv.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,8 @@ theorem mul_apply (e₁ e₂ : A₁ ≃ₐ[R] A₁) (x : A₁) : (e₁ * e₂) x
641641

642642
lemma aut_inv (ϕ : A₁ ≃ₐ[R] A₁) : ϕ⁻¹ = ϕ.symm := rfl
643643

644+
@[simp] lemma coe_inv (ϕ : A₁ ≃ₐ[R] A₁) : ⇑ϕ⁻¹ = ⇑ϕ.symm := rfl
645+
644646
@[simp] theorem coe_pow (e : A₁ ≃ₐ[R] A₁) (n : ℕ) : ⇑(e ^ n) = e^[n] :=
645647
n.rec (by ext; simp) fun _ ih ↦ by ext; simp [pow_succ, ih]
646648

Mathlib/Algebra/Group/End.lean

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@ theorem mul_apply (f g : Perm α) (x) : (f * g) x = f (g x) :=
9898
theorem one_apply (x) : (1 : Perm α) x = x :=
9999
rfl
100100

101-
@[simp]
101+
@[deprecated symm_apply_apply (since := "2025-08-16")]
102102
theorem inv_apply_self (f : Perm α) (x) : f⁻¹ (f x) = x :=
103103
f.symm_apply_apply x
104104

105-
@[simp]
105+
@[deprecated apply_symm_apply (since := "2025-08-16")]
106106
theorem apply_inv_self (f : Perm α) (x) : f (f⁻¹ x) = x :=
107107
f.apply_symm_apply x
108108

@@ -115,6 +115,8 @@ theorem mul_def (f g : Perm α) : f * g = g.trans f :=
115115
theorem inv_def (f : Perm α) : f⁻¹ = f.symm :=
116116
rfl
117117

118+
@[simp] lemma coe_inv (f : Perm α) : ⇑f⁻¹ = ⇑f.symm := rfl
119+
118120
@[simp, norm_cast] lemma coe_one : ⇑(1 : Perm α) = id := rfl
119121

120122
@[simp, norm_cast] lemma coe_mul (f g : Perm α) : ⇑(f * g) = f ∘ g := rfl
@@ -519,7 +521,7 @@ theorem swap_mul_self (i j : α) : swap i j * swap i j = 1 :=
519521

520522
theorem swap_mul_eq_mul_swap (f : Perm α) (x y : α) : swap x y * f = f * swap (f⁻¹ x) (f⁻¹ y) :=
521523
Equiv.ext fun z => by
522-
simp only [Perm.mul_apply, swap_apply_def]; split_ifs <;> simp_all [Perm.eq_inv_iff_eq]
524+
simp only [Perm.mul_apply, swap_apply_def]; split_ifs <;> simp_all [eq_symm_apply]
523525

524526
theorem mul_swap_eq_swap_mul (f : Perm α) (x y : α) : f * swap x y = swap (f x) (f y) * f := by
525527
simp [swap_mul_eq_mul_swap]

Mathlib/Algebra/Module/Equiv/Basic.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ lemma mul_eq_trans (f g : M ≃ₗ[R] M) : f * g = g.trans f := rfl
9292
@[simp]
9393
lemma coe_one : ↑(1 : M ≃ₗ[R] M) = id := rfl
9494

95+
@[simp] lemma coe_inv (f : M ≃ₗ[R] M) : ⇑f⁻¹ = ⇑f.symm := rfl
96+
9597
@[simp]
9698
lemma coe_toLinearMap_one : (↑(1 : M ≃ₗ[R] M) : M →ₗ[R] M) = LinearMap.id := rfl
9799

Mathlib/Algebra/Order/Rearrangement.lean

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ theorem MonovaryOn.sum_smul_comp_perm_le_sum_smul (hfg : MonovaryOn f g s)
8787
grw [← hind]
8888
obtain hσa | hσa := eq_or_ne a (σ a)
8989
· rw [hτ, ← hσa, swap_self, trans_refl]
90-
have h1s : σ⁻¹ a ∈ s := by
90+
have h1s : σ.symm a ∈ s := by
9191
rw [Ne, ← inv_eq_iff_eq] at hσa
9292
refine mem_of_mem_insert_of_ne (hσ fun h ↦ hσa ?_) hσa
93-
rwa [apply_inv_self, eq_comm] at h
93+
rwa [apply_symm_apply, eq_comm] at h
9494
simp only [← s.sum_erase_add _ h1s, add_comm]
9595
rw [← add_assoc, ← add_assoc]
96-
simp only [hτ, swap_apply_left, Function.comp_apply, Equiv.coe_trans, apply_inv_self]
96+
simp only [hτ, swap_apply_left, Function.comp_apply, Equiv.coe_trans, apply_symm_apply]
9797
refine add_le_add (smul_add_smul_le_smul_add_smul' ?_ ?_) (sum_congr rfl fun x hx ↦ ?_).le
98-
· specialize hamax (σ⁻¹ a) h1s
98+
· specialize hamax (σ.symm a) h1s
9999
rw [Prod.Lex.toLex_le_toLex] at hamax
100100
rcases hamax with hamax | hamax
101101
· exact hfg (mem_insert_of_mem h1s) (mem_insert_self _ _) hamax
@@ -105,7 +105,7 @@ theorem MonovaryOn.sum_smul_comp_perm_le_sum_smul (hfg : MonovaryOn f g s)
105105
rcases hamax with hamax | hamax
106106
· exact hamax.le
107107
· exact hamax.1.le
108-
· rw [mem_erase, Ne, eq_inv_iff_eq] at hx
108+
· rw [mem_erase, Ne, eq_symm_apply] at hx
109109
rw [swap_apply_of_ne_of_ne hx.1 (σ.injective.ne _)]
110110
rintro rfl
111111
exact has hx.2
@@ -121,7 +121,7 @@ theorem AntivaryOn.sum_smul_le_sum_smul_comp_perm (hfg : AntivaryOn f g s)
121121
theorem MonovaryOn.sum_comp_perm_smul_le_sum_smul (hfg : MonovaryOn f g s)
122122
(hσ : {x | σ x ≠ x} ⊆ s) : ∑ i ∈ s, f (σ i) • g i ≤ ∑ i ∈ s, f i • g i := by
123123
convert hfg.sum_smul_comp_perm_le_sum_smul
124-
(show { x | σ⁻¹ x ≠ x } ⊆ s by simp only [set_support_inv_eq, hσ]) using 1
124+
(show { x | σ⁻¹ x ≠ x } ⊆ s by simp [set_support_symm_eq, hσ]) using 1
125125
exact σ.sum_comp' s (fun i j ↦ f i • g j) hσ
126126

127127
/-- **Rearrangement Inequality**: Pointwise scalar multiplication of `f` and `g` is minimized when
@@ -171,7 +171,7 @@ theorem MonovaryOn.sum_smul_comp_perm_eq_sum_smul_iff (hfg : MonovaryOn f g s)
171171
∑ i ∈ s, f i • g (σ i) = ∑ i ∈ s, f i • g i ↔ MonovaryOn f (g ∘ σ) s := by
172172
classical
173173
refine ⟨not_imp_not.1 fun h ↦ ?_, fun h ↦ (hfg.sum_smul_comp_perm_le_sum_smul hσ).antisymm <| by
174-
simpa using h.sum_smul_comp_perm_le_sum_smul ((set_support_inv_eq _).subset.trans hσ)⟩
174+
simpa using h.sum_smul_comp_perm_le_sum_smul ((set_support_symm_eq _).subset.trans hσ)⟩
175175
rw [MonovaryOn] at h
176176
push_neg at h
177177
obtain ⟨x, hx, y, hy, hgxy, hfxy⟩ := h
@@ -204,7 +204,7 @@ monovary together on `s`. Stated by permuting the entries of `f`. -/
204204
theorem MonovaryOn.sum_comp_perm_smul_eq_sum_smul_iff (hfg : MonovaryOn f g s)
205205
(hσ : {x | σ x ≠ x} ⊆ s) :
206206
∑ i ∈ s, f (σ i) • g i = ∑ i ∈ s, f i • g i ↔ MonovaryOn (f ∘ σ) g s := by
207-
have hσinv : { x | σ⁻¹ x ≠ x } ⊆ s := (set_support_inv_eq _).subset.trans hσ
207+
have hσinv : { x | σ⁻¹ x ≠ x } ⊆ s := (set_support_symm_eq _).subset.trans hσ
208208
refine (Iff.trans ?_ <| hfg.sum_smul_comp_perm_eq_sum_smul_iff hσinv).trans
209209
fun h ↦ ?_, fun h ↦ ?_⟩
210210
· apply eq_iff_eq_cancel_right.2

Mathlib/Data/Fintype/Perm.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ theorem nodup_permsOfList : ∀ {l : List α}, l.Nodup → (permsOfList l).Nodup
113113
· intro f hf₁ hf₂
114114
let ⟨x, hx, hx'⟩ := List.mem_flatMap.1 hf₂
115115
let ⟨g, hg⟩ := List.mem_map.1 hx'
116-
obtain rfl : g⁻¹ x = a := f.injective <| by rw [hmeml hf₁, ← hg.2]; simp
117-
have hxa : x ≠ g⁻¹ x := fun h => (List.nodup_cons.1 hl).1 (h ▸ hx)
116+
obtain rfl : g.symm x = a := f.injective <| by rw [hmeml hf₁, ← hg.2]; simp
117+
have hxa : x ≠ g.symm x := fun h => (List.nodup_cons.1 hl).1 (h ▸ hx)
118118
exact (List.nodup_cons.1 hl).1 <| mem_of_mem_permsOfList hg.1 (by simpa using hxa)
119119

120120
/-- Given a finset, produce the finset of all permutations of its elements. -/

Mathlib/FieldTheory/KrullTopology.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def galGroupBasis (K L : Type*) [Field K] [Field L] [Algebra K L] :
116116
rw [IntermediateField.mem_fixingSubgroup_iff]
117117
intro x hx
118118
change σ (g (σ⁻¹ x)) = x
119-
have h_in_F : σ⁻¹ x ∈ F := ⟨x, hx, by dsimp; rw [← AlgEquiv.invFun_eq_symm]; rfl
119+
have h_in_F : σ⁻¹ x ∈ F := ⟨x, hx, by dsimp⟩
120120
have h_g_fix : g (σ⁻¹ x) = σ⁻¹ x := by
121121
rw [Subgroup.mem_carrier, IntermediateField.mem_fixingSubgroup_iff F g] at hg
122122
exact hg (σ⁻¹ x) h_in_F

Mathlib/GroupTheory/Perm/Basic.lean

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ variable {α : Type u} {β : Type v}
3131

3232
namespace Perm
3333

34-
@[simp] lemma image_inv (f : Perm α) (s : Set α) : ↑f⁻¹ '' s = f ⁻¹' s := f.image_symm_eq_preimage _
34+
@[deprecated Equiv.image_symm_eq_preimage (since := "2025-08-16")]
35+
lemma image_inv (f : Perm α) (s : Set α) : ↑f⁻¹ '' s = f ⁻¹' s := f.image_symm_eq_preimage _
3536

36-
@[simp] lemma preimage_inv (f : Perm α) (s : Set α) : ↑f⁻¹ ⁻¹' s = f '' s :=
37+
@[deprecated Equiv.image_eq_preimage_symm (since := "2025-08-16")]
38+
lemma preimage_inv (f : Perm α) (s : Set α) : ↑f⁻¹ ⁻¹' s = f '' s :=
3739
(f.image_eq_preimage_symm _).symm
3840

3941
end Perm

Mathlib/GroupTheory/Perm/Cycle/Basic.lean

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ alias ⟨SameCycle.of_inv, SameCycle.inv⟩ := sameCycle_inv
9090

9191
@[simp]
9292
theorem sameCycle_conj : SameCycle (g * f * g⁻¹) x y ↔ SameCycle f (g⁻¹ x) (g⁻¹ y) :=
93-
exists_congr fun i => by simp [conj_zpow, eq_inv_iff_eq]
93+
exists_congr fun i => by simp [conj_zpow, eq_symm_apply]
9494

9595
theorem SameCycle.conj : SameCycle f x y → SameCycle (g * f * g⁻¹) (g x) (g y) := by
9696
simp [sameCycle_conj]
@@ -116,12 +116,16 @@ theorem sameCycle_apply_right : SameCycle f x (f y) ↔ SameCycle f x y := by
116116
rw [sameCycle_comm, sameCycle_apply_left, sameCycle_comm]
117117

118118
@[simp]
119-
theorem sameCycle_inv_apply_left : SameCycle f (f⁻¹ x) y ↔ SameCycle f x y := by
120-
rw [← sameCycle_apply_left, apply_inv_self]
119+
theorem sameCycle_symm_apply_left : SameCycle f (f.symm x) y ↔ SameCycle f x y := by
120+
rw [← sameCycle_apply_left, apply_symm_apply]
121+
122+
@[deprecated (since := "2025-11-17")] alias sameCycle_inv_apply_left := sameCycle_symm_apply_left
121123

122124
@[simp]
123-
theorem sameCycle_inv_apply_right : SameCycle f x (f⁻¹ y) ↔ SameCycle f x y := by
124-
rw [← sameCycle_apply_right, apply_inv_self]
125+
theorem sameCycle_symm_apply_right : SameCycle f x (f.symm y) ↔ SameCycle f x y := by
126+
rw [← sameCycle_apply_right, apply_symm_apply]
127+
128+
@[deprecated (since := "2025-11-17")] alias sameCycle_inv_apply_right := sameCycle_symm_apply_right
125129

126130
@[simp]
127131
theorem sameCycle_zpow_left {n : ℤ} : SameCycle f ((f ^ n) x) y ↔ SameCycle f x y :=
@@ -143,9 +147,9 @@ alias ⟨SameCycle.of_apply_left, SameCycle.apply_left⟩ := sameCycle_apply_lef
143147

144148
alias ⟨SameCycle.of_apply_right, SameCycle.apply_right⟩ := sameCycle_apply_right
145149

146-
alias ⟨SameCycle.of_inv_apply_left, SameCycle.inv_apply_left⟩ := sameCycle_inv_apply_left
150+
alias ⟨SameCycle.of_symm_apply_left, SameCycle.symm_apply_left⟩ := sameCycle_symm_apply_left
147151

148-
alias ⟨SameCycle.of_inv_apply_right, SameCycle.inv_apply_right⟩ := sameCycle_inv_apply_right
152+
alias ⟨SameCycle.of_symm_apply_right, SameCycle.symm_apply_right⟩ := sameCycle_symm_apply_right
149153

150154
alias ⟨SameCycle.of_pow_left, SameCycle.pow_left⟩ := sameCycle_pow_left
151155

@@ -369,7 +373,8 @@ theorem isCycle_swap_mul_aux₁ {α : Type*} [DecidableEq α] :
369373
· exact ⟨0, hfbx⟩
370374
have : f b ≠ b ∧ b ≠ x := ne_and_ne_of_swap_mul_apply_ne_self hb
371375
have hb' : (swap x (f x) * f) (f.symm b) ≠ f.symm b := by
372-
simpa [swap_apply_of_ne_of_ne this.2 hfbx.symm, eq_symm_apply] using this.1
376+
simpa [swap_apply_of_ne_of_ne this.2 hfbx.symm, eq_symm_apply, f.injective.eq_iff]
377+
using this.1
373378
obtain ⟨i, hi⟩ := hn hb' <| f.injective <| by simpa [pow_succ'] using h
374379
refine ⟨i + 1, ?_⟩
375380
rw [add_comm, zpow_add, mul_apply, hi, zpow_one, mul_apply, apply_symm_apply,
@@ -391,12 +396,11 @@ theorem isCycle_swap_mul_aux₂ {α : Type*} [DecidableEq α] :
391396
refine ⟨-i, (swap x (f⁻¹ x) * f⁻¹).injective ?_⟩
392397
convert hi using 1
393398
· rw [zpow_neg, ← inv_zpow, ← mul_apply, mul_inv_rev, swap_inv, mul_swap_eq_swap_mul]
394-
simp [swap_comm _ x, ← mul_apply, -coe_mul, ← inv_def, ← inv_def, mul_assoc _ f⁻¹,
399+
simp [swap_comm _ x, ← mul_apply, -coe_mul, ← inv_def, -coe_inv, ← inv_def, mul_assoc _ f⁻¹,
395400
← mul_zpow_mul, mul_assoc _ _ f]
396401
simp
397-
· refine swap_apply_of_ne_of_ne ?_ ?_
398-
· simpa [eq_comm, Perm.eq_inv_iff_eq, Perm.inv_eq_iff_eq] using hfxb
399-
· simpa [eq_comm, eq_symm_apply, symm_apply_eq]
402+
· exact swap_apply_of_ne_of_ne (by simpa [eq_comm, eq_symm_apply, symm_apply_eq] using hfxb)
403+
(by simpa [eq_comm, eq_symm_apply, symm_apply_eq])
400404

401405
theorem IsCycle.eq_swap_of_apply_apply_eq_self {α : Type*} [DecidableEq α] {f : Perm α}
402406
(hf : IsCycle f) {x : α} (hfx : f x ≠ x) (hffx : f (f x) = x) : f = swap x (f x) :=
@@ -765,12 +769,12 @@ theorem IsCycleOn.zpow_apply_eq {s : Finset α} (hf : f.IsCycleOn s) (ha : a ∈
765769
theorem IsCycleOn.pow_apply_eq_pow_apply {s : Finset α} (hf : f.IsCycleOn s) (ha : a ∈ s)
766770
{m n : ℕ} : (f ^ m) a = (f ^ n) a ↔ m ≡ n [MOD #s] := by
767771
rw [Nat.modEq_iff_dvd, ← hf.zpow_apply_eq ha]
768-
simp [sub_eq_neg_add, zpow_add, eq_inv_iff_eq, eq_comm]
772+
simp [sub_eq_neg_add, zpow_add, eq_symm_apply, eq_comm]
769773

770774
theorem IsCycleOn.zpow_apply_eq_zpow_apply {s : Finset α} (hf : f.IsCycleOn s) (ha : a ∈ s)
771775
{m n : ℤ} : (f ^ m) a = (f ^ n) a ↔ m ≡ n [ZMOD #s] := by
772776
rw [Int.modEq_iff_dvd, ← hf.zpow_apply_eq ha]
773-
simp [sub_eq_neg_add, zpow_add, eq_inv_iff_eq, eq_comm]
777+
simp [sub_eq_neg_add, zpow_add, eq_symm_apply, eq_comm]
774778

775779
theorem IsCycleOn.pow_card_apply {s : Finset α} (hf : f.IsCycleOn s) (ha : a ∈ s) :
776780
(f ^ #s) a = a :=

Mathlib/GroupTheory/Perm/Cycle/Factors.lean

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ theorem cycleOf_inv (f : Perm α) [DecidableRel f.SameCycle] (x : α) :
5151
(cycleOf f x)⁻¹ = cycleOf f⁻¹ x :=
5252
Equiv.ext fun y => by
5353
rw [inv_eq_iff_eq, cycleOf_apply, cycleOf_apply]
54-
split_ifs <;> simp_all [sameCycle_inv, sameCycle_inv_apply_right]
54+
split_ifs <;> simp_all [sameCycle_inv, sameCycle_symm_apply_right]
5555

5656
@[simp]
5757
theorem cycleOf_pow_apply_self (f : Perm α) [DecidableRel f.SameCycle] (x : α) :
@@ -385,7 +385,7 @@ where
385385
(by
386386
rw [hfg hx]
387387
intro y hy
388-
simp [inv_eq_iff_eq, cycleOf_apply, eq_comm (a := g y)] at hy
388+
simp [symm_apply_eq, cycleOf_apply, eq_comm (a := g y)] at hy
389389
rw [hfg (Ne.symm hy.right), ← mul_inv_eq_one (a := g.cycleOf y), cycleOf_inv]
390390
simp_rw [mul_inv_rev]
391391
rw [inv_inv, cycleOf_mul_of_apply_right_eq_self, ← cycleOf_inv, mul_inv_eq_one]
@@ -410,7 +410,7 @@ where
410410
refine hg'y <| (disjoint_prod_right _ this y).resolve_right ?_
411411
have hsc : SameCycle g⁻¹ x (g y) := by rwa [sameCycle_inv, sameCycle_apply_right]
412412
rw [disjoint_prod_perm hm₃ hg'm.symm, List.prod_cons, ← eq_inv_mul_iff_mul_eq] at hm₁
413-
simpa [hm₁, cycleOf_inv, hsc.cycleOf_apply, Perm.eq_inv_iff_eq, eq_comm] using hg'y⟩
413+
simpa [hm₁, cycleOf_inv, hsc.cycleOf_apply, eq_symm_apply, eq_comm] using hg'y⟩
414414

415415
theorem mem_list_cycles_iff {α : Type*} [Finite α] {l : List (Perm α)}
416416
(h1 : ∀ σ : Perm α, σ ∈ l → σ.IsCycle) (h2 : l.Pairwise Disjoint) {σ : Perm α} :
@@ -681,7 +681,8 @@ theorem disjoint_mul_inv_of_mem_cycleFactorsFinset {f g : Perm α} (h : f ∈ cy
681681
intro x
682682
by_cases hx : f x = x
683683
· exact Or.inr hx
684-
rw [mul_apply, ← h.right _ (by simpa [Perm.eq_inv_iff_eq])]
684+
left
685+
rw [mul_apply, ← h.right _ (by simpa [eq_symm_apply])]
685686
simp
686687

687688
/-- If c is a cycle, a ∈ c.support and c is a cycle of f, then `c = f.cycleOf a` -/
@@ -738,7 +739,7 @@ theorem mem_cycleFactorsFinset_conj (g k c : Perm α) :
738739
intro hc a ha
739740
simp only [coe_mul, Function.comp_apply, EmbeddingLike.apply_eq_iff_eq]
740741
apply hc
741-
simpa [inv_def, eq_symm_apply] using ha
742+
simp_all
742743

743744
/-- If a permutation commutes with every cycle of `g`, then it commutes with `g`
744745

Mathlib/GroupTheory/Perm/Finite.lean

Lines changed: 33 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -49,39 +49,50 @@ theorem isConj_of_support_equiv
4949

5050
end Conjugation
5151

52-
theorem perm_inv_on_of_perm_on_finset {s : Finset α} {f : Perm α} (h : ∀ x ∈ s, f x ∈ s) {y : α}
53-
(hy : y ∈ s) : f⁻¹ y ∈ s := by
52+
theorem perm_symm_on_of_perm_on_finset {s : Finset α} {f : Perm α} (h : ∀ x ∈ s, f x ∈ s) {y : α}
53+
(hy : y ∈ s) : f.symm y ∈ s := by
5454
have h0 : ∀ y ∈ s, ∃ (x : _) (hx : x ∈ s), y = (fun i (_ : i ∈ s) => f i) x hx :=
5555
Finset.surj_on_of_inj_on_of_card_le (fun x hx => (fun i _ => f i) x hx) (fun a ha => h a ha)
5656
(fun a₁ a₂ ha₁ ha₂ heq => (Equiv.apply_eq_iff_eq f).mp heq) rfl.ge
5757
obtain ⟨y2, hy2, rfl⟩ := h0 y hy
5858
simpa using hy2
5959

60-
theorem perm_inv_mapsTo_of_mapsTo (f : Perm α) {s : Set α} [Finite s] (h : Set.MapsTo f s s) :
61-
Set.MapsTo (f⁻¹ :) s s := by
60+
@[deprecated (since := "2025-11-17")]
61+
alias perm_inv_on_of_perm_on_finset := perm_symm_on_of_perm_on_finset
62+
63+
theorem perm_symm_mapsTo_of_mapsTo (f : Perm α) {s : Set α} [Finite s] (h : Set.MapsTo f s s) :
64+
Set.MapsTo f.symm s s := by
6265
cases nonempty_fintype s
6366
exact fun x hx =>
6467
Set.mem_toFinset.mp <|
65-
perm_inv_on_of_perm_on_finset
68+
perm_symm_on_of_perm_on_finset
6669
(fun a ha => Set.mem_toFinset.mpr (h (Set.mem_toFinset.mp ha)))
6770
(Set.mem_toFinset.mpr hx)
6871

72+
@[deprecated (since := "2025-11-17")] alias perm_inv_mapsTo_of_mapsTo := perm_symm_mapsTo_of_mapsTo
73+
6974
@[simp]
70-
theorem perm_inv_mapsTo_iff_mapsTo {f : Perm α} {s : Set α} [Finite s] :
71-
Set.MapsTo (f⁻¹ :) s s ↔ Set.MapsTo f s s :=
72-
perm_inv_mapsTo_of_mapsTo f⁻¹, perm_inv_mapsTo_of_mapsTo f⟩
75+
theorem perm_symm_mapsTo_iff_mapsTo {f : Perm α} {s : Set α} [Finite s] :
76+
Set.MapsTo f.symm s s ↔ Set.MapsTo f s s :=
77+
perm_symm_mapsTo_of_mapsTo f⁻¹, perm_symm_mapsTo_of_mapsTo f⟩
7378

74-
theorem perm_inv_on_of_perm_on_finite {f : Perm α} {p : α → Prop} [Finite { x // p x }]
75-
(h : ∀ x, p x → p (f x)) {x : α} (hx : p x) : p (f⁻¹ x) := by
79+
@[deprecated (since := "2025-11-17")]
80+
alias perm_inv_mapsTo_iff_mapsTo := perm_symm_mapsTo_iff_mapsTo
81+
82+
theorem perm_symm_on_of_perm_on_finite {f : Perm α} {p : α → Prop} [Finite { x // p x }]
83+
(h : ∀ x, p x → p (f x)) {x : α} (hx : p x) : p (f.symm x) := by
7684
have : Finite { x | p x } := by simpa
77-
simpa using perm_inv_mapsTo_of_mapsTo (s := {x | p x}) f h hx
85+
simpa using perm_symm_mapsTo_of_mapsTo (s := {x | p x}) f h hx
86+
87+
@[deprecated (since := "2025-11-17")]
88+
alias perm_inv_on_of_perm_on_finite := perm_symm_on_of_perm_on_finite
7889

7990
/-- If the permutation `f` maps `{x // p x}` into itself, then this returns the permutation
8091
on `{x // p x}` induced by `f`. Note that the `h` hypothesis is weaker than for
8192
`Equiv.Perm.subtypePerm`. -/
8293
abbrev subtypePermOfFintype (f : Perm α) {p : α → Prop} [Finite { x // p x }]
8394
(h : ∀ x, p x → p (f x)) : Perm { x // p x } :=
84-
f.subtypePerm fun x => ⟨fun h₂ => f.inv_apply_self x ▸ perm_inv_on_of_perm_on_finite h h₂, h x⟩
95+
f.subtypePerm fun x => ⟨fun h₂ => f.symm_apply_apply x ▸ perm_symm_on_of_perm_on_finite h h₂, h x⟩
8596

8697
@[simp]
8798
theorem subtypePermOfFintype_apply (f : Perm α) {p : α → Prop} [Finite { x // p x }]
@@ -98,19 +109,17 @@ theorem perm_mapsTo_inl_iff_mapsTo_inr {m n : Type*} [Finite m] [Finite n] (σ :
98109
constructor <;>
99110
( intro h
100111
classical
101-
rw [← perm_inv_mapsTo_iff_mapsTo] at h
112+
rw [← perm_symm_mapsTo_iff_mapsTo] at h
102113
intro x
103114
rcases hx : σ x with l | r)
104115
· rintro ⟨a, rfl⟩
105116
obtain ⟨y, hy⟩ := h ⟨l, rfl⟩
106-
rw [← hx, σ.inv_apply_self] at hy
107-
exact absurd hy Sum.inl_ne_inr
117+
grind
108118
· rintro _; exact ⟨r, rfl⟩
109119
· rintro _; exact ⟨l, rfl⟩
110120
· rintro ⟨a, rfl⟩
111121
obtain ⟨y, hy⟩ := h ⟨r, rfl⟩
112-
rw [← hx, σ.inv_apply_self] at hy
113-
exact absurd hy Sum.inr_ne_inl
122+
grind
114123

115124
theorem mem_sumCongrHom_range_of_perm_mapsTo_inl {m n : Type*} [Finite m] [Finite n]
116125
{σ : Perm (m ⊕ n)} (h : Set.MapsTo σ (Set.range Sum.inl) (Set.range Sum.inl)) :
@@ -182,11 +191,11 @@ theorem Disjoint.isConj_mul [Finite α] {σ τ π ρ : Perm α} (hc1 : IsConj σ
182191
· rw [mem_coe, mem_support] at hxσ
183192
rw [Set.union_apply_left, Set.union_apply_left]
184193
· simp only [subtypeEquiv_apply, Perm.coe_mul, Sum.map_inl, comp_apply,
185-
Set.union_symm_apply_left, Subtype.coe_mk, apply_eq_iff_eq]
194+
Set.union_symm_apply_left, Subtype.coe_mk, apply_eq_iff_eq, coe_inv]
186195
have h := (hd2 (f x)).resolve_left ?_
187-
· rw [mul_apply, mul_apply] at h
188-
rw [h, inv_apply_self, (hd1 x).resolve_left hxσ]
189-
· rwa [mul_apply, mul_apply, inv_apply_self, apply_eq_iff_eq]
196+
· rw [mul_apply, mul_apply, coe_inv] at h
197+
rw [h, symm_apply_apply, (hd1 x).resolve_left hxσ]
198+
· rwa [mul_apply, mul_apply, coe_inv, symm_apply_apply, apply_eq_iff_eq]
190199
· rwa [Subtype.coe_mk, mem_coe, mem_support]
191200
· rwa [Subtype.coe_mk, Perm.mul_apply, (hd1 x).resolve_left hxσ, mem_coe,
192201
apply_mem_support, mem_support]
@@ -195,9 +204,9 @@ theorem Disjoint.isConj_mul [Finite α] {σ τ π ρ : Perm α} (hc1 : IsConj σ
195204
· simp only [subtypeEquiv_apply, Perm.coe_mul, Sum.map_inr, comp_apply,
196205
Set.union_symm_apply_right, Subtype.coe_mk]
197206
have h := (hd2 (g (τ x))).resolve_right ?_
198-
· rw [mul_apply, mul_apply] at h
199-
rw [inv_apply_self, h, (hd1 (τ x)).resolve_right hxτ]
200-
· rwa [mul_apply, mul_apply, inv_apply_self, apply_eq_iff_eq]
207+
· rw [mul_apply, mul_apply, coe_inv] at h
208+
rw [coe_inv, coe_inv, symm_apply_apply, h, (hd1 (τ x)).resolve_right hxτ]
209+
· rwa [mul_apply, mul_apply, coe_inv, symm_apply_apply, apply_eq_iff_eq]
201210
· rwa [Subtype.coe_mk, mem_coe, ← apply_mem_support, mem_support]
202211
· rwa [Subtype.coe_mk, Perm.mul_apply, (hd1 (τ x)).resolve_right hxτ,
203212
mem_coe, mem_support]

0 commit comments

Comments
 (0)