The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V09. Commutative algebra I: ideals, polynomials, factorization

Mathlib.RingTheory.Localization.Defs

146 declarations. Mathlib docs · Source

Localizations of commutative rings

We characterize the localization of a commutative ring R at a submonoid M up to isomorphism; that is, a commutative ring S is the localization of R at M iff we can find a ring homomorphism f : R →+* S satisfying 3 properties:

  1. For all y ∈ M, f y is a unit;
  2. For all z : S, there exists (x, y) : R × M such that z * f y = f x;
  3. For all x, y : R such that f x = f y, there exists c ∈ M such that x * c = y * c. (The converse is a consequence of 1.)

In the following, let R, P be commutative rings, S, Q be R- and P-algebras and M, T be submonoids of R and P respectively, e.g.:

variable (R S P Q : Type*) [CommRing R] [CommRing S] [CommRing P] [CommRing Q]
variable [Algebra R S] [Algebra P Q] (M : Submonoid R) (T : Submonoid P)

Main definitions

  • IsLocalization (M : Submonoid R) (S : Type*) is a typeclass expressing that S is a localization of R at M, i.e. the canonical map algebraMap R S : R →+* S is a localization map (satisfying the above properties).
  • IsLocalization.mk' S is a surjection sending (x, y) : R × M to f x * (f y)⁻¹
  • IsLocalization.lift is the ring homomorphism from S induced by a homomorphism from R which maps elements of M to invertible elements of the codomain.
  • IsLocalization.map S Q is the ring homomorphism from S to Q which maps elements of M to elements of T
  • IsLocalization.ringEquivOfRingEquiv: if R and P are isomorphic by an isomorphism sending M to T, then S and Q are isomorphic

Main results

  • Localization M S, a construction of the localization as a quotient type, defined in GroupTheory.MonoidLocalization, has CommRing, Algebra R and IsLocalization M instances if R is a ring. Localization.Away, Localization.AtPrime and FractionRing are abbreviations for Localizations and have their corresponding IsLocalization instances

Implementation notes

In maths it is natural to reason up to isomorphism, but in Lean we cannot naturally rewrite one structure with an isomorphic one; one way around this is to isolate a predicate characterizing a structure up to isomorphism, and reason about things that satisfy the predicate.

A previous version of this file used a fully bundled type of ring localization maps, then used a type synonym f.codomain for f : LocalizationMap M S to instantiate the R-algebra structure on S. This results in defining ad-hoc copies for everything already defined on S. By making IsLocalization a predicate on the algebraMap R S, we can ensure the localization map commutes nicely with other algebraMaps.

To prove most lemmas about a localization map algebraMap R S in this file we invoke the corresponding proof for the underlying CommMonoid localization map IsLocalization.toLocalizationMap M S, which can be found in GroupTheory.MonoidLocalization and the namespace Submonoid.LocalizationMap.

To reason about the localization as a quotient type, use mk_eq_of_mk' and associated lemmas. These show the quotient map mk : R → M → Localization M equals the surjection LocalizationMap.mk' induced by the map algebraMap : R →+* Localization M. The lemma mk_eq_of_mk' hence gives you access to the results in the rest of the file, which are about the LocalizationMap.mk' induced by any localization map.

The proof that "a CommRing K which is the localization of an integral domain R at R \ {0} is a field" is a def rather than an instance, so if you want to reason about a field of fractions K, assume [Field K] instead of just [CommRing K].

Tags

localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions

Constructing a localization at a given submonoid

theorem IsLocalization.ringEquivOfRingEquiv.congr_simp E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M M_1 : Submonoid R} (e_M : M = M_1) (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] {T T_1 : Submonoid P}
  (e_T : T = T_1) (Q : Type u_4) [inst_5 : CommSemiring Q] [inst_6 : Algebra P Q] [inst_7 : IsLocalization T Q]
  (h h_1 : R ≃+* P) (e_h : h = h_1) (H : Submonoid.map h.toMonoidHom M = T),
  IsLocalization.ringEquivOfRingEquiv S Q h H = IsLocalization.ringEquivOfRingEquiv S Q h_1 ⋯

theorem IsLocalization.lift.congr_simp E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M M_1 : Submonoid R} (e_M : M = M_1) {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] {g g_1 : R →+* P}
  (e_g : g = g_1) (hg : ∀ (y : ↥M), IsUnit (g ↑y)), IsLocalization.lift hg = IsLocalization.lift ⋯

theorem IsLocalization.toLocalizationMap.congr_simp E1 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S],
  IsLocalization.toLocalizationMap M S = IsLocalization.toLocalizationMap M S

theorem IsLocalization.map.congr_simp E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M M_1 : Submonoid R} (e_M : M = M_1) {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] {T T_1 : Submonoid P}
  (e_T : T = T_1) (Q : Type u_4) [inst_5 : CommSemiring Q] [inst_6 : Algebra P Q] [inst_7 : IsLocalization T Q]
  (g g_1 : R →+* P) (e_g : g = g_1) (hy : M ≤ Submonoid.comap g T),
  IsLocalization.map Q g hy = IsLocalization.map Q g_1 ⋯

theorem IsLocalization.mk'.congr_simp E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (x x_1 : R),
  x = x_1 → ∀ (y y_1 : ↥M), y = y_1 → IsLocalization.mk' S x y = IsLocalization.mk' S x_1 y_1

theorem IsLocalization.sec.congr_simp E1 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (z z_1 : S),
  z = z_1 → IsLocalization.sec M z = IsLocalization.sec M z_1

class IsLocalization' E1 #

{R : Type u_1} →
  [inst : CommSemiring R] → Submonoid R → (S : Type u_2) → [inst_1 : CommSemiring S] → [Algebra R S] → Prop

An auxiliary typeclass to avoid auto-generated declarations under the IsLocalization namespace.

