logic.equiv.transfer_instance
⟷
Mathlib.Logic.Equiv.TransferInstance
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.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(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)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -528,11 +528,11 @@ protected theorem isDomain [Ring α] [Ring β] [IsDomain β] (e : α ≃+* β) :
#align equiv.is_domain Equiv.isDomain
-/
-#print Equiv.RatCast /-
+#print Equiv.ratCast /-
/-- Transfer `has_rat_cast` across an `equiv` -/
@[reducible]
-protected def RatCast [HasRatCast β] : HasRatCast α where ratCast n := e.symm n
-#align equiv.has_rat_cast Equiv.RatCast
+protected def ratCast [HasRatCast β] : HasRatCast α where ratCast n := e.symm n
+#align equiv.has_rat_cast Equiv.ratCast
-/
#print Equiv.divisionRing /-
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -376,7 +376,7 @@ protected def addGroupWithOne [AddGroupWithOne β] : AddGroupWithOne α :=
{ e.AddMonoidWithOne,
e.AddGroup with
intCast := fun n => e.symm n
- intCast_ofNat := fun n => by rw [Int.cast_ofNat] <;> rfl
+ intCast_ofNat := fun n => by rw [Int.cast_natCast] <;> rfl
intCast_negSucc := fun n =>
congr_arg e.symm <| (Int.cast_negSucc _).trans <| congr_arg _ (e.apply_symm_apply _).symm }
#align equiv.add_group_with_one Equiv.addGroupWithOne
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -665,7 +665,7 @@ protected def algebra (e : α ≃ β) [Semiring β] :
· intro r x
simp only [Function.comp_apply, RingHom.coe_comp]
have p := ring_equiv_symm_apply e
- dsimp at p
+ dsimp at p
erw [p]; clear p
apply (RingEquiv e).Injective
simp only [(RingEquiv e).map_hMul]
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,9 +3,9 @@ Copyright (c) 2018 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl
-/
-import Mathbin.Algebra.Algebra.Equiv
-import Mathbin.Algebra.Field.Basic
-import Mathbin.Logic.Equiv.Defs
+import Algebra.Algebra.Equiv
+import Algebra.Field.Basic
+import Logic.Equiv.Defs
#align_import logic.equiv.transfer_instance from "leanprover-community/mathlib"@"86d1873c01a723aba6788f0b9051ae3d23b4c1c3"
mathlib commit https://github.com/leanprover-community/mathlib/commit/32a7e535287f9c73f2e4d2aef306a39190f0b504
@@ -586,7 +586,7 @@ variable [Monoid R]
protected def mulAction (e : α ≃ β) [MulAction R β] : MulAction R α :=
{ e.SMul R with
one_smul := by simp [smul_def]
- mul_smul := by simp [smul_def, mul_smul] }
+ hMul_smul := by simp [smul_def, mul_smul] }
#align equiv.mul_action Equiv.mulAction
-/
@@ -668,7 +668,7 @@ protected def algebra (e : α ≃ β) [Semiring β] :
dsimp at p
erw [p]; clear p
apply (RingEquiv e).Injective
- simp only [(RingEquiv e).map_mul]
+ simp only [(RingEquiv e).map_hMul]
simp [Algebra.commutes]
#align equiv.algebra Equiv.algebra
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,16 +2,13 @@
Copyright (c) 2018 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl
-
-! This file was ported from Lean 3 source module logic.equiv.transfer_instance
-! leanprover-community/mathlib commit 86d1873c01a723aba6788f0b9051ae3d23b4c1c3
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Algebra.Algebra.Equiv
import Mathbin.Algebra.Field.Basic
import Mathbin.Logic.Equiv.Defs
+#align_import logic.equiv.transfer_instance from "leanprover-community/mathlib"@"86d1873c01a723aba6788f0b9051ae3d23b4c1c3"
+
/-!
# Transfer algebraic structures across `equiv`s
mathlib commit https://github.com/leanprover-community/mathlib/commit/5dc6092d09e5e489106865241986f7f2ad28d4c8
@@ -46,52 +46,52 @@ section Instances
variable (e : α ≃ β)
-#print Equiv.One /-
+#print Equiv.one /-
/-- Transfer `has_one` across an `equiv` -/
@[reducible, to_additive "Transfer `has_zero` across an `equiv`"]
-protected def One [One β] : One α :=
+protected def one [One β] : One α :=
⟨e.symm 1⟩
-#align equiv.has_one Equiv.One
-#align equiv.has_zero Equiv.Zero
+#align equiv.has_one Equiv.one
+#align equiv.has_zero Equiv.zero
-/
#print Equiv.one_def /-
@[to_additive]
-theorem one_def [One β] : @One.one _ (Equiv.One e) = e.symm 1 :=
+theorem one_def [One β] : @One.one _ (Equiv.one e) = e.symm 1 :=
rfl
#align equiv.one_def Equiv.one_def
#align equiv.zero_def Equiv.zero_def
-/
-#print Equiv.Mul /-
+#print Equiv.mul /-
/-- Transfer `has_mul` across an `equiv` -/
@[reducible, to_additive "Transfer `has_add` across an `equiv`"]
-protected def Mul [Mul β] : Mul α :=
+protected def mul [Mul β] : Mul α :=
⟨fun x y => e.symm (e x * e y)⟩
-#align equiv.has_mul Equiv.Mul
-#align equiv.has_add Equiv.Add
+#align equiv.has_mul Equiv.mul
+#align equiv.has_add Equiv.add
-/
#print Equiv.mul_def /-
@[to_additive]
-theorem mul_def [Mul β] (x y : α) : @Mul.mul _ (Equiv.Mul e) x y = e.symm (e x * e y) :=
+theorem mul_def [Mul β] (x y : α) : @Mul.mul _ (Equiv.mul e) x y = e.symm (e x * e y) :=
rfl
#align equiv.mul_def Equiv.mul_def
#align equiv.add_def Equiv.add_def
-/
-#print Equiv.Div /-
+#print Equiv.div /-
/-- Transfer `has_div` across an `equiv` -/
@[reducible, to_additive "Transfer `has_sub` across an `equiv`"]
-protected def Div [Div β] : Div α :=
+protected def div [Div β] : Div α :=
⟨fun x y => e.symm (e x / e y)⟩
-#align equiv.has_div Equiv.Div
-#align equiv.has_sub Equiv.Sub
+#align equiv.has_div Equiv.div
+#align equiv.has_sub Equiv.sub
-/
#print Equiv.div_def /-
@[to_additive]
-theorem div_def [Div β] (x y : α) : @Div.div _ (Equiv.Div e) x y = e.symm (e x / e y) :=
+theorem div_def [Div β] (x y : α) : @Div.div _ (Equiv.div e) x y = e.symm (e x / e y) :=
rfl
#align equiv.div_def Equiv.div_def
#align equiv.sub_def Equiv.sub_def
@@ -114,12 +114,12 @@ theorem inv_def [Inv β] (x : α) : @Inv.inv _ (Equiv.Inv e) x = e.symm (e x)⁻
#align equiv.neg_def Equiv.neg_def
-/
-#print Equiv.SMul /-
+#print Equiv.smul /-
/-- Transfer `has_smul` across an `equiv` -/
@[reducible]
-protected def SMul (R : Type _) [SMul R β] : SMul R α :=
+protected def smul (R : Type _) [SMul R β] : SMul R α :=
⟨fun r x => e.symm (r • e x)⟩
-#align equiv.has_smul Equiv.SMul
+#align equiv.has_smul Equiv.smul
-/
#print Equiv.smul_def /-
@@ -129,13 +129,13 @@ theorem smul_def {R : Type _} [SMul R β] (r : R) (x : α) :
#align equiv.smul_def Equiv.smul_def
-/
-#print Equiv.Pow /-
+#print Equiv.pow /-
/-- Transfer `has_pow` across an `equiv` -/
@[reducible, to_additive SMul]
-protected def Pow (N : Type _) [Pow β N] : Pow α N :=
+protected def pow (N : Type _) [Pow β N] : Pow α N :=
⟨fun x n => e.symm (e x ^ n)⟩
-#align equiv.has_pow Equiv.Pow
-#align equiv.has_smul Equiv.SMul
+#align equiv.has_pow Equiv.pow
+#align equiv.has_smul Equiv.smul
-/
#print Equiv.pow_def /-
@@ -153,7 +153,7 @@ the one obtained by transporting a multiplicative structure on `β` back along `
@[to_additive
"An equivalence `e : α ≃ β` gives a additive equivalence `α ≃+ β`\nwhere the additive structure on `α` is\nthe one obtained by transporting an additive structure on `β` back along `e`."]
def mulEquiv (e : α ≃ β) [Mul β] :
- letI := Equiv.Mul e
+ letI := Equiv.mul e
α ≃* β :=
by
intros
@@ -173,7 +173,7 @@ theorem mulEquiv_apply (e : α ≃ β) [Mul β] (a : α) : (mulEquiv e) a = e a
#print Equiv.mulEquiv_symm_apply /-
@[to_additive]
theorem mulEquiv_symm_apply (e : α ≃ β) [Mul β] (b : β) :
- letI := Equiv.Mul e
+ letI := Equiv.mul e
(MulEquiv e).symm b = e.symm b :=
by intros; rfl
#align equiv.mul_equiv_symm_apply Equiv.mulEquiv_symm_apply
@@ -185,7 +185,7 @@ theorem mulEquiv_symm_apply (e : α ≃ β) [Mul β] (b : β) :
where the ring structure on `α` is
the one obtained by transporting a ring structure on `β` back along `e`.
-/
-def ringEquiv (e : α ≃ β) [Add β] [Mul β] : by letI := Equiv.Add e; letI := Equiv.Mul e;
+def ringEquiv (e : α ≃ β) [Add β] [Mul β] : by letI := Equiv.add e; letI := Equiv.mul e;
exact α ≃+* β := by
intros
exact
@@ -203,8 +203,8 @@ theorem ringEquiv_apply (e : α ≃ β) [Add β] [Mul β] (a : α) : (ringEquiv
-/
#print Equiv.ringEquiv_symm_apply /-
-theorem ringEquiv_symm_apply (e : α ≃ β) [Add β] [Mul β] (b : β) : by letI := Equiv.Add e;
- letI := Equiv.Mul e; exact (RingEquiv e).symm b = e.symm b := by intros; rfl
+theorem ringEquiv_symm_apply (e : α ≃ β) [Add β] [Mul β] (b : β) : by letI := Equiv.add e;
+ letI := Equiv.mul e; exact (RingEquiv e).symm b = e.symm b := by intros; rfl
#align equiv.ring_equiv_symm_apply Equiv.ringEquiv_symm_apply
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -122,10 +122,12 @@ protected def SMul (R : Type _) [SMul R β] : SMul R α :=
#align equiv.has_smul Equiv.SMul
-/
+#print Equiv.smul_def /-
theorem smul_def {R : Type _} [SMul R β] (r : R) (x : α) :
@SMul.smul _ _ (e.SMul R) r x = e.symm (r • e x) :=
rfl
#align equiv.smul_def Equiv.smul_def
+-/
#print Equiv.Pow /-
/-- Transfer `has_pow` across an `equiv` -/
@@ -136,10 +138,12 @@ protected def Pow (N : Type _) [Pow β N] : Pow α N :=
#align equiv.has_smul Equiv.SMul
-/
+#print Equiv.pow_def /-
theorem pow_def {N : Type _} [Pow β N] (n : N) (x : α) :
@Pow.pow _ _ (e.Pow N) x n = e.symm (e x ^ n) :=
rfl
#align equiv.pow_def Equiv.pow_def
+-/
#print Equiv.mulEquiv /-
/-- An equivalence `e : α ≃ β` gives a multiplicative equivalence `α ≃* β`
@@ -158,12 +162,15 @@ def mulEquiv (e : α ≃ β) [Mul β] :
#align equiv.add_equiv Equiv.addEquiv
-/
+#print Equiv.mulEquiv_apply /-
@[simp, to_additive]
theorem mulEquiv_apply (e : α ≃ β) [Mul β] (a : α) : (mulEquiv e) a = e a :=
rfl
#align equiv.mul_equiv_apply Equiv.mulEquiv_apply
#align equiv.add_equiv_apply Equiv.addEquiv_apply
+-/
+#print Equiv.mulEquiv_symm_apply /-
@[to_additive]
theorem mulEquiv_symm_apply (e : α ≃ β) [Mul β] (b : β) :
letI := Equiv.Mul e
@@ -171,7 +178,9 @@ theorem mulEquiv_symm_apply (e : α ≃ β) [Mul β] (b : β) :
by intros; rfl
#align equiv.mul_equiv_symm_apply Equiv.mulEquiv_symm_apply
#align equiv.add_equiv_symm_apply Equiv.addEquiv_symm_apply
+-/
+#print Equiv.ringEquiv /-
/-- An equivalence `e : α ≃ β` gives a ring equivalence `α ≃+* β`
where the ring structure on `α` is
the one obtained by transporting a ring structure on `β` back along `e`.
@@ -184,6 +193,7 @@ def ringEquiv (e : α ≃ β) [Add β] [Mul β] : by letI := Equiv.Add e; letI :
map_add' := fun x y => by apply e.symm.injective; simp
map_mul' := fun x y => by apply e.symm.injective; simp }
#align equiv.ring_equiv Equiv.ringEquiv
+-/
#print Equiv.ringEquiv_apply /-
@[simp]
@@ -513,16 +523,20 @@ protected theorem nontrivial [Nontrivial β] : Nontrivial α :=
#align equiv.nontrivial Equiv.nontrivial
-/
+#print Equiv.isDomain /-
/-- Transfer `is_domain` across an `equiv` -/
@[reducible]
protected theorem isDomain [Ring α] [Ring β] [IsDomain β] (e : α ≃+* β) : IsDomain α :=
Function.Injective.isDomain e.toRingHom e.Injective
#align equiv.is_domain Equiv.isDomain
+-/
+#print Equiv.RatCast /-
/-- Transfer `has_rat_cast` across an `equiv` -/
@[reducible]
protected def RatCast [HasRatCast β] : HasRatCast α where ratCast n := e.symm n
#align equiv.has_rat_cast Equiv.RatCast
+-/
#print Equiv.divisionRing /-
/-- Transfer `division_ring` across an `equiv` -/
@@ -565,8 +579,6 @@ section R
variable (R : Type _)
-include R
-
section
variable [Monoid R]
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -168,7 +168,7 @@ theorem mulEquiv_apply (e : α ≃ β) [Mul β] (a : α) : (mulEquiv e) a = e a
theorem mulEquiv_symm_apply (e : α ≃ β) [Mul β] (b : β) :
letI := Equiv.Mul e
(MulEquiv e).symm b = e.symm b :=
- by intros ; rfl
+ by intros; rfl
#align equiv.mul_equiv_symm_apply Equiv.mulEquiv_symm_apply
#align equiv.add_equiv_symm_apply Equiv.addEquiv_symm_apply
@@ -194,7 +194,7 @@ theorem ringEquiv_apply (e : α ≃ β) [Add β] [Mul β] (a : α) : (ringEquiv
#print Equiv.ringEquiv_symm_apply /-
theorem ringEquiv_symm_apply (e : α ≃ β) [Add β] [Mul β] (b : β) : by letI := Equiv.Add e;
- letI := Equiv.Mul e; exact (RingEquiv e).symm b = e.symm b := by intros ; rfl
+ letI := Equiv.Mul e; exact (RingEquiv e).symm b = e.symm b := by intros; rfl
#align equiv.ring_equiv_symm_apply Equiv.ringEquiv_symm_apply
-/
@@ -656,7 +656,7 @@ protected def algebra (e : α ≃ β) [Semiring β] :
· intro r x
simp only [Function.comp_apply, RingHom.coe_comp]
have p := ring_equiv_symm_apply e
- dsimp at p
+ dsimp at p
erw [p]; clear p
apply (RingEquiv e).Injective
simp only [(RingEquiv e).map_mul]
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -122,12 +122,6 @@ protected def SMul (R : Type _) [SMul R β] : SMul R α :=
#align equiv.has_smul Equiv.SMul
-/
-/- warning: equiv.smul_def -> Equiv.smul_def is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) {R : Type.{u3}} [_inst_1 : SMul.{u3, u2} R β] (r : R) (x : α), Eq.{succ u1} α (SMul.smul.{u3, u1} R α (Equiv.SMul.{u1, u2, u3} α β e R _inst_1) r x) (coeFn.{max 1 (max (succ u2) (succ u1)) (succ u1) (succ u2), max (succ u2) (succ u1)} (Equiv.{succ u2, succ u1} β α) (fun (_x : Equiv.{succ u2, succ u1} β α) => β -> α) (Equiv.hasCoeToFun.{succ u2, succ u1} β α) (Equiv.symm.{succ u1, succ u2} α β e) (SMul.smul.{u3, u2} R β _inst_1 r (coeFn.{max 1 (max (succ u1) (succ u2)) (succ u2) (succ u1), max (succ u1) (succ u2)} (Equiv.{succ u1, succ u2} α β) (fun (_x : Equiv.{succ u1, succ u2} α β) => α -> β) (Equiv.hasCoeToFun.{succ u1, succ u2} α β) e x)))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u3}} (e : Equiv.{succ u2, succ u3} α β) {R : Type.{u1}} [_inst_1 : SMul.{u1, u3} R β] (r : R) (x : α), Eq.{succ u2} α (HSMul.hSMul.{u1, u2, u2} R α α (instHSMul.{u1, u2} R α (Equiv.SMul.{u2, u3, u1} α β e R _inst_1)) r x) (FunLike.coe.{max (succ u2) (succ u3), succ u3, succ u2} (Equiv.{succ u3, succ u2} β α) β (fun (_x : β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : β) => α) _x) (Equiv.instFunLikeEquiv.{succ u3, succ u2} β α) (Equiv.symm.{succ u2, succ u3} α β e) (HSMul.hSMul.{u1, u3, u3} R ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : α) => β) x) ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : α) => β) x) (instHSMul.{u1, u3} R ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : α) => β) x) _inst_1) r (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (Equiv.{succ u2, succ u3} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : α) => β) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u3} α β) e x)))
-Case conversion may be inaccurate. Consider using '#align equiv.smul_def Equiv.smul_defₓ'. -/
theorem smul_def {R : Type _} [SMul R β] (r : R) (x : α) :
@SMul.smul _ _ (e.SMul R) r x = e.symm (r • e x) :=
rfl
@@ -142,12 +136,6 @@ protected def Pow (N : Type _) [Pow β N] : Pow α N :=
#align equiv.has_smul Equiv.SMul
-/
-/- warning: equiv.pow_def -> Equiv.pow_def is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) {N : Type.{u3}} [_inst_1 : Pow.{u2, u3} β N] (n : N) (x : α), Eq.{succ u1} α (HPow.hPow.{u1, u3, u1} α N α (instHPow.{u1, u3} α N (Equiv.Pow.{u1, u2, u3} α β e N _inst_1)) x n) (coeFn.{max 1 (max (succ u2) (succ u1)) (succ u1) (succ u2), max (succ u2) (succ u1)} (Equiv.{succ u2, succ u1} β α) (fun (_x : Equiv.{succ u2, succ u1} β α) => β -> α) (Equiv.hasCoeToFun.{succ u2, succ u1} β α) (Equiv.symm.{succ u1, succ u2} α β e) (HPow.hPow.{u2, u3, u2} β N β (instHPow.{u2, u3} β N _inst_1) (coeFn.{max 1 (max (succ u1) (succ u2)) (succ u2) (succ u1), max (succ u1) (succ u2)} (Equiv.{succ u1, succ u2} α β) (fun (_x : Equiv.{succ u1, succ u2} α β) => α -> β) (Equiv.hasCoeToFun.{succ u1, succ u2} α β) e x) n))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u3}} (e : Equiv.{succ u2, succ u3} α β) {N : Type.{u1}} [_inst_1 : Pow.{u3, u1} β N] (n : N) (x : α), Eq.{succ u2} α (HPow.hPow.{u2, u1, u2} α N α (instHPow.{u2, u1} α N (Equiv.Pow.{u2, u3, u1} α β e N _inst_1)) x n) (FunLike.coe.{max (succ u2) (succ u3), succ u3, succ u2} (Equiv.{succ u3, succ u2} β α) β (fun (_x : β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : β) => α) _x) (Equiv.instFunLikeEquiv.{succ u3, succ u2} β α) (Equiv.symm.{succ u2, succ u3} α β e) (HPow.hPow.{u3, u1, u3} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : α) => β) x) N ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : α) => β) x) (instHPow.{u3, u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : α) => β) x) N _inst_1) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (Equiv.{succ u2, succ u3} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : α) => β) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u3} α β) e x) n))
-Case conversion may be inaccurate. Consider using '#align equiv.pow_def Equiv.pow_defₓ'. -/
theorem pow_def {N : Type _} [Pow β N] (n : N) (x : α) :
@Pow.pow _ _ (e.Pow N) x n = e.symm (e x ^ n) :=
rfl
@@ -170,24 +158,12 @@ def mulEquiv (e : α ≃ β) [Mul β] :
#align equiv.add_equiv Equiv.addEquiv
-/
-/- warning: equiv.mul_equiv_apply -> Equiv.mulEquiv_apply is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) [_inst_1 : Mul.{u2} β] (a : α), Eq.{succ u2} β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (let _inst : Mul.{u1} α := Equiv.Mul.{u1, u2} α β e _inst_1; MulEquiv.{u1, u2} α β _inst _inst_1) (fun (_x : MulEquiv.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1) => α -> β) (MulEquiv.hasCoeToFun.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1) (Equiv.mulEquiv.{u1, u2} α β e _inst_1) a) (coeFn.{max 1 (max (succ u1) (succ u2)) (succ u2) (succ u1), max (succ u1) (succ u2)} (Equiv.{succ u1, succ u2} α β) (fun (_x : Equiv.{succ u1, succ u2} α β) => α -> β) (Equiv.hasCoeToFun.{succ u1, succ u2} α β) e a)
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) [_inst_1 : Mul.{u2} β] (a : α), Eq.{succ u2} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) a) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (MulEquiv.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u1) (succ u2), succ u1, succ u2} (MulEquiv.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1) α β (EquivLike.toEmbeddingLike.{max (succ u1) (succ u2), succ u1, succ u2} (MulEquiv.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1) α β (MulEquivClass.toEquivLike.{max u1 u2, u1, u2} (MulEquiv.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1) α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1 (MulEquiv.instMulEquivClassMulEquiv.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1)))) (Equiv.mulEquiv.{u1, u2} α β e _inst_1) a) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (Equiv.{succ u1, succ u2} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : α) => β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u2} α β) e a)
-Case conversion may be inaccurate. Consider using '#align equiv.mul_equiv_apply Equiv.mulEquiv_applyₓ'. -/
@[simp, to_additive]
theorem mulEquiv_apply (e : α ≃ β) [Mul β] (a : α) : (mulEquiv e) a = e a :=
rfl
#align equiv.mul_equiv_apply Equiv.mulEquiv_apply
#align equiv.add_equiv_apply Equiv.addEquiv_apply
-/- warning: equiv.mul_equiv_symm_apply -> Equiv.mulEquiv_symm_apply is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) [_inst_1 : Mul.{u2} β] (b : β), let _inst : Mul.{u1} α := Equiv.Mul.{u1, u2} α β e _inst_1; Eq.{succ u1} α (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) (fun (_x : MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) => β -> α) (MulEquiv.hasCoeToFun.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) (MulEquiv.symm.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1 (Equiv.mulEquiv.{u1, u2} α β e _inst_1)) b) (coeFn.{max 1 (max (succ u2) (succ u1)) (succ u1) (succ u2), max (succ u2) (succ u1)} (Equiv.{succ u2, succ u1} β α) (fun (_x : Equiv.{succ u2, succ u1} β α) => β -> α) (Equiv.hasCoeToFun.{succ u2, succ u1} β α) (Equiv.symm.{succ u1, succ u2} α β e) b)
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) [_inst_1 : Mul.{u2} β] (b : β), Eq.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : β) => α) b) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) β (fun (a : β) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : β) => α) a) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) β α (EquivLike.toEmbeddingLike.{max (succ u2) (succ u1), succ u2, succ u1} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) β α (MulEquivClass.toEquivLike.{max u2 u1, u2, u1} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1) (MulEquiv.instMulEquivClassMulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1))))) (MulEquiv.symm.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1 (Equiv.mulEquiv.{u1, u2} α β e _inst_1)) b) (FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (Equiv.{succ u2, succ u1} β α) β (fun (a : β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : β) => α) a) (Equiv.instFunLikeEquiv.{succ u2, succ u1} β α) (Equiv.symm.{succ u1, succ u2} α β e) b)
-Case conversion may be inaccurate. Consider using '#align equiv.mul_equiv_symm_apply Equiv.mulEquiv_symm_applyₓ'. -/
@[to_additive]
theorem mulEquiv_symm_apply (e : α ≃ β) [Mul β] (b : β) :
letI := Equiv.Mul e
@@ -196,12 +172,6 @@ theorem mulEquiv_symm_apply (e : α ≃ β) [Mul β] (b : β) :
#align equiv.mul_equiv_symm_apply Equiv.mulEquiv_symm_apply
#align equiv.add_equiv_symm_apply Equiv.addEquiv_symm_apply
-/- warning: equiv.ring_equiv -> Equiv.ringEquiv is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) [_inst_1 : Add.{u2} β] [_inst_2 : Mul.{u2} β], let _inst : Add.{u1} α := Equiv.Add.{u1, u2} α β e _inst_1; let _inst_3 : Mul.{u1} α := Equiv.Mul.{u1, u2} α β e _inst_2; RingEquiv.{u1, u2} α β _inst_3 _inst _inst_2 _inst_1
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) [_inst_1 : Add.{u2} β] [_inst_2 : Mul.{u2} β], let _inst : Add.{u1} α := Equiv.Add.{u1, u2} α β e _inst_1; let _inst_3 : Mul.{u1} α := Equiv.Mul.{u1, u2} α β e _inst_2; RingEquiv.{u1, u2} α β _inst_3 _inst_2 _inst _inst_1
-Case conversion may be inaccurate. Consider using '#align equiv.ring_equiv Equiv.ringEquivₓ'. -/
/-- An equivalence `e : α ≃ β` gives a ring equivalence `α ≃+* β`
where the ring structure on `α` is
the one obtained by transporting a ring structure on `β` back along `e`.
@@ -543,24 +513,12 @@ protected theorem nontrivial [Nontrivial β] : Nontrivial α :=
#align equiv.nontrivial Equiv.nontrivial
-/
-/- warning: equiv.is_domain -> Equiv.isDomain is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Ring.{u1} α] [_inst_2 : Ring.{u2} β] [_inst_3 : IsDomain.{u2} β (Ring.toSemiring.{u2} β _inst_2)], (RingEquiv.{u1, u2} α β (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α _inst_1)) (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α _inst_1)) (Distrib.toHasMul.{u2} β (Ring.toDistrib.{u2} β _inst_2)) (Distrib.toHasAdd.{u2} β (Ring.toDistrib.{u2} β _inst_2))) -> (IsDomain.{u1} α (Ring.toSemiring.{u1} α _inst_1))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Ring.{u1} α] [_inst_2 : Ring.{u2} β] [_inst_3 : IsDomain.{u2} β (Ring.toSemiring.{u2} β _inst_2)], (RingEquiv.{u1, u2} α β (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1))) (NonUnitalNonAssocRing.toMul.{u2} β (NonAssocRing.toNonUnitalNonAssocRing.{u2} β (Ring.toNonAssocRing.{u2} β _inst_2))) (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1))))) (Distrib.toAdd.{u2} β (NonUnitalNonAssocSemiring.toDistrib.{u2} β (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} β (NonAssocRing.toNonUnitalNonAssocRing.{u2} β (Ring.toNonAssocRing.{u2} β _inst_2)))))) -> (IsDomain.{u1} α (Ring.toSemiring.{u1} α _inst_1))
-Case conversion may be inaccurate. Consider using '#align equiv.is_domain Equiv.isDomainₓ'. -/
/-- Transfer `is_domain` across an `equiv` -/
@[reducible]
protected theorem isDomain [Ring α] [Ring β] [IsDomain β] (e : α ≃+* β) : IsDomain α :=
Function.Injective.isDomain e.toRingHom e.Injective
#align equiv.is_domain Equiv.isDomain
-/- warning: equiv.has_rat_cast -> Equiv.RatCast is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}}, (Equiv.{succ u1, succ u2} α β) -> (forall [_inst_1 : HasRatCast.{u2} β], HasRatCast.{u1} α)
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}}, (Equiv.{succ u1, succ u2} α β) -> (forall [_inst_1 : RatCast.{u2} β], RatCast.{u1} α)
-Case conversion may be inaccurate. Consider using '#align equiv.has_rat_cast Equiv.RatCastₓ'. -/
/-- Transfer `has_rat_cast` across an `equiv` -/
@[reducible]
protected def RatCast [HasRatCast β] : HasRatCast α where ratCast n := e.symm n
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -165,11 +165,7 @@ def mulEquiv (e : α ≃ β) [Mul β] :
α ≃* β :=
by
intros
- exact
- { e with
- map_mul' := fun x y => by
- apply e.symm.injective
- simp }
+ exact { e with map_mul' := fun x y => by apply e.symm.injective; simp }
#align equiv.mul_equiv Equiv.mulEquiv
#align equiv.add_equiv Equiv.addEquiv
-/
@@ -210,21 +206,13 @@ Case conversion may be inaccurate. Consider using '#align equiv.ring_equiv Equiv
where the ring structure on `α` is
the one obtained by transporting a ring structure on `β` back along `e`.
-/
-def ringEquiv (e : α ≃ β) [Add β] [Mul β] :
- by
- letI := Equiv.Add e
- letI := Equiv.Mul e
+def ringEquiv (e : α ≃ β) [Add β] [Mul β] : by letI := Equiv.Add e; letI := Equiv.Mul e;
exact α ≃+* β := by
intros
exact
- {
- e with
- map_add' := fun x y => by
- apply e.symm.injective
- simp
- map_mul' := fun x y => by
- apply e.symm.injective
- simp }
+ { e with
+ map_add' := fun x y => by apply e.symm.injective; simp
+ map_mul' := fun x y => by apply e.symm.injective; simp }
#align equiv.ring_equiv Equiv.ringEquiv
#print Equiv.ringEquiv_apply /-
@@ -235,11 +223,8 @@ theorem ringEquiv_apply (e : α ≃ β) [Add β] [Mul β] (a : α) : (ringEquiv
-/
#print Equiv.ringEquiv_symm_apply /-
-theorem ringEquiv_symm_apply (e : α ≃ β) [Add β] [Mul β] (b : β) :
- by
- letI := Equiv.Add e
- letI := Equiv.Mul e
- exact (RingEquiv e).symm b = e.symm b := by intros ; rfl
+theorem ringEquiv_symm_apply (e : α ≃ β) [Add β] [Mul β] (b : β) : by letI := Equiv.Add e;
+ letI := Equiv.Mul e; exact (RingEquiv e).symm b = e.symm b := by intros ; rfl
#align equiv.ring_equiv_symm_apply Equiv.ringEquiv_symm_apply
-/
@@ -690,12 +675,7 @@ def linearEquiv (e : α ≃ β) [AddCommMonoid β] [Module R β] :
letI := Equiv.module R e
exact α ≃ₗ[R] β := by
intros
- exact
- { Equiv.addEquiv e with
- map_smul' := fun r x => by
- apply e.symm.injective
- simp
- rfl }
+ exact { Equiv.addEquiv e with map_smul' := fun r x => by apply e.symm.injective; simp; rfl }
#align equiv.linear_equiv Equiv.linearEquiv
-/
@@ -719,8 +699,7 @@ protected def algebra (e : α ≃ β) [Semiring β] :
simp only [Function.comp_apply, RingHom.coe_comp]
have p := ring_equiv_symm_apply e
dsimp at p
- erw [p]
- clear p
+ erw [p]; clear p
apply (RingEquiv e).Injective
simp only [(RingEquiv e).map_mul]
simp [Algebra.commutes]
@@ -738,12 +717,7 @@ def algEquiv (e : α ≃ β) [Semiring β] [Algebra R β] :
letI := Equiv.algebra R e
exact α ≃ₐ[R] β := by
intros
- exact
- { Equiv.ringEquiv e with
- commutes' := fun r => by
- apply e.symm.injective
- simp
- rfl }
+ exact { Equiv.ringEquiv e with commutes' := fun r => by apply e.symm.injective; simp; rfl }
#align equiv.alg_equiv Equiv.algEquiv
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/95a87616d63b3cb49d3fe678d416fbe9c4217bf4
@@ -126,7 +126,7 @@ protected def SMul (R : Type _) [SMul R β] : SMul R α :=
lean 3 declaration is
forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) {R : Type.{u3}} [_inst_1 : SMul.{u3, u2} R β] (r : R) (x : α), Eq.{succ u1} α (SMul.smul.{u3, u1} R α (Equiv.SMul.{u1, u2, u3} α β e R _inst_1) r x) (coeFn.{max 1 (max (succ u2) (succ u1)) (succ u1) (succ u2), max (succ u2) (succ u1)} (Equiv.{succ u2, succ u1} β α) (fun (_x : Equiv.{succ u2, succ u1} β α) => β -> α) (Equiv.hasCoeToFun.{succ u2, succ u1} β α) (Equiv.symm.{succ u1, succ u2} α β e) (SMul.smul.{u3, u2} R β _inst_1 r (coeFn.{max 1 (max (succ u1) (succ u2)) (succ u2) (succ u1), max (succ u1) (succ u2)} (Equiv.{succ u1, succ u2} α β) (fun (_x : Equiv.{succ u1, succ u2} α β) => α -> β) (Equiv.hasCoeToFun.{succ u1, succ u2} α β) e x)))
but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u3}} (e : Equiv.{succ u2, succ u3} α β) {R : Type.{u1}} [_inst_1 : SMul.{u1, u3} R β] (r : R) (x : α), Eq.{succ u2} α (HSMul.hSMul.{u1, u2, u2} R α α (instHSMul.{u1, u2} R α (Equiv.SMul.{u2, u3, u1} α β e R _inst_1)) r x) (FunLike.coe.{max (succ u2) (succ u3), succ u3, succ u2} (Equiv.{succ u3, succ u2} β α) β (fun (_x : β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : β) => α) _x) (Equiv.instFunLikeEquiv.{succ u3, succ u2} β α) (Equiv.symm.{succ u2, succ u3} α β e) (HSMul.hSMul.{u1, u3, u3} R ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => β) x) ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => β) x) (instHSMul.{u1, u3} R ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => β) x) _inst_1) r (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (Equiv.{succ u2, succ u3} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => β) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u3} α β) e x)))
+ forall {α : Type.{u2}} {β : Type.{u3}} (e : Equiv.{succ u2, succ u3} α β) {R : Type.{u1}} [_inst_1 : SMul.{u1, u3} R β] (r : R) (x : α), Eq.{succ u2} α (HSMul.hSMul.{u1, u2, u2} R α α (instHSMul.{u1, u2} R α (Equiv.SMul.{u2, u3, u1} α β e R _inst_1)) r x) (FunLike.coe.{max (succ u2) (succ u3), succ u3, succ u2} (Equiv.{succ u3, succ u2} β α) β (fun (_x : β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : β) => α) _x) (Equiv.instFunLikeEquiv.{succ u3, succ u2} β α) (Equiv.symm.{succ u2, succ u3} α β e) (HSMul.hSMul.{u1, u3, u3} R ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : α) => β) x) ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : α) => β) x) (instHSMul.{u1, u3} R ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : α) => β) x) _inst_1) r (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (Equiv.{succ u2, succ u3} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : α) => β) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u3} α β) e x)))
Case conversion may be inaccurate. Consider using '#align equiv.smul_def Equiv.smul_defₓ'. -/
theorem smul_def {R : Type _} [SMul R β] (r : R) (x : α) :
@SMul.smul _ _ (e.SMul R) r x = e.symm (r • e x) :=
@@ -146,7 +146,7 @@ protected def Pow (N : Type _) [Pow β N] : Pow α N :=
lean 3 declaration is
forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) {N : Type.{u3}} [_inst_1 : Pow.{u2, u3} β N] (n : N) (x : α), Eq.{succ u1} α (HPow.hPow.{u1, u3, u1} α N α (instHPow.{u1, u3} α N (Equiv.Pow.{u1, u2, u3} α β e N _inst_1)) x n) (coeFn.{max 1 (max (succ u2) (succ u1)) (succ u1) (succ u2), max (succ u2) (succ u1)} (Equiv.{succ u2, succ u1} β α) (fun (_x : Equiv.{succ u2, succ u1} β α) => β -> α) (Equiv.hasCoeToFun.{succ u2, succ u1} β α) (Equiv.symm.{succ u1, succ u2} α β e) (HPow.hPow.{u2, u3, u2} β N β (instHPow.{u2, u3} β N _inst_1) (coeFn.{max 1 (max (succ u1) (succ u2)) (succ u2) (succ u1), max (succ u1) (succ u2)} (Equiv.{succ u1, succ u2} α β) (fun (_x : Equiv.{succ u1, succ u2} α β) => α -> β) (Equiv.hasCoeToFun.{succ u1, succ u2} α β) e x) n))
but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u3}} (e : Equiv.{succ u2, succ u3} α β) {N : Type.{u1}} [_inst_1 : Pow.{u3, u1} β N] (n : N) (x : α), Eq.{succ u2} α (HPow.hPow.{u2, u1, u2} α N α (instHPow.{u2, u1} α N (Equiv.Pow.{u2, u3, u1} α β e N _inst_1)) x n) (FunLike.coe.{max (succ u2) (succ u3), succ u3, succ u2} (Equiv.{succ u3, succ u2} β α) β (fun (_x : β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : β) => α) _x) (Equiv.instFunLikeEquiv.{succ u3, succ u2} β α) (Equiv.symm.{succ u2, succ u3} α β e) (HPow.hPow.{u3, u1, u3} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => β) x) N ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => β) x) (instHPow.{u3, u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => β) x) N _inst_1) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (Equiv.{succ u2, succ u3} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => β) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u3} α β) e x) n))
+ forall {α : Type.{u2}} {β : Type.{u3}} (e : Equiv.{succ u2, succ u3} α β) {N : Type.{u1}} [_inst_1 : Pow.{u3, u1} β N] (n : N) (x : α), Eq.{succ u2} α (HPow.hPow.{u2, u1, u2} α N α (instHPow.{u2, u1} α N (Equiv.Pow.{u2, u3, u1} α β e N _inst_1)) x n) (FunLike.coe.{max (succ u2) (succ u3), succ u3, succ u2} (Equiv.{succ u3, succ u2} β α) β (fun (_x : β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : β) => α) _x) (Equiv.instFunLikeEquiv.{succ u3, succ u2} β α) (Equiv.symm.{succ u2, succ u3} α β e) (HPow.hPow.{u3, u1, u3} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : α) => β) x) N ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : α) => β) x) (instHPow.{u3, u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : α) => β) x) N _inst_1) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (Equiv.{succ u2, succ u3} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : α) => β) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u3} α β) e x) n))
Case conversion may be inaccurate. Consider using '#align equiv.pow_def Equiv.pow_defₓ'. -/
theorem pow_def {N : Type _} [Pow β N] (n : N) (x : α) :
@Pow.pow _ _ (e.Pow N) x n = e.symm (e x ^ n) :=
@@ -178,7 +178,7 @@ def mulEquiv (e : α ≃ β) [Mul β] :
lean 3 declaration is
forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) [_inst_1 : Mul.{u2} β] (a : α), Eq.{succ u2} β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (let _inst : Mul.{u1} α := Equiv.Mul.{u1, u2} α β e _inst_1; MulEquiv.{u1, u2} α β _inst _inst_1) (fun (_x : MulEquiv.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1) => α -> β) (MulEquiv.hasCoeToFun.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1) (Equiv.mulEquiv.{u1, u2} α β e _inst_1) a) (coeFn.{max 1 (max (succ u1) (succ u2)) (succ u2) (succ u1), max (succ u1) (succ u2)} (Equiv.{succ u1, succ u2} α β) (fun (_x : Equiv.{succ u1, succ u2} α β) => α -> β) (Equiv.hasCoeToFun.{succ u1, succ u2} α β) e a)
but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) [_inst_1 : Mul.{u2} β] (a : α), Eq.{succ u2} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) a) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (MulEquiv.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u1) (succ u2), succ u1, succ u2} (MulEquiv.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1) α β (EquivLike.toEmbeddingLike.{max (succ u1) (succ u2), succ u1, succ u2} (MulEquiv.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1) α β (MulEquivClass.toEquivLike.{max u1 u2, u1, u2} (MulEquiv.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1) α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1 (MulEquiv.instMulEquivClassMulEquiv.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1)))) (Equiv.mulEquiv.{u1, u2} α β e _inst_1) a) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (Equiv.{succ u1, succ u2} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u2} α β) e a)
+ forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) [_inst_1 : Mul.{u2} β] (a : α), Eq.{succ u2} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) a) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (MulEquiv.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u1) (succ u2), succ u1, succ u2} (MulEquiv.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1) α β (EquivLike.toEmbeddingLike.{max (succ u1) (succ u2), succ u1, succ u2} (MulEquiv.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1) α β (MulEquivClass.toEquivLike.{max u1 u2, u1, u2} (MulEquiv.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1) α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1 (MulEquiv.instMulEquivClassMulEquiv.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1)))) (Equiv.mulEquiv.{u1, u2} α β e _inst_1) a) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (Equiv.{succ u1, succ u2} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : α) => β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u2} α β) e a)
Case conversion may be inaccurate. Consider using '#align equiv.mul_equiv_apply Equiv.mulEquiv_applyₓ'. -/
@[simp, to_additive]
theorem mulEquiv_apply (e : α ≃ β) [Mul β] (a : α) : (mulEquiv e) a = e a :=
@@ -190,7 +190,7 @@ theorem mulEquiv_apply (e : α ≃ β) [Mul β] (a : α) : (mulEquiv e) a = e a
lean 3 declaration is
forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) [_inst_1 : Mul.{u2} β] (b : β), let _inst : Mul.{u1} α := Equiv.Mul.{u1, u2} α β e _inst_1; Eq.{succ u1} α (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) (fun (_x : MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) => β -> α) (MulEquiv.hasCoeToFun.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) (MulEquiv.symm.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1 (Equiv.mulEquiv.{u1, u2} α β e _inst_1)) b) (coeFn.{max 1 (max (succ u2) (succ u1)) (succ u1) (succ u2), max (succ u2) (succ u1)} (Equiv.{succ u2, succ u1} β α) (fun (_x : Equiv.{succ u2, succ u1} β α) => β -> α) (Equiv.hasCoeToFun.{succ u2, succ u1} β α) (Equiv.symm.{succ u1, succ u2} α β e) b)
but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) [_inst_1 : Mul.{u2} β] (b : β), Eq.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : β) => α) b) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) β (fun (a : β) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : β) => α) a) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) β α (EquivLike.toEmbeddingLike.{max (succ u2) (succ u1), succ u2, succ u1} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) β α (MulEquivClass.toEquivLike.{max u2 u1, u2, u1} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1) (MulEquiv.instMulEquivClassMulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1))))) (MulEquiv.symm.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1 (Equiv.mulEquiv.{u1, u2} α β e _inst_1)) b) (FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (Equiv.{succ u2, succ u1} β α) β (fun (a : β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : β) => α) a) (Equiv.instFunLikeEquiv.{succ u2, succ u1} β α) (Equiv.symm.{succ u1, succ u2} α β e) b)
+ forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) [_inst_1 : Mul.{u2} β] (b : β), Eq.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : β) => α) b) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) β (fun (a : β) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : β) => α) a) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) β α (EquivLike.toEmbeddingLike.{max (succ u2) (succ u1), succ u2, succ u1} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) β α (MulEquivClass.toEquivLike.{max u2 u1, u2, u1} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1) (MulEquiv.instMulEquivClassMulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1))))) (MulEquiv.symm.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1 (Equiv.mulEquiv.{u1, u2} α β e _inst_1)) b) (FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (Equiv.{succ u2, succ u1} β α) β (fun (a : β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : β) => α) a) (Equiv.instFunLikeEquiv.{succ u2, succ u1} β α) (Equiv.symm.{succ u1, succ u2} α β e) b)
Case conversion may be inaccurate. Consider using '#align equiv.mul_equiv_symm_apply Equiv.mulEquiv_symm_applyₓ'. -/
@[to_additive]
theorem mulEquiv_symm_apply (e : α ≃ β) [Mul β] (b : β) :
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -178,7 +178,7 @@ def mulEquiv (e : α ≃ β) [Mul β] :
lean 3 declaration is
forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) [_inst_1 : Mul.{u2} β] (a : α), Eq.{succ u2} β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (let _inst : Mul.{u1} α := Equiv.Mul.{u1, u2} α β e _inst_1; MulEquiv.{u1, u2} α β _inst _inst_1) (fun (_x : MulEquiv.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1) => α -> β) (MulEquiv.hasCoeToFun.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1) (Equiv.mulEquiv.{u1, u2} α β e _inst_1) a) (coeFn.{max 1 (max (succ u1) (succ u2)) (succ u2) (succ u1), max (succ u1) (succ u2)} (Equiv.{succ u1, succ u2} α β) (fun (_x : Equiv.{succ u1, succ u2} α β) => α -> β) (Equiv.hasCoeToFun.{succ u1, succ u2} α β) e a)
but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) [_inst_1 : Mul.{u2} β] (a : α), Eq.{succ u2} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) a) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (let mul : Mul.{u1} α := Equiv.Mul.{u1, u2} α β e _inst_1; MulEquiv.{u1, u2} α β mul _inst_1) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u1) (succ u2), succ u1, succ u2} (let mul : Mul.{u1} α := Equiv.Mul.{u1, u2} α β e _inst_1; MulEquiv.{u1, u2} α β mul _inst_1) α β (EquivLike.toEmbeddingLike.{max (succ u1) (succ u2), succ u1, succ u2} (let mul : Mul.{u1} α := Equiv.Mul.{u1, u2} α β e _inst_1; MulEquiv.{u1, u2} α β mul _inst_1) α β (MulEquivClass.toEquivLike.{max u1 u2, u1, u2} (let mul : Mul.{u1} α := Equiv.Mul.{u1, u2} α β e _inst_1; MulEquiv.{u1, u2} α β mul _inst_1) α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1 (MulEquiv.instMulEquivClassMulEquiv.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1)))) (Equiv.mulEquiv.{u1, u2} α β e _inst_1) a) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (Equiv.{succ u1, succ u2} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u2} α β) e a)
+ forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) [_inst_1 : Mul.{u2} β] (a : α), Eq.{succ u2} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) a) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (MulEquiv.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u1) (succ u2), succ u1, succ u2} (MulEquiv.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1) α β (EquivLike.toEmbeddingLike.{max (succ u1) (succ u2), succ u1, succ u2} (MulEquiv.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1) α β (MulEquivClass.toEquivLike.{max u1 u2, u1, u2} (MulEquiv.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1) α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1 (MulEquiv.instMulEquivClassMulEquiv.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1)))) (Equiv.mulEquiv.{u1, u2} α β e _inst_1) a) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (Equiv.{succ u1, succ u2} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u2} α β) e a)
Case conversion may be inaccurate. Consider using '#align equiv.mul_equiv_apply Equiv.mulEquiv_applyₓ'. -/
@[simp, to_additive]
theorem mulEquiv_apply (e : α ≃ β) [Mul β] (a : α) : (mulEquiv e) a = e a :=
@@ -190,7 +190,7 @@ theorem mulEquiv_apply (e : α ≃ β) [Mul β] (a : α) : (mulEquiv e) a = e a
lean 3 declaration is
forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) [_inst_1 : Mul.{u2} β] (b : β), let _inst : Mul.{u1} α := Equiv.Mul.{u1, u2} α β e _inst_1; Eq.{succ u1} α (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) (fun (_x : MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) => β -> α) (MulEquiv.hasCoeToFun.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) (MulEquiv.symm.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1 (Equiv.mulEquiv.{u1, u2} α β e _inst_1)) b) (coeFn.{max 1 (max (succ u2) (succ u1)) (succ u1) (succ u2), max (succ u2) (succ u1)} (Equiv.{succ u2, succ u1} β α) (fun (_x : Equiv.{succ u2, succ u1} β α) => β -> α) (Equiv.hasCoeToFun.{succ u2, succ u1} β α) (Equiv.symm.{succ u1, succ u2} α β e) b)
but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) [_inst_1 : Mul.{u2} β] (b : β), Eq.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : β) => α) b) (FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) β (fun (a : β) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : β) => α) a) (EmbeddingLike.toFunLike.{max (succ u1) (succ u2), succ u2, succ u1} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) β α (EquivLike.toEmbeddingLike.{max (succ u1) (succ u2), succ u2, succ u1} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) β α (MulEquivClass.toEquivLike.{max u1 u2, u2, u1} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1) (MulEquiv.instMulEquivClassMulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1))))) (MulEquiv.symm.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1 (Equiv.mulEquiv.{u1, u2} α β e _inst_1)) b) (FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (Equiv.{succ u2, succ u1} β α) β (fun (a : β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : β) => α) a) (Equiv.instFunLikeEquiv.{succ u2, succ u1} β α) (Equiv.symm.{succ u1, succ u2} α β e) b)
+ forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) [_inst_1 : Mul.{u2} β] (b : β), Eq.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : β) => α) b) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) β (fun (a : β) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : β) => α) a) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) β α (EquivLike.toEmbeddingLike.{max (succ u2) (succ u1), succ u2, succ u1} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) β α (MulEquivClass.toEquivLike.{max u2 u1, u2, u1} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1) (MulEquiv.instMulEquivClassMulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1))))) (MulEquiv.symm.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1 (Equiv.mulEquiv.{u1, u2} α β e _inst_1)) b) (FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (Equiv.{succ u2, succ u1} β α) β (fun (a : β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : β) => α) a) (Equiv.instFunLikeEquiv.{succ u2, succ u1} β α) (Equiv.symm.{succ u1, succ u2} α β e) b)
Case conversion may be inaccurate. Consider using '#align equiv.mul_equiv_symm_apply Equiv.mulEquiv_symm_applyₓ'. -/
@[to_additive]
theorem mulEquiv_symm_apply (e : α ≃ β) [Mul β] (b : β) :
mathlib commit https://github.com/leanprover-community/mathlib/commit/52932b3a083d4142e78a15dc928084a22fea9ba0
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl
! This file was ported from Lean 3 source module logic.equiv.transfer_instance
-! leanprover-community/mathlib commit ec1c7d810034d4202b0dd239112d1792be9f6fdc
+! leanprover-community/mathlib commit 86d1873c01a723aba6788f0b9051ae3d23b4c1c3
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -15,6 +15,9 @@ import Mathbin.Logic.Equiv.Defs
/-!
# Transfer algebraic structures across `equiv`s
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
In this file we prove theorems of the following form: if `β` has a
group structure and `α ≃ β` then `α` has a group structure, and
similarly for monoids, semigroups, rings, integral domains, fields and
mathlib commit https://github.com/leanprover-community/mathlib/commit/cd8fafa2fac98e1a67097e8a91ad9901cfde48af
@@ -43,81 +43,114 @@ section Instances
variable (e : α ≃ β)
+#print Equiv.One /-
/-- Transfer `has_one` across an `equiv` -/
@[reducible, to_additive "Transfer `has_zero` across an `equiv`"]
-protected def hasOne [One β] : One α :=
+protected def One [One β] : One α :=
⟨e.symm 1⟩
-#align equiv.has_one Equiv.hasOne
-#align equiv.has_zero Equiv.hasZero
+#align equiv.has_one Equiv.One
+#align equiv.has_zero Equiv.Zero
+-/
+#print Equiv.one_def /-
@[to_additive]
-theorem one_def [One β] : @One.one _ (Equiv.hasOne e) = e.symm 1 :=
+theorem one_def [One β] : @One.one _ (Equiv.One e) = e.symm 1 :=
rfl
#align equiv.one_def Equiv.one_def
#align equiv.zero_def Equiv.zero_def
+-/
+#print Equiv.Mul /-
/-- Transfer `has_mul` across an `equiv` -/
@[reducible, to_additive "Transfer `has_add` across an `equiv`"]
-protected def hasMul [Mul β] : Mul α :=
+protected def Mul [Mul β] : Mul α :=
⟨fun x y => e.symm (e x * e y)⟩
-#align equiv.has_mul Equiv.hasMul
-#align equiv.has_add Equiv.hasAdd
+#align equiv.has_mul Equiv.Mul
+#align equiv.has_add Equiv.Add
+-/
+#print Equiv.mul_def /-
@[to_additive]
-theorem mul_def [Mul β] (x y : α) : @Mul.mul _ (Equiv.hasMul e) x y = e.symm (e x * e y) :=
+theorem mul_def [Mul β] (x y : α) : @Mul.mul _ (Equiv.Mul e) x y = e.symm (e x * e y) :=
rfl
#align equiv.mul_def Equiv.mul_def
#align equiv.add_def Equiv.add_def
+-/
+#print Equiv.Div /-
/-- Transfer `has_div` across an `equiv` -/
@[reducible, to_additive "Transfer `has_sub` across an `equiv`"]
-protected def hasDiv [Div β] : Div α :=
+protected def Div [Div β] : Div α :=
⟨fun x y => e.symm (e x / e y)⟩
-#align equiv.has_div Equiv.hasDiv
-#align equiv.has_sub Equiv.hasSub
+#align equiv.has_div Equiv.Div
+#align equiv.has_sub Equiv.Sub
+-/
+#print Equiv.div_def /-
@[to_additive]
-theorem div_def [Div β] (x y : α) : @Div.div _ (Equiv.hasDiv e) x y = e.symm (e x / e y) :=
+theorem div_def [Div β] (x y : α) : @Div.div _ (Equiv.Div e) x y = e.symm (e x / e y) :=
rfl
#align equiv.div_def Equiv.div_def
#align equiv.sub_def Equiv.sub_def
+-/
+#print Equiv.Inv /-
/-- Transfer `has_inv` across an `equiv` -/
@[reducible, to_additive "Transfer `has_neg` across an `equiv`"]
-protected def hasInv [Inv β] : Inv α :=
+protected def Inv [Inv β] : Inv α :=
⟨fun x => e.symm (e x)⁻¹⟩
-#align equiv.has_inv Equiv.hasInv
-#align equiv.has_neg Equiv.hasNeg
+#align equiv.has_inv Equiv.Inv
+#align equiv.has_neg Equiv.Neg
+-/
+#print Equiv.inv_def /-
@[to_additive]
-theorem inv_def [Inv β] (x : α) : @Inv.inv _ (Equiv.hasInv e) x = e.symm (e x)⁻¹ :=
+theorem inv_def [Inv β] (x : α) : @Inv.inv _ (Equiv.Inv e) x = e.symm (e x)⁻¹ :=
rfl
#align equiv.inv_def Equiv.inv_def
#align equiv.neg_def Equiv.neg_def
+-/
+#print Equiv.SMul /-
/-- Transfer `has_smul` across an `equiv` -/
@[reducible]
-protected def hasSmul (R : Type _) [SMul R β] : SMul R α :=
+protected def SMul (R : Type _) [SMul R β] : SMul R α :=
⟨fun r x => e.symm (r • e x)⟩
-#align equiv.has_smul Equiv.hasSmul
+#align equiv.has_smul Equiv.SMul
+-/
+/- warning: equiv.smul_def -> Equiv.smul_def is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) {R : Type.{u3}} [_inst_1 : SMul.{u3, u2} R β] (r : R) (x : α), Eq.{succ u1} α (SMul.smul.{u3, u1} R α (Equiv.SMul.{u1, u2, u3} α β e R _inst_1) r x) (coeFn.{max 1 (max (succ u2) (succ u1)) (succ u1) (succ u2), max (succ u2) (succ u1)} (Equiv.{succ u2, succ u1} β α) (fun (_x : Equiv.{succ u2, succ u1} β α) => β -> α) (Equiv.hasCoeToFun.{succ u2, succ u1} β α) (Equiv.symm.{succ u1, succ u2} α β e) (SMul.smul.{u3, u2} R β _inst_1 r (coeFn.{max 1 (max (succ u1) (succ u2)) (succ u2) (succ u1), max (succ u1) (succ u2)} (Equiv.{succ u1, succ u2} α β) (fun (_x : Equiv.{succ u1, succ u2} α β) => α -> β) (Equiv.hasCoeToFun.{succ u1, succ u2} α β) e x)))
+but is expected to have type
+ forall {α : Type.{u2}} {β : Type.{u3}} (e : Equiv.{succ u2, succ u3} α β) {R : Type.{u1}} [_inst_1 : SMul.{u1, u3} R β] (r : R) (x : α), Eq.{succ u2} α (HSMul.hSMul.{u1, u2, u2} R α α (instHSMul.{u1, u2} R α (Equiv.SMul.{u2, u3, u1} α β e R _inst_1)) r x) (FunLike.coe.{max (succ u2) (succ u3), succ u3, succ u2} (Equiv.{succ u3, succ u2} β α) β (fun (_x : β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : β) => α) _x) (Equiv.instFunLikeEquiv.{succ u3, succ u2} β α) (Equiv.symm.{succ u2, succ u3} α β e) (HSMul.hSMul.{u1, u3, u3} R ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => β) x) ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => β) x) (instHSMul.{u1, u3} R ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => β) x) _inst_1) r (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (Equiv.{succ u2, succ u3} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => β) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u3} α β) e x)))
+Case conversion may be inaccurate. Consider using '#align equiv.smul_def Equiv.smul_defₓ'. -/
theorem smul_def {R : Type _} [SMul R β] (r : R) (x : α) :
@SMul.smul _ _ (e.SMul R) r x = e.symm (r • e x) :=
rfl
#align equiv.smul_def Equiv.smul_def
+#print Equiv.Pow /-
/-- Transfer `has_pow` across an `equiv` -/
@[reducible, to_additive SMul]
-protected def hasPow (N : Type _) [Pow β N] : Pow α N :=
+protected def Pow (N : Type _) [Pow β N] : Pow α N :=
⟨fun x n => e.symm (e x ^ n)⟩
-#align equiv.has_pow Equiv.hasPow
-#align equiv.has_smul Equiv.hasSmul
+#align equiv.has_pow Equiv.Pow
+#align equiv.has_smul Equiv.SMul
+-/
+/- warning: equiv.pow_def -> Equiv.pow_def is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) {N : Type.{u3}} [_inst_1 : Pow.{u2, u3} β N] (n : N) (x : α), Eq.{succ u1} α (HPow.hPow.{u1, u3, u1} α N α (instHPow.{u1, u3} α N (Equiv.Pow.{u1, u2, u3} α β e N _inst_1)) x n) (coeFn.{max 1 (max (succ u2) (succ u1)) (succ u1) (succ u2), max (succ u2) (succ u1)} (Equiv.{succ u2, succ u1} β α) (fun (_x : Equiv.{succ u2, succ u1} β α) => β -> α) (Equiv.hasCoeToFun.{succ u2, succ u1} β α) (Equiv.symm.{succ u1, succ u2} α β e) (HPow.hPow.{u2, u3, u2} β N β (instHPow.{u2, u3} β N _inst_1) (coeFn.{max 1 (max (succ u1) (succ u2)) (succ u2) (succ u1), max (succ u1) (succ u2)} (Equiv.{succ u1, succ u2} α β) (fun (_x : Equiv.{succ u1, succ u2} α β) => α -> β) (Equiv.hasCoeToFun.{succ u1, succ u2} α β) e x) n))
+but is expected to have type
+ forall {α : Type.{u2}} {β : Type.{u3}} (e : Equiv.{succ u2, succ u3} α β) {N : Type.{u1}} [_inst_1 : Pow.{u3, u1} β N] (n : N) (x : α), Eq.{succ u2} α (HPow.hPow.{u2, u1, u2} α N α (instHPow.{u2, u1} α N (Equiv.Pow.{u2, u3, u1} α β e N _inst_1)) x n) (FunLike.coe.{max (succ u2) (succ u3), succ u3, succ u2} (Equiv.{succ u3, succ u2} β α) β (fun (_x : β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : β) => α) _x) (Equiv.instFunLikeEquiv.{succ u3, succ u2} β α) (Equiv.symm.{succ u2, succ u3} α β e) (HPow.hPow.{u3, u1, u3} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => β) x) N ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => β) x) (instHPow.{u3, u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => β) x) N _inst_1) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (Equiv.{succ u2, succ u3} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => β) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u3} α β) e x) n))
+Case conversion may be inaccurate. Consider using '#align equiv.pow_def Equiv.pow_defₓ'. -/
theorem pow_def {N : Type _} [Pow β N] (n : N) (x : α) :
@Pow.pow _ _ (e.Pow N) x n = e.symm (e x ^ n) :=
rfl
#align equiv.pow_def Equiv.pow_def
+#print Equiv.mulEquiv /-
/-- An equivalence `e : α ≃ β` gives a multiplicative equivalence `α ≃* β`
where the multiplicative structure on `α` is
the one obtained by transporting a multiplicative structure on `β` back along `e`.
@@ -125,7 +158,7 @@ the one obtained by transporting a multiplicative structure on `β` back along `
@[to_additive
"An equivalence `e : α ≃ β` gives a additive equivalence `α ≃+ β`\nwhere the additive structure on `α` is\nthe one obtained by transporting an additive structure on `β` back along `e`."]
def mulEquiv (e : α ≃ β) [Mul β] :
- letI := Equiv.hasMul e
+ letI := Equiv.Mul e
α ≃* β :=
by
intros
@@ -136,29 +169,48 @@ def mulEquiv (e : α ≃ β) [Mul β] :
simp }
#align equiv.mul_equiv Equiv.mulEquiv
#align equiv.add_equiv Equiv.addEquiv
+-/
+/- warning: equiv.mul_equiv_apply -> Equiv.mulEquiv_apply is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) [_inst_1 : Mul.{u2} β] (a : α), Eq.{succ u2} β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (let _inst : Mul.{u1} α := Equiv.Mul.{u1, u2} α β e _inst_1; MulEquiv.{u1, u2} α β _inst _inst_1) (fun (_x : MulEquiv.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1) => α -> β) (MulEquiv.hasCoeToFun.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1) (Equiv.mulEquiv.{u1, u2} α β e _inst_1) a) (coeFn.{max 1 (max (succ u1) (succ u2)) (succ u2) (succ u1), max (succ u1) (succ u2)} (Equiv.{succ u1, succ u2} α β) (fun (_x : Equiv.{succ u1, succ u2} α β) => α -> β) (Equiv.hasCoeToFun.{succ u1, succ u2} α β) e a)
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) [_inst_1 : Mul.{u2} β] (a : α), Eq.{succ u2} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) a) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (let mul : Mul.{u1} α := Equiv.Mul.{u1, u2} α β e _inst_1; MulEquiv.{u1, u2} α β mul _inst_1) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u1) (succ u2), succ u1, succ u2} (let mul : Mul.{u1} α := Equiv.Mul.{u1, u2} α β e _inst_1; MulEquiv.{u1, u2} α β mul _inst_1) α β (EquivLike.toEmbeddingLike.{max (succ u1) (succ u2), succ u1, succ u2} (let mul : Mul.{u1} α := Equiv.Mul.{u1, u2} α β e _inst_1; MulEquiv.{u1, u2} α β mul _inst_1) α β (MulEquivClass.toEquivLike.{max u1 u2, u1, u2} (let mul : Mul.{u1} α := Equiv.Mul.{u1, u2} α β e _inst_1; MulEquiv.{u1, u2} α β mul _inst_1) α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1 (MulEquiv.instMulEquivClassMulEquiv.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1)))) (Equiv.mulEquiv.{u1, u2} α β e _inst_1) a) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (Equiv.{succ u1, succ u2} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u2} α β) e a)
+Case conversion may be inaccurate. Consider using '#align equiv.mul_equiv_apply Equiv.mulEquiv_applyₓ'. -/
@[simp, to_additive]
theorem mulEquiv_apply (e : α ≃ β) [Mul β] (a : α) : (mulEquiv e) a = e a :=
rfl
#align equiv.mul_equiv_apply Equiv.mulEquiv_apply
-#align equiv.add_equiv_apply Equiv.add_equiv_apply
-
+#align equiv.add_equiv_apply Equiv.addEquiv_apply
+
+/- warning: equiv.mul_equiv_symm_apply -> Equiv.mulEquiv_symm_apply is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) [_inst_1 : Mul.{u2} β] (b : β), let _inst : Mul.{u1} α := Equiv.Mul.{u1, u2} α β e _inst_1; Eq.{succ u1} α (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) (fun (_x : MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) => β -> α) (MulEquiv.hasCoeToFun.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) (MulEquiv.symm.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1 (Equiv.mulEquiv.{u1, u2} α β e _inst_1)) b) (coeFn.{max 1 (max (succ u2) (succ u1)) (succ u1) (succ u2), max (succ u2) (succ u1)} (Equiv.{succ u2, succ u1} β α) (fun (_x : Equiv.{succ u2, succ u1} β α) => β -> α) (Equiv.hasCoeToFun.{succ u2, succ u1} β α) (Equiv.symm.{succ u1, succ u2} α β e) b)
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) [_inst_1 : Mul.{u2} β] (b : β), Eq.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : β) => α) b) (FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) β (fun (a : β) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : β) => α) a) (EmbeddingLike.toFunLike.{max (succ u1) (succ u2), succ u2, succ u1} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) β α (EquivLike.toEmbeddingLike.{max (succ u1) (succ u2), succ u2, succ u1} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) β α (MulEquivClass.toEquivLike.{max u1 u2, u2, u1} (MulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1)) β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1) (MulEquiv.instMulEquivClassMulEquiv.{u2, u1} β α _inst_1 (Equiv.Mul.{u1, u2} α β e _inst_1))))) (MulEquiv.symm.{u1, u2} α β (Equiv.Mul.{u1, u2} α β e _inst_1) _inst_1 (Equiv.mulEquiv.{u1, u2} α β e _inst_1)) b) (FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (Equiv.{succ u2, succ u1} β α) β (fun (a : β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : β) => α) a) (Equiv.instFunLikeEquiv.{succ u2, succ u1} β α) (Equiv.symm.{succ u1, succ u2} α β e) b)
+Case conversion may be inaccurate. Consider using '#align equiv.mul_equiv_symm_apply Equiv.mulEquiv_symm_applyₓ'. -/
@[to_additive]
theorem mulEquiv_symm_apply (e : α ≃ β) [Mul β] (b : β) :
- letI := Equiv.hasMul e
+ letI := Equiv.Mul e
(MulEquiv e).symm b = e.symm b :=
by intros ; rfl
#align equiv.mul_equiv_symm_apply Equiv.mulEquiv_symm_apply
-#align equiv.add_equiv_symm_apply Equiv.add_equiv_symm_apply
-
+#align equiv.add_equiv_symm_apply Equiv.addEquiv_symm_apply
+
+/- warning: equiv.ring_equiv -> Equiv.ringEquiv is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) [_inst_1 : Add.{u2} β] [_inst_2 : Mul.{u2} β], let _inst : Add.{u1} α := Equiv.Add.{u1, u2} α β e _inst_1; let _inst_3 : Mul.{u1} α := Equiv.Mul.{u1, u2} α β e _inst_2; RingEquiv.{u1, u2} α β _inst_3 _inst _inst_2 _inst_1
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β) [_inst_1 : Add.{u2} β] [_inst_2 : Mul.{u2} β], let _inst : Add.{u1} α := Equiv.Add.{u1, u2} α β e _inst_1; let _inst_3 : Mul.{u1} α := Equiv.Mul.{u1, u2} α β e _inst_2; RingEquiv.{u1, u2} α β _inst_3 _inst_2 _inst _inst_1
+Case conversion may be inaccurate. Consider using '#align equiv.ring_equiv Equiv.ringEquivₓ'. -/
/-- An equivalence `e : α ≃ β` gives a ring equivalence `α ≃+* β`
where the ring structure on `α` is
the one obtained by transporting a ring structure on `β` back along `e`.
-/
def ringEquiv (e : α ≃ β) [Add β] [Mul β] :
by
- letI := Equiv.hasAdd e
- letI := Equiv.hasMul e
+ letI := Equiv.Add e
+ letI := Equiv.Mul e
exact α ≃+* β := by
intros
exact
@@ -172,18 +224,23 @@ def ringEquiv (e : α ≃ β) [Add β] [Mul β] :
simp }
#align equiv.ring_equiv Equiv.ringEquiv
+#print Equiv.ringEquiv_apply /-
@[simp]
theorem ringEquiv_apply (e : α ≃ β) [Add β] [Mul β] (a : α) : (ringEquiv e) a = e a :=
rfl
#align equiv.ring_equiv_apply Equiv.ringEquiv_apply
+-/
+#print Equiv.ringEquiv_symm_apply /-
theorem ringEquiv_symm_apply (e : α ≃ β) [Add β] [Mul β] (b : β) :
by
- letI := Equiv.hasAdd e
- letI := Equiv.hasMul e
+ letI := Equiv.Add e
+ letI := Equiv.Mul e
exact (RingEquiv e).symm b = e.symm b := by intros ; rfl
#align equiv.ring_equiv_symm_apply Equiv.ringEquiv_symm_apply
+-/
+#print Equiv.semigroup /-
/-- Transfer `semigroup` across an `equiv` -/
@[reducible, to_additive "Transfer `add_semigroup` across an `equiv`"]
protected def semigroup [Semigroup β] : Semigroup α :=
@@ -192,7 +249,9 @@ protected def semigroup [Semigroup β] : Semigroup α :=
skip <;> apply e.injective.semigroup _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.semigroup Equiv.semigroup
#align equiv.add_semigroup Equiv.addSemigroup
+-/
+#print Equiv.semigroupWithZero /-
/-- Transfer `semigroup_with_zero` across an `equiv` -/
@[reducible]
protected def semigroupWithZero [SemigroupWithZero β] : SemigroupWithZero α :=
@@ -201,7 +260,9 @@ protected def semigroupWithZero [SemigroupWithZero β] : SemigroupWithZero α :=
let zero := e.Zero
skip <;> apply e.injective.semigroup_with_zero _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.semigroup_with_zero Equiv.semigroupWithZero
+-/
+#print Equiv.commSemigroup /-
/-- Transfer `comm_semigroup` across an `equiv` -/
@[reducible, to_additive "Transfer `add_comm_semigroup` across an `equiv`"]
protected def commSemigroup [CommSemigroup β] : CommSemigroup α :=
@@ -210,7 +271,9 @@ protected def commSemigroup [CommSemigroup β] : CommSemigroup α :=
skip <;> apply e.injective.comm_semigroup _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.comm_semigroup Equiv.commSemigroup
#align equiv.add_comm_semigroup Equiv.addCommSemigroup
+-/
+#print Equiv.mulZeroClass /-
/-- Transfer `mul_zero_class` across an `equiv` -/
@[reducible]
protected def mulZeroClass [MulZeroClass β] : MulZeroClass α :=
@@ -219,7 +282,9 @@ protected def mulZeroClass [MulZeroClass β] : MulZeroClass α :=
let mul := e.Mul
skip <;> apply e.injective.mul_zero_class _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.mul_zero_class Equiv.mulZeroClass
+-/
+#print Equiv.mulOneClass /-
/-- Transfer `mul_one_class` across an `equiv` -/
@[reducible, to_additive "Transfer `add_zero_class` across an `equiv`"]
protected def mulOneClass [MulOneClass β] : MulOneClass α :=
@@ -229,7 +294,9 @@ protected def mulOneClass [MulOneClass β] : MulOneClass α :=
skip <;> apply e.injective.mul_one_class _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.mul_one_class Equiv.mulOneClass
#align equiv.add_zero_class Equiv.addZeroClass
+-/
+#print Equiv.mulZeroOneClass /-
/-- Transfer `mul_zero_one_class` across an `equiv` -/
@[reducible]
protected def mulZeroOneClass [MulZeroOneClass β] : MulZeroOneClass α :=
@@ -239,7 +306,9 @@ protected def mulZeroOneClass [MulZeroOneClass β] : MulZeroOneClass α :=
let mul := e.Mul
skip <;> apply e.injective.mul_zero_one_class _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.mul_zero_one_class Equiv.mulZeroOneClass
+-/
+#print Equiv.monoid /-
/-- Transfer `monoid` across an `equiv` -/
@[reducible, to_additive "Transfer `add_monoid` across an `equiv`"]
protected def monoid [Monoid β] : Monoid α :=
@@ -250,7 +319,9 @@ protected def monoid [Monoid β] : Monoid α :=
skip <;> apply e.injective.monoid _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.monoid Equiv.monoid
#align equiv.add_monoid Equiv.addMonoid
+-/
+#print Equiv.commMonoid /-
/-- Transfer `comm_monoid` across an `equiv` -/
@[reducible, to_additive "Transfer `add_comm_monoid` across an `equiv`"]
protected def commMonoid [CommMonoid β] : CommMonoid α :=
@@ -261,7 +332,9 @@ protected def commMonoid [CommMonoid β] : CommMonoid α :=
skip <;> apply e.injective.comm_monoid _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.comm_monoid Equiv.commMonoid
#align equiv.add_comm_monoid Equiv.addCommMonoid
+-/
+#print Equiv.group /-
/-- Transfer `group` across an `equiv` -/
@[reducible, to_additive "Transfer `add_group` across an `equiv`"]
protected def group [Group β] : Group α :=
@@ -275,7 +348,9 @@ protected def group [Group β] : Group α :=
skip <;> apply e.injective.group _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.group Equiv.group
#align equiv.add_group Equiv.addGroup
+-/
+#print Equiv.commGroup /-
/-- Transfer `comm_group` across an `equiv` -/
@[reducible, to_additive "Transfer `add_comm_group` across an `equiv`"]
protected def commGroup [CommGroup β] : CommGroup α :=
@@ -289,7 +364,9 @@ protected def commGroup [CommGroup β] : CommGroup α :=
skip <;> apply e.injective.comm_group _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.comm_group Equiv.commGroup
#align equiv.add_comm_group Equiv.addCommGroup
+-/
+#print Equiv.nonUnitalNonAssocSemiring /-
/-- Transfer `non_unital_non_assoc_semiring` across an `equiv` -/
@[reducible]
protected def nonUnitalNonAssocSemiring [NonUnitalNonAssocSemiring β] :
@@ -301,7 +378,9 @@ protected def nonUnitalNonAssocSemiring [NonUnitalNonAssocSemiring β] :
skip <;> apply e.injective.non_unital_non_assoc_semiring _ <;> intros <;>
exact e.apply_symm_apply _
#align equiv.non_unital_non_assoc_semiring Equiv.nonUnitalNonAssocSemiring
+-/
+#print Equiv.nonUnitalSemiring /-
/-- Transfer `non_unital_semiring` across an `equiv` -/
@[reducible]
protected def nonUnitalSemiring [NonUnitalSemiring β] : NonUnitalSemiring α :=
@@ -312,7 +391,9 @@ protected def nonUnitalSemiring [NonUnitalSemiring β] : NonUnitalSemiring α :=
let nsmul := e.SMul ℕ
skip <;> apply e.injective.non_unital_semiring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.non_unital_semiring Equiv.nonUnitalSemiring
+-/
+#print Equiv.addMonoidWithOne /-
/-- Transfer `add_monoid_with_one` across an `equiv` -/
@[reducible]
protected def addMonoidWithOne [AddMonoidWithOne β] : AddMonoidWithOne α :=
@@ -321,7 +402,9 @@ protected def addMonoidWithOne [AddMonoidWithOne β] : AddMonoidWithOne α :=
natCast_zero := show e.symm _ = _ by simp [zero_def]
natCast_succ := fun n => show e.symm _ = e.symm (e (e.symm _) + _) by simp [add_def, one_def] }
#align equiv.add_monoid_with_one Equiv.addMonoidWithOne
+-/
+#print Equiv.addGroupWithOne /-
/-- Transfer `add_group_with_one` across an `equiv` -/
@[reducible]
protected def addGroupWithOne [AddGroupWithOne β] : AddGroupWithOne α :=
@@ -332,7 +415,9 @@ protected def addGroupWithOne [AddGroupWithOne β] : AddGroupWithOne α :=
intCast_negSucc := fun n =>
congr_arg e.symm <| (Int.cast_negSucc _).trans <| congr_arg _ (e.apply_symm_apply _).symm }
#align equiv.add_group_with_one Equiv.addGroupWithOne
+-/
+#print Equiv.nonAssocSemiring /-
/-- Transfer `non_assoc_semiring` across an `equiv` -/
@[reducible]
protected def nonAssocSemiring [NonAssocSemiring β] : NonAssocSemiring α :=
@@ -341,7 +426,9 @@ protected def nonAssocSemiring [NonAssocSemiring β] : NonAssocSemiring α :=
let add_monoid_with_one := e.AddMonoidWithOne
skip <;> apply e.injective.non_assoc_semiring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.non_assoc_semiring Equiv.nonAssocSemiring
+-/
+#print Equiv.semiring /-
/-- Transfer `semiring` across an `equiv` -/
@[reducible]
protected def semiring [Semiring β] : Semiring α :=
@@ -351,7 +438,9 @@ protected def semiring [Semiring β] : Semiring α :=
let npow := e.Pow ℕ
skip <;> apply e.injective.semiring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.semiring Equiv.semiring
+-/
+#print Equiv.nonUnitalCommSemiring /-
/-- Transfer `non_unital_comm_semiring` across an `equiv` -/
@[reducible]
protected def nonUnitalCommSemiring [NonUnitalCommSemiring β] : NonUnitalCommSemiring α :=
@@ -362,7 +451,9 @@ protected def nonUnitalCommSemiring [NonUnitalCommSemiring β] : NonUnitalCommSe
let nsmul := e.SMul ℕ
skip <;> apply e.injective.non_unital_comm_semiring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.non_unital_comm_semiring Equiv.nonUnitalCommSemiring
+-/
+#print Equiv.commSemiring /-
/-- Transfer `comm_semiring` across an `equiv` -/
@[reducible]
protected def commSemiring [CommSemiring β] : CommSemiring α :=
@@ -372,7 +463,9 @@ protected def commSemiring [CommSemiring β] : CommSemiring α :=
let npow := e.Pow ℕ
skip <;> apply e.injective.comm_semiring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.comm_semiring Equiv.commSemiring
+-/
+#print Equiv.nonUnitalNonAssocRing /-
/-- Transfer `non_unital_non_assoc_ring` across an `equiv` -/
@[reducible]
protected def nonUnitalNonAssocRing [NonUnitalNonAssocRing β] : NonUnitalNonAssocRing α :=
@@ -386,7 +479,9 @@ protected def nonUnitalNonAssocRing [NonUnitalNonAssocRing β] : NonUnitalNonAss
let zsmul := e.SMul ℤ
skip <;> apply e.injective.non_unital_non_assoc_ring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.non_unital_non_assoc_ring Equiv.nonUnitalNonAssocRing
+-/
+#print Equiv.nonUnitalRing /-
/-- Transfer `non_unital_ring` across an `equiv` -/
@[reducible]
protected def nonUnitalRing [NonUnitalRing β] : NonUnitalRing α :=
@@ -400,7 +495,9 @@ protected def nonUnitalRing [NonUnitalRing β] : NonUnitalRing α :=
let zsmul := e.SMul ℤ
skip <;> apply e.injective.non_unital_ring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.non_unital_ring Equiv.nonUnitalRing
+-/
+#print Equiv.nonAssocRing /-
/-- Transfer `non_assoc_ring` across an `equiv` -/
@[reducible]
protected def nonAssocRing [NonAssocRing β] : NonAssocRing α :=
@@ -409,7 +506,9 @@ protected def nonAssocRing [NonAssocRing β] : NonAssocRing α :=
let mul := e.Mul
skip <;> apply e.injective.non_assoc_ring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.non_assoc_ring Equiv.nonAssocRing
+-/
+#print Equiv.ring /-
/-- Transfer `ring` across an `equiv` -/
@[reducible]
protected def ring [Ring β] : Ring α := by
@@ -418,7 +517,9 @@ protected def ring [Ring β] : Ring α := by
let npow := e.Pow ℕ
skip <;> apply e.injective.ring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.ring Equiv.ring
+-/
+#print Equiv.nonUnitalCommRing /-
/-- Transfer `non_unital_comm_ring` across an `equiv` -/
@[reducible]
protected def nonUnitalCommRing [NonUnitalCommRing β] : NonUnitalCommRing α :=
@@ -432,7 +533,9 @@ protected def nonUnitalCommRing [NonUnitalCommRing β] : NonUnitalCommRing α :=
let zsmul := e.SMul ℤ
skip <;> apply e.injective.non_unital_comm_ring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.non_unital_comm_ring Equiv.nonUnitalCommRing
+-/
+#print Equiv.commRing /-
/-- Transfer `comm_ring` across an `equiv` -/
@[reducible]
protected def commRing [CommRing β] : CommRing α :=
@@ -442,24 +545,40 @@ protected def commRing [CommRing β] : CommRing α :=
let npow := e.Pow ℕ
skip <;> apply e.injective.comm_ring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.comm_ring Equiv.commRing
+-/
+#print Equiv.nontrivial /-
/-- Transfer `nontrivial` across an `equiv` -/
@[reducible]
protected theorem nontrivial [Nontrivial β] : Nontrivial α :=
e.Surjective.Nontrivial
#align equiv.nontrivial Equiv.nontrivial
+-/
+/- warning: equiv.is_domain -> Equiv.isDomain is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Ring.{u1} α] [_inst_2 : Ring.{u2} β] [_inst_3 : IsDomain.{u2} β (Ring.toSemiring.{u2} β _inst_2)], (RingEquiv.{u1, u2} α β (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α _inst_1)) (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α _inst_1)) (Distrib.toHasMul.{u2} β (Ring.toDistrib.{u2} β _inst_2)) (Distrib.toHasAdd.{u2} β (Ring.toDistrib.{u2} β _inst_2))) -> (IsDomain.{u1} α (Ring.toSemiring.{u1} α _inst_1))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Ring.{u1} α] [_inst_2 : Ring.{u2} β] [_inst_3 : IsDomain.{u2} β (Ring.toSemiring.{u2} β _inst_2)], (RingEquiv.{u1, u2} α β (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1))) (NonUnitalNonAssocRing.toMul.{u2} β (NonAssocRing.toNonUnitalNonAssocRing.{u2} β (Ring.toNonAssocRing.{u2} β _inst_2))) (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1))))) (Distrib.toAdd.{u2} β (NonUnitalNonAssocSemiring.toDistrib.{u2} β (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} β (NonAssocRing.toNonUnitalNonAssocRing.{u2} β (Ring.toNonAssocRing.{u2} β _inst_2)))))) -> (IsDomain.{u1} α (Ring.toSemiring.{u1} α _inst_1))
+Case conversion may be inaccurate. Consider using '#align equiv.is_domain Equiv.isDomainₓ'. -/
/-- Transfer `is_domain` across an `equiv` -/
@[reducible]
protected theorem isDomain [Ring α] [Ring β] [IsDomain β] (e : α ≃+* β) : IsDomain α :=
Function.Injective.isDomain e.toRingHom e.Injective
#align equiv.is_domain Equiv.isDomain
+/- warning: equiv.has_rat_cast -> Equiv.RatCast is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}}, (Equiv.{succ u1, succ u2} α β) -> (forall [_inst_1 : HasRatCast.{u2} β], HasRatCast.{u1} α)
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}}, (Equiv.{succ u1, succ u2} α β) -> (forall [_inst_1 : RatCast.{u2} β], RatCast.{u1} α)
+Case conversion may be inaccurate. Consider using '#align equiv.has_rat_cast Equiv.RatCastₓ'. -/
/-- Transfer `has_rat_cast` across an `equiv` -/
@[reducible]
-protected def hasRatCast [HasRatCast β] : HasRatCast α where ratCast n := e.symm n
-#align equiv.has_rat_cast Equiv.hasRatCast
+protected def RatCast [HasRatCast β] : HasRatCast α where ratCast n := e.symm n
+#align equiv.has_rat_cast Equiv.RatCast
+#print Equiv.divisionRing /-
/-- Transfer `division_ring` across an `equiv` -/
@[reducible]
protected def divisionRing [DivisionRing β] : DivisionRing α :=
@@ -475,7 +594,9 @@ protected def divisionRing [DivisionRing β] : DivisionRing α :=
let qsmul := e.SMul ℚ
skip <;> apply e.injective.division_ring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.division_ring Equiv.divisionRing
+-/
+#print Equiv.field /-
/-- Transfer `field` across an `equiv` -/
@[reducible]
protected def field [Field β] : Field α :=
@@ -492,6 +613,7 @@ protected def field [Field β] : Field α :=
let qsmul := e.SMul ℚ
skip <;> apply e.injective.field _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.field Equiv.field
+-/
section R
@@ -503,6 +625,7 @@ section
variable [Monoid R]
+#print Equiv.mulAction /-
/-- Transfer `mul_action` across an `equiv` -/
@[reducible]
protected def mulAction (e : α ≃ β) [MulAction R β] : MulAction R α :=
@@ -510,7 +633,9 @@ protected def mulAction (e : α ≃ β) [MulAction R β] : MulAction R α :=
one_smul := by simp [smul_def]
mul_smul := by simp [smul_def, mul_smul] }
#align equiv.mul_action Equiv.mulAction
+-/
+#print Equiv.distribMulAction /-
/-- Transfer `distrib_mul_action` across an `equiv` -/
@[reducible]
protected def distribMulAction (e : α ≃ β) [AddCommMonoid β] :
@@ -525,6 +650,7 @@ protected def distribMulAction (e : α ≃ β) [AddCommMonoid β] :
smul_add := by simp [add_def, smul_def, smul_add] } :
DistribMulAction R α)
#align equiv.distrib_mul_action Equiv.distribMulAction
+-/
end
@@ -532,6 +658,7 @@ section
variable [Semiring R]
+#print Equiv.module /-
/-- Transfer `module` across an `equiv` -/
@[reducible]
protected def module (e : α ≃ β) [AddCommMonoid β] :
@@ -547,7 +674,9 @@ protected def module (e : α ≃ β) [AddCommMonoid β] :
add_smul := by simp [add_def, smul_def, add_smul] } :
Module R α)
#align equiv.module Equiv.module
+-/
+#print Equiv.linearEquiv /-
/-- An equivalence `e : α ≃ β` gives a linear equivalence `α ≃ₗ[R] β`
where the `R`-module structure on `α` is
the one obtained by transporting an `R`-module structure on `β` back along `e`.
@@ -565,6 +694,7 @@ def linearEquiv (e : α ≃ β) [AddCommMonoid β] [Module R β] :
simp
rfl }
#align equiv.linear_equiv Equiv.linearEquiv
+-/
end
@@ -572,6 +702,7 @@ section
variable [CommSemiring R]
+#print Equiv.algebra /-
/-- Transfer `algebra` across an `equiv` -/
@[reducible]
protected def algebra (e : α ≃ β) [Semiring β] :
@@ -591,7 +722,9 @@ protected def algebra (e : α ≃ β) [Semiring β] :
simp only [(RingEquiv e).map_mul]
simp [Algebra.commutes]
#align equiv.algebra Equiv.algebra
+-/
+#print Equiv.algEquiv /-
/-- An equivalence `e : α ≃ β` gives an algebra equivalence `α ≃ₐ[R] β`
where the `R`-algebra structure on `α` is
the one obtained by transporting an `R`-algebra structure on `β` back along `e`.
@@ -609,6 +742,7 @@ def algEquiv (e : α ≃ β) [Semiring β] [Algebra R β] :
simp
rfl }
#align equiv.alg_equiv Equiv.algEquiv
+-/
end
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce11c3c2a285bbe6937e26d9792fda4e51f3fe1a
@@ -4,14 +4,13 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl
! This file was ported from Lean 3 source module logic.equiv.transfer_instance
-! leanprover-community/mathlib commit 70fd9563a21e7b963887c9360bd29b2393e6225a
+! leanprover-community/mathlib commit ec1c7d810034d4202b0dd239112d1792be9f6fdc
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
-import Mathbin.Algebra.Algebra.Basic
+import Mathbin.Algebra.Algebra.Equiv
import Mathbin.Algebra.Field.Basic
import Mathbin.Logic.Equiv.Defs
-import Mathbin.RingTheory.Ideal.LocalRing
/-!
# Transfer algebraic structures across `equiv`s
@@ -619,14 +618,3 @@ end Instances
end Equiv
-namespace RingEquiv
-
-@[reducible]
-protected theorem localRing {A B : Type _} [CommSemiring A] [LocalRing A] [CommSemiring B]
- (e : A ≃+* B) : LocalRing B :=
- haveI := e.symm.to_equiv.nontrivial
- LocalRing.of_surjective (e : A →+* B) e.surjective
-#align ring_equiv.local_ring RingEquiv.localRing
-
-end RingEquiv
-
mathlib commit https://github.com/leanprover-community/mathlib/commit/3180fab693e2cee3bff62675571264cb8778b212
@@ -458,7 +458,7 @@ protected theorem isDomain [Ring α] [Ring β] [IsDomain β] (e : α ≃+* β) :
/-- Transfer `has_rat_cast` across an `equiv` -/
@[reducible]
-protected def hasRatCast [RatCast β] : RatCast α where ratCast n := e.symm n
+protected def hasRatCast [HasRatCast β] : HasRatCast α where ratCast n := e.symm n
#align equiv.has_rat_cast Equiv.hasRatCast
/-- Transfer `division_ring` across an `equiv` -/
@@ -472,7 +472,7 @@ protected def divisionRing [DivisionRing β] : DivisionRing α :=
let mul := e.Mul
let npow := e.Pow ℕ
let zpow := e.Pow ℤ
- let rat_cast := e.RatCast
+ let rat_cast := e.HasRatCast
let qsmul := e.SMul ℚ
skip <;> apply e.injective.division_ring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.division_ring Equiv.divisionRing
@@ -489,7 +489,7 @@ protected def field [Field β] : Field α :=
let mul := e.Mul
let npow := e.Pow ℕ
let zpow := e.Pow ℤ
- let rat_cast := e.RatCast
+ let rat_cast := e.HasRatCast
let qsmul := e.SMul ℚ
skip <;> apply e.injective.field _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.field Equiv.field
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
NNRat.cast
(#11203)
Define the canonical coercion from the nonnegative rationals to any division semiring.
From LeanAPAP
@@ -560,10 +560,16 @@ protected theorem isDomain [Ring α] [Ring β] [IsDomain β] (e : α ≃+* β) :
noncomputable instance [Small.{v} α] [Ring α] [IsDomain α] : IsDomain (Shrink.{v} α) :=
Equiv.isDomain (Shrink.ringEquiv α)
+/-- Transfer `NNRatCast` across an `Equiv` -/
+@[reducible] protected def nnratCast [NNRatCast β] : NNRatCast α where nnratCast q := e.symm q
+
/-- Transfer `RatCast` across an `Equiv` -/
@[reducible] protected def ratCast [RatCast β] : RatCast α where ratCast n := e.symm n
#align equiv.has_rat_cast Equiv.ratCast
+noncomputable instance _root_.Shrink.instNNRatCast [Small.{v} α] [NNRatCast α] :
+ NNRatCast (Shrink.{v} α) := (equivShrink α).symm.nnratCast
+
noncomputable instance _root_.Shrink.instRatCast [Small.{v} α] [RatCast α] :
RatCast (Shrink.{v} α) := (equivShrink α).symm.ratCast
@@ -576,7 +582,9 @@ protected def divisionRing [DivisionRing β] : DivisionRing α := by
let mul := e.mul
let npow := e.pow ℕ
let zpow := e.pow ℤ
+ let nnratCast := e.nnratCast
let ratCast := e.ratCast
+ let nnqsmul := e.smul ℚ≥0
let qsmul := e.smul ℚ
apply e.injective.divisionRing _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.division_ring Equiv.divisionRing
@@ -594,7 +602,9 @@ protected def field [Field β] : Field α := by
let mul := e.mul
let npow := e.pow ℕ
let zpow := e.pow ℤ
+ let nnratCast := e.nnratCast
let ratCast := e.ratCast
+ let nnqsmul := e.smul ℚ≥0
let qsmul := e.smul ℚ
apply e.injective.field _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.field Equiv.field
NNRat.cast
(#12360)
This is the parts of the diff of #11203 which don't mention NNRat.cast
.
where
notation.qsmul := _
instead of qsmul := qsmulRec _
to make the instances more robust to definition changes.qsmulRec
.qsmul
before ratCast_def
in instance declarations.rat_smul
to qsmul
.@@ -561,8 +561,7 @@ noncomputable instance [Small.{v} α] [Ring α] [IsDomain α] : IsDomain (Shrink
Equiv.isDomain (Shrink.ringEquiv α)
/-- Transfer `RatCast` across an `Equiv` -/
-@[reducible]
-protected def ratCast [RatCast β] : RatCast α where ratCast n := e.symm n
+@[reducible] protected def ratCast [RatCast β] : RatCast α where ratCast n := e.symm n
#align equiv.has_rat_cast Equiv.ratCast
noncomputable instance _root_.Shrink.instRatCast [Small.{v} α] [RatCast α] :
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.
@@ -562,11 +562,11 @@ noncomputable instance [Small.{v} α] [Ring α] [IsDomain α] : IsDomain (Shrink
/-- Transfer `RatCast` across an `Equiv` -/
@[reducible]
-protected def RatCast [RatCast β] : RatCast α where ratCast n := e.symm n
-#align equiv.has_rat_cast Equiv.RatCast
+protected def ratCast [RatCast β] : RatCast α where ratCast n := e.symm n
+#align equiv.has_rat_cast Equiv.ratCast
-noncomputable instance [Small.{v} α] [RatCast α] : RatCast (Shrink.{v} α) :=
- (equivShrink α).symm.RatCast
+noncomputable instance _root_.Shrink.instRatCast [Small.{v} α] [RatCast α] :
+ RatCast (Shrink.{v} α) := (equivShrink α).symm.ratCast
/-- Transfer `DivisionRing` across an `Equiv` -/
@[reducible]
@@ -577,7 +577,7 @@ protected def divisionRing [DivisionRing β] : DivisionRing α := by
let mul := e.mul
let npow := e.pow ℕ
let zpow := e.pow ℤ
- let rat_cast := e.RatCast
+ let ratCast := e.ratCast
let qsmul := e.smul ℚ
apply e.injective.divisionRing _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.division_ring Equiv.divisionRing
@@ -595,7 +595,7 @@ protected def field [Field β] : Field α := by
let mul := e.mul
let npow := e.pow ℕ
let zpow := e.pow ℤ
- let rat_cast := e.RatCast
+ let ratCast := e.ratCast
let qsmul := e.smul ℚ
apply e.injective.field _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.field Equiv.field
OfNat
and Nat.cast
lemmas (#11861)
This renames
Int.cast_ofNat
to Int.cast_natCast
Int.int_cast_ofNat
to Int.cast_ofNat
I think the history here is that this lemma was previously about Int.ofNat
, before we globally fixed the simp-normal form to be Nat.cast
.
Since the Int.cast_ofNat
name is repurposed, it can't be deprecated. Int.int_cast_ofNat
is such a wonky name that it was probably never used.
@@ -401,7 +401,7 @@ protected def addGroupWithOne [AddGroupWithOne β] : AddGroupWithOne α :=
{ e.addMonoidWithOne,
e.addGroup with
intCast := fun n => e.symm n
- intCast_ofNat := fun n => by simp only [Int.cast_ofNat]; rfl
+ intCast_ofNat := fun n => by simp only [Int.cast_natCast]; rfl
intCast_negSucc := fun n =>
congr_arg e.symm <| (Int.cast_negSucc _).trans <| congr_arg _ (e.apply_symm_apply _).symm }
#align equiv.add_group_with_one Equiv.addGroupWithOne
TypeMax
constructions by UnivLE
assumptions (#11420)
Replaces TypeMax
limit constructions in MonCat
, GroupCat
, Ring
, AlgebraCat
and ModuleCat
by the UnivLE
analogs. Also generalizes some universe assumptions.
@@ -738,8 +738,18 @@ def algEquiv (e : α ≃ β) [Semiring β] [Algebra R β] : by
symm_apply_apply, algebraMap_def] }
#align equiv.alg_equiv Equiv.algEquiv
+@[simp]
+theorem algEquiv_apply (e : α ≃ β) [Semiring β] [Algebra R β] (a : α) : (algEquiv R e) a = e a :=
+ rfl
+
+theorem algEquiv_symm_apply (e : α ≃ β) [Semiring β] [Algebra R β] (b : β) : by
+ letI := Equiv.semiring e
+ letI := Equiv.algebra R e
+ exact (algEquiv R e).symm b = e.symm b := by intros; rfl
+
variable (α) in
/-- Shrink `α` to a smaller universe preserves algebra structure. -/
+@[simps!]
noncomputable def _root_.Shrink.algEquiv [Small.{v} α] [Semiring α] [Algebra R α] :
Shrink.{v} α ≃ₐ[R] α :=
Equiv.algEquiv _ (equivShrink α).symm
Module
instance diamond (#11419)
Currently Equiv.algebra
is defined in terms of RingHom.toAlgebra'
which causes the induced Module R
instance to not be defeq to the one from Equiv.module
. This commit fixes this by defining Equiv.algebra
in terms of Algebra.ofModule
.
@@ -698,14 +698,25 @@ protected def algebra (e : α ≃ β) [Semiring β] :
let semiring := Equiv.semiring e
∀ [Algebra R β], Algebra R α := by
intros
- fapply RingHom.toAlgebra'
- · exact ((ringEquiv e).symm : β →+* α).comp (algebraMap R β)
- · intro r x
- rw [RingHom.coe_comp, Function.comp_apply, RingHom.coe_coe, ringEquiv_symm_apply e]
- apply (ringEquiv e).injective
- simp [Algebra.commutes]
+ letI : Module R α := e.module R
+ fapply Algebra.ofModule
+ · intro r x y
+ show e.symm (e (e.symm (r • e x)) * e y) = e.symm (r • e.ringEquiv (x * y))
+ simp only [apply_symm_apply, Algebra.smul_mul_assoc, map_mul, ringEquiv_apply]
+ · intro r x y
+ show e.symm (e x * e (e.symm (r • e y))) = e.symm (r • e (e.symm (e x * e y)))
+ simp only [apply_symm_apply, Algebra.mul_smul_comm]
#align equiv.algebra Equiv.algebra
+lemma algebraMap_def (e : α ≃ β) [Semiring β] [Algebra R β] (r : R) :
+ let semiring := Equiv.semiring e
+ let algebra := Equiv.algebra R e
+ (algebraMap R α) r = e.symm ((algebraMap R β) r) := by
+ intros
+ simp only [Algebra.algebraMap_eq_smul_one]
+ show e.symm (r • e 1) = e.symm (r • 1)
+ simp only [Equiv.one_def, apply_symm_apply]
+
noncomputable instance [Small.{v} α] [Semiring α] [Algebra R α] :
Algebra R (Shrink.{v} α) :=
(equivShrink α).symm.algebra _
@@ -723,8 +734,8 @@ def algEquiv (e : α ≃ β) [Semiring β] [Algebra R β] : by
{ Equiv.ringEquiv e with
commutes' := fun r => by
apply e.symm.injective
- simp
- rfl }
+ simp only [RingEquiv.toEquiv_eq_coe, toFun_as_coe, EquivLike.coe_coe, ringEquiv_apply,
+ symm_apply_apply, algebraMap_def] }
#align equiv.alg_equiv Equiv.algEquiv
variable (α) in
@@ -177,7 +177,7 @@ theorem mulEquiv_apply (e : α ≃ β) [Mul β] (a : α) : (mulEquiv e) a = e a
theorem mulEquiv_symm_apply (e : α ≃ β) [Mul β] (b : β) :
letI := Equiv.mul e
(mulEquiv e).symm b = e.symm b :=
- by intros; rfl
+ rfl
#align equiv.mul_equiv_symm_apply Equiv.mulEquiv_symm_apply
#align equiv.add_equiv_symm_apply Equiv.addEquiv_symm_apply
@@ -213,7 +213,7 @@ theorem ringEquiv_apply (e : α ≃ β) [Add β] [Mul β] (a : α) : (ringEquiv
theorem ringEquiv_symm_apply (e : α ≃ β) [Add β] [Mul β] (b : β) : by
letI := Equiv.add e
letI := Equiv.mul e
- exact (ringEquiv e).symm b = e.symm b := by intros; rfl
+ exact (ringEquiv e).symm b = e.symm b := rfl
#align equiv.ring_equiv_symm_apply Equiv.ringEquiv_symm_apply
variable (α) in
to_additive
attribute (#11277)
Removes to_additive
from a MulZeroClass
instance and instead puts it on the corresponding MulOneClass
instance (more explanation here: https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/to_additive.20on.20MulZeroClass).
@@ -265,7 +265,6 @@ protected def mulZeroClass [MulZeroClass β] : MulZeroClass α := by
apply e.injective.mulZeroClass _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.mul_zero_class Equiv.mulZeroClass
-@[to_additive]
noncomputable instance [Small.{v} α] [MulZeroClass α] : MulZeroClass (Shrink.{v} α) :=
(equivShrink α).symm.mulZeroClass
@@ -278,6 +277,7 @@ protected def mulOneClass [MulOneClass β] : MulOneClass α := by
#align equiv.mul_one_class Equiv.mulOneClass
#align equiv.add_zero_class Equiv.addZeroClass
+@[to_additive]
noncomputable instance [Small.{v} α] [MulOneClass α] : MulOneClass (Shrink.{v} α) :=
(equivShrink α).symm.mulOneClass
G
-sets are a PreGaloisCategory
(#9879)
We show that the category of finite G
-sets is a PreGaloisCategory
and the forgetful functor to finite sets is a FibreFunctor
.
@@ -740,3 +740,16 @@ end R
end Instances
end Equiv
+
+namespace Finite
+
+attribute [-instance] Fin.instMulFin
+
+/-- Any finite group in universe `u` is equivalent to some finite group in universe `0`. -/
+lemma exists_type_zero_nonempty_mulEquiv (G : Type u) [Group G] [Finite G] :
+ ∃ (G' : Type) (_ : Group G') (_ : Fintype G'), Nonempty (G ≃* G') := by
+ obtain ⟨n, ⟨e⟩⟩ := Finite.exists_equiv_fin G
+ letI groupH : Group (Fin n) := Equiv.group e.symm
+ exact ⟨Fin n, inferInstance, inferInstance, ⟨MulEquiv.symm <| Equiv.mulEquiv e.symm⟩⟩
+
+end Finite
@@ -6,6 +6,7 @@ Authors: Johannes Hölzl
import Mathlib.Algebra.Algebra.Equiv
import Mathlib.Algebra.Field.Basic
import Mathlib.Logic.Equiv.Defs
+import Mathlib.Logic.Small.Defs
#align_import logic.equiv.transfer_instance from "leanprover-community/mathlib"@"ec1c7d810034d4202b0dd239112d1792be9f6fdc"
@@ -55,6 +56,10 @@ theorem one_def [One β] :
#align equiv.one_def Equiv.one_def
#align equiv.zero_def Equiv.zero_def
+@[to_additive]
+noncomputable instance [Small.{v} α] [One α] : One (Shrink.{v} α) :=
+ (equivShrink α).symm.one
+
/-- Transfer `Mul` across an `Equiv` -/
@[to_additive (attr := reducible) "Transfer `Add` across an `Equiv`"]
protected def mul [Mul β] : Mul α :=
@@ -70,6 +75,10 @@ theorem mul_def [Mul β] (x y : α) :
#align equiv.mul_def Equiv.mul_def
#align equiv.add_def Equiv.add_def
+@[to_additive]
+noncomputable instance [Small.{v} α] [Mul α] : Mul (Shrink.{v} α) :=
+ (equivShrink α).symm.mul
+
/-- Transfer `Div` across an `Equiv` -/
@[to_additive (attr := reducible) "Transfer `Sub` across an `Equiv`"]
protected def div [Div β] : Div α :=
@@ -85,6 +94,10 @@ theorem div_def [Div β] (x y : α) :
#align equiv.div_def Equiv.div_def
#align equiv.sub_def Equiv.sub_def
+@[to_additive]
+noncomputable instance [Small.{v} α] [Div α] : Div (Shrink.{v} α) :=
+ (equivShrink α).symm.div
+
-- Porting note: this should be called `inv`,
-- but we already have an `Equiv.inv` (which perhaps should move to `Perm.inv`?)
/-- Transfer `Inv` across an `Equiv` -/
@@ -102,6 +115,10 @@ theorem inv_def [Inv β] (x : α) :
#align equiv.inv_def Equiv.inv_def
#align equiv.neg_def Equiv.neg_def
+@[to_additive]
+noncomputable instance [Small.{v} α] [Inv α] : Inv (Shrink.{v} α) :=
+ (equivShrink α).symm.Inv
+
/-- Transfer `SMul` across an `Equiv` -/
@[reducible]
protected def smul (R : Type*) [SMul R β] : SMul R α :=
@@ -114,6 +131,9 @@ theorem smul_def {R : Type*} [SMul R β] (r : R) (x : α) :
rfl
#align equiv.smul_def Equiv.smul_def
+noncomputable instance [Small.{v} α] (R : Type*) [SMul R α] : SMul R (Shrink.{v} α) :=
+ (equivShrink α).symm.smul R
+
/-- Transfer `Pow` across an `Equiv` -/
@[to_additive (attr := reducible) existing smul]
protected def pow (N : Type*) [Pow β N] : Pow α N :=
@@ -126,6 +146,9 @@ theorem pow_def {N : Type*} [Pow β N] (n : N) (x : α) :
rfl
#align equiv.pow_def Equiv.pow_def
+noncomputable instance [Small.{v} α] (N : Type*) [Pow α N] : Pow (Shrink.{v} α) N :=
+ (equivShrink α).symm.pow N
+
/-- An equivalence `e : α ≃ β` gives a multiplicative equivalence `α ≃* β` where
the multiplicative structure on `α` is the one obtained by transporting a multiplicative structure
on `β` back along `e`. -/
@@ -158,6 +181,11 @@ theorem mulEquiv_symm_apply (e : α ≃ β) [Mul β] (b : β) :
#align equiv.mul_equiv_symm_apply Equiv.mulEquiv_symm_apply
#align equiv.add_equiv_symm_apply Equiv.addEquiv_symm_apply
+/-- Shrink `α` to a smaller universe preserves multiplication. -/
+@[to_additive "Shrink `α` to a smaller universe preserves addition."]
+noncomputable def _root_.Shrink.mulEquiv [Small.{v} α] [Mul α] : Shrink.{v} α ≃* α :=
+ (equivShrink α).symm.mulEquiv
+
/-- An equivalence `e : α ≃ β` gives a ring equivalence `α ≃+* β`
where the ring structure on `α` is
the one obtained by transporting a ring structure on `β` back along `e`.
@@ -188,6 +216,11 @@ theorem ringEquiv_symm_apply (e : α ≃ β) [Add β] [Mul β] (b : β) : by
exact (ringEquiv e).symm b = e.symm b := by intros; rfl
#align equiv.ring_equiv_symm_apply Equiv.ringEquiv_symm_apply
+variable (α) in
+/-- Shrink `α` to a smaller universe preserves ring structure. -/
+noncomputable def _root_.Shrink.ringEquiv [Small.{v} α] [Ring α] : Shrink.{v} α ≃+* α :=
+ (equivShrink α).symm.ringEquiv
+
/-- Transfer `Semigroup` across an `Equiv` -/
@[to_additive (attr := reducible) "Transfer `add_semigroup` across an `Equiv`"]
protected def semigroup [Semigroup β] : Semigroup α := by
@@ -196,6 +229,10 @@ protected def semigroup [Semigroup β] : Semigroup α := by
#align equiv.semigroup Equiv.semigroup
#align equiv.add_semigroup Equiv.addSemigroup
+@[to_additive]
+noncomputable instance [Small.{v} α] [Semigroup α] : Semigroup (Shrink.{v} α) :=
+ (equivShrink α).symm.semigroup
+
/-- Transfer `SemigroupWithZero` across an `Equiv` -/
@[reducible]
protected def semigroupWithZero [SemigroupWithZero β] : SemigroupWithZero α := by
@@ -204,6 +241,10 @@ protected def semigroupWithZero [SemigroupWithZero β] : SemigroupWithZero α :=
apply e.injective.semigroupWithZero _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.semigroup_with_zero Equiv.semigroupWithZero
+@[to_additive]
+noncomputable instance [Small.{v} α] [SemigroupWithZero α] : SemigroupWithZero (Shrink.{v} α) :=
+ (equivShrink α).symm.semigroupWithZero
+
/-- Transfer `CommSemigroup` across an `Equiv` -/
@[to_additive (attr := reducible) "Transfer `AddCommSemigroup` across an `Equiv`"]
protected def commSemigroup [CommSemigroup β] : CommSemigroup α := by
@@ -212,6 +253,10 @@ protected def commSemigroup [CommSemigroup β] : CommSemigroup α := by
#align equiv.comm_semigroup Equiv.commSemigroup
#align equiv.add_comm_semigroup Equiv.addCommSemigroup
+@[to_additive]
+noncomputable instance [Small.{v} α] [CommSemigroup α] : CommSemigroup (Shrink.{v} α) :=
+ (equivShrink α).symm.commSemigroup
+
/-- Transfer `MulZeroClass` across an `Equiv` -/
@[reducible]
protected def mulZeroClass [MulZeroClass β] : MulZeroClass α := by
@@ -220,6 +265,10 @@ protected def mulZeroClass [MulZeroClass β] : MulZeroClass α := by
apply e.injective.mulZeroClass _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.mul_zero_class Equiv.mulZeroClass
+@[to_additive]
+noncomputable instance [Small.{v} α] [MulZeroClass α] : MulZeroClass (Shrink.{v} α) :=
+ (equivShrink α).symm.mulZeroClass
+
/-- Transfer `MulOneClass` across an `Equiv` -/
@[to_additive (attr := reducible) "Transfer `AddZeroClass` across an `Equiv`"]
protected def mulOneClass [MulOneClass β] : MulOneClass α := by
@@ -229,6 +278,9 @@ protected def mulOneClass [MulOneClass β] : MulOneClass α := by
#align equiv.mul_one_class Equiv.mulOneClass
#align equiv.add_zero_class Equiv.addZeroClass
+noncomputable instance [Small.{v} α] [MulOneClass α] : MulOneClass (Shrink.{v} α) :=
+ (equivShrink α).symm.mulOneClass
+
/-- Transfer `MulZeroOneClass` across an `Equiv` -/
@[reducible]
protected def mulZeroOneClass [MulZeroOneClass β] : MulZeroOneClass α := by
@@ -238,6 +290,9 @@ protected def mulZeroOneClass [MulZeroOneClass β] : MulZeroOneClass α := by
apply e.injective.mulZeroOneClass _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.mul_zero_one_class Equiv.mulZeroOneClass
+noncomputable instance [Small.{v} α] [MulZeroOneClass α] : MulZeroOneClass (Shrink.{v} α) :=
+ (equivShrink α).symm.mulZeroOneClass
+
/-- Transfer `Monoid` across an `Equiv` -/
@[to_additive (attr := reducible) "Transfer `AddMonoid` across an `Equiv`"]
protected def monoid [Monoid β] : Monoid α := by
@@ -248,6 +303,10 @@ protected def monoid [Monoid β] : Monoid α := by
#align equiv.monoid Equiv.monoid
#align equiv.add_monoid Equiv.addMonoid
+@[to_additive]
+noncomputable instance [Small.{v} α] [Monoid α] : Monoid (Shrink.{v} α) :=
+ (equivShrink α).symm.monoid
+
/-- Transfer `CommMonoid` across an `Equiv` -/
@[to_additive (attr := reducible) "Transfer `AddCommMonoid` across an `Equiv`"]
protected def commMonoid [CommMonoid β] : CommMonoid α := by
@@ -258,6 +317,10 @@ protected def commMonoid [CommMonoid β] : CommMonoid α := by
#align equiv.comm_monoid Equiv.commMonoid
#align equiv.add_comm_monoid Equiv.addCommMonoid
+@[to_additive]
+noncomputable instance [Small.{v} α] [CommMonoid α] : CommMonoid (Shrink.{v} α) :=
+ (equivShrink α).symm.commMonoid
+
/-- Transfer `Group` across an `Equiv` -/
@[to_additive (attr := reducible) "Transfer `AddGroup` across an `Equiv`"]
protected def group [Group β] : Group α := by
@@ -271,6 +334,10 @@ protected def group [Group β] : Group α := by
#align equiv.group Equiv.group
#align equiv.add_group Equiv.addGroup
+@[to_additive]
+noncomputable instance [Small.{v} α] [Group α] : Group (Shrink.{v} α) :=
+ (equivShrink α).symm.group
+
/-- Transfer `CommGroup` across an `Equiv` -/
@[to_additive (attr := reducible) "Transfer `AddCommGroup` across an `Equiv`"]
protected def commGroup [CommGroup β] : CommGroup α := by
@@ -284,6 +351,10 @@ protected def commGroup [CommGroup β] : CommGroup α := by
#align equiv.comm_group Equiv.commGroup
#align equiv.add_comm_group Equiv.addCommGroup
+@[to_additive]
+noncomputable instance [Small.{v} α] [CommGroup α] : CommGroup (Shrink.{v} α) :=
+ (equivShrink α).symm.commGroup
+
/-- Transfer `NonUnitalNonAssocSemiring` across an `Equiv` -/
@[reducible]
protected def nonUnitalNonAssocSemiring [NonUnitalNonAssocSemiring β] :
@@ -295,6 +366,10 @@ protected def nonUnitalNonAssocSemiring [NonUnitalNonAssocSemiring β] :
apply e.injective.nonUnitalNonAssocSemiring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.non_unital_non_assoc_semiring Equiv.nonUnitalNonAssocSemiring
+noncomputable instance [Small.{v} α] [NonUnitalNonAssocSemiring α] :
+ NonUnitalNonAssocSemiring (Shrink.{v} α) :=
+ (equivShrink α).symm.nonUnitalNonAssocSemiring
+
/-- Transfer `NonUnitalSemiring` across an `Equiv` -/
@[reducible]
protected def nonUnitalSemiring [NonUnitalSemiring β] : NonUnitalSemiring α := by
@@ -305,6 +380,9 @@ protected def nonUnitalSemiring [NonUnitalSemiring β] : NonUnitalSemiring α :=
apply e.injective.nonUnitalSemiring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.non_unital_semiring Equiv.nonUnitalSemiring
+noncomputable instance [Small.{v} α] [NonUnitalSemiring α] : NonUnitalSemiring (Shrink.{v} α) :=
+ (equivShrink α).symm.nonUnitalSemiring
+
/-- Transfer `AddMonoidWithOne` across an `Equiv` -/
@[reducible]
protected def addMonoidWithOne [AddMonoidWithOne β] : AddMonoidWithOne α :=
@@ -314,6 +392,9 @@ protected def addMonoidWithOne [AddMonoidWithOne β] : AddMonoidWithOne α :=
natCast_succ := fun n => e.injective (by simp [add_def, one_def]) }
#align equiv.add_monoid_with_one Equiv.addMonoidWithOne
+noncomputable instance [Small.{v} α] [AddMonoidWithOne α] : AddMonoidWithOne (Shrink.{v} α) :=
+ (equivShrink α).symm.addMonoidWithOne
+
/-- Transfer `AddGroupWithOne` across an `Equiv` -/
@[reducible]
protected def addGroupWithOne [AddGroupWithOne β] : AddGroupWithOne α :=
@@ -325,6 +406,9 @@ protected def addGroupWithOne [AddGroupWithOne β] : AddGroupWithOne α :=
congr_arg e.symm <| (Int.cast_negSucc _).trans <| congr_arg _ (e.apply_symm_apply _).symm }
#align equiv.add_group_with_one Equiv.addGroupWithOne
+noncomputable instance [Small.{v} α] [AddGroupWithOne α] : AddGroupWithOne (Shrink.{v} α) :=
+ (equivShrink α).symm.addGroupWithOne
+
/-- Transfer `NonAssocSemiring` across an `Equiv` -/
@[reducible]
protected def nonAssocSemiring [NonAssocSemiring β] : NonAssocSemiring α := by
@@ -333,6 +417,9 @@ protected def nonAssocSemiring [NonAssocSemiring β] : NonAssocSemiring α := by
apply e.injective.nonAssocSemiring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.non_assoc_semiring Equiv.nonAssocSemiring
+noncomputable instance [Small.{v} α] [NonAssocSemiring α] : NonAssocSemiring (Shrink.{v} α) :=
+ (equivShrink α).symm.nonAssocSemiring
+
/-- Transfer `Semiring` across an `Equiv` -/
@[reducible]
protected def semiring [Semiring β] : Semiring α := by
@@ -342,6 +429,9 @@ protected def semiring [Semiring β] : Semiring α := by
apply e.injective.semiring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.semiring Equiv.semiring
+noncomputable instance [Small.{v} α] [Semiring α] : Semiring (Shrink.{v} α) :=
+ (equivShrink α).symm.semiring
+
/-- Transfer `NonUnitalCommSemiring` across an `Equiv` -/
@[reducible]
protected def nonUnitalCommSemiring [NonUnitalCommSemiring β] : NonUnitalCommSemiring α := by
@@ -352,6 +442,10 @@ protected def nonUnitalCommSemiring [NonUnitalCommSemiring β] : NonUnitalCommSe
apply e.injective.nonUnitalCommSemiring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.non_unital_comm_semiring Equiv.nonUnitalCommSemiring
+noncomputable instance [Small.{v} α] [NonUnitalCommSemiring α] :
+ NonUnitalCommSemiring (Shrink.{v} α) :=
+ (equivShrink α).symm.nonUnitalCommSemiring
+
/-- Transfer `CommSemiring` across an `Equiv` -/
@[reducible]
protected def commSemiring [CommSemiring β] : CommSemiring α := by
@@ -361,6 +455,9 @@ protected def commSemiring [CommSemiring β] : CommSemiring α := by
apply e.injective.commSemiring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.comm_semiring Equiv.commSemiring
+noncomputable instance [Small.{v} α] [CommSemiring α] : CommSemiring (Shrink.{v} α) :=
+ (equivShrink α).symm.commSemiring
+
/-- Transfer `NonUnitalNonAssocRing` across an `Equiv` -/
@[reducible]
protected def nonUnitalNonAssocRing [NonUnitalNonAssocRing β] : NonUnitalNonAssocRing α := by
@@ -374,6 +471,10 @@ protected def nonUnitalNonAssocRing [NonUnitalNonAssocRing β] : NonUnitalNonAss
apply e.injective.nonUnitalNonAssocRing _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.non_unital_non_assoc_ring Equiv.nonUnitalNonAssocRing
+noncomputable instance [Small.{v} α] [NonUnitalNonAssocRing α] :
+ NonUnitalNonAssocRing (Shrink.{v} α) :=
+ (equivShrink α).symm.nonUnitalNonAssocRing
+
/-- Transfer `NonUnitalRing` across an `Equiv` -/
@[reducible]
protected def nonUnitalRing [NonUnitalRing β] : NonUnitalRing α := by
@@ -387,6 +488,9 @@ protected def nonUnitalRing [NonUnitalRing β] : NonUnitalRing α := by
apply e.injective.nonUnitalRing _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.non_unital_ring Equiv.nonUnitalRing
+noncomputable instance [Small.{v} α] [NonUnitalRing α] : NonUnitalRing (Shrink.{v} α) :=
+ (equivShrink α).symm.nonUnitalRing
+
/-- Transfer `NonAssocRing` across an `Equiv` -/
@[reducible]
protected def nonAssocRing [NonAssocRing β] : NonAssocRing α := by
@@ -395,6 +499,9 @@ protected def nonAssocRing [NonAssocRing β] : NonAssocRing α := by
apply e.injective.nonAssocRing _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.non_assoc_ring Equiv.nonAssocRing
+noncomputable instance [Small.{v} α] [NonAssocRing α] : NonAssocRing (Shrink.{v} α) :=
+ (equivShrink α).symm.nonAssocRing
+
/-- Transfer `Ring` across an `Equiv` -/
@[reducible]
protected def ring [Ring β] : Ring α := by
@@ -404,6 +511,9 @@ protected def ring [Ring β] : Ring α := by
apply e.injective.ring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.ring Equiv.ring
+noncomputable instance [Small.{v} α] [Ring α] : Ring (Shrink.{v} α) :=
+ (equivShrink α).symm.ring
+
/-- Transfer `NonUnitalCommRing` across an `Equiv` -/
@[reducible]
protected def nonUnitalCommRing [NonUnitalCommRing β] : NonUnitalCommRing α := by
@@ -417,6 +527,9 @@ protected def nonUnitalCommRing [NonUnitalCommRing β] : NonUnitalCommRing α :=
apply e.injective.nonUnitalCommRing _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.non_unital_comm_ring Equiv.nonUnitalCommRing
+noncomputable instance [Small.{v} α] [NonUnitalCommRing α] : NonUnitalCommRing (Shrink.{v} α) :=
+ (equivShrink α).symm.nonUnitalCommRing
+
/-- Transfer `CommRing` across an `Equiv` -/
@[reducible]
protected def commRing [CommRing β] : CommRing α := by
@@ -426,23 +539,35 @@ protected def commRing [CommRing β] : CommRing α := by
apply e.injective.commRing _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.comm_ring Equiv.commRing
+noncomputable instance [Small.{v} α] [CommRing α] : CommRing (Shrink.{v} α) :=
+ (equivShrink α).symm.commRing
+
/-- Transfer `Nontrivial` across an `Equiv` -/
@[reducible]
protected theorem nontrivial [Nontrivial β] : Nontrivial α :=
e.surjective.nontrivial
#align equiv.nontrivial Equiv.nontrivial
+noncomputable instance [Small.{v} α] [Nontrivial α] : Nontrivial (Shrink.{v} α) :=
+ (equivShrink α).symm.nontrivial
+
/-- Transfer `IsDomain` across an `Equiv` -/
@[reducible]
protected theorem isDomain [Ring α] [Ring β] [IsDomain β] (e : α ≃+* β) : IsDomain α :=
Function.Injective.isDomain e.toRingHom e.injective
#align equiv.is_domain Equiv.isDomain
+noncomputable instance [Small.{v} α] [Ring α] [IsDomain α] : IsDomain (Shrink.{v} α) :=
+ Equiv.isDomain (Shrink.ringEquiv α)
+
/-- Transfer `RatCast` across an `Equiv` -/
@[reducible]
protected def RatCast [RatCast β] : RatCast α where ratCast n := e.symm n
#align equiv.has_rat_cast Equiv.RatCast
+noncomputable instance [Small.{v} α] [RatCast α] : RatCast (Shrink.{v} α) :=
+ (equivShrink α).symm.RatCast
+
/-- Transfer `DivisionRing` across an `Equiv` -/
@[reducible]
protected def divisionRing [DivisionRing β] : DivisionRing α := by
@@ -457,6 +582,9 @@ protected def divisionRing [DivisionRing β] : DivisionRing α := by
apply e.injective.divisionRing _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.division_ring Equiv.divisionRing
+noncomputable instance [Small.{v} α] [DivisionRing α] : DivisionRing (Shrink.{v} α) :=
+ (equivShrink α).symm.divisionRing
+
/-- Transfer `Field` across an `Equiv` -/
@[reducible]
protected def field [Field β] : Field α := by
@@ -472,6 +600,9 @@ protected def field [Field β] : Field α := by
apply e.injective.field _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.field Equiv.field
+noncomputable instance [Small.{v} α] [Field α] : Field (Shrink.{v} α) :=
+ (equivShrink α).symm.field
+
section R
variable (R : Type*)
@@ -488,6 +619,9 @@ protected def mulAction (e : α ≃ β) [MulAction R β] : MulAction R α :=
mul_smul := by simp [smul_def, mul_smul] }
#align equiv.mul_action Equiv.mulAction
+noncomputable instance [Small.{v} α] [MulAction R α] : MulAction R (Shrink.{v} α) :=
+ (equivShrink α).symm.mulAction R
+
/-- Transfer `DistribMulAction` across an `Equiv` -/
@[reducible]
protected def distribMulAction (e : α ≃ β) [AddCommMonoid β] :
@@ -502,6 +636,10 @@ protected def distribMulAction (e : α ≃ β) [AddCommMonoid β] :
DistribMulAction R α)
#align equiv.distrib_mul_action Equiv.distribMulAction
+noncomputable instance [Small.{v} α] [AddCommMonoid α] [DistribMulAction R α] :
+ DistribMulAction R (Shrink.{v} α) :=
+ (equivShrink α).symm.distribMulAction R
+
end
section
@@ -521,6 +659,9 @@ protected def module (e : α ≃ β) [AddCommMonoid β] :
Module R α)
#align equiv.module Equiv.module
+noncomputable instance [Small.{v} α] [AddCommMonoid α] [Module R α] : Module R (Shrink.{v} α) :=
+ (equivShrink α).symm.module R
+
/-- An equivalence `e : α ≃ β` gives a linear equivalence `α ≃ₗ[R] β`
where the `R`-module structure on `α` is
the one obtained by transporting an `R`-module structure on `β` back along `e`.
@@ -538,6 +679,13 @@ def linearEquiv (e : α ≃ β) [AddCommMonoid β] [Module R β] : by
exact Iff.mpr (apply_eq_iff_eq_symm_apply _) rfl }
#align equiv.linear_equiv Equiv.linearEquiv
+variable (α) in
+/-- Shrink `α` to a smaller universe preserves module structure. -/
+@[simps!]
+noncomputable def _root_.Shrink.linearEquiv [Small.{v} α] [AddCommMonoid α] [Module R α] :
+ Shrink.{v} α ≃ₗ[R] α :=
+ Equiv.linearEquiv _ (equivShrink α).symm
+
end
section
@@ -558,6 +706,10 @@ protected def algebra (e : α ≃ β) [Semiring β] :
simp [Algebra.commutes]
#align equiv.algebra Equiv.algebra
+noncomputable instance [Small.{v} α] [Semiring α] [Algebra R α] :
+ Algebra R (Shrink.{v} α) :=
+ (equivShrink α).symm.algebra _
+
/-- An equivalence `e : α ≃ β` gives an algebra equivalence `α ≃ₐ[R] β`
where the `R`-algebra structure on `α` is
the one obtained by transporting an `R`-algebra structure on `β` back along `e`.
@@ -575,6 +727,12 @@ def algEquiv (e : α ≃ β) [Semiring β] [Algebra R β] : by
rfl }
#align equiv.alg_equiv Equiv.algEquiv
+variable (α) in
+/-- Shrink `α` to a smaller universe preserves algebra structure. -/
+noncomputable def _root_.Shrink.algEquiv [Small.{v} α] [Semiring α] [Algebra R α] :
+ Shrink.{v} α ≃ₐ[R] α :=
+ Equiv.algEquiv _ (equivShrink α).symm
+
end
end R
@@ -553,10 +553,8 @@ protected def algebra (e : α ≃ β) [Semiring β] :
fapply RingHom.toAlgebra'
· exact ((ringEquiv e).symm : β →+* α).comp (algebraMap R β)
· intro r x
- simp only [Function.comp_apply, RingHom.coe_comp]
- erw [ringEquiv_symm_apply e]
+ rw [RingHom.coe_comp, Function.comp_apply, RingHom.coe_coe, ringEquiv_symm_apply e]
apply (ringEquiv e).injective
- simp only [(ringEquiv e).map_mul]
simp [Algebra.commutes]
#align equiv.algebra Equiv.algebra
@@ -554,10 +554,7 @@ protected def algebra (e : α ≃ β) [Semiring β] :
· exact ((ringEquiv e).symm : β →+* α).comp (algebraMap R β)
· intro r x
simp only [Function.comp_apply, RingHom.coe_comp]
- have p := ringEquiv_symm_apply e
- dsimp at p
- erw [p]
- clear p
+ erw [ringEquiv_symm_apply e]
apply (ringEquiv e).injective
simp only [(ringEquiv e).map_mul]
simp [Algebra.commutes]
Fixes mistake introduced in #7976 (ping to @alreadydone that you should use @[to_additive (attr := simp)]
and not @[to_additive, simp]
) and some namespacing mistakes from my own PRs #7337 and #7755
@@ -41,7 +41,7 @@ section Instances
variable (e : α ≃ β)
/-- Transfer `One` across an `Equiv` -/
-@[reducible, to_additive "Transfer `Zero` across an `Equiv`"]
+@[to_additive (attr := reducible) "Transfer `Zero` across an `Equiv`"]
protected def one [One β] : One α :=
⟨e.symm 1⟩
#align equiv.has_one Equiv.one
@@ -56,7 +56,7 @@ theorem one_def [One β] :
#align equiv.zero_def Equiv.zero_def
/-- Transfer `Mul` across an `Equiv` -/
-@[reducible, to_additive "Transfer `Add` across an `Equiv`"]
+@[to_additive (attr := reducible) "Transfer `Add` across an `Equiv`"]
protected def mul [Mul β] : Mul α :=
⟨fun x y => e.symm (e x * e y)⟩
#align equiv.has_mul Equiv.mul
@@ -71,7 +71,7 @@ theorem mul_def [Mul β] (x y : α) :
#align equiv.add_def Equiv.add_def
/-- Transfer `Div` across an `Equiv` -/
-@[reducible, to_additive "Transfer `Sub` across an `Equiv`"]
+@[to_additive (attr := reducible) "Transfer `Sub` across an `Equiv`"]
protected def div [Div β] : Div α :=
⟨fun x y => e.symm (e x / e y)⟩
#align equiv.has_div Equiv.div
@@ -88,7 +88,7 @@ theorem div_def [Div β] (x y : α) :
-- Porting note: this should be called `inv`,
-- but we already have an `Equiv.inv` (which perhaps should move to `Perm.inv`?)
/-- Transfer `Inv` across an `Equiv` -/
-@[reducible, to_additive "Transfer `Neg` across an `Equiv`"]
+@[to_additive (attr := reducible) "Transfer `Neg` across an `Equiv`"]
protected def Inv [Inv β] : Inv α :=
⟨fun x => e.symm (e x)⁻¹⟩
#align equiv.has_inv Equiv.Inv
@@ -115,7 +115,7 @@ theorem smul_def {R : Type*} [SMul R β] (r : R) (x : α) :
#align equiv.smul_def Equiv.smul_def
/-- Transfer `Pow` across an `Equiv` -/
-@[reducible, to_additive existing smul]
+@[to_additive (attr := reducible) existing smul]
protected def pow (N : Type*) [Pow β N] : Pow α N :=
⟨fun x n => e.symm (e x ^ n)⟩
#align equiv.has_pow Equiv.pow
@@ -189,7 +189,7 @@ theorem ringEquiv_symm_apply (e : α ≃ β) [Add β] [Mul β] (b : β) : by
#align equiv.ring_equiv_symm_apply Equiv.ringEquiv_symm_apply
/-- Transfer `Semigroup` across an `Equiv` -/
-@[reducible, to_additive "Transfer `add_semigroup` across an `Equiv`"]
+@[to_additive (attr := reducible) "Transfer `add_semigroup` across an `Equiv`"]
protected def semigroup [Semigroup β] : Semigroup α := by
let mul := e.mul
apply e.injective.semigroup _; intros; exact e.apply_symm_apply _
@@ -205,7 +205,7 @@ protected def semigroupWithZero [SemigroupWithZero β] : SemigroupWithZero α :=
#align equiv.semigroup_with_zero Equiv.semigroupWithZero
/-- Transfer `CommSemigroup` across an `Equiv` -/
-@[reducible, to_additive "Transfer `AddCommSemigroup` across an `Equiv`"]
+@[to_additive (attr := reducible) "Transfer `AddCommSemigroup` across an `Equiv`"]
protected def commSemigroup [CommSemigroup β] : CommSemigroup α := by
let mul := e.mul
apply e.injective.commSemigroup _; intros; exact e.apply_symm_apply _
@@ -221,7 +221,7 @@ protected def mulZeroClass [MulZeroClass β] : MulZeroClass α := by
#align equiv.mul_zero_class Equiv.mulZeroClass
/-- Transfer `MulOneClass` across an `Equiv` -/
-@[reducible, to_additive "Transfer `AddZeroClass` across an `Equiv`"]
+@[to_additive (attr := reducible) "Transfer `AddZeroClass` across an `Equiv`"]
protected def mulOneClass [MulOneClass β] : MulOneClass α := by
let one := e.one
let mul := e.mul
@@ -239,7 +239,7 @@ protected def mulZeroOneClass [MulZeroOneClass β] : MulZeroOneClass α := by
#align equiv.mul_zero_one_class Equiv.mulZeroOneClass
/-- Transfer `Monoid` across an `Equiv` -/
-@[reducible, to_additive "Transfer `AddMonoid` across an `Equiv`"]
+@[to_additive (attr := reducible) "Transfer `AddMonoid` across an `Equiv`"]
protected def monoid [Monoid β] : Monoid α := by
let one := e.one
let mul := e.mul
@@ -249,7 +249,7 @@ protected def monoid [Monoid β] : Monoid α := by
#align equiv.add_monoid Equiv.addMonoid
/-- Transfer `CommMonoid` across an `Equiv` -/
-@[reducible, to_additive "Transfer `AddCommMonoid` across an `Equiv`"]
+@[to_additive (attr := reducible) "Transfer `AddCommMonoid` across an `Equiv`"]
protected def commMonoid [CommMonoid β] : CommMonoid α := by
let one := e.one
let mul := e.mul
@@ -259,7 +259,7 @@ protected def commMonoid [CommMonoid β] : CommMonoid α := by
#align equiv.add_comm_monoid Equiv.addCommMonoid
/-- Transfer `Group` across an `Equiv` -/
-@[reducible, to_additive "Transfer `AddGroup` across an `Equiv`"]
+@[to_additive (attr := reducible) "Transfer `AddGroup` across an `Equiv`"]
protected def group [Group β] : Group α := by
let one := e.one
let mul := e.mul
@@ -272,7 +272,7 @@ protected def group [Group β] : Group α := by
#align equiv.add_group Equiv.addGroup
/-- Transfer `CommGroup` across an `Equiv` -/
-@[reducible, to_additive "Transfer `AddCommGroup` across an `Equiv`"]
+@[to_additive (attr := reducible) "Transfer `AddCommGroup` across an `Equiv`"]
protected def commGroup [CommGroup β] : CommGroup α := by
let one := e.one
let mul := e.mul
Equiv.toFun_as_coe_apply
(#7902)
This simp
lemma was added during the port but tagged as probably unnecessary after fixing https://github.com/leanprover/lean4/issues/1937. This PR confirms it is indeed no longer necessary. The only proofs that needed fixing were the one explicitly calling the new simp lemma.
The porting note can go too.
@@ -534,7 +534,7 @@ def linearEquiv (e : α ≃ β) [AddCommMonoid β] [Module R β] : by
{ Equiv.addEquiv e with
map_smul' := fun r x => by
apply e.symm.injective
- simp only [toFun_as_coe_apply, RingHom.id_apply, EmbeddingLike.apply_eq_iff_eq]
+ simp only [toFun_as_coe, RingHom.id_apply, EmbeddingLike.apply_eq_iff_eq]
exact Iff.mpr (apply_eq_iff_eq_symm_apply _) rfl }
#align equiv.linear_equiv Equiv.linearEquiv
@@ -534,7 +534,7 @@ def linearEquiv (e : α ≃ β) [AddCommMonoid β] [Module R β] : by
{ Equiv.addEquiv e with
map_smul' := fun r x => by
apply e.symm.injective
- simp
+ simp only [toFun_as_coe_apply, RingHom.id_apply, EmbeddingLike.apply_eq_iff_eq]
exact Iff.mpr (apply_eq_iff_eq_symm_apply _) rfl }
#align equiv.linear_equiv Equiv.linearEquiv
@@ -205,7 +205,7 @@ protected def semigroupWithZero [SemigroupWithZero β] : SemigroupWithZero α :=
#align equiv.semigroup_with_zero Equiv.semigroupWithZero
/-- Transfer `CommSemigroup` across an `Equiv` -/
-@[reducible, to_additive "Transfer `add_comm_semigroup` across an `Equiv`"]
+@[reducible, to_additive "Transfer `AddCommSemigroup` across an `Equiv`"]
protected def commSemigroup [CommSemigroup β] : CommSemigroup α := by
let mul := e.mul
apply e.injective.commSemigroup _; intros; exact e.apply_symm_apply _
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -104,11 +104,11 @@ theorem inv_def [Inv β] (x : α) :
/-- Transfer `SMul` across an `Equiv` -/
@[reducible]
-protected def smul (R : Type _) [SMul R β] : SMul R α :=
+protected def smul (R : Type*) [SMul R β] : SMul R α :=
⟨fun r x => e.symm (r • e x)⟩
#align equiv.has_smul Equiv.smul
-theorem smul_def {R : Type _} [SMul R β] (r : R) (x : α) :
+theorem smul_def {R : Type*} [SMul R β] (r : R) (x : α) :
letI := e.smul R
r • x = e.symm (r • e x) :=
rfl
@@ -116,11 +116,11 @@ theorem smul_def {R : Type _} [SMul R β] (r : R) (x : α) :
/-- Transfer `Pow` across an `Equiv` -/
@[reducible, to_additive existing smul]
-protected def pow (N : Type _) [Pow β N] : Pow α N :=
+protected def pow (N : Type*) [Pow β N] : Pow α N :=
⟨fun x n => e.symm (e x ^ n)⟩
#align equiv.has_pow Equiv.pow
-theorem pow_def {N : Type _} [Pow β N] (n : N) (x : α) :
+theorem pow_def {N : Type*} [Pow β N] (n : N) (x : α) :
letI := e.pow N
x ^ n = e.symm (e x ^ n) :=
rfl
@@ -474,7 +474,7 @@ protected def field [Field β] : Field α := by
section R
-variable (R : Type _)
+variable (R : Type*)
section
@@ -2,16 +2,13 @@
Copyright (c) 2018 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl
-
-! This file was ported from Lean 3 source module logic.equiv.transfer_instance
-! leanprover-community/mathlib commit ec1c7d810034d4202b0dd239112d1792be9f6fdc
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Algebra.Algebra.Equiv
import Mathlib.Algebra.Field.Basic
import Mathlib.Logic.Equiv.Defs
+#align_import logic.equiv.transfer_instance from "leanprover-community/mathlib"@"ec1c7d810034d4202b0dd239112d1792be9f6fdc"
+
/-!
# Transfer algebraic structures across `Equiv`s
@@ -45,14 +45,14 @@ variable (e : α ≃ β)
/-- Transfer `One` across an `Equiv` -/
@[reducible, to_additive "Transfer `Zero` across an `Equiv`"]
-protected def One [One β] : One α :=
+protected def one [One β] : One α :=
⟨e.symm 1⟩
-#align equiv.has_one Equiv.One
-#align equiv.has_zero Equiv.Zero
+#align equiv.has_one Equiv.one
+#align equiv.has_zero Equiv.zero
@[to_additive]
theorem one_def [One β] :
- letI := e.One
+ letI := e.one
1 = e.symm 1 :=
rfl
#align equiv.one_def Equiv.one_def
@@ -60,14 +60,14 @@ theorem one_def [One β] :
/-- Transfer `Mul` across an `Equiv` -/
@[reducible, to_additive "Transfer `Add` across an `Equiv`"]
-protected def Mul [Mul β] : Mul α :=
+protected def mul [Mul β] : Mul α :=
⟨fun x y => e.symm (e x * e y)⟩
-#align equiv.has_mul Equiv.Mul
-#align equiv.has_add Equiv.Add
+#align equiv.has_mul Equiv.mul
+#align equiv.has_add Equiv.add
@[to_additive]
theorem mul_def [Mul β] (x y : α) :
- letI := Equiv.Mul e
+ letI := Equiv.mul e
x * y = e.symm (e x * e y) :=
rfl
#align equiv.mul_def Equiv.mul_def
@@ -75,19 +75,21 @@ theorem mul_def [Mul β] (x y : α) :
/-- Transfer `Div` across an `Equiv` -/
@[reducible, to_additive "Transfer `Sub` across an `Equiv`"]
-protected def Div [Div β] : Div α :=
+protected def div [Div β] : Div α :=
⟨fun x y => e.symm (e x / e y)⟩
-#align equiv.has_div Equiv.Div
-#align equiv.has_sub Equiv.Sub
+#align equiv.has_div Equiv.div
+#align equiv.has_sub Equiv.sub
@[to_additive]
theorem div_def [Div β] (x y : α) :
- letI := Equiv.Div e
+ letI := Equiv.div e
x / y = e.symm (e x / e y) :=
rfl
#align equiv.div_def Equiv.div_def
#align equiv.sub_def Equiv.sub_def
+-- Porting note: this should be called `inv`,
+-- but we already have an `Equiv.inv` (which perhaps should move to `Perm.inv`?)
/-- Transfer `Inv` across an `Equiv` -/
@[reducible, to_additive "Transfer `Neg` across an `Equiv`"]
protected def Inv [Inv β] : Inv α :=
@@ -105,24 +107,24 @@ theorem inv_def [Inv β] (x : α) :
/-- Transfer `SMul` across an `Equiv` -/
@[reducible]
-protected def SMul (R : Type _) [SMul R β] : SMul R α :=
+protected def smul (R : Type _) [SMul R β] : SMul R α :=
⟨fun r x => e.symm (r • e x)⟩
-#align equiv.has_smul Equiv.SMul
+#align equiv.has_smul Equiv.smul
theorem smul_def {R : Type _} [SMul R β] (r : R) (x : α) :
- letI := e.SMul R
+ letI := e.smul R
r • x = e.symm (r • e x) :=
rfl
#align equiv.smul_def Equiv.smul_def
/-- Transfer `Pow` across an `Equiv` -/
-@[reducible, to_additive existing SMul]
-protected def Pow (N : Type _) [Pow β N] : Pow α N :=
+@[reducible, to_additive existing smul]
+protected def pow (N : Type _) [Pow β N] : Pow α N :=
⟨fun x n => e.symm (e x ^ n)⟩
-#align equiv.has_pow Equiv.Pow
+#align equiv.has_pow Equiv.pow
theorem pow_def {N : Type _} [Pow β N] (n : N) (x : α) :
- letI := e.Pow N
+ letI := e.pow N
x ^ n = e.symm (e x ^ n) :=
rfl
#align equiv.pow_def Equiv.pow_def
@@ -134,7 +136,7 @@ on `β` back along `e`. -/
the additive structure on `α` is the one obtained by transporting an additive structure
on `β` back along `e`."]
def mulEquiv (e : α ≃ β) [Mul β] :
- let mul := Equiv.Mul e
+ let mul := Equiv.mul e
α ≃* β := by
intros
exact
@@ -153,7 +155,7 @@ theorem mulEquiv_apply (e : α ≃ β) [Mul β] (a : α) : (mulEquiv e) a = e a
@[to_additive]
theorem mulEquiv_symm_apply (e : α ≃ β) [Mul β] (b : β) :
- letI := Equiv.Mul e
+ letI := Equiv.mul e
(mulEquiv e).symm b = e.symm b :=
by intros; rfl
#align equiv.mul_equiv_symm_apply Equiv.mulEquiv_symm_apply
@@ -164,8 +166,8 @@ where the ring structure on `α` is
the one obtained by transporting a ring structure on `β` back along `e`.
-/
def ringEquiv (e : α ≃ β) [Add β] [Mul β] : by
- let add := Equiv.Add e
- let mul := Equiv.Mul e
+ let add := Equiv.add e
+ let mul := Equiv.mul e
exact α ≃+* β := by
intros
exact
@@ -184,15 +186,15 @@ theorem ringEquiv_apply (e : α ≃ β) [Add β] [Mul β] (a : α) : (ringEquiv
#align equiv.ring_equiv_apply Equiv.ringEquiv_apply
theorem ringEquiv_symm_apply (e : α ≃ β) [Add β] [Mul β] (b : β) : by
- letI := Equiv.Add e
- letI := Equiv.Mul e
+ letI := Equiv.add e
+ letI := Equiv.mul e
exact (ringEquiv e).symm b = e.symm b := by intros; rfl
#align equiv.ring_equiv_symm_apply Equiv.ringEquiv_symm_apply
/-- Transfer `Semigroup` across an `Equiv` -/
@[reducible, to_additive "Transfer `add_semigroup` across an `Equiv`"]
protected def semigroup [Semigroup β] : Semigroup α := by
- let mul := e.Mul
+ let mul := e.mul
apply e.injective.semigroup _; intros; exact e.apply_symm_apply _
#align equiv.semigroup Equiv.semigroup
#align equiv.add_semigroup Equiv.addSemigroup
@@ -200,15 +202,15 @@ protected def semigroup [Semigroup β] : Semigroup α := by
/-- Transfer `SemigroupWithZero` across an `Equiv` -/
@[reducible]
protected def semigroupWithZero [SemigroupWithZero β] : SemigroupWithZero α := by
- let mul := e.Mul
- let zero := e.Zero
+ let mul := e.mul
+ let zero := e.zero
apply e.injective.semigroupWithZero _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.semigroup_with_zero Equiv.semigroupWithZero
/-- Transfer `CommSemigroup` across an `Equiv` -/
@[reducible, to_additive "Transfer `add_comm_semigroup` across an `Equiv`"]
protected def commSemigroup [CommSemigroup β] : CommSemigroup α := by
- let mul := e.Mul
+ let mul := e.mul
apply e.injective.commSemigroup _; intros; exact e.apply_symm_apply _
#align equiv.comm_semigroup Equiv.commSemigroup
#align equiv.add_comm_semigroup Equiv.addCommSemigroup
@@ -216,16 +218,16 @@ protected def commSemigroup [CommSemigroup β] : CommSemigroup α := by
/-- Transfer `MulZeroClass` across an `Equiv` -/
@[reducible]
protected def mulZeroClass [MulZeroClass β] : MulZeroClass α := by
- let zero := e.Zero
- let mul := e.Mul
+ let zero := e.zero
+ let mul := e.mul
apply e.injective.mulZeroClass _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.mul_zero_class Equiv.mulZeroClass
/-- Transfer `MulOneClass` across an `Equiv` -/
@[reducible, to_additive "Transfer `AddZeroClass` across an `Equiv`"]
protected def mulOneClass [MulOneClass β] : MulOneClass α := by
- let one := e.One
- let mul := e.Mul
+ let one := e.one
+ let mul := e.mul
apply e.injective.mulOneClass _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.mul_one_class Equiv.mulOneClass
#align equiv.add_zero_class Equiv.addZeroClass
@@ -233,18 +235,18 @@ protected def mulOneClass [MulOneClass β] : MulOneClass α := by
/-- Transfer `MulZeroOneClass` across an `Equiv` -/
@[reducible]
protected def mulZeroOneClass [MulZeroOneClass β] : MulZeroOneClass α := by
- let zero := e.Zero
- let one := e.One
- let mul := e.Mul
+ let zero := e.zero
+ let one := e.one
+ let mul := e.mul
apply e.injective.mulZeroOneClass _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.mul_zero_one_class Equiv.mulZeroOneClass
/-- Transfer `Monoid` across an `Equiv` -/
@[reducible, to_additive "Transfer `AddMonoid` across an `Equiv`"]
protected def monoid [Monoid β] : Monoid α := by
- let one := e.One
- let mul := e.Mul
- let pow := e.Pow ℕ
+ let one := e.one
+ let mul := e.mul
+ let pow := e.pow ℕ
apply e.injective.monoid _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.monoid Equiv.monoid
#align equiv.add_monoid Equiv.addMonoid
@@ -252,9 +254,9 @@ protected def monoid [Monoid β] : Monoid α := by
/-- Transfer `CommMonoid` across an `Equiv` -/
@[reducible, to_additive "Transfer `AddCommMonoid` across an `Equiv`"]
protected def commMonoid [CommMonoid β] : CommMonoid α := by
- let one := e.One
- let mul := e.Mul
- let pow := e.Pow ℕ
+ let one := e.one
+ let mul := e.mul
+ let pow := e.pow ℕ
apply e.injective.commMonoid _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.comm_monoid Equiv.commMonoid
#align equiv.add_comm_monoid Equiv.addCommMonoid
@@ -262,12 +264,12 @@ protected def commMonoid [CommMonoid β] : CommMonoid α := by
/-- Transfer `Group` across an `Equiv` -/
@[reducible, to_additive "Transfer `AddGroup` across an `Equiv`"]
protected def group [Group β] : Group α := by
- let one := e.One
- let mul := e.Mul
+ let one := e.one
+ let mul := e.mul
let inv := e.Inv
- let div := e.Div
- let npow := e.Pow ℕ
- let zpow := e.Pow ℤ
+ let div := e.div
+ let npow := e.pow ℕ
+ let zpow := e.pow ℤ
apply e.injective.group _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.group Equiv.group
#align equiv.add_group Equiv.addGroup
@@ -275,12 +277,12 @@ protected def group [Group β] : Group α := by
/-- Transfer `CommGroup` across an `Equiv` -/
@[reducible, to_additive "Transfer `AddCommGroup` across an `Equiv`"]
protected def commGroup [CommGroup β] : CommGroup α := by
- let one := e.One
- let mul := e.Mul
+ let one := e.one
+ let mul := e.mul
let inv := e.Inv
- let div := e.Div
- let npow := e.Pow ℕ
- let zpow := e.Pow ℤ
+ let div := e.div
+ let npow := e.pow ℕ
+ let zpow := e.pow ℤ
apply e.injective.commGroup _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.comm_group Equiv.commGroup
#align equiv.add_comm_group Equiv.addCommGroup
@@ -289,27 +291,27 @@ protected def commGroup [CommGroup β] : CommGroup α := by
@[reducible]
protected def nonUnitalNonAssocSemiring [NonUnitalNonAssocSemiring β] :
NonUnitalNonAssocSemiring α := by
- let zero := e.Zero
- let add := e.Add
- let mul := e.Mul
- let nsmul := e.SMul ℕ
+ let zero := e.zero
+ let add := e.add
+ let mul := e.mul
+ let nsmul := e.smul ℕ
apply e.injective.nonUnitalNonAssocSemiring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.non_unital_non_assoc_semiring Equiv.nonUnitalNonAssocSemiring
/-- Transfer `NonUnitalSemiring` across an `Equiv` -/
@[reducible]
protected def nonUnitalSemiring [NonUnitalSemiring β] : NonUnitalSemiring α := by
- let zero := e.Zero
- let add := e.Add
- let mul := e.Mul
- let nsmul := e.SMul ℕ
+ let zero := e.zero
+ let add := e.add
+ let mul := e.mul
+ let nsmul := e.smul ℕ
apply e.injective.nonUnitalSemiring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.non_unital_semiring Equiv.nonUnitalSemiring
/-- Transfer `AddMonoidWithOne` across an `Equiv` -/
@[reducible]
protected def addMonoidWithOne [AddMonoidWithOne β] : AddMonoidWithOne α :=
- { e.addMonoid, e.One with
+ { e.addMonoid, e.one with
natCast := fun n => e.symm n
natCast_zero := e.injective (by simp [zero_def])
natCast_succ := fun n => e.injective (by simp [add_def, one_def]) }
@@ -329,7 +331,7 @@ protected def addGroupWithOne [AddGroupWithOne β] : AddGroupWithOne α :=
/-- Transfer `NonAssocSemiring` across an `Equiv` -/
@[reducible]
protected def nonAssocSemiring [NonAssocSemiring β] : NonAssocSemiring α := by
- let mul := e.Mul
+ let mul := e.mul
let add_monoid_with_one := e.addMonoidWithOne
apply e.injective.nonAssocSemiring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.non_assoc_semiring Equiv.nonAssocSemiring
@@ -337,54 +339,54 @@ protected def nonAssocSemiring [NonAssocSemiring β] : NonAssocSemiring α := by
/-- Transfer `Semiring` across an `Equiv` -/
@[reducible]
protected def semiring [Semiring β] : Semiring α := by
- let mul := e.Mul
+ let mul := e.mul
let add_monoid_with_one := e.addMonoidWithOne
- let npow := e.Pow ℕ
+ let npow := e.pow ℕ
apply e.injective.semiring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.semiring Equiv.semiring
/-- Transfer `NonUnitalCommSemiring` across an `Equiv` -/
@[reducible]
protected def nonUnitalCommSemiring [NonUnitalCommSemiring β] : NonUnitalCommSemiring α := by
- let zero := e.Zero
- let add := e.Add
- let mul := e.Mul
- let nsmul := e.SMul ℕ
+ let zero := e.zero
+ let add := e.add
+ let mul := e.mul
+ let nsmul := e.smul ℕ
apply e.injective.nonUnitalCommSemiring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.non_unital_comm_semiring Equiv.nonUnitalCommSemiring
/-- Transfer `CommSemiring` across an `Equiv` -/
@[reducible]
protected def commSemiring [CommSemiring β] : CommSemiring α := by
- let mul := e.Mul
+ let mul := e.mul
let add_monoid_with_one := e.addMonoidWithOne
- let npow := e.Pow ℕ
+ let npow := e.pow ℕ
apply e.injective.commSemiring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.comm_semiring Equiv.commSemiring
/-- Transfer `NonUnitalNonAssocRing` across an `Equiv` -/
@[reducible]
protected def nonUnitalNonAssocRing [NonUnitalNonAssocRing β] : NonUnitalNonAssocRing α := by
- let zero := e.Zero
- let add := e.Add
- let mul := e.Mul
+ let zero := e.zero
+ let add := e.add
+ let mul := e.mul
let neg := e.Neg
- let sub := e.Sub
- let nsmul := e.SMul ℕ
- let zsmul := e.SMul ℤ
+ let sub := e.sub
+ let nsmul := e.smul ℕ
+ let zsmul := e.smul ℤ
apply e.injective.nonUnitalNonAssocRing _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.non_unital_non_assoc_ring Equiv.nonUnitalNonAssocRing
/-- Transfer `NonUnitalRing` across an `Equiv` -/
@[reducible]
protected def nonUnitalRing [NonUnitalRing β] : NonUnitalRing α := by
- let zero := e.Zero
- let add := e.Add
- let mul := e.Mul
+ let zero := e.zero
+ let add := e.add
+ let mul := e.mul
let neg := e.Neg
- let sub := e.Sub
- let nsmul := e.SMul ℕ
- let zsmul := e.SMul ℤ
+ let sub := e.sub
+ let nsmul := e.smul ℕ
+ let zsmul := e.smul ℤ
apply e.injective.nonUnitalRing _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.non_unital_ring Equiv.nonUnitalRing
@@ -392,38 +394,38 @@ protected def nonUnitalRing [NonUnitalRing β] : NonUnitalRing α := by
@[reducible]
protected def nonAssocRing [NonAssocRing β] : NonAssocRing α := by
let add_group_with_one := e.addGroupWithOne
- let mul := e.Mul
+ let mul := e.mul
apply e.injective.nonAssocRing _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.non_assoc_ring Equiv.nonAssocRing
/-- Transfer `Ring` across an `Equiv` -/
@[reducible]
protected def ring [Ring β] : Ring α := by
- let mul := e.Mul
+ let mul := e.mul
let add_group_with_one := e.addGroupWithOne
- let npow := e.Pow ℕ
+ let npow := e.pow ℕ
apply e.injective.ring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.ring Equiv.ring
/-- Transfer `NonUnitalCommRing` across an `Equiv` -/
@[reducible]
protected def nonUnitalCommRing [NonUnitalCommRing β] : NonUnitalCommRing α := by
- let zero := e.Zero
- let add := e.Add
- let mul := e.Mul
+ let zero := e.zero
+ let add := e.add
+ let mul := e.mul
let neg := e.Neg
- let sub := e.Sub
- let nsmul := e.SMul ℕ
- let zsmul := e.SMul ℤ
+ let sub := e.sub
+ let nsmul := e.smul ℕ
+ let zsmul := e.smul ℤ
apply e.injective.nonUnitalCommRing _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.non_unital_comm_ring Equiv.nonUnitalCommRing
/-- Transfer `CommRing` across an `Equiv` -/
@[reducible]
protected def commRing [CommRing β] : CommRing α := by
- let mul := e.Mul
+ let mul := e.mul
let add_group_with_one := e.addGroupWithOne
- let npow := e.Pow ℕ
+ let npow := e.pow ℕ
apply e.injective.commRing _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.comm_ring Equiv.commRing
@@ -449,12 +451,12 @@ protected def RatCast [RatCast β] : RatCast α where ratCast n := e.symm n
protected def divisionRing [DivisionRing β] : DivisionRing α := by
let add_group_with_one := e.addGroupWithOne
let inv := e.Inv
- let div := e.Div
- let mul := e.Mul
- let npow := e.Pow ℕ
- let zpow := e.Pow ℤ
+ let div := e.div
+ let mul := e.mul
+ let npow := e.pow ℕ
+ let zpow := e.pow ℤ
let rat_cast := e.RatCast
- let qsmul := e.SMul ℚ
+ let qsmul := e.smul ℚ
apply e.injective.divisionRing _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.division_ring Equiv.divisionRing
@@ -464,12 +466,12 @@ protected def field [Field β] : Field α := by
let add_group_with_one := e.addGroupWithOne
let neg := e.Neg
let inv := e.Inv
- let div := e.Div
- let mul := e.Mul
- let npow := e.Pow ℕ
- let zpow := e.Pow ℤ
+ let div := e.div
+ let mul := e.mul
+ let npow := e.pow ℕ
+ let zpow := e.pow ℤ
let rat_cast := e.RatCast
- let qsmul := e.SMul ℚ
+ let qsmul := e.smul ℚ
apply e.injective.field _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.field Equiv.field
@@ -484,7 +486,7 @@ variable [Monoid R]
/-- Transfer `MulAction` across an `Equiv` -/
@[reducible]
protected def mulAction (e : α ≃ β) [MulAction R β] : MulAction R α :=
- { e.SMul R with
+ { e.smul R with
one_smul := by simp [smul_def]
mul_smul := by simp [smul_def, mul_smul] }
#align equiv.mul_action Equiv.mulAction
@@ -334,7 +334,7 @@ protected def nonAssocSemiring [NonAssocSemiring β] : NonAssocSemiring α := by
apply e.injective.nonAssocSemiring _ <;> intros <;> exact e.apply_symm_apply _
#align equiv.non_assoc_semiring Equiv.nonAssocSemiring
-/-- Transfer `semiring` across an `Equiv` -/
+/-- Transfer `Semiring` across an `Equiv` -/
@[reducible]
protected def semiring [Semiring β] : Semiring α := by
let mul := e.Mul
Co-authored-by: Joël Riou <joel.riou@universite-paris-saclay.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
The unported dependencies are