Skip to content

Commit c44e862

Browse files
committed
chore: get rid of generic hom coercions
1 parent a7e757e commit c44e862

File tree

13 files changed

+168
-166
lines changed

13 files changed

+168
-166
lines changed

Mathlib/Algebra/Group/Equiv/Basic.lean

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,18 @@ end EmbeddingLike
3535

3636
variable [EquivLike F α β]
3737

38+
/-- Turn an element of a type `F` satisfying `MulEquivClass F α β` into an actual
39+
`MulEquiv`. This is declared as the default coercion from `F` to `α ≃* β`. -/
40+
@[to_additive (attr := simps!)
41+
"Turn an element of a type `F` satisfying `AddEquivClass F α β` into an actual
42+
`AddEquiv`. This is declared as the default coercion from `F` to `α ≃+ β`."]
43+
def MulEquiv.ofClass [Mul α] [Mul β] [MulEquivClass F α β] (f : F) : α ≃* β where
44+
__ : α ≃ β := .ofClass f
45+
__ : α →ₙ* β := .ofClass f
46+
3847
@[to_additive]
39-
theorem MulEquivClass.toMulEquiv_injective [Mul α] [Mul β] [MulEquivClass F α β] :
40-
Function.Injective ((↑) : F → α ≃* β) :=
48+
theorem MulEquiv.ofClass_injective [Mul α] [Mul β] [MulEquivClass F α β] :
49+
Function.Injective (.ofClass : F → α ≃* β) :=
4150
fun _ _ e ↦ DFunLike.ext _ _ fun a ↦ congr_arg (fun e : α ≃* β ↦ e.toFun a) e
4251

4352
@[to_additive] theorem MulEquivClass.isDedekindFiniteMonoid_iff [MulOne α] [MulOne β]

Mathlib/Algebra/Group/Equiv/Defs.lean

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ variable [EquivLike F α β]
143143
/-- Turn an element of a type `F` satisfying `AddEquivClass F α β` into an actual
144144
`AddEquiv`. This is declared as the default coercion from `F` to `α ≃+ β`. -/]
145145
def MulEquivClass.toMulEquiv [Mul α] [Mul β] [MulEquivClass F α β] (f : F) : α ≃* β :=
146-
{ (f : α ≃ β), (f : α →ₙ* β) with }
146+
{ (.ofClass f : α ≃ β), (.ofClass f : α →ₙ* β) with }
147147