ctor IsLocalization'.mk E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S], M.IsLocalizationMap ⇑(algebraMap R S) → IsLocalization' M S

theorem IsLocalization'.toIsLocalizationMap E1 #

∀ {R : Type u_1} {inst : CommSemiring R} {M : Submonoid R} {S : Type u_2} {inst_1 : CommSemiring S}
  {inst_2 : Algebra R S} [self : IsLocalization' M S], M.IsLocalizationMap ⇑(algebraMap R S)

abbrev IsLocalization E3 #

{R : Type u_4} →
  [inst : CommSemiring R] → Submonoid R → (S : Type u_5) → [inst_1 : CommSemiring S] → [Algebra R S] → Prop

The typeclass IsLocalization (M : Submonoid R) S where S is an R-algebra expresses that S is isomorphic to the localization of R at M.

theorem isLocalization_iff_isLocalizationMap E1 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S], IsLocalization M S ↔ M.IsLocalizationMap ⇑(algebraMap R S)

theorem isLocalization_iff E0 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S],
  IsLocalization M S ↔
    (∀ (y : ↥M), IsUnit ((algebraMap R S) ↑y)) ∧
      (∀ (z : S), ∃ x, z * (algebraMap R S) ↑x.2 = (algebraMap R S) x.1) ∧
        ∀ {x y : R}, (algebraMap R S) x = (algebraMap R S) y → ∃ c, ↑c * x = ↑c * y

theorem IsLocalization.map_units E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [IsLocalization M S] (y : ↥M), IsUnit ((algebraMap R S) ↑y)

Everything in the image of algebraMap is a unit.

theorem IsLocalization.surj E1 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [IsLocalization M S] (z : S), ∃ x, z * (algebraMap R S) ↑x.2 = (algebraMap R S) x.1

Every element in the localization can be expressed as a quotient of an element in the range of algebraMap by the image of an element of the submonoid.

theorem IsLocalization.exists_of_eq E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [IsLocalization M S] {x y : R}, (algebraMap R S) x = (algebraMap R S) y → ∃ c, ↑c * x = ↑c * y

theorem IsLocalization.smul_bijective E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [IsLocalization M S] (m : ↥M), Function.Bijective fun s ↦ m • s

abbrev IsLocalization.toLocalizationMap E1 #

{R : Type u_1} →
  [inst : CommSemiring R] →
    (M : Submonoid R) →
      (S : Type u_2) → [inst_1 : CommSemiring S] → [inst_2 : Algebra R S] → [IsLocalization M S] → M.LocalizationMap S

IsLocalization.toLocalizationMap M S shows S is the monoid localization of R at M.

theorem IsLocalization.toLocalizationMap_toMonoidHom E0 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S],
  (IsLocalization.toLocalizationMap M S).toMonoidHom = ↑↑(algebraMap R S)

theorem IsLocalization.coe_toLocalizationMap E0 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S], ⇑(IsLocalization.toLocalizationMap M S) = ⇑(algebraMap R S)

theorem IsLocalization.toLocalizationMap_apply E0 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (x : R),
  (IsLocalization.toLocalizationMap M S) x = (algebraMap R S) x

theorem IsLocalization.surj₂ E1 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [IsLocalization M S] (z w : S),
  ∃ z' w' d, z * (algebraMap R S) ↑d = (algebraMap R S) z' ∧ w * (algebraMap R S) ↑d = (algebraMap R S) w'

theorem IsLocalization.injective_iff_isRegular E1 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [IsLocalization M S], Function.Injective ⇑(algebraMap R S) ↔ ∀ (c : ↥M), IsRegular ↑c

theorem IsLocalization.of_le E1 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [IsLocalization M S] (N : Submonoid R),
  M ≤ N → (∀ r ∈ N, IsUnit ((algebraMap R S) r)) → IsLocalization N S

theorem IsLocalization.of_le_of_exists_dvd E1 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [IsLocalization M S] (N : Submonoid R), M ≤ N → (∀ n ∈ N, ∃ m ∈ M, n ∣ m) → IsLocalization N S

theorem IsLocalization.algebraMap_isUnit_iff E0 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [IsLocalization M S] {x : R}, IsUnit ((algebraMap R S) x) ↔ ∃ m ∈ M, x ∣ m

def IsLocalization.sec E1 #

{R : Type u_1} →
  [inst : CommSemiring R] →
    (M : Submonoid R) →
      {S : Type u_2} → [inst_1 : CommSemiring S] → [inst_2 : Algebra R S] → [IsLocalization M S] → S → R × ↥M

Given a localization map f : M →* N, a section function sending z : N to some (x, y) : M × S such that f x * (f y)⁻¹ = z.

theorem IsLocalization.toLocalizationMap_sec E0 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S],
  (IsLocalization.toLocalizationMap M S).sec = IsLocalization.sec M

theorem IsLocalization.sec_spec E1 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (z : S),
  z * (algebraMap R S) ↑(IsLocalization.sec M z).2 = (algebraMap R S) (IsLocalization.sec M z).1

Given z : S, IsLocalization.sec M z is defined to be a pair (x, y) : R × M such that z * f y = f x (so this lemma is true by definition).

theorem IsLocalization.sec_spec' E1 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (z : S),
  (algebraMap R S) (IsLocalization.sec M z).1 = (algebraMap R S) ↑(IsLocalization.sec M z).2 * z

Given z : S, IsLocalization.sec M z is defined to be a pair (x, y) : R × M such that z * f y = f x, so this lemma is just an application of S's commutativity.

theorem IsLocalization.subsingleton E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [IsLocalization M S], 0 ∈ M → Subsingleton S

If M contains 0 then the localization at M is trivial.

theorem IsLocalization.subsingleton_iff E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [IsLocalization M S], Subsingleton S ↔ 0 ∈ M

