Quelle Basic.lean
Sprache: Lean
|
|
/-
Copyright (c) 2018 Kenny Lau. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen
-/
module
public import Mathlib.RingTheory.Ideal.MinimalPrime.Basic
public import Mathlib.RingTheory.Ideal.Quotient.Nilpotent
public import Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic
public import Mathlib.RingTheory.Localization.Basic
public import Mathlib.RingTheory.Localization.Ideal
/-!
# Localizations of commutative rings at the complement of a prime ideal
## Main definitions
* `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a
localization at (the complement of) a prime ideal `P`, as an abbreviation of
`IsLocalization P.prime_compl S`
## Main results
* `IsLocalization.AtPrime.isLocalRing`: a theorem (not an instance) stating a localization at the
complement of a prime ideal is a local ring
## Implementation notes
See `RingTheory.Localization.Basic` for a design overview.
## Tags
localization, ring localization, commutative ring localization, characteristic predicate,
commutative ring, field of fractions
-/
@[expose] public section
open Module
variable {R : Type*} [CommSemiring R] (S : Type*) [CommSemiring S]
variable [Algebra R S] {P : Type*} [CommSemiring P]
section AtPrime
variable (P : Ideal R) [hp : P.IsPrime]
/-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is
isomorphic to the localization of `R` at the complement of `P`. -/
protected abbrev IsLocalization.AtPrime :=
IsLocalization P.primeCompl S
/-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of
`R` at the complement of `P`, as a quotient type. -/
protected abbrev Localization.AtPrime :=
Localization P.primeCompl
namespace IsLocalization
theorem AtPrime.nontrivial [IsLocalization.AtPrime S P] : Nontrivial S :=
nontrivial_of_ne (0 : S) 1 fun hze => by
rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze
obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze
have htz : (t : R) = 0 := by simpa using ht.symm
exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P)
theorem AtPrime.isLocalRing [IsLocalization.AtPrime S P] : IsLocalRing S :=
letI := AtPrime.nontrivial S P -- Can't be a local instance because we can't figure out `P`.
IsLocalRing.of_nonunits_add
(by
intro x y hx hy hu
obtain ⟨z, hxyz⟩ := isUnit_iff_exists_inv.1 hu
have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} =>
not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl),
mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩
rcases exists_mk'_eq P.primeCompl x with ⟨rx, sx, hrx⟩
rcases exists_mk'_eq P.primeCompl y with ⟨ry, sy, hry⟩
rcases exists_mk'_eq P.primeCompl z with ⟨rz, sz, hrz⟩
rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz
rw [← hrx] at hx
rw [← hry] at hy
obtain ⟨t, ht⟩ := IsLocalization.eq.1 hxyz
simp only [mul_one, one_mul, Submonoid.coe_mul] at ht
suffices (t : R) * (sx * sy * sz) ∈ P from
not_or_intro (mt hp.mem_or_mem <| not_or_intro sx.2 sy.2) sz.2
(hp.mem_or_mem <| (hp.mem_or_mem this).resolve_left t.2)
rw [← ht]
exact
P.mul_mem_left _ <| P.mul_mem_right _ <|
P.add_mem (P.mul_mem_right _ <| this hx) <| P.mul_mem_right _ <| this hy)
variable {A : Type*} [CommRing A] [IsDomain A]
/-- The localization of an integral domain at the complement of a prime ideal is an integral domain.
-/
instance isDomain_of_local_atPrime {P : Ideal A} (_ : P.IsPrime) :
IsDomain (Localization.AtPrime P) :=
isDomain_localization P.primeCompl_le_nonZeroDivisors
end IsLocalization
namespace Localization
/-- The localization of `R` at the complement of a prime ideal is a local ring. -/
instance AtPrime.isLocalRing : IsLocalRing (Localization P.primeCompl) :=
IsLocalization.AtPrime.isLocalRing (Localization P.primeCompl) P
instance {R S : Type*} [CommRing R] [IsDomain R] {P : Ideal R} [CommRing S] [Algebra R S]
[IsTorsionFree R S] [IsDomain S] [P.IsPrime] :
IsTorsionFree (Localization.AtPrime P) <|
Localization <| Algebra.algebraMapSubmonoid S P.primeCompl :=
.of_isLocalization R S P.primeCompl_le_nonZeroDivisors
theorem _root_.IsLocalization.AtPrime.faithfulSMul (R : Type*) [CommRing R] [NoZeroDivisors R]
[Algebra R S] (P : Ideal R) [hp : P.IsPrime] [IsLocalization.AtPrime S P] :
FaithfulSMul R S := by
rw [faithfulSMul_iff_algebraMap_injective, IsLocalization.injective_iff_isRegular P.primeCompl]
exact fun ⟨_, h⟩ ↦ .of_ne_zero <| by aesop
instance {R : Type*} [CommRing R] [NoZeroDivisors R] (P : Ideal R) [hp : P.IsPrime] :
FaithfulSMul R (Localization.AtPrime P) := IsLocalization.AtPrime.faithfulSMul _ _ P
end Localization
end AtPrime
namespace IsLocalization
variable {A : Type*} [CommRing A] [IsDomain A]
/-- This is an `IsLocalization.AtPrime` version for `IsLocalization.isDomain_of_local_atPrime`. -/
theorem isDomain_of_atPrime (S : Type*) [CommSemiring S] [Algebra A S]
(P : Ideal A) [P.IsPrime] [IsLocalization.AtPrime S P] : IsDomain S :=
isDomain_of_le_nonZeroDivisors S P.primeCompl_le_nonZeroDivisors
namespace AtPrime
variable (I : Ideal R) [hI : I.IsPrime] [IsLocalization.AtPrime S I]
/-- The prime ideals in the localization of a commutative ring at a prime ideal I are in
order-preserving bijection with the prime ideals contained in I. -/
@[simps!]
def orderIsoOfPrime : { p : Ideal S // p.IsPrime } ≃o { p : Ideal R // p.IsPrime ∧ p ≤ I } :=
(IsLocalization.orderIsoOfPrime I.primeCompl S).trans <| Set.orderIsoOfEq _ _ <|
show Set.ofPred _ = Set.ofPred _
by ext; simp [Ideal.primeCompl, ← le_compl_iff_disjoint_left]
/-- The prime spectrum of the localization of a commutative ring R at a prime ideal I are in
order-preserving bijection with the interval $(-∞, I]$ in the prime spectrum of R. -/
@[simps!] def primeSpectrumOrderIso : PrimeSpectrum S ≃o Set.Iic (⟨I, hI⟩ : PrimeSpectrum R) :=
(PrimeSpectrum.equivSubtype S).trans <| (orderIsoOfPrime S I).trans
⟨⟨fun p ↦ ⟨⟨p, p.2.1⟩, p.2.2⟩, fun p ↦ ⟨p.1.1, p.1.2, p.2⟩, fun _ ↦ rfl, fun _ ↦ rfl⟩, .rfl⟩
theorem isUnit_to_map_iff (x : R) : IsUnit ((algebraMap R S) x) ↔ x ∈ I.primeCompl :=
⟨fun h hx =>
(isPrime_of_isPrime_disjoint I.primeCompl S I hI disjoint_compl_left).ne_top <|
(Ideal.map (algebraMap R S) I).eq_top_of_isUnit_mem (Ideal.mem_map_of_mem _ hx) h,
fun h => map_units S ⟨x, h⟩⟩
-- Can't use typeclasses to infer the `IsLocalRing` instance, so use an `optParam` instead
-- (since `IsLocalRing` is a `Prop`, there should be no unification issues.)
theorem to_map_mem_maximal_iff (x : R) (h : IsLocalRing S := isLocalRing S I) :
algebraMap R S x ∈ IsLocalRing.maximalIdeal S ↔ x ∈ I :=
not_iff_not.mp <| by
simpa only [IsLocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using!
isUnit_to_map_iff S I x
theorem under_maximalIdeal (h : IsLocalRing S := isLocalRing S I) :
(IsLocalRing.maximalIdeal S).under R = I :=
Ideal.ext fun x => by simpa only [Ideal.mem_comap] using to_map_mem_maximal_iff _ I x
instance liesOver_maximalIdeal (h : IsLocalRing S := isLocalRing S I) :
(IsLocalRing.maximalIdeal S).LiesOver I :=
(Ideal.liesOver_iff _ _).mpr (under_maximalIdeal _ _).symm
theorem isUnit_mk'_iff (x : R) (y : I.primeCompl) : IsUnit (mk' S x y) ↔ x ∈ I.primeCompl :=
⟨fun h hx => mk'_mem_iff.mpr ((to_map_mem_maximal_iff S I x).mpr hx) h, fun h =>
isUnit_iff_exists_inv.mpr ⟨mk' S ↑y ⟨x, h⟩, mk'_mul_mk'_eq_one ⟨x, h⟩ y⟩⟩
theorem mk'_mem_maximal_iff (x : R) (y : I.primeCompl) (h : IsLocalRing S := isLocalRing S I) :
mk' S x y ∈ IsLocalRing.maximalIdeal S ↔ x ∈ I :=
not_iff_not.mp <| by
simpa only [IsLocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using!
isUnit_mk'_iff S I x y
end AtPrime
end IsLocalization
namespace Localization
open IsLocalization
variable (I : Ideal R) [hI : I.IsPrime]
variable {I}
/-- The unique maximal ideal of the localization at `I.primeCompl` lies over the ideal `I`. -/
theorem AtPrime.under_maximalIdeal :
(IsLocalRing.maximalIdeal (Localization I.primeCompl)).under R = I :=
IsLocalization.AtPrime.under_maximalIdeal _ _
/-- The image of `I` in the localization at `I.primeCompl` is a maximal ideal, and in particular
it is the unique maximal ideal given by the local ring structure `AtPrime.isLocalRing` -/
theorem AtPrime.map_eq_maximalIdeal :
Ideal.map (algebraMap R (Localization.AtPrime I)) I =
IsLocalRing.maximalIdeal (Localization I.primeCompl) := by
convert congr(Ideal.map _ $AtPrime.under_maximalIdeal.symm)
rw [map_under I.primeCompl]
lemma AtPrime.eq_maximalIdeal_iff_under_eq {J : Ideal (Localization.AtPrime I)} :
J.under R = I ↔ J = IsLocalRing.maximalIdeal (Localization.AtPrime I) where
mp h := le_antisymm (IsLocalRing.le_maximalIdeal (fun hJ ↦ (hI.ne_top (h.symm ▸ hJ ▸ rfl)))) <| by
simpa [← AtPrime.map_eq_maximalIdeal, ← h] using Ideal.map_comap_le
mpr h := h.symm ▸ AtPrime.under_maximalIdeal
theorem le_comap_primeCompl_iff {J : Ideal P} [J.IsPrime] {f : R →+* P} :
I.primeCompl ≤ J.primeCompl.comap f ↔ J.comap f ≤ I :=
⟨fun h x hx => by
contrapose hx
exact h hx,
fun h _ hx hfxJ => hx (h hfxJ)⟩
variable (I)
/-- For a ring hom `f : R →+* S` and a prime ideal `J` in `S`, the induced ring hom from the
localization of `R` at `J.comap f` to the localization of `S` at `J`.
To make this definition more flexible, we allow any ideal `I` of `R` as input, together with a proof
that `I = J.comap f`. This can be useful when `I` is not definitionally equal to `J.comap f`.
-/
noncomputable def localRingHom (J : Ideal P) [J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) :
Localization.AtPrime I →+* Localization.AtPrime J :=
IsLocalization.map (Localization.AtPrime J) f (le_comap_primeCompl_iff.mpr (ge_of_eq hIJ))
@[simp]
theorem localRingHom_to_map (J : Ideal P) [J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f)
(x : R) : localRingHom I J f hIJ (algebraMap _ _ x) = algebraMap _ _ (f x) :=
map_eq _ _
@[simp]
theorem localRingHom_mk' (J : Ideal P) [J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) (x : R)
(y : I.primeCompl) :
localRingHom I J f hIJ (IsLocalization.mk' _ x y) =
IsLocalization.mk' (Localization.AtPrime J) (f x)
(⟨f y, le_comap_primeCompl_iff.mpr (ge_of_eq hIJ) y.2⟩ : J.primeCompl) :=
map_mk' _ _ _
@[simp]
theorem localRingHom_mk (J : Ideal P) [J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) (x : R)
(y : I.primeCompl) :
localRingHom I J f hIJ (mk x y) = mk (f x) ⟨f y, by aesop⟩ := by
simp_rw [mk_eq_mk', localRingHom_mk']
@[instance]
theorem isLocalHom_localRingHom (J : Ideal P) [hJ : J.IsPrime] (f : R →+* P)
(hIJ : I = J.comap f) : IsLocalHom (localRingHom I J f hIJ) :=
IsLocalHom.mk fun x hx => by
rcases IsLocalization.exists_mk'_eq I.primeCompl x with ⟨r, s, rfl⟩
rw [localRingHom_mk'] at hx
rw [AtPrime.isUnit_mk'_iff] at hx ⊢
exact fun hr => hx ((SetLike.ext_iff.mp hIJ r).mp hr)
theorem localRingHom_unique (J : Ideal P) [J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f)
{j : Localization.AtPrime I →+* Localization.AtPrime J}
(hj : ∀ x : R, j (algebraMap _ _ x) = algebraMap _ _ (f x)) : localRingHom I J f hIJ = j :=
map_unique _ _ hj
@[simp]
theorem localRingHom_id : localRingHom I I (RingHom.id R) (Ideal.comap_id I).symm = RingHom.id _ :=
localRingHom_unique _ _ _ _ fun _ => rfl
-- `simp` can't figure out `J` so this can't be a `@[simp]` lemma.
theorem localRingHom_comp {S : Type*} [CommSemiring S] (J : Ideal S) [hJ : J.IsPrime] (K : Ideal P)
[hK : K.IsPrime] (f : R →+* S) (hIJ : I = J.comap f) (g : S →+* P) (hJK : J = K.comap g) :
localRingHom I K (g.comp f) (by rw [hIJ, hJK, Ideal.comap_comap f g]) =
(localRingHom J K g hJK).comp (localRingHom I J f hIJ) :=
localRingHom_unique _ _ _ _ fun r => by
simp only [Function.comp_apply, RingHom.coe_comp, localRingHom_to_map]
/-- Isomorphic rings have isomorphic localizations. -/
@[simps]
noncomputable def localRingEquiv (J : Ideal P) [J.IsPrime] (f : R ≃+* P) (hIJ : I = J.comap f) :
Localization.AtPrime I ≃+* Localization.AtPrime J where
__ := localRingHom I J f hIJ
invFun := localRingHom J I f.symm
(by rw [hIJ, ← Ideal.comap_coe f, Ideal.comap_comap, RingEquiv.comp_symm, Ideal.comap_id])
left_inv x := by simp [localRingHom, map_map]
right_inv x := by simp [localRingHom, map_map]
variable {S} in
/-- For an `R`-algebra homomorphism `f : S →ₐ[R] P` and prime ideals `I = f⁻¹(J)`, the induced
`R`-algebra homomorphism from the localization of `S` at `I` to the localization of `P` at `J`.
See `localAlgHom'` for a variant where the base ring `R` is also localized. -/
noncomputable def localAlgHom [Algebra R P] (I : Ideal S) [I.IsPrime] (J : Ideal P) [J.IsPrime]
(f : S →ₐ[R] P) (hIJ : I = J.comap f) :
Localization.AtPrime I →ₐ[R] Localization.AtPrime J where
__ := localRingHom I J f.toRingHom hIJ
commutes' r := by
simp [IsScalarTower.algebraMap_apply R S (Localization.AtPrime I),
localRingHom_to_map, IsScalarTower.algebraMap_apply R P (Localization.AtPrime J)]
variable {S} in
@[simp] lemma localAlgHom_apply [Algebra R P] (I : Ideal S) [I.IsPrime] (J : Ideal P) [J.IsPrime]
(f : S →ₐ[R] P) (hIJ : I = J.comap f) (x) :
localAlgHom I J f hIJ x = localRingHom I J f.toRingHom hIJ x := rfl
variable {S} in
/-- Isomorphic algebras have isomorphic localizations.
See `localAlgEquiv'` for a variant where the base ring is also localized. -/
@[simps]
noncomputable def localAlgEquiv [Algebra R P] (I : Ideal S) [I.IsPrime] (J : Ideal P) [J.IsPrime]
(f : S ≃ₐ[R] P) (hIJ : I = J.comap f) :
Localization.AtPrime I ≃ₐ[R] Localization.AtPrime J where
__ := localAlgHom I J f.toAlgHom hIJ
__ := localRingEquiv I J f.toRingEquiv hIJ
lemma localRingHom_bijective_of_saturated_inf_eq_top
{P : Ideal S} [P.IsPrime] {s : Subalgebra R S}
(H : s.saturation (P.primeCompl ⊓ s.toSubmonoid) (by simp) = ⊤) (p : Ideal s)
[p.IsPrime] [P.LiesOver p] :
Function.Bijective (Localization.localRingHom _ _ _ (P.over_def p)) := by
constructor
· suffices ∀ a ∈ s, ∀ b ∈ s, b ∉ P → ∀ c ∈ s, ∀ d ∈ s, d ∉ P → ∀ x ∉ P,
x * (a * d) = x * (c * b) → ∃ a_6 ∉ P, a_6 ∈ s ∧ a_6 * (a * d) = a_6 * (c * b) by
simpa [Function.Injective, (IsLocalization.mk'_surjective p.primeCompl).forall, P.over_def p,
Localization.localRingHom_mk', IsLocalization.mk'_eq_iff_eq', Subtype.ext_iff, -map_mul,
IsLocalization.eq_iff_exists P.primeCompl, IsLocalization.eq_iff_exists p.primeCompl]
intro a _ b _ _ c _ d _ _ x hxP e
obtain ⟨t, ⟨htP, -⟩, ht⟩ := H.ge (Set.mem_univ x)
exact ⟨_, ‹P.IsPrime›.mul_notMem htP hxP, ht, by simp [mul_assoc, e]⟩
· suffices ∀ y, ∀ z ∉ P, ∃ y' ∈ s, ∃ z' ∉ P, z' ∈ s ∧ ∃ t ∉ P, t * (z * y') = t * (z' * y) by
simpa [(IsLocalization.mk'_surjective p.primeCompl).exists,
(IsLocalization.mk'_surjective P.primeCompl).forall, P.over_def p,
Localization.localRingHom_mk', IsLocalization.mk'_eq_iff_eq, -map_mul,
IsLocalization.eq_iff_exists P.primeCompl, Function.Surjective] using this
intro y z hzP
obtain ⟨a, ⟨haP, has⟩, ha⟩ := H.ge (Set.mem_univ y)
obtain ⟨b, ⟨hbP, hbs⟩, hb⟩ := H.ge (Set.mem_univ z)
exact ⟨_, mul_mem ha hbs, _, P.primeCompl.mul_mem (mul_mem hbP hzP) haP, mul_mem hb has, 1,
P.primeCompl.one_mem, by ring⟩
namespace AtPrime
section
variable {A B C : Type*} [CommSemiring A] [CommSemiring B] [Algebra R A] [Algebra R B] [Algebra A B]
[IsScalarTower R A B] [CommSemiring C] [Algebra A C] [Algebra B C] [IsScalarTower A B C]
/-- If `P` lies over `p`, then `Localization.AtPrime P` is an algebra over `Localization.AtPrime p`.
This is not an instance for performance reasons and to avoid diamonds in the situation where the top
ring is already an algebra over `Localization.AtPrime p` (e.g., this happens for `Ideal.Fiber`). -/
@[instance_reducible]
noncomputable def algebraOfLiesOver
(p : Ideal A) [p.IsPrime] (P : Ideal B) [P.IsPrime] [P.LiesOver p] :
Algebra (Localization.AtPrime p) (Localization.AtPrime P) :=
(Localization.localRingHom p P (algebraMap A B) Ideal.LiesOver.over).toAlgebra
/-- A deprecated predicate on the algebra map between two localizations. -/
@[deprecated "Use `IsScalarTower` instead." (since := "2026-06-27")]
abbrev IsLiesOverAlgebra (p : Ideal A) [p.IsPrime] (P : Ideal B) [P.IsPrime]
[Algebra (Localization.AtPrime p) (Localization.AtPrime P)] :=
IsScalarTower A (Localization.AtPrime p) (Localization.AtPrime P)
instance (p : Ideal A) [p.IsPrime] (P : Ideal B) [P.IsPrime] [P.LiesOver p] :
letI := algebraOfLiesOver p P
IsScalarTower A (Localization.AtPrime p) (Localization.AtPrime P) := by
let := algebraOfLiesOver p P
refine .of_algebraMap_eq fun x ↦ ?_
rw [IsScalarTower.algebraMap_apply A B (Localization.AtPrime P),
RingHom.algebraMap_toAlgebra, localRingHom_to_map]
theorem algebraMap_eq (p : Ideal A) [p.IsPrime] (P : Ideal B) [P.IsPrime]
[Algebra (Localization.AtPrime p) (Localization.AtPrime P)]
[IsScalarTower A (Localization.AtPrime p) (Localization.AtPrime P)] [P.LiesOver p] :
algebraMap (Localization.AtPrime p) (Localization.AtPrime P) =
Localization.localRingHom p P (algebraMap A B) Ideal.LiesOver.over := by
symm
apply localRingHom_unique
simp [← IsScalarTower.algebraMap_apply]
@[deprecated (since := "2026-06-30")] alias IsLiesOverAlgebra.algebraMap_eq := algebraMap_eq
instance (p : Ideal A) [p.IsPrime] (P : Ideal B) [P.IsPrime]
[Algebra (Localization.AtPrime p) (Localization.AtPrime P)]
[IsScalarTower A (Localization.AtPrime p) (Localization.AtPrime P)] :
IsScalarTower R (Localization.AtPrime p) (Localization.AtPrime P) :=
.to₁₃₄ R A (Localization.AtPrime p) (Localization.AtPrime P)
instance (p : Ideal A) [p.IsPrime] (P : Ideal B) [P.IsPrime] [P.LiesOver p] (Q : Ideal C)
[Q.IsPrime] [Q.LiesOver P] [Q.LiesOver p]
[Algebra (Localization.AtPrime p) (Localization.AtPrime P)]
[Algebra (Localization.AtPrime P) (Localization.AtPrime Q)]
[Algebra (Localization.AtPrime p) (Localization.AtPrime Q)]
[IsScalarTower A (Localization.AtPrime p) (Localization.AtPrime P)]
[IsScalarTower B (Localization.AtPrime P) (Localization.AtPrime Q)]
[IsScalarTower A (Localization.AtPrime p) (Localization.AtPrime Q)] :
IsScalarTower (Localization.AtPrime p) (Localization.AtPrime P) (Localization.AtPrime Q) :=
.of_algebraMap_eq' <| by
simp_rw [algebraMap_eq, ← localRingHom_comp, ← IsScalarTower.algebraMap_eq]
end
variable {ι : Type*} {R : ι → Type*} [∀ i, CommSemiring (R i)]
variable {i : ι} (I : Ideal (R i)) [I.IsPrime]
/-- `Localization.localRingHom` specialized to a projection homomorphism from a product ring. -/
noncomputable abbrev mapPiEvalRingHom :
Localization.AtPrime (I.comap <| Pi.evalRingHom R i) →+* Localization.AtPrime I :=
localRingHom _ _ _ rfl
theorem mapPiEvalRingHom_bijective : Function.Bijective (mapPiEvalRingHom I) :=
Localization.mapPiEvalRingHom_bijective _
theorem mapPiEvalRingHom_comp_algebraMap :
(mapPiEvalRingHom I).comp (algebraMap _ _) = (algebraMap _ _).comp (Pi.evalRingHom R i) :=
IsLocalization.map_comp _
theorem mapPiEvalRingHom_algebraMap_apply {r : Π i, R i} :
mapPiEvalRingHom I (algebraMap _ _ r) = algebraMap _ _ (r i) :=
localRingHom_to_map ..
end AtPrime
section localAlg
open AtPrime
variable {S} [Algebra R P] (J : Ideal S) (K : Ideal P) [J.IsPrime] [K.IsPrime]
[J.LiesOver I] [Algebra (Localization.AtPrime I) (Localization.AtPrime J)]
[K.LiesOver I] [Algebra (Localization.AtPrime I) (Localization.AtPrime K)]
[IsScalarTower R (Localization.AtPrime I) (Localization.AtPrime J)]
[IsScalarTower R (Localization.AtPrime I) (Localization.AtPrime K)]
/-- For an `R`-algebra homomorphism `f : S →ₐ[R] P` and prime ideals `J = f⁻¹(K)` lying over `I`,
the induced algebra homomorphism from the localization of `S` at `J` to the localization of `P` at
`K` over the localization of `R` at `I`.
See `localAlgHom` for a variant where the base ring `R` is not localized. -/
@[simps!]
noncomputable def localAlgHom' (f : S →ₐ[R] P) (h : J = K.comap f) :
Localization.AtPrime J →ₐ[Localization.AtPrime I] Localization.AtPrime K :=
(localAlgHom J K f h).extendScalarsOfIsLocalization (Localization.AtPrime I) I.primeCompl
#adaptation_note
/-- `respectTransparency.types true` changes the auto-generated lemmas' signature -/
set_option backward.isDefEq.respectTransparency.types false in
/-- Isomorphic algebras have isomorphic localizations.
See `localAlgEquiv` for a variant where the base ring is not localized. -/
@[simps!]
noncomputable def localAlgEquiv' (f : S ≃ₐ[R] P) (h : J = K.comap f) :
Localization.AtPrime J ≃ₐ[Localization.AtPrime I] Localization.AtPrime K :=
(localAlgEquiv J K f h).extendScalarsOfIsLocalization (Localization.AtPrime I) I.primeCompl
end localAlg
end Localization
section
variable (q : Ideal R) [q.IsPrime] (M : Submonoid R) {S : Type*} [CommSemiring S] [Algebra R S]
[IsLocalization.AtPrime S q]
lemma Ideal.isPrime_map_of_isLocalizationAtPrime {p : Ideal R} [p.IsPrime] (hpq : p ≤ q) :
(p.map (algebraMap R S)).IsPrime := by
have disj : Disjoint (q.primeCompl : Set R) p := by
simp [Ideal.primeCompl, ← le_compl_iff_disjoint_left, hpq]
apply IsLocalization.isPrime_of_isPrime_disjoint q.primeCompl _ p (by simpa) disj
lemma Ideal.under_map_of_isLocalizationAtPrime {p : Ideal R} [p.IsPrime] (hpq : p ≤ q) :
(p.map (algebraMap R S)).under R = p := by
have disj : Disjoint (q.primeCompl : Set R) p := by
simp [Ideal.primeCompl, ← le_compl_iff_disjoint_left, hpq]
exact IsLocalization.under_map_of_isPrime_disjoint _ _ (by simpa) disj
lemma IsLocalization.subsingleton_primeSpectrum_of_mem_minimalPrimes
{R : Type*} [CommSemiring R] (p : Ideal R) (hp : p ∈ minimalPrimes R)
(S : Type*) [CommSemiring S] [Algebra R S] [IsLocalization.AtPrime S p (hp := hp.1.1)] :
Subsingleton (PrimeSpectrum S) :=
have := hp.1.1
have : Unique (Set.Iic (⟨p, hp.1.1⟩ : PrimeSpectrum R)) := ⟨⟨⟨p, hp.1.1⟩, by exact
fun ⦃x⦄ a ↦ a⟩, fun i ↦ Subtype.ext <| PrimeSpectrum.ext <|
(minimalPrimes_eq_minimals (R := R) ▸ hp).eq_of_le i.1.2 i.2⟩
(IsLocalization.AtPrime.primeSpectrumOrderIso S p).subsingleton
open Ideal in
/-- If `R'` (resp. `S'`) is the localization of `R` (resp. `S`) and
`P` lies over `p` then the image of `P` in `S'` lies over the image of `p` in `R'`. -/
lemma IsLocalization.liesOver_of_isPrime_of_disjoint {R' S' : Type*}
(M : Submonoid R) (T : Submonoid S)
[CommSemiring R'] [CommSemiring S'] [Algebra R R'] [Algebra S S'] [Algebra R' S']
[Algebra R S'] [IsScalarTower R S S'] [IsScalarTower R R' S']
[IsLocalization M R'] [IsLocalization T S']
(p : Ideal R) {P : Ideal S} [P.IsPrime] [P.LiesOver p]
(disj : Disjoint (T : Set S) (P : Set S)) :
(P.map (algebraMap S S')).LiesOver (p.map (algebraMap R R')) := by
suffices h : Ideal.map (algebraMap R R') (under R (under R' (P.map (algebraMap S S')))) =
Ideal.map (algebraMap R R') p from ⟨by rw [← h, IsLocalization.map_under (M := M)]⟩
rw [under_under, ← under_under (B := S), under_map_of_isPrime_disjoint _ _ ‹_› disj,
LiesOver.over (P := P) (p := p)]
@[deprecated (since := "2026-07-04")] alias Ideal.IsMaximal.of_isLocalization_of_disjoint :=
IsLocalization.isMaximal_of_isMaximal_under
end
namespace IsLocalization.AtPrime
open Algebra IsLocalRing Ideal IsLocalization IsLocalization.AtPrime
variable (p : Ideal R) [p.IsPrime] (Rₚ : Type*) [CommSemiring Rₚ] [Algebra R Rₚ]
[IsLocalization.AtPrime Rₚ p] [IsLocalRing Rₚ] (Sₚ : Type*) [CommSemiring Sₚ] [Algebra S Sₚ]
[IsLocalization (Algebra.algebraMapSubmonoid S p.primeCompl) Sₚ] [Algebra Rₚ Sₚ]
(P : Ideal S)
theorem isPrime_map_of_liesOver [P.IsPrime] [P.LiesOver p] : (P.map (algebraMap S Sₚ)).IsPrime :=
isPrime_of_isPrime_disjoint _ _ _ inferInstance (Ideal.disjoint_primeCompl_of_liesOver P p)
theorem map_eq_maximalIdeal : p.map (algebraMap R Rₚ) = maximalIdeal Rₚ := by
convert congr(Ideal.map (algebraMap R Rₚ) $((under_maximalIdeal Rₚ p).symm))
rw [map_under p.primeCompl]
instance isMaximal_map : (p.map (algebraMap R Rₚ)).IsMaximal := by
rw [map_eq_maximalIdeal]
exact maximalIdeal.isMaximal Rₚ
theorem under_map_of_isMaximal [P.IsMaximal] [P.LiesOver p] :
(Ideal.map (algebraMap S Sₚ) P).under S = P :=
comap_map_eq_self_of_isMaximal _ (isPrime_map_of_liesOver S p Sₚ P).ne_top
lemma under_maximalIdeal_pow [p.IsMaximal] (n : ℕ) :
(IsLocalRing.maximalIdeal Rₚ ^ n).under R = p ^ n := by
ext
rw [mem_comap, ← map_eq_maximalIdeal p Rₚ, ← Ideal.map_pow,
algebraMap_mem_map_algebraMap_iff p.primeCompl Rₚ]
refine ⟨fun ⟨m, hm, h⟩ ↦ ?_, fun h ↦ ⟨1, by simp, by simp [h]⟩⟩
exact (IsMaximal.mul_mem_pow _ h).resolve_left (mem_primeCompl_iff.mp hm)
section isomorphisms
attribute [local instance] Ideal.Quotient.field
variable {S R : Type*} [CommRing R] (p : Ideal R) [p.IsMaximal]
variable (Rₚ : Type*) [CommRing Rₚ] [Algebra R Rₚ] [IsLocalization.AtPrime Rₚ p] [IsLocalRing Rₚ]
open IsLocalRing
set_option backward.isDefEq.respectTransparency.types false in
/-- The isomorphism `R ⧸ p ^ n ≃ₐ[R] Rₚ ⧸ maximalIdeal Rₚ ^ n`, where `Rₚ` satisfies
`IsLocalization.AtPrime Rₚ p`. -/
noncomputable
def equivQuotMaximalIdealPow (n : ℕ) : (R ⧸ p ^ n) ≃ₐ[R] Rₚ ⧸ IsLocalRing.maximalIdeal Rₚ ^ n := by
refine AlgEquiv.ofAlgHom (Ideal.Quotient.liftₐ _ (Algebra.ofId _ _) ?_) ?_ ?_ ?_
· simp_rw [ofId_apply, ← RingHom.mem_ker, ← IsConcreteLE.le_iff]
rw [← Quotient.mk_comp_algebraMap, ← RingHom.comap_ker, mk_ker, ← under_def,
under_maximalIdeal_pow p]
· refine Ideal.Quotient.liftₐ _
(IsLocalization.liftAlgHom (f := Ideal.Quotient.mkₐ R (p ^ n)) fun (u : p.primeCompl) ↦
Ideal.Quotient.isUnit_mk_pow_of_notMem _ <| mem_primeCompl_iff.mp u.prop) fun x hx ↦ ?_
obtain ⟨a, b, rfl⟩ := IsLocalization.exists_mk'_eq p.primeCompl x
rw [IsLocalization.mk'_mem_iff, ← Ideal.mem_under, under_maximalIdeal_pow p] at hx
simpa [lift_mk', Quotient.eq_zero_iff_mem] using hx
· rw [← AlgHom.cancel_right (Ideal.Quotient.mkₐ_surjective _ _)]
exact IsLocalization.algHom_ext (W := p.primeCompl) (A := R) (by ext)
· rw [← AlgHom.cancel_right (Ideal.Quotient.mkₐ_surjective _ _)]
ext
@[simp]
theorem equivQuotMaximalIdealPow_apply_mk (n : ℕ) (x : R) :
equivQuotMaximalIdealPow p Rₚ n (Ideal.Quotient.mk _ x) =
Ideal.Quotient.mk _ (algebraMap R Rₚ x) :=
rfl
set_option backward.isDefEq.respectTransparency.types false in
@[simp]
theorem equivQuotMaximalIdealPow_symm_apply_mk_mul (n : ℕ) (x : R) (s : p.primeCompl) :
(equivQuotMaximalIdealPow p Rₚ n).symm (Ideal.Quotient.mk _ (IsLocalization.mk' Rₚ x s)) *
Ideal.Quotient.mk (p ^ n) s = Ideal.Quotient.mk (p ^ n) x := by
simp [equivQuotMaximalIdealPow, lift_mk', IsUnit.liftRight_apply, mul_assoc]
/-- The isomorphism `R ⧸ p ≃ₐ[R] Rₚ ⧸ maximalIdeal Rₚ`, where `Rₚ` satisfies
`IsLocalization.AtPrime Rₚ p`. In particular, localization preserves the residue field.
This is the `n = 1` case of `equivQuotMaximalIdealPow`. -/
noncomputable
def equivQuotMaximalIdeal : (R ⧸ p) ≃ₐ[R] Rₚ ⧸ maximalIdeal Rₚ :=
(Ideal.quotientEquivAlgOfEq R (pow_one p).symm).trans <|
(equivQuotMaximalIdealPow p Rₚ 1).trans
(Ideal.quotientEquivAlgOfEq R (pow_one (maximalIdeal Rₚ)))
@[simp]
theorem equivQuotMaximalIdeal_apply_mk (x : R) :
equivQuotMaximalIdeal p Rₚ (Ideal.Quotient.mk _ x) =
(Ideal.Quotient.mk _ (algebraMap R Rₚ x)) := rfl
@[simp]
theorem equivQuotMaximalIdeal_symm_apply_mk (x : R) (s : p.primeCompl) :
(equivQuotMaximalIdeal p Rₚ).symm (Ideal.Quotient.mk _ (IsLocalization.mk' Rₚ x s)) =
(Ideal.Quotient.mk p x) * (Ideal.Quotient.mk p s)⁻¹ := by
rw [eq_mul_inv_iff_mul_eq₀ (Ideal.Quotient.eq_zero_iff_mem.not.mpr s.prop)]
simpa only [map_mul, Ideal.quotientEquivAlgOfEq_mk] using!
congr_arg (Ideal.quotientEquivAlgOfEq R (pow_one p))
(equivQuotMaximalIdealPow_symm_apply_mk_mul p Rₚ 1 x s)
variable {Sₚ : Type*} [CommRing S] [Algebra R S] [CommRing Sₚ] [Algebra S Sₚ] [Algebra R Sₚ]
variable [Algebra Rₚ Sₚ] [IsLocalization (Algebra.algebraMapSubmonoid S p.primeCompl) Sₚ]
variable [IsScalarTower R S Sₚ]
local notation "pS" => Ideal.map (algebraMap R S) p
local notation "pSₚ" => Ideal.map (algebraMap Rₚ Sₚ) (maximalIdeal Rₚ)
lemma under_map_eq_map : (Ideal.map (algebraMap R Sₚ) p).under S = pS := by
rw [IsScalarTower.algebraMap_eq R S Sₚ, ← Ideal.map_map, eq_comm]
apply Ideal.le_comap_map.antisymm
intro x hx
obtain ⟨α, hα, hαx⟩ : ∃ α ∉ p, α • x ∈ pS := by
have ⟨⟨y, s⟩, hy⟩ := (IsLocalization.mem_map_algebraMap_iff
(Algebra.algebraMapSubmonoid S p.primeCompl) Sₚ).mp hx
rw [← map_mul,
IsLocalization.eq_iff_exists (Algebra.algebraMapSubmonoid S p.primeCompl)] at hy
obtain ⟨c, hc⟩ := hy
obtain ⟨α, hα, e⟩ := (c * s).prop
refine ⟨α, hα, ?_⟩
rw [Algebra.smul_def, e, Submonoid.coe_mul, mul_assoc, mul_comm _ x, hc]
exact Ideal.mul_mem_left _ _ y.prop
obtain ⟨β, γ, hγ, hβ⟩ : ∃ β γ, γ ∈ p ∧ β * α = 1 + γ := by
obtain ⟨β, hβ⟩ := Ideal.Quotient.mk_surjective (I := p) (Ideal.Quotient.mk p α)⁻¹
refine ⟨β, β * α - 1, ?_, ?_⟩
· rw [← Ideal.Quotient.eq_zero_iff_mem, map_sub, map_one,
map_mul, hβ, inv_mul_cancel₀, sub_self]
rwa [Ne, Ideal.Quotient.eq_zero_iff_mem]
· rw [add_sub_cancel]
have := Ideal.mul_mem_left _ (algebraMap _ _ β) hαx
rw [← Algebra.smul_def, smul_smul, hβ, add_smul, one_smul] at this
refine (Submodule.add_mem_iff_left pS ?_).mp this
rw [Algebra.smul_def]
apply Ideal.mul_mem_right
exact Ideal.mem_map_of_mem _ hγ
variable [IsScalarTower R Rₚ Sₚ]
variable (S Sₚ) in
/--
The isomorphism `S ⧸ pS ≃+* Sₚ ⧸ p·Sₚ`, where `Sₚ` is the localization of `S` at the (image) of
the complement of `p`
-/
noncomputable def equivQuotientMapMaximalIdeal : S ⧸ pS ≃+* Sₚ ⧸ pSₚ := by
haveI h : pSₚ = Ideal.map (algebraMap S Sₚ) pS := by
rw [← map_eq_maximalIdeal p, Ideal.map_map,
← IsScalarTower.algebraMap_eq, Ideal.map_map, ← IsScalarTower.algebraMap_eq]
refine (Ideal.quotEquivOfEq ?_).trans
(RingHom.quotientKerEquivOfSurjective (f := algebraMap S (Sₚ ⧸ pSₚ)) ?_)
· rw [IsScalarTower.algebraMap_eq S Sₚ, Ideal.Quotient.algebraMap_eq, ← RingHom.comap_ker,
Ideal.mk_ker, h, Ideal.map_map, ← IsScalarTower.algebraMap_eq, ← under_def, under_map_eq_map]
· intro x
obtain ⟨x, rfl⟩ := Ideal.Quotient.mk_surjective x
obtain ⟨x, s, rfl⟩ := IsLocalization.exists_mk'_eq
(Algebra.algebraMapSubmonoid S p.primeCompl) x
obtain ⟨α, hα : α ∉ p, e⟩ := s.prop
obtain ⟨β, γ, hγ, hβ⟩ : ∃ β γ, γ ∈ p ∧ α * β = 1 + γ := by
obtain ⟨β, hβ⟩ := Ideal.Quotient.mk_surjective (I := p) (Ideal.Quotient.mk p α)⁻¹
refine ⟨β, α * β - 1, ?_, ?_⟩
· rw [← Ideal.Quotient.eq_zero_iff_mem, map_sub, map_one,
map_mul, hβ, mul_inv_cancel₀, sub_self]
rwa [Ne, Ideal.Quotient.eq_zero_iff_mem]
· rw [add_sub_cancel]
use β • x
rw [IsScalarTower.algebraMap_eq S Sₚ (Sₚ ⧸ pSₚ), Ideal.Quotient.algebraMap_eq,
RingHom.comp_apply, ← sub_eq_zero, ← map_sub, Ideal.Quotient.eq_zero_iff_mem]
rw [h, IsLocalization.mem_map_algebraMap_iff
(Algebra.algebraMapSubmonoid S p.primeCompl) Sₚ]
refine ⟨⟨⟨γ • x, ?_⟩, s⟩, ?_⟩
· rw [Algebra.smul_def]
apply Ideal.mul_mem_right
exact Ideal.mem_map_of_mem _ hγ
simp only
rw [mul_comm, mul_sub, IsLocalization.mul_mk'_eq_mk'_of_mul,
IsLocalization.mk'_mul_cancel_left, ← map_mul, ← e, ← Algebra.smul_def, smul_smul,
hβ, ← map_sub, add_smul, one_smul, add_comm x, add_sub_cancel_right]
@[simp]
lemma equivQuotientMapMaximalIdeal_apply_mk (s : S) :
equivQuotientMapMaximalIdeal S p Rₚ Sₚ (Ideal.Quotient.mk _ s) = (algebraMap S _) s := rfl
set_option backward.isDefEq.respectTransparency.types false in
@[simp]
lemma equivQuotientMapMaximalIdeal_symm_apply_mk (s : S) :
(equivQuotientMapMaximalIdeal S p Rₚ Sₚ).symm (algebraMap S _ s) = Ideal.Quotient.mk _ s := by
simp [equivQuotientMapMaximalIdeal]
end isomorphisms
lemma map_eq_top_of_not_le {I : Ideal R} {p : Ideal R} [p.IsPrime] [IsLocalization.AtPrime S p]
(hle : ¬ I ≤ p) : Ideal.map (algebraMap R S) I = ⊤ := by
apply IsLocalization.map_eq_top_of_not_subset p.primeCompl
simpa [IsConcreteLE.le_iff, Set.not_subset_iff_exists_mem_notMem] using hle
end IsLocalization.AtPrime
¤ Dauer der Verarbeitung: 0.29 Sekunden
¤
*© Formatika GbR, Deutschland
|
|
2026-11-24
|