148148
/-- Any type satisfying `MulEquivClass` can be cast into `MulEquiv` via
149149
`MulEquivClass.toMulEquiv`. -/
@@ -201,20 +201,20 @@ theorem mk_coe (e : M ≃* N) (e' h₁ h₂ h₃) : (⟨⟨e, e', h₁, h₂⟩,
201201
ext fun _ => rfl
202202

203203
@[to_additive (attr := simp)]
204-
theorem toEquiv_eq_coe (f : M ≃* N) : f.toEquiv = f :=
204+
theorem toEquiv_eq_ofClass (f : M ≃* N) : f.toEquiv = .ofClass f :=
205205
rfl
206206

207207
/-- The `simp`-normal form to turn something into a `MulHom` is via `MulHomClass.toMulHom`. -/
208208
@[to_additive (attr := simp)]
209-
theorem toMulHom_eq_coe (f : M ≃* N) : f.toMulHom = f :=
209+
theorem toMulHom_eq_ofClass (f : M ≃* N) : f.toMulHom = .ofClass f :=
210210
rfl
211211

212212
@[to_additive]
213213
theorem toFun_eq_coe (f : M ≃* N) : f.toFun = f := rfl
214214

215215
/-- `simp`-normal form of `toFun_eq_coe`. -/
216216
@[to_additive (attr := simp)]
217-
theorem coe_toEquiv (f : M ≃* N) : ⇑(f : M ≃ N) = f := rfl
217+
theorem coe_toEquiv (f : M ≃* N) : ⇑(.ofClass f : M ≃ N) = f := rfl
218218

219219
@[to_additive (attr := simp)]
220220
theorem coe_toMulHom {f : M ≃* N} : (f.toMulHom : M → N) = f := rfl
@@ -292,13 +292,13 @@ theorem invFun_eq_symm {f : M ≃* N} : f.invFun = f.symm := rfl
292292

293293
/-- `simp`-normal form of `invFun_eq_symm`. -/
294294
@[to_additive (attr := simp)]
295-
theorem coe_toEquiv_symm (f : M ≃* N) : ((f : M ≃ N).symm : N → M) = f.symm := rfl
295+
theorem symm_ofClass (f : M ≃* N) : ((.ofClass f : M ≃ N).symm : N → M) = f.symm := rfl
296296

297297
@[to_additive (attr := simp)]
298298
theorem equivLike_inv_eq_symm (f : M ≃* N) : EquivLike.inv f = f.symm := rfl
299299

300300
@[to_additive (attr := simp)]
301-
theorem toEquiv_symm (f : M ≃* N) : (f.symm : N ≃ M) = (f : M ≃ N).symm := rfl
301+
theorem ofClass_symm (f : M ≃* N) : (.ofClass f.symm : N ≃ M) = (.ofClass f : M ≃ N).symm := rfl
302302

303303
@[to_additive (attr := simp)]
304304
theorem symm_symm (f : M ≃* N) : f.symm.symm = f := rfl
@@ -458,29 +458,6 @@ protected def cast {ι : Type*} {M : ι → Type*} [∀ i, Mul (M i)] {i j : ι}
458458
section MulOneClass
459459
variable [MulOneClass M] [MulOneClass N] [MulOneClass P]
460460

461-
@[to_additive (attr := simp)]
462-
theorem coe_monoidHom_refl : (refl M : M →* M) = MonoidHom.id M := rfl
463-
464-
@[to_additive (attr := simp)]
465-
lemma coe_monoidHom_trans (e₁ : M ≃* N) (e₂ : N ≃* P) :
466-
(e₁.trans e₂ : M →* P) = (e₂ : N →* P).comp ↑e₁ := rfl
467-
468-
@[to_additive (attr := simp)]
469-
lemma coe_monoidHom_comp_coe_monoidHom_symm (e : M ≃* N) :
470-
(e : M →* N).comp e.symm = MonoidHom.id _ := by ext; simp
471-
472-
@[to_additive (attr := simp)]
473-
lemma coe_monoidHom_symm_comp_coe_monoidHom (e : M ≃* N) :
474-
(e.symm : N →* M).comp e = MonoidHom.id _ := by ext; simp
475-
476-
@[to_additive]
477-
lemma comp_left_injective (e : M ≃* N) : Injective fun f : N →* P ↦ f.comp (e : M →* N) :=
478-
LeftInverse.injective (g := fun f ↦ f.comp e.symm) fun f ↦ by simp [MonoidHom.comp_assoc]
479-
480-
@[to_additive]
481-
lemma comp_right_injective (e : M ≃* N) : Injective fun f : P →* M ↦ (e : M →* N).comp f :=
482-
LeftInverse.injective (g := (e.symm : N →* M).comp) fun f ↦ by simp [← MonoidHom.comp_assoc]
483-
484461
/-- A multiplicative isomorphism of monoids sends `1` to `1` (and is hence a monoid isomorphism). -/
485462
@[to_additive
486463
/-- An additive isomorphism of additive monoids sends `0` to `0`
@@ -514,17 +491,41 @@ as a multiplication-preserving function.
514491
def toMonoidHom (h : M ≃* N) : M →* N :=
515492
{ h with map_one' := h.map_one }
516493

494+
instance : Coe (M ≃* N) (M →* N) := ⟨toMonoidHom⟩
495+
517496
@[to_additive (attr := simp)]
518497
theorem coe_toMonoidHom (e : M ≃* N) : ⇑e.toMonoidHom = e := rfl
519498

520-
@[to_additive (attr := simp)]
521-
theorem toMonoidHom_eq_coe (f : M ≃* N) : f.toMonoidHom = (f : M →* N) :=
522-
rfl
499+
@[to_additive (attr := deprecated "No replacement" (since := "2025-04-14"))]
500+
theorem toMonoidHom_eq_ofClass (f : M ≃* N) : f.toMonoidHom = (.ofClass f : M →* N) := rfl
523501

524502
@[to_additive]
525503
theorem toMonoidHom_injective : Injective (toMonoidHom : M ≃* N → M →* N) :=
526504
Injective.of_comp (f := DFunLike.coe) DFunLike.coe_injective
527505

506+
@[to_additive (attr := simp)]
507+
theorem refl_toMonoidHom : (refl M).toMonoidHom = .id M := rfl
508+
509+
@[to_additive (attr := simp)]
510+
lemma trans_toMonoidHom (e₁ : M ≃* N) (e₂ : N ≃* P) :
511+
(e₁.trans e₂).toMonoidHom = e₂.toMonoidHom.comp e₁.toMonoidHom := rfl
512+
513+
@[to_additive (attr := simp)]
514+
lemma toMonoidHom_comp_toMonoidHom_symm (e : M ≃* N) : e.toMonoidHom.comp e.symm = .id _ := by
515+
ext; simp
516+
517+
@[to_additive (attr := simp)]
518+
lemma toMonoidHom_symm_comp_toMonoidHom (e : M ≃* N) : e.symm.toMonoidHom.comp e = .id _ := by
519+
ext; simp
520+
521+
@[to_additive]
522+
lemma comp_left_injective (e : M ≃* N) : Injective fun f : N →* P ↦ f.comp (e : M →* N) :=
523+
LeftInverse.injective (g := fun f ↦ f.comp e.symm) fun f ↦ by simp [MonoidHom.comp_assoc]
524+
525+
@[to_additive]
526+
lemma comp_right_injective (e : M ≃* N) : Injective fun f : P →* M ↦ (e : M →* N).comp f :=
527+
LeftInverse.injective (g := (e.symm : N →* M).comp) fun f ↦ by simp [← MonoidHom.comp_assoc]
528+
528529
end MulOneClass
529530

530531
/-!

Mathlib/Algebra/Group/Hom/Defs.lean

Lines changed: 18 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ public import Mathlib.Algebra.Group.Defs
1010
public import Mathlib.Algebra.Notation.Pi.Defs
1111
public import Mathlib.Data.FunLike.Basic
1212
public import Mathlib.Logic.Function.Iterate
13+
public import Mathlib.Tactic.Spread
1314

1415
/-!
1516
# Monoid and group homomorphisms
@@ -257,24 +258,20 @@ theorem map_ne_one_iff {R S F : Type*} [One R] [One S] [FunLike F R S] [OneHomCl
257258
theorem ne_one_of_map {R S F : Type*} [One R] [One S] [FunLike F R S] [OneHomClass F R S]
258259
{f : F} {x : R} (hx : f x ≠ 1) : x ≠ 1 := ne_of_apply_ne f <| (by rwa [(map_one f)])
259260

261+
initialize_simps_projections ZeroHom (toFun → apply)
262+
initialize_simps_projections OneHom (toFun → apply)
263+
260264
/-- Turn an element of a type `F` satisfying `OneHomClass F M N` into an actual
261265
`OneHom`. This is declared as the default coercion from `F` to `OneHom M N`. -/
262-
@[to_additive (attr := coe)
266+
@[to_additive (attr := simps)
263267
/-- Turn an element of a type `F` satisfying `ZeroHomClass F M N` into an actual
264268
`ZeroHom`. This is declared as the default coercion from `F` to `ZeroHom M N`. -/]
265-
def OneHomClass.toOneHom [OneHomClass F M N] (f : F) : OneHom M N where
269+
def OneHom.ofClass [OneHomClass F M N] (f : F) : OneHom M N where
266270
toFun := f
267271
map_one' := map_one f
268272

269-
/-- Any type satisfying `OneHomClass` can be cast into `OneHom` via `OneHomClass.toOneHom`. -/
270-
@[to_additive /-- Any type satisfying `ZeroHomClass` can be cast into `ZeroHom` via
271-
`ZeroHomClass.toZeroHom`. -/]
272-
instance [OneHomClass F M N] : CoeTC F (OneHom M N) :=
273-
⟨OneHomClass.toOneHom⟩
274-
275273
@[to_additive (attr := simp)]
276-
theorem OneHom.coe_coe [OneHomClass F M N] (f : F) :
277-
((f : OneHom M N) : M → N) = f := rfl
274+
lemma OneHom.coe_ofClass [OneHomClass F M N] (f : F) : ⇑(ofClass f) = f := rfl
278275

279276
end One
280277

@@ -330,23 +327,20 @@ theorem map_mul [MulHomClass F M N] (f : F) (x y : M) : f (x * y) = f x * f y :=
330327
lemma map_comp_mul [MulHomClass F M N] (f : F) (g h : ι → M) : f ∘ (g * h) = f ∘ g * f ∘ h := by
331328
ext; simp
332329

330+
initialize_simps_projections AddHom (toFun → apply)
331+
initialize_simps_projections MulHom (toFun → apply)
332+
333333
/-- Turn an element of a type `F` satisfying `MulHomClass F M N` into an actual
334334
`MulHom`. This is declared as the default coercion from `F` to `M →ₙ* N`. -/
335-
@[to_additive (attr := coe)
335+
@[to_additive (attr := simps)
336336
/-- Turn an element of a type `F` satisfying `AddHomClass F M N` into an actual
337337
`AddHom`. This is declared as the default coercion from `F` to `M →ₙ+ N`. -/]
338-
def MulHomClass.toMulHom [MulHomClass F M N] (f : F) : M →ₙ* N where
338+
def MulHom.ofClass [MulHomClass F M N] (f : F) : M →ₙ* N where
339339
toFun := f
340340
map_mul' := map_mul f
341341

342-
/-- Any type satisfying `MulHomClass` can be cast into `MulHom` via `MulHomClass.toMulHom`. -/
343-
@[to_additive /-- Any type satisfying `AddHomClass` can be cast into `AddHom` via
344-
`AddHomClass.toAddHom`. -/]
345-
instance [MulHomClass F M N] : CoeTC F (M →ₙ* N) :=
346-
⟨MulHomClass.toMulHom⟩
347-
348342
@[to_additive (attr := simp)]
349-
theorem MulHom.coe_coe [MulHomClass F M N] (f : F) : ((f : MulHom M N) : M → N) = f := rfl
343+
lemma MulHom.coe_ofClass [MulHomClass F M N] (f : F) : (ofClass f : M → N) = f := rfl
350344

351345
end Mul
352346

@@ -398,23 +392,13 @@ instance MonoidHom.instMonoidHomClass : MonoidHomClass (M →* N) M N where
398392

399393
variable [FunLike F M N]
400394

401-
/-- Turn an element of a type `F` satisfying `MonoidHomClass F M N` into an actual
402-
`MonoidHom`. This is declared as the default coercion from `F` to `M →* N`. -/
395+
/-- Turn an element of a type `F` satisfying `MonoidHomClass F M N` into an actual `MonoidHom`. -/
403396
@[to_additive (attr := coe)
404397
/-- Turn an element of a type `F` satisfying `AddMonoidHomClass F M N` into an
405-
actual `MonoidHom`. This is declared as the default coercion from `F` to `M →+ N`. -/]
406-
def MonoidHomClass.toMonoidHom [MonoidHomClass F M N] (f : F) : M →* N :=
407-
{ (f : M →ₙ* N), (f : OneHom M N) with }
408-
409-
/-- Any type satisfying `MonoidHomClass` can be cast into `MonoidHom` via
410-
`MonoidHomClass.toMonoidHom`. -/
411-
@[to_additive /-- Any type satisfying `AddMonoidHomClass` can be cast into `AddMonoidHom` via
412-
`AddMonoidHomClass.toAddMonoidHom`. -/]
413-
instance [MonoidHomClass F M N] : CoeTC F (M →* N) :=
414-
⟨MonoidHomClass.toMonoidHom⟩
415-
416-
@[to_additive (attr := simp)]
417-
theorem MonoidHom.coe_coe [MonoidHomClass F M N] (f : F) : ((f : M →* N) : M → N) = f := rfl
398+
actual `AddMonoidHom`. -/]
399+
def MonoidHom.ofClass [MonoidHomClass F M N] (f : F) : M →* N where
400+
__ : M →ₙ* N := .ofClass f
401+
__ : OneHom M N := .ofClass f
418402

419403
@[to_additive]
420404
theorem map_mul_eq_one [MonoidHomClass F M N] (f : F) {a b : M} (h : a * b = 1) :
@@ -532,11 +516,7 @@ instance MonoidHom.coeToMulHom [MulOne M] [MulOne N] : Coe (M →* N) (M →ₙ*
532516
⟨MonoidHom.toMulHom⟩
533517

534518
-- these must come after the coe_toFun definitions
535-
initialize_simps_projections ZeroHom (toFun → apply)
536-
initialize_simps_projections AddHom (toFun → apply)
537519
initialize_simps_projections AddMonoidHom (toFun → apply)
538-
initialize_simps_projections OneHom (toFun → apply)
539-
initialize_simps_projections MulHom (toFun → apply)
540520
initialize_simps_projections MonoidHom (toFun → apply)
541521

542522
@[to_additive (attr := simp)]

Mathlib/Algebra/Group/Subgroup/Map.lean

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,8 @@ theorem comap_equiv_eq_map_symm' (f : N ≃* G) (K : Subgroup G) :
191191
theorem map_symm_eq_iff_map_eq {H : Subgroup N} {e : G ≃* N} :
192192
H.map ↑e.symm = K ↔ K.map ↑e = H := by
193193
constructor <;> rintro rfl
194-
· rw [map_map, ← MulEquiv.coe_monoidHom_trans, MulEquiv.symm_trans_self,
195-
MulEquiv.coe_monoidHom_refl, map_id]
196-
· rw [map_map, ← MulEquiv.coe_monoidHom_trans, MulEquiv.self_trans_symm,
197-
MulEquiv.coe_monoidHom_refl, map_id]
194+
· rw [map_map, MulEquiv.toMonoidHom_comp_toMonoidHom_symm, map_id]
195+
· rw [map_map, MulEquiv.toMonoidHom_symm_comp_toMonoidHom, map_id]
198196

199197
@[to_additive]
200198
theorem map_le_iff_le_comap {f : G →* N} {K : Subgroup G} {H : Subgroup N} :

Mathlib/Algebra/Group/Units/Hom.lean

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ theorem val_zpow_eq_zpow_val : ∀ (u : αˣ) (n : ℤ), ((u ^ n : αˣ) : α) =
127127
@[to_additive (attr := simp)]
128128
theorem _root_.map_units_inv {F : Type*} [FunLike F M α] [MonoidHomClass F M α]
129129
(f : F) (u : Units M) :
130-
f ↑u⁻¹ = (f u)⁻¹ := ((f : M →* α).comp (Units.coeHom M)).map_inv u
130+
f ↑u⁻¹ = (f u)⁻¹ := ((.ofClass f : M →* α).comp (Units.coeHom M)).map_inv u
131131

132132
end DivisionMonoid
133133

@@ -203,7 +203,7 @@ variable [Monoid M] [Monoid N]
203203

204204
@[to_additive]
205205
theorem map [MonoidHomClass F M N] (f : F) {x : M} (h : IsUnit x) : IsUnit (f x) := by
206-
rcases h with ⟨y, rfl⟩; exact (Units.map (f : M →* N) y).isUnit
206+
obtain ⟨y, rfl⟩ := h; exact (y.map <| .ofClass f).isUnit
207207

208208
@[to_additive]
209209
theorem of_leftInverse [MonoidHomClass G N M] {f : F} {x : M} (g : G)
@@ -276,10 +276,12 @@ theorem MonoidHom.isLocalHom_comp (g : S →* T) (f : R →* S) [IsLocalHom g]
276276

277277
-- see note [lower instance priority]
278278
@[instance 100]
279-
theorem isLocalHom_toMonoidHom (f : F) [IsLocalHom f] :
280-
IsLocalHom (f : R →* S) :=
279+
theorem isLocalHom_monoidHomOfClass (f : F) [IsLocalHom f] : IsLocalHom (.ofClass f : R →* S) :=
281280
⟨IsLocalHom.map_nonunit (f := f)⟩
282281

282+
@[deprecated (since := "2024-10-10")]
283+
alias isLocalRingHom_toMonoidHom := isLocalHom_monoidHomOfClass
284+
283285
theorem MonoidHom.isLocalHom_of_comp (f : R →* S) (g : S →* T) [IsLocalHom (g.comp f)] :
284286
IsLocalHom f :=
285287
fun _ ha => (isUnit_map_iff (g.comp f) _).mp (ha.map g)⟩

Mathlib/Algebra/GroupWithZero/Hom.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ infixr:25 " →*₀ " => MonoidWithZeroHom
8080
`MonoidWithZeroHom`. This is declared as the default coercion from `F` to `α →*₀ β`. -/
8181
@[coe]
8282
def MonoidWithZeroHomClass.toMonoidWithZeroHom [FunLike F α β] [MonoidWithZeroHomClass F α β]
83-
(f : F) : α →*₀ β := { (f : α →* β), (f : ZeroHom α β) with }
83+
(f : F) : α →*₀ β := { (.ofClass f : α →* β), (.ofClass f : ZeroHom α β) with }
8484

8585
/-- Any type satisfying `MonoidWithZeroHomClass` can be cast into `MonoidWithZeroHom` via
8686
`MonoidWithZeroHomClass.toMonoidWithZeroHom`. -/

Mathlib/Algebra/Order/Hom/Monoid.lean

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ into an actual `OrderMonoidHom`. This is declared as the default coercion from `
130130
This is declared as the default coercion from `F` to `α →+o β`. -/]
131131
def OrderMonoidHomClass.toOrderMonoidHom [OrderHomClass F α β] [MonoidHomClass F α β] (f : F) :
132132
α →*o β :=
133-
{ (f : α →* β) with monotone' := OrderHomClass.monotone f }
133+
{ (.ofClass f : α →* β) with monotone' := OrderHomClass.monotone f }
134134

135135
/-- Any type satisfying `OrderMonoidHomClass` can be cast into `OrderMonoidHom` via
136136
`OrderMonoidHomClass.toOrderMonoidHom`. -/
@@ -265,6 +265,8 @@ instance : MonoidHomClass (α →*o β) α β where
265265
map_mul f := f.map_mul'
266266
map_one f := f.map_one'
267267

268+
@[to_additive] instance : Coe (α →*o β) (α →* β) := ⟨toMonoidHom⟩
269+
268270
-- Other lemmas should be accessed through the `FunLike` API
269271
@[to_additive (attr := ext)]
270272
theorem ext (h : ∀ a, f a = g a) : f = g :=
@@ -442,10 +444,6 @@ section OrderedCommMonoid
442444

443445
variable {_ : Preorder α} {_ : Preorder β} {_ : MulOneClass α} {_ : MulOneClass β}
444446

445-
@[to_additive (attr := simp)]
446-
theorem toMonoidHom_eq_coe (f : α →*o β) : f.toMonoidHom = f :=
447-
rfl
448-
449447
@[to_additive (attr := simp)]
450448
theorem toOrderHom_eq_coe (f : α →*o β) : f.toOrderHom = f :=
451449
rfl
@@ -509,6 +507,8 @@ theorem coe_mk (f : α ≃* β) (h) : (OrderMonoidIso.mk f h : α → β) = f :=
509507
@[to_additive (attr := simp)]
510508
theorem mk_coe (f : α ≃*o β) (h) : OrderMonoidIso.mk (f : α ≃* β) h = f := rfl
511509

510+
@[to_additive (attr := simp)] lemma coe_toMulEquiv (f : α ≃*o β) : ⇑f.toMulEquiv = f := rfl
511+
512512
/-- Reinterpret an ordered monoid isomorphism as an order isomorphism. -/
513513
@[to_additive
514514
/-- Reinterpret an ordered additive monoid isomomorphism as an order isomomorphism. -/]
@@ -562,12 +562,12 @@ theorem coe_trans (f : α ≃*o β) (g : β ≃*o γ) : (f.trans g : α → γ)
562562
theorem trans_apply (f : α ≃*o β) (g : β ≃*o γ) (a : α) : (f.trans g) a = g (f a) :=
563563
rfl
564564

565-
@[to_additive]
565+
@[to_additive (attr := simp, norm_cast)]
566566
theorem coe_trans_mulEquiv (f : α ≃*o β) (g : β ≃*o γ) :
567567
(f.trans g : α ≃* γ) = (f : α ≃* β).trans g :=
568568
rfl
569569

570-
@[to_additive]
570+
@[to_additive (attr := simp, norm_cast)]
571571
theorem coe_trans_orderIso (f : α ≃*o β) (g : β ≃*o γ) :
572572
(f.trans g : α ≃o γ) = (f : α ≃o β).trans g :=
573573
rfl
@@ -624,15 +624,17 @@ initialize_simps_projections OrderMonoidIso (toFun → apply, invFun → symm_ap
624624
@[to_additive]
625625
theorem invFun_eq_symm {f : α ≃*o β} : f.invFun = f.symm := rfl
626626

627-
/-- `simp`-normal form of `invFun_eq_symm`. -/
628627
@[to_additive (attr := simp)]
629-
theorem coe_toEquiv_symm (f : α ≃*o β) : ((f : α ≃ β).symm : β → α) = f.symm := rfl
628+
theorem symm_toEquiv (f : α ≃*o β) : f.toEquiv.symm = f.symm.toEquiv := rfl
630629

631630
@[to_additive (attr := simp)]
632-
theorem equivLike_inv_eq_symm (f : α ≃*o β) : EquivLike.inv f = f.symm := rfl
631+
lemma symm_toOrderIso (f : α ≃*o β) : f.toOrderIso.symm = f.symm.toOrderIso := rfl
633632

634633
@[to_additive (attr := simp)]
635-
theorem toEquiv_symm (f : α ≃*o β) : (f.symm : β ≃ α) = (f : α ≃ β).symm := rfl
634+
lemma symm_toOrderIso (f : α ≃*o β) : f.toOrderIso.symm = f.symm.toOrderIso := rfl
635+
636+
@[to_additive (attr := simp)]
637+
theorem equivLike_inv_eq_symm (f : α ≃*o β) : EquivLike.inv f = f.symm := rfl
636638

637639
@[to_additive (attr := simp)]
638640
theorem symm_symm (f : α ≃*o β) : f.symm.symm = f := rfl

0 commit comments

Comments
 (0)