theorem IsLocalization.map_right_cancel E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [IsLocalization M S] {x y : R} {c : ↥M},
  (algebraMap R S) (↑c * x) = (algebraMap R S) (↑c * y) → (algebraMap R S) x = (algebraMap R S) y

theorem IsLocalization.map_left_cancel E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [IsLocalization M S] {x y : R} {c : ↥M},
  (algebraMap R S) (x * ↑c) = (algebraMap R S) (y * ↑c) → (algebraMap R S) x = (algebraMap R S) y

theorem IsLocalization.map_eq_zero_iff E0 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [IsLocalization M S] (r : R), (algebraMap R S) r = 0 ↔ ∃ m, ↑m * r = 0

def IsLocalization.mk' E1 #

{R : Type u_1} →
  [inst : CommSemiring R] →
    {M : Submonoid R} →
      (S : Type u_2) → [inst_1 : CommSemiring S] → [inst_2 : Algebra R S] → [IsLocalization M S] → R → ↥M → S

IsLocalization.mk' S is the surjection sending (x, y) : R × M to f x * (f y)⁻¹.

theorem IsLocalization.mk'_sec E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (z : S),
  IsLocalization.mk' S (IsLocalization.sec M z).1 (IsLocalization.sec M z).2 = z

theorem IsLocalization.mk'_mul E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (x₁ x₂ : R) (y₁ y₂ : ↥M),
  IsLocalization.mk' S (x₁ * x₂) (y₁ * y₂) = IsLocalization.mk' S x₁ y₁ * IsLocalization.mk' S x₂ y₂

theorem IsLocalization.mk'_one E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (x : R), IsLocalization.mk' S x 1 = (algebraMap R S) x

theorem IsLocalization.mk'_spec E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (x : R) (y : ↥M),
  IsLocalization.mk' S x y * (algebraMap R S) ↑y = (algebraMap R S) x

theorem IsLocalization.mk'_spec' E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (x : R) (y : ↥M),
  (algebraMap R S) ↑y * IsLocalization.mk' S x y = (algebraMap R S) x

theorem IsLocalization.mk'_spec_mk E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (x y : R) (hy : y ∈ M),
  IsLocalization.mk' S x ⟨y, hy⟩ * (algebraMap R S) y = (algebraMap R S) x

theorem IsLocalization.mk'_spec'_mk E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (x y : R) (hy : y ∈ M),
  (algebraMap R S) y * IsLocalization.mk' S x ⟨y, hy⟩ = (algebraMap R S) x

theorem IsLocalization.mk'_eq_iff_eq_mul E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] {x : R} {y : ↥M} {z : S},
  IsLocalization.mk' S x y = z ↔ (algebraMap R S) x = z * (algebraMap R S) ↑y

theorem IsLocalization.mk'_add_eq_iff_add_mul_eq_mul E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] {x : R} {y : ↥M} {z₁ z₂ : S},
  IsLocalization.mk' S x y + z₁ = z₂ ↔ (algebraMap R S) x + z₁ * (algebraMap R S) ↑y = z₂ * (algebraMap R S) ↑y

theorem IsLocalization.mk'_pow E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (x : R) (y : ↥M) (n : ℕ),
  IsLocalization.mk' S (x ^ n) (y ^ n) = IsLocalization.mk' S x y ^ n

theorem IsLocalization.mk'_surjective E1 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S],
  Function.Surjective fun x ↦
    match x with
    | (r, m) => IsLocalization.mk' S r m

theorem IsLocalization.exists_mk'_eq E0 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (z : S), ∃ x y, IsLocalization.mk' S x y = z

def IsLocalization.fintype' E1 #

{R : Type u_1} →
  [inst : CommSemiring R] →
    (M : Submonoid R) →
      (S : Type u_2) →
        [inst_1 : CommSemiring S] → [inst_2 : Algebra R S] → [IsLocalization M S] → [Fintype R] → Fintype S

The localization of a Fintype is a Fintype. Cannot be an instance.

def IsLocalization.uniqueOfZeroMem E1 #

{R : Type u_1} →
  [inst : CommSemiring R] →
    {M : Submonoid R} →
      {S : Type u_2} → [inst_1 : CommSemiring S] → [inst_2 : Algebra R S] → [IsLocalization M S] → 0 ∈ M → Unique S

Localizing at a submonoid with 0 inside it leads to the trivial ring.

theorem IsLocalization.mk'_eq_iff_eq E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] {x₁ x₂ : R} {y₁ y₂ : ↥M},
  IsLocalization.mk' S x₁ y₁ = IsLocalization.mk' S x₂ y₂ ↔ (algebraMap R S) (↑y₂ * x₁) = (algebraMap R S) (↑y₁ * x₂)

theorem IsLocalization.mk'_eq_iff_eq' E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] {x₁ x₂ : R} {y₁ y₂ : ↥M},
  IsLocalization.mk' S x₁ y₁ = IsLocalization.mk' S x₂ y₂ ↔ (algebraMap R S) (x₁ * ↑y₂) = (algebraMap R S) (x₂ * ↑y₁)

theorem IsLocalization.eq E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] {a₁ b₁ : R} {a₂ b₂ : ↥M},
  IsLocalization.mk' S a₁ a₂ = IsLocalization.mk' S b₁ b₂ ↔ ∃ c, ↑c * (↑b₂ * a₁) = ↑c * (↑a₂ * b₁)

theorem IsLocalization.mk'_eq_zero_iff E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (x : R) (s : ↥M), IsLocalization.mk' S x s = 0 ↔ ∃ m, ↑m * x = 0

theorem IsLocalization.mk'_zero E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (s : ↥M), IsLocalization.mk' S 0 s = 0

theorem IsLocalization.ne_zero_of_mk'_ne_zero E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] {x : R} {y : ↥M}, IsLocalization.mk' S x y ≠ 0 → x ≠ 0

