Skip to content

Commit 978ccf8

Browse files
tb65536ReemMelamed
authored andcommitted
feat(RingTheory/Localization/AtPrime/Basic): add variants of localAlgHom and localAlgEquiv (leanprover-community#39714)
This PR adds variants of `localAlgHom` and `localAlgEquiv` where the base ring is also localized. Co-authored-by: tb65536 <thomas.l.browning@gmail.com>
1 parent 0bff6a8 commit 978ccf8

2 files changed

Lines changed: 39 additions & 7 deletions

File tree

Mathlib/RingTheory/Localization/AtPrime/Basic.lean

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

298298
variable {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. -/
301303
noncomputable 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

314316
variable {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]
317321
noncomputable 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

350354
section
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`.
356360
This 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

415419
end 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+
417449
end Localization
418450

419451
section

Mathlib/RingTheory/Localization/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -687,8 +687,8 @@ theorem IsLocalization.algHom_ext {R A L B : Type*}
687687

688688
section extend
689689

690-
variable {R A B : Type*} [CommRing R] [CommRing A] [CommRing B]
691-
(S : Type*) [CommRing S] [Algebra R S] (M : Submonoid R) [IsLocalization M S]
690+
variable {R A B : Type*} [CommSemiring R] [Semiring A] [Semiring B]
691+
(S : Type*) [CommSemiring S] [Algebra R S] (M : Submonoid R) [IsLocalization M S]
692692
[Algebra R A] [Algebra S A] [IsScalarTower R S A]
693693
[Algebra R B] [Algebra S B] [IsScalarTower R S B]
694694

0 commit comments

Comments
 (0)