@@ -83,13 +83,18 @@ end AlgEquivClass
8383
8484namespace AlgEquiv
8585
86- variable {R : Type u} {A₁ : Type v} {A₂ : Type w} {A₃ : Type u₁}
86+ universe uR uA₁ uA₂ uA₃ uA₁' uA₂' uA₃'
87+ variable {R : Type uR}
88+ variable {A₁ : Type uA₁} {A₂ : Type uA₂} {A₃ : Type uA₃}
89+ variable {A₁' : Type uA₁'} {A₂' : Type uA₂'} {A₃' : Type uA₃'}
8790
8891section Semiring
8992
9093variable [CommSemiring R] [Semiring A₁] [Semiring A₂] [Semiring A₃]
94+ variable [Semiring A₁'] [Semiring A₂'] [Semiring A₃']
9195
9296variable [Algebra R A₁] [Algebra R A₂] [Algebra R A₃]
97+ variable [Algebra R A₁'] [Algebra R A₂'] [Algebra R A₃']
9398
9499variable (e : A₁ ≃ₐ[R] A₂)
95100
@@ -438,9 +443,8 @@ theorem rightInverse_symm (e : A₁ ≃ₐ[R] A₂) : Function.RightInverse e.sy
438443
439444/-- If `A₁` is equivalent to `A₁'` and `A₂` is equivalent to `A₂'`, then the type of maps
440445`A₁ →ₐ[R] A₂` is equivalent to the type of maps `A₁' →ₐ[R] A₂'`. -/
441- def arrowCongr {A₁' A₂' : Type *} [Semiring A₁'] [Semiring A₂'] [Algebra R A₁'] [Algebra R A₂']
442- (e₁ : A₁ ≃ₐ[R] A₁') (e₂ : A₂ ≃ₐ[R] A₂') : (A₁ →ₐ[R] A₂) ≃ (A₁' →ₐ[R] A₂')
443- where
446+ @ [simps apply]
447+ def arrowCongr (e₁ : A₁ ≃ₐ[R] A₁') (e₂ : A₂ ≃ₐ[R] A₂') : (A₁ →ₐ[R] A₂) ≃ (A₁' →ₐ[R] A₂') where
444448 toFun f := (e₂.toAlgHom.comp f).comp e₁.symm.toAlgHom
445449 invFun f := (e₂.symm.toAlgHom.comp f).comp e₁.toAlgHom
446450 left_inv f := by
@@ -451,8 +455,7 @@ def arrowCongr {A₁' A₂' : Type*} [Semiring A₁'] [Semiring A₂'] [Algebra
451455 simp only [← AlgHom.comp_assoc, comp_symm, AlgHom.id_comp, AlgHom.comp_id]
452456#align alg_equiv.arrow_congr AlgEquiv.arrowCongr
453457
454- theorem arrowCongr_comp {A₁' A₂' A₃' : Type *} [Semiring A₁'] [Semiring A₂'] [Semiring A₃']
455- [Algebra R A₁'] [Algebra R A₂'] [Algebra R A₃'] (e₁ : A₁ ≃ₐ[R] A₁') (e₂ : A₂ ≃ₐ[R] A₂')
458+ theorem arrowCongr_comp (e₁ : A₁ ≃ₐ[R] A₁') (e₂ : A₂ ≃ₐ[R] A₂')
456459 (e₃ : A₃ ≃ₐ[R] A₃') (f : A₁ →ₐ[R] A₂) (g : A₂ →ₐ[R] A₃) :
457460 arrowCongr e₁ e₃ (g.comp f) = (arrowCongr e₂ e₃ g).comp (arrowCongr e₁ e₂ f) := by
458461 ext
@@ -468,22 +471,52 @@ theorem arrowCongr_refl : arrowCongr AlgEquiv.refl AlgEquiv.refl = Equiv.refl (A
468471#align alg_equiv.arrow_congr_refl AlgEquiv.arrowCongr_refl
469472
470473@[simp]
471- theorem arrowCongr_trans {A₁' A₂' A₃' : Type *} [Semiring A₁'] [Semiring A₂'] [Semiring A₃']
472- [Algebra R A₁'] [Algebra R A₂'] [Algebra R A₃'] (e₁ : A₁ ≃ₐ[R] A₂) (e₁' : A₁' ≃ₐ[R] A₂')
474+ theorem arrowCongr_trans (e₁ : A₁ ≃ₐ[R] A₂) (e₁' : A₁' ≃ₐ[R] A₂')
473475 (e₂ : A₂ ≃ₐ[R] A₃) (e₂' : A₂' ≃ₐ[R] A₃') :
474476 arrowCongr (e₁.trans e₂) (e₁'.trans e₂') = (arrowCongr e₁ e₁').trans (arrowCongr e₂ e₂') := by
475477 ext
476478 rfl
477479#align alg_equiv.arrow_congr_trans AlgEquiv.arrowCongr_trans
478480
479481@[simp]
480- theorem arrowCongr_symm {A₁' A₂' : Type *} [Semiring A₁'] [Semiring A₂'] [Algebra R A₁']
481- [Algebra R A₂'] (e₁ : A₁ ≃ₐ[R] A₁') (e₂ : A₂ ≃ₐ[R] A₂') :
482+ theorem arrowCongr_symm (e₁ : A₁ ≃ₐ[R] A₁') (e₂ : A₂ ≃ₐ[R] A₂') :
482483 (arrowCongr e₁ e₂).symm = arrowCongr e₁.symm e₂.symm := by
483484 ext
484485 rfl
485486#align alg_equiv.arrow_congr_symm AlgEquiv.arrowCongr_symm
486487
488+ /-- If `A₁` is equivalent to `A₂` and `A₁'` is equivalent to `A₂'`, then the type of maps
489+ `A₁ ≃ₐ[R] A₁'` is equivalent to the type of maps `A₂ ≃ ₐ[R] A₂'`.
490+
491+ This is the `AlgEquiv` version of `AlgEquiv.arrowCongr`. -/
492+ @ [simps apply]
493+ def equivCongr (e : A₁ ≃ₐ[R] A₂) (e' : A₁' ≃ₐ[R] A₂') : (A₁ ≃ₐ[R] A₁') ≃ A₂ ≃ₐ[R] A₂' where
494+ toFun ψ := e.symm.trans (ψ.trans e')
495+ invFun ψ := e.trans (ψ.trans e'.symm)
496+ left_inv ψ := by
497+ ext
498+ simp_rw [trans_apply, symm_apply_apply]
499+ right_inv ψ := by
500+ ext
501+ simp_rw [trans_apply, apply_symm_apply]
502+
503+ @[simp]
504+ theorem equivCongr_refl : equivCongr AlgEquiv.refl AlgEquiv.refl = Equiv.refl (A₁ ≃ₐ[R] A₁') := by
505+ ext
506+ rfl
507+
508+ @[simp]
509+ theorem equivCongr_symm (e : A₁ ≃ₐ[R] A₂) (e' : A₁' ≃ₐ[R] A₂') :
510+ (equivCongr e e').symm = equivCongr e.symm e'.symm :=
511+ rfl
512+
513+ @[simp]
514+ theorem equivCongr_trans (e₁₂ : A₁ ≃ₐ[R] A₂) (e₁₂' : A₁' ≃ₐ[R] A₂')
515+ (e₂₃ : A₂ ≃ₐ[R] A₃) (e₂₃' : A₂' ≃ₐ[R] A₃') :
516+ (equivCongr e₁₂ e₁₂').trans (equivCongr e₂₃ e₂₃') =
517+ equivCongr (e₁₂.trans e₂₃) (e₁₂'.trans e₂₃') :=
518+ rfl
519+
487520/-- If an algebra morphism has an inverse, it is an algebra isomorphism. -/
488521def ofAlgHom (f : A₁ →ₐ[R] A₂) (g : A₂ →ₐ[R] A₁) (h₁ : f.comp g = AlgHom.id R A₂)
489522 (h₂ : g.comp f = AlgHom.id R A₁) : A₁ ≃ₐ[R] A₂ :=
@@ -527,20 +560,13 @@ theorem ofBijective_apply {f : A₁ →ₐ[R] A₂} {hf : Function.Bijective f}
527560#align alg_equiv.of_bijective_apply AlgEquiv.ofBijective_apply
528561
529562/-- Forgetting the multiplicative structures, an equivalence of algebras is a linear equivalence. -/
530- -- Porting note: writing the `@[simps apply]`-generated lemma by hand
531- -- Maybe fixed by the changes in #2435?
563+ @ [simps apply]
532564def toLinearEquiv (e : A₁ ≃ₐ[R] A₂) : A₁ ≃ₗ[R] A₂ :=
533565 { e with
534566 toFun := e
535567 map_smul' := e.map_smul
536568 invFun := e.symm }
537569#align alg_equiv.to_linear_equiv AlgEquiv.toLinearEquiv
538-
539- -- Porting note: writing the `@[simps apply]`-generated lemma by hand
540- -- Maybe fixed by the changes in #2435?
541- @[simp]
542- theorem toLinearEquiv_apply : e.toLinearEquiv x = e x :=
543- rfl
544570#align alg_equiv.to_linear_equiv_apply AlgEquiv.toLinearEquiv_apply
545571
546572@[simp]
@@ -675,17 +701,14 @@ theorem mul_apply (e₁ e₂ : A₁ ≃ₐ[R] A₁) (x : A₁) : (e₁ * e₂) x
675701 rfl
676702#align alg_equiv.mul_apply AlgEquiv.mul_apply
677703
678- /-- An algebra isomorphism induces a group isomorphism between automorphism groups -/
704+ /-- An algebra isomorphism induces a group isomorphism between automorphism groups.
705+
706+ This is a more bundled version of `AlgEquiv.equivCongr`. -/
679707@ [simps apply]
680708def autCongr (ϕ : A₁ ≃ₐ[R] A₂) : (A₁ ≃ₐ[R] A₁) ≃* A₂ ≃ₐ[R] A₂ where
709+ __ := equivCongr ϕ ϕ
681710 toFun ψ := ϕ.symm.trans (ψ.trans ϕ)
682711 invFun ψ := ϕ.trans (ψ.trans ϕ.symm)
683- left_inv ψ := by
684- ext
685- simp_rw [trans_apply, symm_apply_apply]
686- right_inv ψ := by
687- ext
688- simp_rw [trans_apply, apply_symm_apply]
689712 map_mul' ψ χ := by
690713 ext
691714 simp only [mul_apply, trans_apply, symm_apply_apply]
0 commit comments