theorem IsLocalization.isRegular_mk' E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S],
  (∀ m ∈ M, IsRegular m) → ∀ {r : R} {m : ↥M}, IsRegular (IsLocalization.mk' S r m) ↔ IsRegular r

If we localise a ring R at a submonoid M made of regular elements, then r / m : R[1/M] is regular iff r : R is.

theorem IsLocalization.noZeroDivisors E1 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [IsLocalization M S] [NoZeroDivisors R], NoZeroDivisors S

Any localization of a commutative semiring without zero-divisors also has no zero-divisors.

theorem IsLocalization.sec_fst_ne_zero E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] {x : S}, x ≠ 0 → (IsLocalization.sec M x).1 ≠ 0

theorem IsLocalization.mk'_eq_iff_mk'_eq E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] [inst_5 : Algebra R P]
  [inst_6 : IsLocalization M P] {x₁ x₂ : R} {y₁ y₂ : ↥M},
  IsLocalization.mk' S x₁ y₁ = IsLocalization.mk' S x₂ y₂ ↔ IsLocalization.mk' P x₁ y₁ = IsLocalization.mk' P x₂ y₂

theorem IsLocalization.mk'_eq_of_eq E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] {a₁ b₁ : R} {a₂ b₂ : ↥M},
  ↑a₂ * b₁ = ↑b₂ * a₁ → IsLocalization.mk' S a₁ a₂ = IsLocalization.mk' S b₁ b₂

theorem IsLocalization.mk'_eq_of_eq' E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] {a₁ b₁ : R} {a₂ b₂ : ↥M},
  b₁ * ↑a₂ = a₁ * ↑b₂ → IsLocalization.mk' S a₁ a₂ = IsLocalization.mk' S b₁ b₂

theorem IsLocalization.mk'_cancel E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (a : R) (b c : ↥M),
  IsLocalization.mk' S (a * ↑c) (b * c) = IsLocalization.mk' S a b

theorem IsLocalization.mk'_self E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] {x : R} (hx : x ∈ M), IsLocalization.mk' S x ⟨x, hx⟩ = 1

theorem IsLocalization.mk'_self' E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] {x : ↥M}, IsLocalization.mk' S (↑x) x = 1

theorem IsLocalization.mk'_self'' E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] {x : ↥M}, IsLocalization.mk' S (↑x) x = 1

theorem IsLocalization.mul_mk'_eq_mk'_of_mul E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (x y : R) (z : ↥M),
  (algebraMap R S) x * IsLocalization.mk' S y z = IsLocalization.mk' S (x * y) z

theorem IsLocalization.mk'_eq_mul_mk'_one E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (x : R) (y : ↥M),
  IsLocalization.mk' S x y = (algebraMap R S) x * IsLocalization.mk' S 1 y

theorem IsLocalization.mk'_mul_cancel_left E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (x : R) (y : ↥M),
  IsLocalization.mk' S (↑y * x) y = (algebraMap R S) x

theorem IsLocalization.mk'_mul_cancel_right E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (x : R) (y : ↥M),
  IsLocalization.mk' S (x * ↑y) y = (algebraMap R S) x

theorem IsLocalization.mk'_mul_mk'_eq_one E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (x y : ↥M),
  IsLocalization.mk' S (↑x) y * IsLocalization.mk' S (↑y) x = 1

theorem IsLocalization.mk'_mul_mk'_eq_one' E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (x : R) (y : ↥M) (h : x ∈ M),
  IsLocalization.mk' S x y * IsLocalization.mk' S ↑y ⟨x, h⟩ = 1

theorem IsLocalization.smul_mk' E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (x y : R) (m : ↥M),
  x • IsLocalization.mk' S y m = IsLocalization.mk' S (x * y) m

theorem IsLocalization.smul_mk'_one E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (x : R) (m : ↥M),
  x • IsLocalization.mk' S 1 m = IsLocalization.mk' S x m

theorem IsLocalization.smul_mk'_self E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] {m : ↥M} {r : R},
  ↑m • IsLocalization.mk' S r m = (algebraMap R S) r

instance IsLocalization.invertible_mk'_one E0 #

{R : Type u_1} →
  [inst : CommSemiring R] →
    {M : Submonoid R} →
      {S : Type u_2} →
        [inst_1 : CommSemiring S] →
          [inst_2 : Algebra R S] → [inst_3 : IsLocalization M S] → (s : ↥M) → Invertible (IsLocalization.mk' S 1 s)

theorem IsLocalization.invertible_mk'_one_invOf E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (s : ↥M), ⅟(IsLocalization.mk' S 1 s) = (algebraMap R S) ↑s

theorem IsLocalization.isUnit_comp E1 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [IsLocalization M S] (j : S →+* P) (y : ↥M),
  IsUnit ((j.comp (algebraMap R S)) ↑y)

theorem IsLocalization.mk'_add E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (x₁ x₂ : R) (y₁ y₂ : ↥M),
  IsLocalization.mk' S (x₁ * ↑y₂ + x₂ * ↑y₁) (y₁ * y₂) = IsLocalization.mk' S x₁ y₁ + IsLocalization.mk' S x₂ y₂

theorem IsLocalization.mul_add_inv_left E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {P : Type u_3} [inst_1 : CommSemiring P] {g : R →+* P}
  (h : ∀ (y : ↥M), IsUnit (g ↑y)) (y : ↥M) (w z₁ z₂ : P),
  w * ↑((IsUnit.liftRight ((↑g).domRestrict M) h) y)⁻¹ + z₁ = z₂ ↔ w + g ↑y * z₁ = g ↑y * z₂

