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:
- For all
y ∈ M,f yis a unit; - For all
z : S, there exists(x, y) : R × Msuch thatz * f y = f x; - For all
x, y : Rsuch thatf x = f y, there existsc ∈ Msuch thatx * 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 thatSis a localization ofRatM, i.e. the canonical mapalgebraMap R S : R →+* Sis a localization map (satisfying the above properties).IsLocalization.mk' Sis a surjection sending(x, y) : R × Mtof x * (f y)⁻¹IsLocalization.liftis the ring homomorphism fromSinduced by a homomorphism fromRwhich maps elements ofMto invertible elements of the codomain.IsLocalization.map S Qis the ring homomorphism fromStoQwhich maps elements ofMto elements ofTIsLocalization.ringEquivOfRingEquiv: ifRandPare isomorphic by an isomorphism sendingMtoT, thenSandQare isomorphicIsLocalization.algEquiv: ifQis another localization ofRatM, thenSandQare isomorphic asR-algebras
Main results #
Localization M S, a construction of the localization as a quotient type, defined inGroupTheory.MonoidLocalization, hasCommRing,Algebra RandIsLocalization Minstances ifRis a ring.Localization.Away,Localization.AtPrimeandFractionRingare abbreviations forLocalizations and have their correspondingIsLocalizationinstances
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
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.
- map_units' : ∀ (y : ↥M), IsUnit ((algebraMap R S) ↑y)
Everything in the image of
algebraMapis a unit - surj' : ∀ (z : S), ∃ (x : R × ↥M), z * (algebraMap R S) ↑x.2 = (algebraMap R S) x.1
The
algebraMapis surjective - exists_of_eq : ∀ {x y : R}, (algebraMap R S) x = (algebraMap R S) y → ∃ (c : ↥M), ↑c * x = ↑c * y
The kernel of
algebraMapis contained in the annihilator ofM; it is then equal to the annihilator bymap_units'
Instances
Everything in the image of algebraMap is a unit
The algebraMap is surjective
The kernel of algebraMap is contained in the annihilator of M;
it is then equal to the annihilator by map_units'
Everything in the image of algebraMap is a unit
The algebraMap is surjective
The kernel of algebraMap is contained in the annihilator of M;
it is then equal to the annihilator by map_units'
IsLocalization.toLocalizationWithZeroMap M S shows S is the monoid localization of
R at M.
Equations
- One or more equations did not get rendered due to their size.
Instances For
IsLocalization.toLocalizationMap M S shows S is the monoid localization of R at M.
Equations
- IsLocalization.toLocalizationMap M S = (IsLocalization.toLocalizationWithZeroMap M S).toLocalizationMap
Instances For
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.
Equations
Instances For
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).
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.
If M contains 0 then the localization at M is trivial.
IsLocalization.mk' S is the surjection sending (x, y) : R × M to
f x * (f y)⁻¹.
Equations
- IsLocalization.mk' S x y = (IsLocalization.toLocalizationMap M S).mk' x y
Instances For
The localization of a Fintype is a Fintype. Cannot be an instance.
Equations
- IsLocalization.fintype' M S = let_fun this := Classical.propDecidable; Fintype.ofSurjective (Function.uncurry (IsLocalization.mk' S)) ⋯
Instances For
Localizing at a submonoid with 0 inside it leads to the trivial ring.
Equations
Instances For
Equations
- IsLocalization.invertible_mk'_one s = { invOf := (algebraMap R S) ↑s, invOf_mul_self := ⋯, mul_invOf_self := ⋯ }
Given a localization map f : R →+* S for a submonoid M ⊆ R and a map of CommSemirings
g : R →+* P such that g(M) ⊆ Units P, f x = f y → g x = g y for all x y : R.
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)⁻¹.
Equations
- One or more equations did not get rendered due to their size.
Instances For
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.
See note [partially-applied ext lemmas]
See note [partially-applied ext lemmas]
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 *.
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)⁻¹.
Equations
- IsLocalization.map Q g hy = IsLocalization.lift ⋯
Instances For
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.
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.
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.
Equations
- One or more equations did not get rendered due to their size.
Instances For
If S, Q are localizations of R at the submonoid M respectively,
there is an isomorphism of localizations S ≃ₐ[R] Q.
Equations
- IsLocalization.algEquiv M S Q = let __src := IsLocalization.ringEquivOfRingEquiv S Q (RingEquiv.refl R) ⋯; { toEquiv := __src.toEquiv, map_mul' := ⋯, map_add' := ⋯, commutes' := ⋯ }
Instances For
The localization at a module of units is isomorphic to the ring.
Equations
- IsLocalization.atUnits R M H = AlgEquiv.ofBijective (Algebra.ofId R S) ⋯
Instances For
Injectivity of a map descends to the map induced on localizations.
Constructing a localization at a given submonoid #
Equations
- Localization.instUniqueLocalization = { toInhabited := Localization.inhabited M, uniq := ⋯ }
Addition in a ring localization is defined as ⟨a, b⟩ + ⟨c, d⟩ = ⟨b * c + d * a, b * d⟩.
Should not be confused with AddLocalization.add, which is defined as
⟨a, b⟩ + ⟨c, d⟩ = ⟨a + c, b + d⟩.
Equations
Instances For
Equations
- Localization.instAdd = { add := Localization.add }
Equations
- Localization.instCommSemiring = let __src := let_fun this := inferInstance; this; CommSemiring.mk ⋯
For any given denominator b : M, the map a ↦ a / b is an AddMonoidHom from R to
Localization M
Equations
- Localization.mkAddMonoidHom b = { toFun := fun (a : R) => Localization.mk a b, map_zero' := ⋯, map_add' := ⋯ }
Instances For
Equations
- Localization.instDistribMulActionOfIsScalarTower = DistribMulAction.mk ⋯ ⋯
Equations
- One or more equations did not get rendered due to their size.
Equations
- Localization.instModuleOfIsScalarTower = let __src := inferInstanceAs (DistribMulAction S (Localization M)); Module.mk ⋯ ⋯
Equations
- One or more equations did not get rendered due to their size.
Equations
- ⋯ = ⋯
Alias of Localization.mk_natCast.
The localization of R at M as a quotient type is isomorphic to any other localization.
Equations
- Localization.algEquiv M S = IsLocalization.algEquiv M (Localization M) S
Instances For
The localization of a singleton is a singleton. Cannot be an instance due to metavariables.
Equations
- IsLocalization.unique R Rₘ M = let_fun this := { default := 1 }; ⋯.unique
Instances For
Negation in a ring localization is defined as -⟨a, b⟩ = ⟨-a, b⟩.
Equations
Instances For
Equations
- Localization.instNeg = { neg := Localization.neg }
Equations
- Localization.instCommRing = let __src := inferInstanceAs (CommSemiring (Localization M)); CommRing.mk ⋯
Alias of Localization.mk_intCast.
A CommRing S which is the localization of a ring R without zero divisors at a subset of
non-zero elements does not have zero divisors.
A CommRing S which is the localization of an integral domain R at a subset of
non-zero elements is an integral domain.
The localization of an integral domain to a set of non-zero elements is an integral domain.
If R is a field, then localizing at a submonoid not containing 0 adds no new elements.
If R is a field, then localizing at a submonoid not containing 0 adds no new elements.
Definition of the natural algebra induced by the localization of an algebra.
Given an algebra R → S, a submonoid R of M, and a localization Rₘ for M,
let Sₘ be the localization of S to the image of M under algebraMap R S.
Then this is the natural algebra structure on Rₘ → Sₘ, such that the entire square commutes,
where localization_map.map_comp gives the commutativity of the underlying maps.
This instance can be helpful if you define Sₘ := Localization (Algebra.algebraMapSubmonoid S M),
however we will instead use the hypotheses [Algebra Rₘ Sₘ] [IsScalarTower R Rₘ Sₘ] in lemmas
since the algebra structure may arise in different ways.
Equations
- localizationAlgebra M S = (IsLocalization.map Sₘ (algebraMap R S) ⋯).toAlgebra
Instances For
If the square below commutes, the bottom map is uniquely specified:
R → S
↓ ↓
Rₘ → Sₘ
If the square below commutes, the bottom map is uniquely specified:
R → S
↓ ↓
Rₘ → Sₘ
Injectivity of the underlying algebraMap descends to the algebra induced by localization.