ring_theory.ring_hom_properties
⟷
Mathlib.RingTheory.RingHomProperties
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)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -5,7 +5,7 @@ Authors: Andrew Yang
-/
import Algebra.Category.Ring.Constructions
import Algebra.Category.Ring.Colimits
-import CategoryTheory.Isomorphism
+import CategoryTheory.Iso
import RingTheory.Localization.Away.Basic
import RingTheory.IsTensorProduct
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,11 +3,11 @@ Copyright (c) 2022 Andrew Yang. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Andrew Yang
-/
-import Mathbin.Algebra.Category.Ring.Constructions
-import Mathbin.Algebra.Category.Ring.Colimits
-import Mathbin.CategoryTheory.Isomorphism
-import Mathbin.RingTheory.Localization.Away.Basic
-import Mathbin.RingTheory.IsTensorProduct
+import Algebra.Category.Ring.Constructions
+import Algebra.Category.Ring.Colimits
+import CategoryTheory.Isomorphism
+import RingTheory.Localization.Away.Basic
+import RingTheory.IsTensorProduct
#align_import ring_theory.ring_hom_properties from "leanprover-community/mathlib"@"d07a9c875ed7139abfde6a333b2be205c5bd404e"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,11 +2,6 @@
Copyright (c) 2022 Andrew Yang. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Andrew Yang
-
-! This file was ported from Lean 3 source module ring_theory.ring_hom_properties
-! leanprover-community/mathlib commit d07a9c875ed7139abfde6a333b2be205c5bd404e
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Algebra.Category.Ring.Constructions
import Mathbin.Algebra.Category.Ring.Colimits
@@ -14,6 +9,8 @@ import Mathbin.CategoryTheory.Isomorphism
import Mathbin.RingTheory.Localization.Away.Basic
import Mathbin.RingTheory.IsTensorProduct
+#align_import ring_theory.ring_hom_properties from "leanprover-community/mathlib"@"d07a9c875ed7139abfde6a333b2be205c5bd404e"
+
/-!
# Properties of ring homomorphisms
mathlib commit https://github.com/leanprover-community/mathlib/commit/9f55d0d4363ae59948c33864cbc52e0b12e0e8ce
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Andrew Yang
! This file was ported from Lean 3 source module ring_theory.ring_hom_properties
-! leanprover-community/mathlib commit a7c017d750512a352b623b1824d75da5998457d0
+! leanprover-community/mathlib commit d07a9c875ed7139abfde6a333b2be205c5bd404e
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -17,6 +17,9 @@ import Mathbin.RingTheory.IsTensorProduct
/-!
# Properties of ring homomorphisms
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
We provide the basic framework for talking about properties of ring homomorphisms.
The following meta-properties of predicates on ring homomorphisms are defined
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -37,8 +37,6 @@ namespace RingHom
variable (P : ∀ {R S : Type u} [CommRing R] [CommRing S] (f : R →+* S), Prop)
-include P
-
section RespectsIso
#print RingHom.RespectsIso /-
@@ -71,6 +69,7 @@ theorem RespectsIso.cancel_right_isIso (hP : RespectsIso @P) {R S T : CommRingCa
#align ring_hom.respects_iso.cancel_right_is_iso RingHom.RespectsIso.cancel_right_isIso
-/
+#print RingHom.RespectsIso.is_localization_away_iff /-
theorem RespectsIso.is_localization_away_iff (hP : RingHom.RespectsIso @P) {R S : Type _}
(R' S' : Type _) [CommRing R] [CommRing S] [CommRing R'] [CommRing S'] [Algebra R R']
[Algebra S S'] (f : R →+* S) (r : R) [IsLocalization.Away r R'] [IsLocalization.Away (f r) S'] :
@@ -93,6 +92,7 @@ theorem RespectsIso.is_localization_away_iff (hP : RingHom.RespectsIso @P) {R S
IsLocalization.ringEquivOfRingEquiv_apply, RingHom.coe_mk, RingEquiv.toFun_eq_coe,
IsLocalization.ringEquivOfRingEquiv_eq, IsLocalization.map_eq]
#align ring_hom.respects_iso.is_localization_away_iff RingHom.RespectsIso.is_localization_away_iff
+-/
end RespectsIso
@@ -109,6 +109,7 @@ def StableUnderComposition : Prop :=
variable {P}
+#print RingHom.StableUnderComposition.respectsIso /-
theorem StableUnderComposition.respectsIso (hP : RingHom.StableUnderComposition @P)
(hP' : ∀ {R S : Type _} [CommRing R] [CommRing S] (e : R ≃+* S), P e.to_ring_hom) :
RingHom.RespectsIso @P := by
@@ -116,6 +117,7 @@ theorem StableUnderComposition.respectsIso (hP : RingHom.StableUnderComposition
· introv H; skip; apply hP; exacts [H, hP' e]
· introv H; skip; apply hP; exacts [hP' e, H]
#align ring_hom.stable_under_composition.respects_iso RingHom.StableUnderComposition.respectsIso
+-/
end StableUnderComposition
@@ -132,6 +134,7 @@ def StableUnderBaseChange : Prop :=
#align ring_hom.stable_under_base_change RingHom.StableUnderBaseChange
-/
+#print RingHom.StableUnderBaseChange.mk /-
theorem StableUnderBaseChange.mk (h₁ : RespectsIso @P)
(h₂ :
∀ ⦃R S T⦄ [CommRing R] [CommRing S] [CommRing T],
@@ -163,8 +166,7 @@ theorem StableUnderBaseChange.mk (h₁ : RespectsIso @P)
dsimp only [e]
rw [h.symm.1.equiv_tmul, Algebra.smul_def, AlgHom.toLinearMap_apply, map_one, mul_one]
#align ring_hom.stable_under_base_change.mk RingHom.StableUnderBaseChange.mk
-
-omit P
+-/
attribute [local instance] Algebra.TensorProduct.rightAlgebra
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -41,6 +41,7 @@ include P
section RespectsIso
+#print RingHom.RespectsIso /-
/-- A property `respects_iso` if it still holds when composed with an isomorphism -/
def RespectsIso : Prop :=
(∀ {R S T : Type u} [CommRing R] [CommRing S] [CommRing T],
@@ -48,22 +49,27 @@ def RespectsIso : Prop :=
∀ {R S T : Type u} [CommRing R] [CommRing S] [CommRing T],
∀ (f : S →+* T) (e : R ≃+* S) (hf : P f), P (f.comp e.toRingHom)
#align ring_hom.respects_iso RingHom.RespectsIso
+-/
variable {P}
+#print RingHom.RespectsIso.cancel_left_isIso /-
theorem RespectsIso.cancel_left_isIso (hP : RespectsIso @P) {R S T : CommRingCat} (f : R ⟶ S)
(g : S ⟶ T) [IsIso f] : P (f ≫ g) ↔ P g :=
⟨fun H => by
convert hP.2 (f ≫ g) (as_iso f).symm.commRingCatIsoToRingEquiv H
exact (is_iso.inv_hom_id_assoc _ _).symm, hP.2 g (asIso f).commRingCatIsoToRingEquiv⟩
#align ring_hom.respects_iso.cancel_left_is_iso RingHom.RespectsIso.cancel_left_isIso
+-/
+#print RingHom.RespectsIso.cancel_right_isIso /-
theorem RespectsIso.cancel_right_isIso (hP : RespectsIso @P) {R S T : CommRingCat} (f : R ⟶ S)
(g : S ⟶ T) [IsIso g] : P (f ≫ g) ↔ P f :=
⟨fun H => by
convert hP.1 (f ≫ g) (as_iso g).symm.commRingCatIsoToRingEquiv H
change f = f ≫ g ≫ inv g; simp, hP.1 f (asIso g).commRingCatIsoToRingEquiv⟩
#align ring_hom.respects_iso.cancel_right_is_iso RingHom.RespectsIso.cancel_right_isIso
+-/
theorem RespectsIso.is_localization_away_iff (hP : RingHom.RespectsIso @P) {R S : Type _}
(R' S' : Type _) [CommRing R] [CommRing S] [CommRing R'] [CommRing S'] [Algebra R R']
@@ -92,12 +98,14 @@ end RespectsIso
section StableUnderComposition
+#print RingHom.StableUnderComposition /-
/-- A property is `stable_under_composition` if the composition of two such morphisms
still falls in the class. -/
def StableUnderComposition : Prop :=
∀ ⦃R S T⦄ [CommRing R] [CommRing S] [CommRing T],
∀ (f : R →+* S) (g : S →+* T) (hf : P f) (hg : P g), P (g.comp f)
#align ring_hom.stable_under_composition RingHom.StableUnderComposition
+-/
variable {P}
@@ -113,6 +121,7 @@ end StableUnderComposition
section StableUnderBaseChange
+#print RingHom.StableUnderBaseChange /-
/-- A morphism property `P` is `stable_under_base_change` if `P(S →+* A)` implies
`P(B →+* A ⊗[S] B)`. -/
def StableUnderBaseChange : Prop :=
@@ -121,6 +130,7 @@ def StableUnderBaseChange : Prop :=
∀ [IsScalarTower R S S'] [IsScalarTower R R' S'],
∀ [Algebra.IsPushout R S R' S'], P (algebraMap R S) → P (algebraMap R' S')
#align ring_hom.stable_under_base_change RingHom.StableUnderBaseChange
+-/
theorem StableUnderBaseChange.mk (h₁ : RespectsIso @P)
(h₂ :
@@ -158,6 +168,7 @@ omit P
attribute [local instance] Algebra.TensorProduct.rightAlgebra
+#print RingHom.StableUnderBaseChange.pushout_inl /-
theorem StableUnderBaseChange.pushout_inl (hP : RingHom.StableUnderBaseChange @P)
(hP' : RingHom.RespectsIso @P) {R S T : CommRingCat} (f : R ⟶ S) (g : R ⟶ T) (H : P g) :
P (pushout.inl : S ⟶ pushout f g) :=
@@ -173,6 +184,7 @@ theorem StableUnderBaseChange.pushout_inl (hP : RingHom.StableUnderBaseChange @P
apply hP R T S (TensorProduct R S T)
exact H
#align ring_hom.stable_under_base_change.pushout_inl RingHom.StableUnderBaseChange.pushout_inl
+-/
end StableUnderBaseChange
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -105,8 +105,8 @@ theorem StableUnderComposition.respectsIso (hP : RingHom.StableUnderComposition
(hP' : ∀ {R S : Type _} [CommRing R] [CommRing S] (e : R ≃+* S), P e.to_ring_hom) :
RingHom.RespectsIso @P := by
constructor
- · introv H; skip; apply hP; exacts[H, hP' e]
- · introv H; skip; apply hP; exacts[hP' e, H]
+ · introv H; skip; apply hP; exacts [H, hP' e]
+ · introv H; skip; apply hP; exacts [hP' e, H]
#align ring_hom.stable_under_composition.respects_iso RingHom.StableUnderComposition.respectsIso
end StableUnderComposition
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -84,7 +84,7 @@ theorem RespectsIso.is_localization_away_iff (hP : RingHom.RespectsIso @P) {R S
revert e₁ e₂
dsimp [RingEquiv.toRingHom, IsLocalization.Away.map]
simp only [CategoryTheory.comp_apply, RingEquiv.refl_apply, IsLocalization.algEquiv_apply,
- IsLocalization.ringEquivOfRingEquiv_apply, RingHom.coe_mk, [anonymous],
+ IsLocalization.ringEquivOfRingEquiv_apply, RingHom.coe_mk, RingEquiv.toFun_eq_coe,
IsLocalization.ringEquivOfRingEquiv_eq, IsLocalization.map_eq]
#align ring_hom.respects_iso.is_localization_away_iff RingHom.RespectsIso.is_localization_away_iff
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -62,8 +62,7 @@ theorem RespectsIso.cancel_right_isIso (hP : RespectsIso @P) {R S T : CommRingCa
(g : S ⟶ T) [IsIso g] : P (f ≫ g) ↔ P f :=
⟨fun H => by
convert hP.1 (f ≫ g) (as_iso g).symm.commRingCatIsoToRingEquiv H
- change f = f ≫ g ≫ inv g
- simp, hP.1 f (asIso g).commRingCatIsoToRingEquiv⟩
+ change f = f ≫ g ≫ inv g; simp, hP.1 f (asIso g).commRingCatIsoToRingEquiv⟩
#align ring_hom.respects_iso.cancel_right_is_iso RingHom.RespectsIso.cancel_right_isIso
theorem RespectsIso.is_localization_away_iff (hP : RingHom.RespectsIso @P) {R S : Type _}
@@ -106,14 +105,8 @@ theorem StableUnderComposition.respectsIso (hP : RingHom.StableUnderComposition
(hP' : ∀ {R S : Type _} [CommRing R] [CommRing S] (e : R ≃+* S), P e.to_ring_hom) :
RingHom.RespectsIso @P := by
constructor
- · introv H
- skip
- apply hP
- exacts[H, hP' e]
- · introv H
- skip
- apply hP
- exacts[hP' e, H]
+ · introv H; skip; apply hP; exacts[H, hP' e]
+ · introv H; skip; apply hP; exacts[hP' e, H]
#align ring_hom.stable_under_composition.respects_iso RingHom.StableUnderComposition.respectsIso
end StableUnderComposition
mathlib commit https://github.com/leanprover-community/mathlib/commit/f51de8769c34652d82d1c8e5f8f18f8374782bed
@@ -4,14 +4,14 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Andrew Yang
! This file was ported from Lean 3 source module ring_theory.ring_hom_properties
-! leanprover-community/mathlib commit b5aecf07a179c60b6b37c1ac9da952f3b565c785
+! leanprover-community/mathlib commit a7c017d750512a352b623b1824d75da5998457d0
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.Algebra.Category.Ring.Constructions
import Mathbin.Algebra.Category.Ring.Colimits
import Mathbin.CategoryTheory.Isomorphism
-import Mathbin.RingTheory.Localization.Away
+import Mathbin.RingTheory.Localization.Away.Basic
import Mathbin.RingTheory.IsTensorProduct
/-!
mathlib commit https://github.com/leanprover-community/mathlib/commit/e3fb84046afd187b710170887195d50bada934ee
@@ -54,16 +54,16 @@ variable {P}
theorem RespectsIso.cancel_left_isIso (hP : RespectsIso @P) {R S T : CommRingCat} (f : R ⟶ S)
(g : S ⟶ T) [IsIso f] : P (f ≫ g) ↔ P g :=
⟨fun H => by
- convert hP.2 (f ≫ g) (as_iso f).symm.commRingIsoToRingEquiv H
- exact (is_iso.inv_hom_id_assoc _ _).symm, hP.2 g (asIso f).commRingIsoToRingEquiv⟩
+ convert hP.2 (f ≫ g) (as_iso f).symm.commRingCatIsoToRingEquiv H
+ exact (is_iso.inv_hom_id_assoc _ _).symm, hP.2 g (asIso f).commRingCatIsoToRingEquiv⟩
#align ring_hom.respects_iso.cancel_left_is_iso RingHom.RespectsIso.cancel_left_isIso
theorem RespectsIso.cancel_right_isIso (hP : RespectsIso @P) {R S T : CommRingCat} (f : R ⟶ S)
(g : S ⟶ T) [IsIso g] : P (f ≫ g) ↔ P f :=
⟨fun H => by
- convert hP.1 (f ≫ g) (as_iso g).symm.commRingIsoToRingEquiv H
+ convert hP.1 (f ≫ g) (as_iso g).symm.commRingCatIsoToRingEquiv H
change f = f ≫ g ≫ inv g
- simp, hP.1 f (asIso g).commRingIsoToRingEquiv⟩
+ simp, hP.1 f (asIso g).commRingCatIsoToRingEquiv⟩
#align ring_hom.respects_iso.cancel_right_is_iso RingHom.RespectsIso.cancel_right_isIso
theorem RespectsIso.is_localization_away_iff (hP : RingHom.RespectsIso @P) {R S : Type _}
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -109,11 +109,9 @@ theorem StableUnderComposition.respectsIso (hP : RingHom.StableUnderComposition
RingHom.RespectsIso @P := by
constructor
· introv H
- skip
apply hP
exacts [H, hP' e]
· introv H
- skip
apply hP
exacts [hP' e, H]
#align ring_hom.stable_under_composition.respects_iso RingHom.StableUnderComposition.respectsIso
Homogenises porting notes via capitalisation and addition of whitespace.
It makes the following changes:
@@ -161,7 +161,7 @@ theorem StableUnderBaseChange.mk (h₁ : RespectsIso @P)
exact map_mul f' _ _
· ext x
change _ = e (x ⊗ₜ[R] 1)
- --Porting note: Had `dsimp only [e]` here, which didn't work anymore
+ -- Porting note: Had `dsimp only [e]` here, which didn't work anymore
rw [h.symm.1.equiv_tmul, Algebra.smul_def, AlgHom.toLinearMap_apply, map_one, mul_one]
#align ring_hom.stable_under_base_change.mk RingHom.StableUnderBaseChange.mk
@@ -87,7 +87,7 @@ theorem RespectsIso.is_localization_away_iff (hP : RingHom.RespectsIso @P) {R S
convert this
apply IsLocalization.ringHom_ext (Submonoid.powers r) _
ext1 x
- dsimp [IsLocalization.Away.map]
+ dsimp [e, e₁, e₂, IsLocalization.Away.map]
simp only [IsLocalization.map_eq, id_apply, RingHomCompTriple.comp_apply]
#align ring_hom.respects_iso.is_localization_away_iff RingHom.RespectsIso.is_localization_away_iff
@@ -149,7 +149,7 @@ theorem StableUnderBaseChange.mk (h₁ : RespectsIso @P)
congr 1
apply TensorProduct.ext'
intro x y
- simp [IsBaseChange.equiv_tmul, Algebra.smul_def]
+ simp [e, f', IsBaseChange.equiv_tmul, Algebra.smul_def]
-- Porting Note: This had a lot of implicit inferences which didn't resolve anymore.
-- Added those in
convert h₁.1 (_ : R' →+* TensorProduct R R' S) (_ : TensorProduct R R' S ≃+* S')
In this pull request, I have systematically eliminated the leading whitespace preceding the colon (:
) within all unlabelled or unclassified porting notes. This adjustment facilitates a more efficient review process for the remaining notes by ensuring no entries are overlooked due to formatting inconsistencies.
@@ -74,7 +74,7 @@ theorem RespectsIso.is_localization_away_iff (hP : RingHom.RespectsIso @P) {R S
refine' (hP.cancel_right_isIso (CommRingCat.ofHom _) e₂.toCommRingCatIso.hom).symm.trans _
rw [← eq_iff_iff]
congr 1
- -- Porting Note : Here, the proof used to have a huge `simp` involving `[anonymous]`, which didn't
+ -- Porting note: Here, the proof used to have a huge `simp` involving `[anonymous]`, which didn't
-- work out anymore. The issue seemed to be that it couldn't handle a term in which Ring
-- homomorphisms were repeatedly casted to the bundled category and back. Here we resolve the
-- problem by converting the goal to a more straightforward form.
Type _
before the colon (#7718)
We have turned to Type*
instead of Type _
, but many of them remained in mathlib because the straight replacement did not work. In general, having Type _
before the colon is a code smell, though, as it hides which types should be in the same universe and which shouldn't, and is not very robust.
This PR replaces most of the remaining Type _
before the colon (except those in category theory) by Type*
or Type u
. This has uncovered a few bugs (where declarations were not as polymorphic as they should be).
I had to increase heartbeats at two places when replacing Type _
by Type*
, but I think it's worth it as it's really more robust.
@@ -62,8 +62,8 @@ theorem RespectsIso.cancel_right_isIso (hP : RespectsIso @P) {R S T : CommRingCa
simp, hP.1 f (asIso g).commRingCatIsoToRingEquiv⟩
#align ring_hom.respects_iso.cancel_right_is_iso RingHom.RespectsIso.cancel_right_isIso
-theorem RespectsIso.is_localization_away_iff (hP : RingHom.RespectsIso @P) {R S : Type _}
- (R' S' : Type _) [CommRing R] [CommRing S] [CommRing R'] [CommRing S'] [Algebra R R']
+theorem RespectsIso.is_localization_away_iff (hP : RingHom.RespectsIso @P) {R S : Type u}
+ (R' S' : Type u) [CommRing R] [CommRing S] [CommRing R'] [CommRing S'] [Algebra R R']
[Algebra S S'] (f : R →+* S) (r : R) [IsLocalization.Away r R'] [IsLocalization.Away (f r) S'] :
P (Localization.awayMap f r) ↔ P (IsLocalization.Away.map R' S' f r) := by
let e₁ : R' ≃+* Localization.Away r :=
@@ -105,7 +105,7 @@ def StableUnderComposition : Prop :=
variable {P}
theorem StableUnderComposition.respectsIso (hP : RingHom.StableUnderComposition @P)
- (hP' : ∀ {R S : Type _} [CommRing R] [CommRing S] (e : R ≃+* S), P e.toRingHom) :
+ (hP' : ∀ {R S : Type u} [CommRing R] [CommRing S] (e : R ≃+* S), P e.toRingHom) :
RingHom.RespectsIso @P := by
constructor
· introv H
This:
TODO
to generalize includeLeft
to commuting actions. As a result a few downstream results are changed to be about includeLeftRingHom
or a ⊗ₜ 1
, as carrying around the extra useless ring just makes the lemmas harder to use. Nothing seems to suffer from this change.TensorProduct.AlgebraTensorModule.rid
Algebra.TensorProduct.algHomOfLinearMapTensorProduct
Algebra.TensorProduct.map
Algebra.TensorProduct.congr
Algebra.TensorProduct.endTensorEndAlgHom
Algebra.TensorProduct.ext
(and renames it to Algebra.TensorProduct.ext'
)Algebra.TensorProduct.rid
Algebra.TensorProduct.ext
which follows "partially-applied ext lemmas", and uses it to golf a proof in RingTheory/Etale.lean
I need many of these results for building AlgEquiv
s relating to the base change of clifford algebras.
@@ -136,7 +136,7 @@ theorem StableUnderBaseChange.mk (h₁ : RespectsIso @P)
∀ ⦃R S T⦄ [CommRing R] [CommRing S] [CommRing T],
∀ [Algebra R S] [Algebra R T],
P (algebraMap R T) →
- P (Algebra.TensorProduct.includeLeft.toRingHom : S →+* TensorProduct R S T)) :
+ P (Algebra.TensorProduct.includeLeftRingHom : S →+* TensorProduct R S T)) :
StableUnderBaseChange @P := by
introv R h H
let e := h.symm.1.equiv
@@ -2,11 +2,6 @@
Copyright (c) 2022 Andrew Yang. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Andrew Yang
-
-! This file was ported from Lean 3 source module ring_theory.ring_hom_properties
-! leanprover-community/mathlib commit a7c017d750512a352b623b1824d75da5998457d0
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Algebra.Category.Ring.Constructions
import Mathlib.Algebra.Category.Ring.Colimits
@@ -14,6 +9,8 @@ import Mathlib.CategoryTheory.Iso
import Mathlib.RingTheory.Localization.Away.Basic
import Mathlib.RingTheory.IsTensorProduct
+#align_import ring_theory.ring_hom_properties from "leanprover-community/mathlib"@"a7c017d750512a352b623b1824d75da5998457d0"
+
/-!
# Properties of ring homomorphisms
@@ -20,10 +20,10 @@ import Mathlib.RingTheory.IsTensorProduct
We provide the basic framework for talking about properties of ring homomorphisms.
The following meta-properties of predicates on ring homomorphisms are defined
-* `ring_hom.respects_iso`: `P` respects isomorphisms if `P f → P (e ≫ f)` and
+* `RingHom.RespectsIso`: `P` respects isomorphisms if `P f → P (e ≫ f)` and
`P f → P (f ≫ e)`, where `e` is an isomorphism.
-* `ring_hom.stable_under_composition`: `P` is stable under composition if `P f → P g → P (f ≫ g)`.
-* `ring_hom.stable_under_base_change`: `P` is stable under base change if `P (S ⟶ Y)`
+* `RingHom.StableUnderComposition`: `P` is stable under composition if `P f → P g → P (f ≫ g)`.
+* `RingHom.StableUnderBaseChange`: `P` is stable under base change if `P (S ⟶ Y)`
implies `P (X ⟶ X ⊗[S] Y)`.
-/
@@ -40,7 +40,7 @@ variable (P : ∀ {R S : Type u} [CommRing R] [CommRing S] (_ : R →+* S), Prop
section RespectsIso
-/-- A property `respects_iso` if it still holds when composed with an isomorphism -/
+/-- A property `RespectsIso` if it still holds when composed with an isomorphism -/
def RespectsIso : Prop :=
(∀ {R S T : Type u} [CommRing R] [CommRing S] [CommRing T],
∀ (f : R →+* S) (e : S ≃+* T) (_ : P f), P (e.toRingHom.comp f)) ∧
@@ -98,7 +98,7 @@ end RespectsIso
section StableUnderComposition
-/-- A property is `stable_under_composition` if the composition of two such morphisms
+/-- A property is `StableUnderComposition` if the composition of two such morphisms
still falls in the class. -/
def StableUnderComposition : Prop :=
∀ ⦃R S T⦄ [CommRing R] [CommRing S] [CommRing T],
@@ -114,18 +114,18 @@ theorem StableUnderComposition.respectsIso (hP : RingHom.StableUnderComposition
· introv H
skip
apply hP
- exacts[H, hP' e]
+ exacts [H, hP' e]
· introv H
skip
apply hP
- exacts[hP' e, H]
+ exacts [hP' e, H]
#align ring_hom.stable_under_composition.respects_iso RingHom.StableUnderComposition.respectsIso
end StableUnderComposition
section StableUnderBaseChange
-/-- A morphism property `P` is `stable_under_base_change` if `P(S →+* A)` implies
+/-- A morphism property `P` is `StableUnderBaseChange` if `P(S →+* A)` implies
`P(B →+* A ⊗[S] B)`. -/
def StableUnderBaseChange : Prop :=
∀ (R S R' S') [CommRing R] [CommRing S] [CommRing R'] [CommRing S'],
@@ -142,7 +142,6 @@ theorem StableUnderBaseChange.mk (h₁ : RespectsIso @P)
P (Algebra.TensorProduct.includeLeft.toRingHom : S →+* TensorProduct R S T)) :
StableUnderBaseChange @P := by
introv R h H
- skip
let e := h.symm.1.equiv
let f' :=
Algebra.TensorProduct.productMap (IsScalarTower.toAlgHom R R' S')
The unported dependencies are