theorem IsLocalization.lift_spec_mul_add E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] {g : R →+* P}
  (hg : ∀ (y : ↥M), IsUnit (g ↑y)) (z : S) (w w' v : P),
  ((IsLocalization.toLocalizationMap M S).lift hg) z * w + w' = v ↔
    g ((IsLocalization.toLocalizationMap M S).sec z).1 * w + g ↑((IsLocalization.toLocalizationMap M S).sec z).2 * w' =
      g ↑((IsLocalization.toLocalizationMap M S).sec z).2 * v

def IsLocalization.lift E3 #

{R : Type u_1} →
  [inst : CommSemiring R] →
    {M : Submonoid R} →
      {S : Type u_2} →
        [inst_1 : CommSemiring S] →
          [inst_2 : Algebra R S] →
            {P : Type u_3} →
              [inst_3 : CommSemiring P] → [IsLocalization M S] → {g : R →+* P} → (∀ (y : ↥M), IsUnit (g ↑y)) → S →+* P

Given a localization map f : R →+* S for a submonoid M ⊆ R and a map of CommSemirings g : R →+* P such that g y is invertible for all y : M, the homomorphism induced from S to P sending z : S to g x * (g y)⁻¹, where (x, y) : R × M are such that z = f x * (f y)⁻¹.

theorem IsLocalization.lift_mk' E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] {g : R →+* P}
  (hg : ∀ (y : ↥M), IsUnit (g ↑y)) (x : R) (y : ↥M),
  (IsLocalization.lift hg) (IsLocalization.mk' S x y) = g x * ↑((IsUnit.liftRight ((↑g).domRestrict M) hg) y)⁻¹

Given a localization map f : R →+* S for a submonoid M ⊆ R and a map of CommSemirings g : R →* P such that g y is invertible for all y : M, the homomorphism induced from S to P maps f x * (f y)⁻¹ to g x * (g y)⁻¹ for all x : R, y ∈ M.

theorem IsLocalization.lift_mk'_spec E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] {g : R →+* P}
  (hg : ∀ (y : ↥M), IsUnit (g ↑y)) (x : R) (v : P) (y : ↥M),
  (IsLocalization.lift hg) (IsLocalization.mk' S x y) = v ↔ g x = g ↑y * v

theorem IsLocalization.lift_eq E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] {g : R →+* P}
  (hg : ∀ (y : ↥M), IsUnit (g ↑y)) (x : R), (IsLocalization.lift hg) ((algebraMap R S) x) = g x

theorem IsLocalization.lift_eq_iff E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] {g : R →+* P}
  (hg : ∀ (y : ↥M), IsUnit (g ↑y)) {x y : R × ↥M},
  (IsLocalization.lift hg) (IsLocalization.mk' S x.1 x.2) = (IsLocalization.lift hg) (IsLocalization.mk' S y.1 y.2) ↔
    g (x.1 * ↑y.2) = g (y.1 * ↑x.2)

theorem IsLocalization.lift_comp E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] {g : R →+* P}
  (hg : ∀ (y : ↥M), IsUnit (g ↑y)), (IsLocalization.lift hg).comp (algebraMap R S) = g

theorem IsLocalization.lift_of_comp E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] (j : S →+* P),
  IsLocalization.lift ⋯ = j

theorem IsLocalization.monoidHom_ext E1 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [IsLocalization M S] {P : Type u_4} [inst_4 : Monoid P] ⦃j k : S →* P⦄,
  j.comp ↑(algebraMap R S) = k.comp ↑(algebraMap R S) → j = k

See note [partially-applied ext lemmas]

theorem IsLocalization.ringHom_ext E1 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [IsLocalization M S] {P : Type u_4} [inst_4 : Semiring P] ⦃j k : S →+* P⦄,
  j.comp (algebraMap R S) = k.comp (algebraMap R S) → j = k

See note [partially-applied ext lemmas]

theorem IsLocalization.ext E1 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [IsLocalization M S] {P : Type u_4} [inst_4 : Monoid P] (j k : S → P),
  j 1 = 1 →
    k 1 = 1 →
      (∀ (a b : S), j (a * b) = j a * j b) →
        (∀ (a b : S), k (a * b) = k a * k b) → (∀ (a : R), j ((algebraMap R S) a) = k ((algebraMap R S) a)) → j = k

To show j and k agree on the whole localization, it suffices to show they agree on the image of the base ring, if they preserve 1 and *.

theorem IsLocalization.lift_unique E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] {g : R →+* P}
  (hg : ∀ (y : ↥M), IsUnit (g ↑y)) {j : S →+* P}, (∀ (x : R), j ((algebraMap R S) x) = g x) → IsLocalization.lift hg = j

theorem IsLocalization.lift_id E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (x : S), (IsLocalization.lift ⋯) x = x

theorem IsLocalization.lift_surjective_iff E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] {g : R →+* P}
  (hg : ∀ (y : ↥M), IsUnit (g ↑y)), Function.Surjective ⇑(IsLocalization.lift hg) ↔ ∀ (v : P), ∃ x, v * g ↑x.2 = g x.1

theorem IsLocalization.lift_injective_iff E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] {g : R →+* P}
  (hg : ∀ (y : ↥M), IsUnit (g ↑y)),
  Function.Injective ⇑(IsLocalization.lift hg) ↔ ∀ (x y : R), (algebraMap R S) x = (algebraMap R S) y ↔ g x = g y

theorem IsLocalization.injective_iff_map_algebraMap_eq E0 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [IsLocalization M S] {T : Type u_4} [inst_4 : CommSemiring T] (f : S →+* T),
  Function.Injective ⇑f ↔
    ∀ (x y : R), (algebraMap R S) x = (algebraMap R S) y ↔ f ((algebraMap R S) x) = f ((algebraMap R S) y)

def IsLocalization.map E1 #

