@@ -296,8 +296,10 @@ noncomputable def localRingEquiv (J : Ideal P) [J.IsPrime] (f : R ≃+* P) (hIJ
296296 right_inv x := by simp [localRingHom, map_map]
297297
298298variable {S} in
299- /-- For an algebra hom `f : S →ₐ[R] P` and a prime ideal `J` in `P`, the induced ring hom from the
300- localization of `R` at `J ∩ S` to the localization of `P` at `J`. -/
299+ /-- For an `R`-algebra homomorphism `f : S →ₐ[R] P` and prime ideals `I = f⁻¹(J)`, the induced
300+ `R`-algebra homomorphism from the localization of `S` at `I` to the localization of `P` at `J`.
301+
302+ See `localAlgHom'` for a variant where the base ring `R` is also localized. -/
301303noncomputable def localAlgHom [Algebra R P] (I : Ideal S) [I.IsPrime] (J : Ideal P) [J.IsPrime]
302304 (f : S →ₐ[R] P) (hIJ : I = J.comap f) :
303305 Localization.AtPrime I →ₐ[R] Localization.AtPrime J where
@@ -312,7 +314,9 @@ variable {S} in
312314 localAlgHom I J f hIJ x = localRingHom I J f.toRingHom hIJ x := rfl
313315
314316variable {S} in
315- /-- Isomorphic algebras have isomorphic localizations. -/
317+ /-- Isomorphic algebras have isomorphic localizations.
318+
319+ See `localAlgEquiv'` for a variant where the base ring is also localized. -/
316320@[simps]
317321noncomputable def localAlgEquiv [Algebra R P] (I : Ideal S) [I.IsPrime] (J : Ideal P) [J.IsPrime]
318322 (f : S ≃ₐ[R] P) (hIJ : I = J.comap f) :
@@ -349,8 +353,8 @@ namespace AtPrime
349353
350354section
351355
352- variable {A B C : Type *} [CommRing A] [CommRing B] [CommRing C ] [Algebra A B] [Algebra A C ]
353- [Algebra R A] [Algebra R B ] [IsScalarTower R A B ] [Algebra B C] [IsScalarTower A B C]
356+ variable {A B C : Type *} [CommSemiring A] [CommSemiring B] [Algebra R A ] [Algebra R B] [Algebra A B ]
357+ [IsScalarTower R A B ] [CommSemiring C ] [Algebra A C ] [Algebra B C] [IsScalarTower A B C]
354358
355359/-- If `P` lies over `p`, then `Localization.AtPrime P` is an algebra over `Localization.AtPrime p`.
356360This is not an instance for performance reasons and to avoid diamonds in the situation where the top
@@ -414,6 +418,34 @@ theorem mapPiEvalRingHom_algebraMap_apply {r : Π i, R i} :
414418
415419end AtPrime
416420
421+ section localAlg
422+
423+ open AtPrime
424+
425+ variable {S} [Algebra R P] (J : Ideal S) (K : Ideal P) [J.IsPrime] [K.IsPrime]
426+ [J.LiesOver I] [Algebra (Localization.AtPrime I) (Localization.AtPrime J)] [IsLiesOverAlgebra I J]
427+ [K.LiesOver I] [Algebra (Localization.AtPrime I) (Localization.AtPrime K)] [IsLiesOverAlgebra I K]
428+
429+ /-- For an `R`-algebra homomorphism `f : S →ₐ[R] P` and prime ideals `J = f⁻¹(K)` lying over `I`,
430+ the induced algebra homomorphism from the localization of `S` at `J` to the localization of `P` at
431+ `K` over the localization of `R` at `I`.
432+
433+ See `localAlgHom` for a variant where the base ring `R` is not localized. -/
434+ @[simps!]
435+ noncomputable def localAlgHom' (f : S →ₐ[R] P) (h : J = K.comap f) :
436+ Localization.AtPrime J →ₐ[Localization.AtPrime I] Localization.AtPrime K :=
437+ (localAlgHom J K f h).extendScalarsOfIsLocalization (Localization.AtPrime I) I.primeCompl
438+
439+ /-- Isomorphic algebras have isomorphic localizations.
440+
441+ See `localAlgEquiv` for a variant where the base ring is not localized. -/
442+ @[simps!]
443+ noncomputable def localAlgEquiv' (f : S ≃ₐ[R] P) (h : J = K.comap f) :
444+ Localization.AtPrime J ≃ₐ[Localization.AtPrime I] Localization.AtPrime K :=
445+ (localAlgEquiv J K f h).extendScalarsOfIsLocalization (Localization.AtPrime I) I.primeCompl
446+
447+ end localAlg
448+
417449end Localization
418450
419451section
0 commit comments