File: Mathlib/RingTheory/Localization/LocalizationLocalization.lean

full_name: IsLocalization.localizationLocalizationSubmodule
code: /-- Localizing wrt `M ⊆ R` and then wrt `N ⊆ S = M⁻¹R` is equal to the localization of `R` wrt this
module. See `localization_localization_isLocalization`.
-/
@[nolint unusedArguments]
def localizationLocalizationSubmodule : Submonoid R 
goal: Submonoid R

full_name: IsLocalization.mem_localizationLocalizationSubmodule
code: @[simp]
theorem mem_localizationLocalizationSubmodule {x : R} :
    x ∈ localizationLocalizationSubmodule M N ↔
      ∃ (y : N) (z : M), algebraMap R S x = y * algebraMap R S z 
goal: x ∈ IsLocalization.localizationLocalizationSubmodule M N ↔ ∃ y z, (algebraMap R S) x = ↑y * (algebraMap R S) ↑z

full_name: IsLocalization.localization_localization_map_units
code: theorem localization_localization_map_units [IsLocalization N T]
    (y : localizationLocalizationSubmodule M N) : IsUnit (algebraMap R T y) 
goal: IsUnit ((algebraMap R T) ↑y)

full_name: IsLocalization.localization_localization_surj
code: theorem localization_localization_surj [IsLocalization N T] (x : T) :
    ∃ y : R × localizationLocalizationSubmodule M N,
        x * algebraMap R T y.2 = algebraMap R T y.1 
goal: ∃ y, x * (algebraMap R T) ↑y.2 = (algebraMap R T) y.1

full_name: IsLocalization.localization_localization_exists_of_eq
code: theorem localization_localization_exists_of_eq [IsLocalization N T] (x y : R) :
    algebraMap R T x = algebraMap R T y →
      ∃ c : localizationLocalizationSubmodule M N, ↑c * x = ↑c * y 
goal: (algebraMap R T) x = (algebraMap R T) y → ∃ c, ↑c * x = ↑c * y

full_name: IsLocalization.localization_localization_isLocalization
code: /-- Given submodules `M ⊆ R` and `N ⊆ S = M⁻¹R`, with `f : R →+* S` the localization map, we have
`N ⁻¹ S = T = (f⁻¹ (N • f(M))) ⁻¹ R`. I.e., the localization of a localization is a localization.
-/
theorem localization_localization_isLocalization [IsLocalization N T] :
    IsLocalization (localizationLocalizationSubmodule M N) T 
goal: IsLocalization (IsLocalization.localizationLocalizationSubmodule M N) T

full_name: IsLocalization.localization_localization_isLocalization_of_has_all_units
code: /-- Given submodules `M ⊆ R` and `N ⊆ S = M⁻¹R`, with `f : R →+* S` the localization map, if
`N` contains all the units of `S`, then `N ⁻¹ S = T = (f⁻¹ N) ⁻¹ R`. I.e., the localization of a
localization is a localization.
-/
theorem localization_localization_isLocalization_of_has_all_units [IsLocalization N T]
    (H : ∀ x : S, IsUnit x → x ∈ N) : IsLocalization (N.comap (algebraMap R S)) T 
goal: IsLocalization (Submonoid.comap (algebraMap R S) N) T

full_name: IsLocalization.isLocalization_isLocalization_atPrime_isLocalization
code: /--
Given a submodule `M ⊆ R` and a prime ideal `p` of `S = M⁻¹R`, with `f : R →+* S` the localization
map, then `T = Sₚ` is the localization of `R` at `f⁻¹(p)`.
-/
theorem isLocalization_isLocalization_atPrime_isLocalization (p : Ideal S) [Hp : p.IsPrime]
    [IsLocalization.AtPrime T p] : IsLocalization.AtPrime T (p.comap (algebraMap R S)) 
goal: IsLocalization.AtPrime T (Ideal.comap (algebraMap R S) p)

full_name: IsLocalization.instAlgebraAtPrimeLocalization
code: instance (p : Ideal (Localization M)) [p.IsPrime] : Algebra R (Localization.AtPrime p) 
goal: Algebra R (Localization.AtPrime p)

full_name: IsLocalization.instIsScalarTowerLocalizationAtPrime
code: instance (p : Ideal (Localization M)) [p.IsPrime] :
    IsScalarTower R (Localization M) (Localization.AtPrime p) 
goal: IsScalarTower R (Localization M) (Localization.AtPrime p)