{R : Type u_1} →
  [inst : CommSemiring R] →
    {M : Submonoid R} →
      {S : Type u_2} →
        [inst_1 : CommSemiring S] →
          [inst_2 : Algebra R S] →
            {P : Type u_3} →
              [inst_3 : CommSemiring P] →
                [IsLocalization M S] →
                  {T : Submonoid P} →
                    (Q : Type u_4) →
                      [inst_5 : CommSemiring Q] →
                        [inst_6 : Algebra P Q] →
                          [IsLocalization T Q] → (g : R →+* P) → M ≤ Submonoid.comap g T → S →+* Q

Map a homomorphism g : R →+* P to S →+* Q, where S and Q are localizations of R and P at M and T respectively, such that g(M) ⊆ T.

We send z : S to algebraMap P Q (g x) * (algebraMap P Q (g y))⁻¹, where (x, y) : R × M are such that z = f x * (f y)⁻¹.

theorem IsLocalization.map_eq E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] {g : R →+* P}
  {T : Submonoid P} {Q : Type u_4} [inst_5 : CommSemiring Q] [inst_6 : Algebra P Q] [inst_7 : IsLocalization T Q]
  (hy : M ≤ Submonoid.comap g T) (x : R), (IsLocalization.map Q g hy) ((algebraMap R S) x) = (algebraMap P Q) (g x)

theorem IsLocalization.map_comp E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] {g : R →+* P}
  {T : Submonoid P} {Q : Type u_4} [inst_5 : CommSemiring Q] [inst_6 : Algebra P Q] [inst_7 : IsLocalization T Q]
  (hy : M ≤ Submonoid.comap g T), (IsLocalization.map Q g hy).comp (algebraMap R S) = (algebraMap P Q).comp g

theorem IsLocalization.map_mk' E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] {g : R →+* P}
  {T : Submonoid P} {Q : Type u_4} [inst_5 : CommSemiring Q] [inst_6 : Algebra P Q] [inst_7 : IsLocalization T Q]
  (hy : M ≤ Submonoid.comap g T) (x : R) (y : ↥M),
  (IsLocalization.map Q g hy) (IsLocalization.mk' S x y) = IsLocalization.mk' Q (g x) ⟨g ↑y, ⋯⟩

theorem IsLocalization.map_unique E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] {g : R →+* P}
  {T : Submonoid P} {Q : Type u_4} [inst_5 : CommSemiring Q] [inst_6 : Algebra P Q] [inst_7 : IsLocalization T Q]
  (hy : M ≤ Submonoid.comap g T) (j : S →+* Q),
  (∀ (x : R), j ((algebraMap R S) x) = (algebraMap P Q) (g x)) → IsLocalization.map Q g hy = j

theorem IsLocalization.map_comp_map E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] {g : R →+* P}
  {T : Submonoid P} {Q : Type u_4} [inst_5 : CommSemiring Q] [inst_6 : Algebra P Q] [inst_7 : IsLocalization T Q]
  (hy : M ≤ Submonoid.comap g T) {A : Type u_5} [inst_8 : CommSemiring A] {U : Submonoid A} {W : Type u_6}
  [inst_9 : CommSemiring W] [inst_10 : Algebra A W] [inst_11 : IsLocalization U W] {l : P →+* A}
  (hl : T ≤ Submonoid.comap l U),
  (IsLocalization.map W l hl).comp (IsLocalization.map Q g hy) = IsLocalization.map W (l.comp g) ⋯

If CommSemiring homs g : R →+* P, l : P →+* A induce maps of localizations, the composition of the induced maps equals the map of localizations induced by l ∘ g.

theorem IsLocalization.map_map E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] {g : R →+* P}
  {T : Submonoid P} {Q : Type u_4} [inst_5 : CommSemiring Q] [inst_6 : Algebra P Q] [inst_7 : IsLocalization T Q]
  (hy : M ≤ Submonoid.comap g T) {A : Type u_5} [inst_8 : CommSemiring A] {U : Submonoid A} {W : Type u_6}
  [inst_9 : CommSemiring W] [inst_10 : Algebra A W] [inst_11 : IsLocalization U W] {l : P →+* A}
  (hl : T ≤ Submonoid.comap l U) (x : S),
  (IsLocalization.map W l hl) ((IsLocalization.map Q g hy) x) = (IsLocalization.map W (l.comp g) ⋯) x

If CommSemiring homs g : R →+* P, l : P →+* A induce maps of localizations, the composition of the induced maps equals the map of localizations induced by l ∘ g.

theorem IsLocalization.map_smul E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] {g : R →+* P}
  {T : Submonoid P} {Q : Type u_4} [inst_5 : CommSemiring Q] [inst_6 : Algebra P Q] [inst_7 : IsLocalization T Q]
  (hy : M ≤ Submonoid.comap g T) (x : S) (z : R),
  (IsLocalization.map Q g hy) (z • x) = g z • (IsLocalization.map Q g hy) x

theorem IsLocalization.map_id_mk' E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] {Q : Type u_5} [inst_4 : CommSemiring Q] [inst_5 : Algebra R Q]
  [inst_6 : IsLocalization M Q] (x : R) (y : ↥M),
  (IsLocalization.map Q (RingHom.id R) ⋯) (IsLocalization.mk' S x y) = IsLocalization.mk' Q x y

theorem IsLocalization.map_id E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] (z : S) (h : optParam (M ≤ Submonoid.comap (RingHom.id R) M) ⋯),
  (IsLocalization.map S (RingHom.id R) h) z = z

def IsLocalization.ringEquivOfRingEquiv E3 #

{R : Type u_1} →
  [inst : CommSemiring R] →
    {M : Submonoid R} →
      (S : Type u_2) →
        [inst_1 : CommSemiring S] →
          [inst_2 : Algebra R S] →
            {P : Type u_3} →
              [inst_3 : CommSemiring P] →
                [IsLocalization M S] →
                  {T : Submonoid P} →
                    (Q : Type u_4) →
                      [inst_5 : CommSemiring Q] →
                        [inst_6 : Algebra P Q] →
                          [IsLocalization T Q] → (h : R ≃+* P) → Submonoid.map h.toMonoidHom M = T → S ≃+* Q

If S, Q are localizations of R and P at submonoids M, T respectively, an isomorphism j : R ≃+* P such that j(M) = T induces an isomorphism of localizations S ≃+* Q.

theorem IsLocalization.ringEquivOfRingEquiv_apply E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] {T : Submonoid P}
  (Q : Type u_4) [inst_5 : CommSemiring Q] [inst_6 : Algebra P Q] [inst_7 : IsLocalization T Q] (h : R ≃+* P)
  (H : Submonoid.map h.toMonoidHom M = T) (a : S),
  (IsLocalization.ringEquivOfRingEquiv S Q h H) a = (IsLocalization.map Q ↑h ⋯) a

theorem IsLocalization.ringEquivOfRingEquiv_eq_map E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] {T : Submonoid P}
  {Q : Type u_4} [inst_5 : CommSemiring Q] [inst_6 : Algebra P Q] [inst_7 : IsLocalization T Q] {j : R ≃+* P}
  (H : Submonoid.map j.toMonoidHom M = T), ↑(IsLocalization.ringEquivOfRingEquiv S Q j H) = IsLocalization.map Q ↑j ⋯

theorem IsLocalization.ringEquivOfRingEquiv_eq E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] {T : Submonoid P}
  {Q : Type u_4} [inst_5 : CommSemiring Q] [inst_6 : Algebra P Q] [inst_7 : IsLocalization T Q] {j : R ≃+* P}
  (H : Submonoid.map j.toMonoidHom M = T) (x : R),
  (IsLocalization.ringEquivOfRingEquiv S Q j H) ((algebraMap R S) x) = (algebraMap P Q) (j x)

theorem IsLocalization.ringEquivOfRingEquiv_mk' E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] {T : Submonoid P}
  {Q : Type u_4} [inst_5 : CommSemiring Q] [inst_6 : Algebra P Q] [inst_7 : IsLocalization T Q] {j : R ≃+* P}
  (H : Submonoid.map j.toMonoidHom M = T) (x : R) (y : ↥M),
  (IsLocalization.ringEquivOfRingEquiv S Q j H) (IsLocalization.mk' S x y) = IsLocalization.mk' Q (j x) ⟨j ↑y, ⋯⟩

theorem IsLocalization.ringEquivOfRingEquiv_symm E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] {T : Submonoid P}
  {Q : Type u_4} [inst_5 : CommSemiring Q] [inst_6 : Algebra P Q] [inst_7 : IsLocalization T Q] {j : R ≃+* P}
  (H : Submonoid.map j M = T),
  (IsLocalization.ringEquivOfRingEquiv S Q j H).symm = IsLocalization.ringEquivOfRingEquiv Q S j.symm ⋯

theorem IsLocalization.map_injective_of_injective E0 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] {g : R →+* P}
  (Q : Type u_4) [inst_5 : CommSemiring Q] [inst_6 : Algebra P Q],
  Function.Injective ⇑g →
    ∀ [inst_7 : IsLocalization (Submonoid.map g M) Q], Function.Injective ⇑(IsLocalization.map Q g ⋯)

Injectivity of a map descends to the map induced on localizations.

theorem IsLocalization.map_surjective_of_surjective E0 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [inst_4 : IsLocalization M S] {g : R →+* P}
  (Q : Type u_4) [inst_5 : CommSemiring Q] [inst_6 : Algebra P Q],
  Function.Surjective ⇑g →
    ∀ [inst_7 : IsLocalization (Submonoid.map g M) Q], Function.Surjective ⇑(IsLocalization.map Q g ⋯)

Surjectivity of a map descends to the map induced on localizations.

theorem IsLocalization.isLocalization_of_base_ringEquiv E1 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] [IsLocalization M S] (h : R ≃+* P),
  IsLocalization (Submonoid.map h M) S

theorem IsLocalization.isLocalization_iff_of_base_ringEquiv E1 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] {P : Type u_3} [inst_3 : CommSemiring P] (h : R ≃+* P),
  IsLocalization M S ↔ IsLocalization (Submonoid.map h M) S

theorem IsLocalization.of_ringEquiv_left E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {S : Type u_4} [inst_1 : CommSemiring S] {K : Type u_5}
  [inst_2 : CommSemiring K] [inst_3 : Algebra R K] (e : R ≃+* S) [inst_4 : Algebra S K] {M₁ : Submonoid S}
  {M₂ : Submonoid R},
  Submonoid.map e M₂ = M₁ →
    (∀ (x : R), (algebraMap R K) x = (algebraMap S K) (e x)) → ∀ [IsLocalization M₁ K], IsLocalization M₂ K

theorem IsLocalization.nonZeroDivisors_le_comap E1 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [IsLocalization M S], nonZeroDivisors R ≤ Submonoid.comap (algebraMap R S) (nonZeroDivisors S)

theorem IsLocalization.map_nonZeroDivisors_le E0 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Submonoid R) (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [IsLocalization M S], Submonoid.map (algebraMap R S) (nonZeroDivisors R) ≤ nonZeroDivisors S

instance Localization.instUniqueLocalization E0 #

{R : Type u_1} → [inst : CommSemiring R] → {M : Submonoid R} → [Subsingleton R] → Unique (Localization M)

theorem Localization.add_mk E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} (a : R) (b : ↥M) (c : R) (d : ↥M),
  Localization.mk a b + Localization.mk c d = Localization.mk (↑b * c + ↑d * a) (b * d)

theorem Localization.add_mk_self E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} (a : R) (b : ↥M) (c : R),
  Localization.mk a b + Localization.mk c b = Localization.mk (a + c) b

def Localization.mkAddMonoidHom E1 #