full_name: IsLocalization.localization_localization_atPrime_is_localization
code: instance localization_localization_atPrime_is_localization (p : Ideal (Localization M))
    [p.IsPrime] : IsLocalization.AtPrime (Localization.AtPrime p) (p.comap (algebraMap R _)) 
goal: IsLocalization.AtPrime (Localization.AtPrime p) (Ideal.comap (algebraMap R (Localization M)) p)

full_name: IsLocalization.localizationLocalizationAtPrimeIsoLocalization
code: /-- Given a submodule `M ⊆ R` and a prime ideal `p` of `M⁻¹R`, with `f : R →+* S` the localization
map, then `(M⁻¹R)ₚ` is isomorphic (as an `R`-algebra) to the localization of `R` at `f⁻¹(p)`.
-/
noncomputable def localizationLocalizationAtPrimeIsoLocalization (p : Ideal (Localization M))
    [p.IsPrime] :
    Localization.AtPrime (p.comap (algebraMap R (Localization M))) ≃ₐ[R] Localization.AtPrime p 
goal: Localization.AtPrime (Ideal.comap (algebraMap R (Localization M)) p) ≃ₐ[R] Localization.AtPrime p

full_name: IsLocalization.localizationAlgebraOfSubmonoidLe
code: /-- Given submonoids `M ≤ N` of `R`, this is the canonical algebra structure
of `M⁻¹S` acting on `N⁻¹S`. -/
noncomputable def localizationAlgebraOfSubmonoidLe (M N : Submonoid R) (h : M ≤ N)
    [IsLocalization M S] [IsLocalization N T] : Algebra S T 
goal: Algebra S T

full_name: IsLocalization.localization_isScalarTower_of_submonoid_le
code: /-- If `M ≤ N` are submonoids of `R`, then the natural map `M⁻¹S →+* N⁻¹S` commutes with the
localization maps -/
theorem localization_isScalarTower_of_submonoid_le (M N : Submonoid R) (h : M ≤ N)
    [IsLocalization M S] [IsLocalization N T] :
    @IsScalarTower R S T _ (localizationAlgebraOfSubmonoidLe S T M N h).toSMul _ 
goal: IsScalarTower R S T

full_name: IsLocalization.instAlgebraAtPrimeLocalizationNonZeroDivisorsOfIsDomain
code: noncomputable instance (x : Ideal R) [H : x.IsPrime] [IsDomain R] :
    Algebra (Localization.AtPrime x) (Localization (nonZeroDivisors R)) 
goal: Algebra (Localization.AtPrime x) (Localization (nonZeroDivisors R))

full_name: IsLocalization.isLocalization_of_submonoid_le
code: /-- If `M ≤ N` are submonoids of `R`, then `N⁻¹S` is also the localization of `M⁻¹S` at `N`. -/
theorem isLocalization_of_submonoid_le (M N : Submonoid R) (h : M ≤ N) [IsLocalization M S]
    [IsLocalization N T] [Algebra S T] [IsScalarTower R S T] :
    IsLocalization (N.map (algebraMap R S)) T 
goal: IsLocalization (Submonoid.map (algebraMap R S) N) T

full_name: IsLocalization.isLocalization_of_is_exists_mul_mem
code: /-- If `M ≤ N` are submonoids of `R` such that `∀ x : N, ∃ m : R, m * x ∈ M`, then the
localization at `N` is equal to the localizaton of `M`. -/
theorem isLocalization_of_is_exists_mul_mem (M N : Submonoid R) [IsLocalization M S] (h : M ≤ N)
    (h' : ∀ x : N, ∃ m : R, m * x ∈ M) : IsLocalization N S 
goal: IsLocalization N S

full_name: IsFractionRing.isFractionRing_of_isLocalization
code: theorem isFractionRing_of_isLocalization (S T : Type*) [CommRing S] [CommRing T] [Algebra R S]
    [Algebra R T] [Algebra S T] [IsScalarTower R S T] [IsLocalization M S] [IsFractionRing R T]
    (hM : M ≤ nonZeroDivisors R) : IsFractionRing S T 
goal: IsFractionRing S T

full_name: IsFractionRing.isFractionRing_of_isDomain_of_isLocalization
code: theorem isFractionRing_of_isDomain_of_isLocalization [IsDomain R] (S T : Type*) [CommRing S]
    [CommRing T] [Algebra R S] [Algebra R T] [Algebra S T] [IsScalarTower R S T]
    [IsLocalization M S] [IsFractionRing R T] : IsFractionRing S T 
goal: IsFractionRing S T