{R : Type u_1} → [inst : CommSemiring R] → {M : Submonoid R} → ↥M → R →+ Localization M

For any given denominator b : M, the map a ↦ a / b is an AddMonoidHom from R to Localization M.

theorem Localization.mkAddMonoidHom_apply E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} (b : ↥M) (a : R),
  (Localization.mkAddMonoidHom b) a = Localization.mk a b

theorem Localization.mk_sum E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {ι : Type u_4} (f : ι → R) (s : Finset ι) (b : ↥M),
  Localization.mk (∑ i ∈ s, f i) b = ∑ i ∈ s, Localization.mk (f i) b

theorem Localization.mk_list_sum E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} (l : List R) (b : ↥M),
  Localization.mk l.sum b = (List.map (fun a ↦ Localization.mk a b) l).sum

theorem Localization.mk_multiset_sum E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} (l : Multiset R) (b : ↥M),
  Localization.mk l.sum b = (Multiset.map (fun a ↦ Localization.mk a b) l).sum

instance Localization.isLocalization E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R}, IsLocalization M (Localization M)

instance Localization.instNoZeroDivisors E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} [NoZeroDivisors R], NoZeroDivisors (Localization M)

theorem Localization.toLocalizationMap_eq_monoidOf E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R},
  IsLocalization.toLocalizationMap M (Localization M) = Localization.monoidOf M

theorem Localization.monoidOf_eq_algebraMap E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} (x : R),
  (Localization.monoidOf M) x = (algebraMap R (Localization M)) x

theorem Localization.mk_one_eq_algebraMap E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} (x : R),
  Localization.mk x 1 = (algebraMap R (Localization M)) x

theorem Localization.mk_eq_mk'_apply E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} (x : R) (y : ↥M),
  Localization.mk x y = IsLocalization.mk' (Localization M) x y

theorem Localization.mk_eq_mk' E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R}, Localization.mk = IsLocalization.mk' (Localization M)

theorem Localization.mk_algebraMap E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {A : Type u_4} [inst_1 : CommSemiring A]
  [inst_2 : Algebra A R] (m : A), Localization.mk ((algebraMap A R) m) 1 = (algebraMap A (Localization M)) m

theorem IsLocalization.to_map_eq_zero_iff E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [IsLocalization M S] {x : R}, M ≤ nonZeroDivisors R → ((algebraMap R S) x = 0 ↔ x = 0)

theorem IsLocalization.injectiveₛ E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [IsLocalization M S], (∀ m ∈ M, IsRegular m) → Function.Injective ⇑(algebraMap R S)

theorem IsLocalization.to_map_ne_zero_of_mem_nonZeroDivisors E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [IsLocalization M S] [Nontrivial R],
  M ≤ nonZeroDivisors R → ∀ {x : R}, x ∈ nonZeroDivisors R → (algebraMap R S) x ≠ 0

theorem IsLocalization.sec_snd_ne_zero E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} {S : Type u_2} [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [inst_3 : IsLocalization M S] [Nontrivial R],
  M ≤ nonZeroDivisors R → ∀ (x : S), ↑(IsLocalization.sec M x).2 ≠ 0

theorem IsLocalization.isDomain_of_le_nonZeroDivisors E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Submonoid R} (S : Type u_2) [inst_1 : CommSemiring S]
  [inst_2 : Algebra R S] [IsLocalization M S] [IsDomain R], M ≤ nonZeroDivisors R → IsDomain S

A CommRing S which is the localization of an integral domain R at a subset of non-zero elements is an integral domain.

theorem IsLocalization.isDomain_localization E1 #

∀ {R : Type u_1} [inst : CommSemiring R] [IsDomain R] {M : Submonoid R},
  M ≤ nonZeroDivisors R → IsDomain (Localization M)

The localization of an integral domain to a set of non-zero elements is an integral domain.

theorem Localization.neg_mk E0 #

∀ {R : Type u_1} [inst : CommRing R] {M : Submonoid R} (a : R) (b : ↥M), -Localization.mk a b = Localization.mk (-a) b

theorem Localization.sub_mk E0 #

∀ {R : Type u_1} [inst : CommRing R] {M : Submonoid R} (a c : R) (b d : ↥M),
  Localization.mk a b - Localization.mk c d = Localization.mk (↑d * a - ↑b * c) (b * d)

theorem IsLocalization.mk'_neg E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Submonoid R} (S : Type u_2) [inst_1 : CommRing S] [inst_2 : Algebra R S]
  [inst_3 : IsLocalization M S] (x : R) (y : ↥M), IsLocalization.mk' S (-x) y = -IsLocalization.mk' S x y

theorem IsLocalization.mk'_sub E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Submonoid R} (S : Type u_2) [inst_1 : CommRing S] [inst_2 : Algebra R S]
  [inst_3 : IsLocalization M S] (x₁ x₂ : R) (y₁ y₂ : ↥M),
  IsLocalization.mk' S (x₁ * ↑y₂ - x₂ * ↑y₁) (y₁ * y₂) = IsLocalization.mk' S x₁ y₁ - IsLocalization.mk' S x₂ y₂

theorem IsLocalization.injective_of_map_algebraMap_zero E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Submonoid R} (S : Type u_2) [inst_1 : CommRing S] [inst_2 : Algebra R S]
  [IsLocalization M S] {T : Type u_3} [inst_4 : CommRing T] (f : S →+* T),
  (∀ (x : R), f ((algebraMap R S) x) = 0 → (algebraMap R S) x = 0) → Function.Injective ⇑f

theorem IsLocalization.injective E1 #

∀ {R : Type u_1} [inst : CommRing R] {M : Submonoid R} (S : Type u_2) [inst_1 : CommRing S] [inst_2 : Algebra R S]
  [IsLocalization M S], M ≤ nonZeroDivisors R → Function.Injective ⇑(algebraMap R S)