Localization
Let $R$ be a commutative ring with 1, and let $U \subset R$ be a multiplicatively closed subset, that is,
\[s, t \in U \;\Rightarrow \; s\cdot t \in U \;\text{ and }\; 1 \in U.\]
Then we can form the localization of $R$ at $U,$ that is, the set
\[ R[U^{-1}] = \left\{ \frac{p}{q} : p,q \in R, \, q \in U \right\},\]
equipped with its standard arithmetic for fractions. See, for instance, David Eisenbud (1995).
In this section, we describe OSCAR functionality for handling localizations of multivariate polynomial rings, as well as localizations of affine algebras, at various types of multiplicatively closed subsets. For the convenience of the developer, in an appendix, we outline a general framework for creating new concrete instances of localized rings in OSCAR, describing relevant abstract types and indicating the functionality to be implemented.
All OSCAR types discussed in this section are parametrized. For simplicity of the presentation, we omit corresponding details.
Localizing Multivariate Rings
Most functions for handling localizations of multivariate polynomial rings rely on Gröbner bases. More precisely, if $R$ is a multivariate polynomial ring, Gröbner bases allow one to solve ideal- and module-theoretic questions concerning $R[U^{-1}]$ by computations over $R$.
Recall that in OSCAR, Gröbner bases are implemented for multivariate polynomial rings over fields (exact fields supported by OSCAR) and for multivariate polynomial rings over the integers.
In the local context, following Hironaka and Grauert, it is often common to use the name standard basis instead of Gröbner basis. See, for example, Gert-Martin Greuel, Gerhard Pfister (2008).
Types
All OSCAR types for multiplicatively closed subsets of commutative rings with unit belong to the abstract type AbsMultSet. For multiplicatively closed subsets of multivariate polynomial rings, there are the concrete descendants MPolyComplementOfKPointIdeal, MPolyComplementOfPrimeIdeal, and MPolyPowersOfElement.
The general abstract type for localizations of commutative rings with unit is AbsLocalizedRing. For localizations of multivariate polynomial rings, there is the concrete subtype MPolyLocalizedRing.
Constructors
Multiplicatively Closed Subsets
In accordance with the above mentioned types, we have the following constructors for multiplicatively closed subsets of multivariate polynomial rings.
complement_of_ideal — Methodcomplement_of_ideal(R::MPolyRing, a::Vector)Given a polynomial ring $R$, say $R = K[x_1,\dots, x_n]$, and given a vector $a = (a_1, \dots, a_n)$ of $n$ elements of $K$, return the multiplicatively closed subset $R\setminus M$, where $M$ is the maximal ideal
\[M = \langle x_1-a_1,\dots, x_n-a_n\rangle \subset R.\]
complement_of_ideal(P::MPolyIdeal; check::Bool=false)Given a prime ideal $P$ of a polynomial ring $R$, say, return the multiplicatively closed subset $R\setminus P.$
If check is set to true, the function checks whether $P$ is indeed a prime ideal.
This may take some time.
Examples
julia> R, (x, y, z) = PolynomialRing(QQ, ["x", "y", "z"])
(Multivariate Polynomial Ring in x, y, z over Rational Field, fmpq_mpoly[x, y, z])
julia> U = complement_of_ideal(R, [0, 0 ,0])
complement of maximal ideal corresponding to point with coordinates fmpq[0, 0, 0]
julia> P = ideal(R, [x])
ideal(x)
julia> U = complement_of_ideal(P)
complement of ideal(x)powers_of_element — Methodpowers_of_element(f::MPolyElem)Given an element f of a polynomial ring, return the multiplicatively closed subset of the polynomial ring which is formed by the powers of f.
Examples
julia> R, (x, y, z) = PolynomialRing(QQ, ["x", "y", "z"])
(Multivariate Polynomial Ring in x, y, z over Rational Field, fmpq_mpoly[x, y, z])
julia> f = x
x
julia> U = powers_of_element(f)
powers of fmpq_mpoly[x]It is also possible to build products of multiplicatively closed sets already given:
product — Methodproduct(T::AbsMPolyMultSet, U::AbsMPolyMultSet)Return the product of the multiplicative subsets T and U.
Alternatively, write T*U.
Examples
julia> R, (x, y, z) = PolynomialRing(QQ, ["x", "y", "z"])
(Multivariate Polynomial Ring in x, y, z over Rational Field, fmpq_mpoly[x, y, z])
julia> T = complement_of_ideal(R, [0, 0 ,0])
complement of maximal ideal corresponding to point with coordinates fmpq[0, 0, 0]
julia> f = x
x
julia> U = powers_of_element(f)
powers of fmpq_mpoly[x]
julia> S = product(T, U)
product of the multiplicative sets [complement of maximal ideal corresponding to point with coordinates fmpq[0, 0, 0], powers of fmpq_mpoly[x]]Containment in multiplicatively closed subsets can be checked via the in function as indicated below:
Examples
julia> R, (x, y, z) = PolynomialRing(QQ, ["x", "y", "z"])(Multivariate Polynomial Ring in x, y, z over Rational Field, fmpq_mpoly[x, y, z])julia> S = complement_of_ideal(R, [0, 0 ,0])complement of maximal ideal corresponding to point with coordinates fmpq[0, 0, 0]julia> y in Sfalsejulia> P = ideal(R, [x])ideal(x)julia> T = complement_of_ideal(P)complement of ideal(x)julia> y in Ttruejulia> f = xxjulia> U = powers_of_element(f)powers of fmpq_mpoly[x]julia> x^3 in Utruejulia> (1+y)*x^2 in product(S, U)true
Localized Rings
Localization — MethodLocalization(U::AbsMPolyMultSet)Given a multiplicatively closed subset of a multivariate polynomial ring $R$, say, return the localization of $R$ at $U$ together with the localization map from $R$ to $R[U^{-1}]$.
Localization(R::MPolyRing, U::AbsMPolyMultSet)Given a multiplicatively closed subset $U$ of $R$, proceed as above.
Examples
julia> R, (x, y, z) = PolynomialRing(QQ, ["x", "y", "z"])
(Multivariate Polynomial Ring in x, y, z over Rational Field, fmpq_mpoly[x, y, z])
julia> P = ideal(R, [x])
ideal(x)
julia> U = complement_of_ideal(P)
complement of ideal(x)
julia> Rloc, iota = Localization(R, U);
julia> Rloc
localization of Multivariate Polynomial Ring in x, y, z over Rational Field at the complement of ideal(x)
julia> iota
Map with following data
Domain:
=======
Multivariate Polynomial Ring in x, y, z over Rational Field
Codomain:
=========
localization of Multivariate Polynomial Ring in x, y, z over Rational Field at the complement of ideal(x)Data associated to Localized Rings
If Rloc is the localization of a multivariate polynomial ring R at a multiplicatively closed subset U of R, then
base_ring(Rloc)refers toR, andinverted_set(Rloc)toU.
Examples
julia> R, (x, y, z) = PolynomialRing(QQ, ["x", "y", "z"])(Multivariate Polynomial Ring in x, y, z over Rational Field, fmpq_mpoly[x, y, z])julia> P = ideal(R, [x])ideal(x)julia> U = complement_of_ideal(P)complement of ideal(x)julia> Rloc, _ = Localization(U);julia> R === base_ring(Rloc)truejulia> U === inverted_set(Rloc)true
Elements of Localized Rings
Types
The general abstract type for elements of localizations of commutative rings with unit is AbsLocalizedRingElem. For elements of localizations of multivariate polynomial rings, there is the concrete subtype MPolyLocalizedRingElem.
Creating Elements of Localized Rings
Elements of a localized multivariate polynomial ring $R[U^{-1}]$ are created as (fractions of) images of elements of $R$ under the localization map or by directly coercing (pairs of) elements of $R$ into fractions.
Examples
julia> R, (x, y, z) = PolynomialRing(QQ, ["x", "y", "z"])(Multivariate Polynomial Ring in x, y, z over Rational Field, fmpq_mpoly[x, y, z])julia> P = ideal(R, [x])ideal(x)julia> U = complement_of_ideal(P)complement of ideal(x)julia> Rloc, iota = Localization(U);julia> f = iota(x)x//1julia> f == Rloc(x)truejulia> g = Rloc(y, z)y//zjulia> f+g(x*z + y)//zjulia> f*g(x*y)//z
Data Associated to Elements of Localized Rings
Given an element f of a localized multivariate ring polynomial Rloc,
parent(f)refers toRloc,numerator(f)to the numerator of the internal representative off, anddenominator(f)to the denominator of the internal representative off.
Examples
julia> R, (x, y, z) = PolynomialRing(QQ, ["x", "y", "z"])(Multivariate Polynomial Ring in x, y, z over Rational Field, fmpq_mpoly[x, y, z])julia> P = ideal(R, [x])ideal(x)julia> U = complement_of_ideal(P)complement of ideal(x)julia> Rloc, iota = Localization(U);julia> f = iota(x)//iota(y)x//yjulia> parent(f)localization of Multivariate Polynomial Ring in x, y, z over Rational Field at the complement of ideal(x)julia> g = iota(y)//iota(z)y//zjulia> numerator(f*g)xjulia> denominator(f*g)z
Homomorphisms from Localized Rings
Let $R[U^{-1}]$ be the localization of a multivariate polynomial ring $R$ at a multiplicatively closed subset U of $R$. Then, by the universal property of localization, each homomorphism from $R[U^{-1}]$ to a commutative ring $S$ with unit is determined as the extension of a ring homomorphism $R \to S$ sending elements of $U$ to units in $S$. In OSCAR, such homomorphisms are of type MPolyLocalizedRingHom. They are created using the following constructor:
hom — Methodhom(Rloc::MPolyLocalizedRing, S::Ring, phi::Map)Given a localized ring Rlocof type MPolyLocalizedRing, say Rloc is the localization of the multivariate polynomial ring R at the multiplicatively closed subset U of R, and given a homomorphism phi from R to S sending elements of U to units in S, return the homomorphism from Rloc to S whose composition with the localization map is phi.
hom(Rloc::MPolyLocalizedRing, S::Ring, images::Vector)Given a localized ring Rloc with notation as above, and given a vector images of nvars elements of S, let phi be the homomorphism from R to S which is defined by the entries of images, and proceed as above.
Since most multiplicative sets are infinite, the extra condition on phi is typically not checked by this constructor.
Examples
julia> R, (x,) = PolynomialRing(QQ, ["x"])
(Multivariate Polynomial Ring in x over Rational Field, fmpq_mpoly[x])
julia> U = powers_of_element(x)
powers of fmpq_mpoly[x]
julia> Rloc, iota = Localization(R, U);
julia> Sprime, (X, Y) = PolynomialRing(QQ, ["X", "Y"])
(Multivariate Polynomial Ring in X, Y over Rational Field, fmpq_mpoly[X, Y])
julia> S, p = quo(Sprime, ideal(Sprime, [X*Y-1]))
(Quotient of Multivariate Polynomial Ring in X, Y over Rational Field by ideal(X*Y - 1), Map from
Multivariate Polynomial Ring in X, Y over Rational Field to Quotient of Multivariate Polynomial Ring in X, Y over Rational Field by ideal(X*Y - 1) defined by a julia-function with inverse)
julia> PHI = hom(Rloc, S, [p(X)])
morphism from the localized ring localization of Multivariate Polynomial Ring in x over Rational Field at the powers of fmpq_mpoly[x] to Quotient of Multivariate Polynomial Ring in X, Y over Rational Field by ideal(X*Y - 1)
julia> PHI(iota(x))
X
julia> is_unit(PHI(iota(x)))
trueGiven a ring homomorphism PHI from Rloc to S as above, domain(PHI) and codomain(PHI) refer to Rloc and S, respectively. Moreover, the composition of PHI with the localization map is recovered as follows:
restricted_map — Methodrestricted_map(PHI::MPolyLocalizedRingHom)Given a ring homomorphism PHI from a localized multivariate polynomial ring, return the composition of PHI with the localization map.
Examples
julia> R, (x,) = PolynomialRing(QQ, ["x"])
(Multivariate Polynomial Ring in x over Rational Field, fmpq_mpoly[x])
julia> U = powers_of_element(x)
powers of fmpq_mpoly[x]
julia> Rloc, iota = Localization(R, U);
julia> Sprime, (X, Y) = PolynomialRing(QQ, ["X", "Y"])
(Multivariate Polynomial Ring in X, Y over Rational Field, fmpq_mpoly[X, Y])
julia> S, p = quo(Sprime, ideal(Sprime, [X*Y-1]))
(Quotient of Multivariate Polynomial Ring in X, Y over Rational Field by ideal(X*Y - 1), Map from
Multivariate Polynomial Ring in X, Y over Rational Field to Quotient of Multivariate Polynomial Ring in X, Y over Rational Field by ideal(X*Y - 1) defined by a julia-function with inverse)
julia> PHI = hom(Rloc, S, [p(X)])
morphism from the localized ring localization of Multivariate Polynomial Ring in x over Rational Field at the powers of fmpq_mpoly[x] to Quotient of Multivariate Polynomial Ring in X, Y over Rational Field by ideal(X*Y - 1)
julia> phi = restricted_map(PHI)
Map with following data
Domain:
=======
Multivariate Polynomial Ring in x over Rational Field
Codomain:
=========
Quotient of Multivariate Polynomial Ring in X, Y over Rational Field by ideal(X*Y - 1)Ideals in Localized Rings
Types
Ideals in localized rings are of concrete type MPolyLocalizedIdeal.
Constructors
Given a localization Rloc of a multivariate polynomial ring R, and given a vector V of elements of Rloc (of R), the ideal of Rloc which is generated by (the images) of the entries of V is created by entering ideal(Rloc, V).
Data Associated to Ideals
If I is an ideal of a localized multivariate polynomial ring Rloc, then
base_ring(I)refers toRloc,gens(I)to the generators ofI,ngens(I)to the number of these generators, andgen(I, k)as well asI[k]to thek-th such generator.
Operations on Ideals
If I, J are ideals of a localized multivariate polynomial ring Rloc, then
I^krefers to thek-th power ofI,I+J,I*J, andintersect(I, J)to the sum, product, and intersection ofIandJ, andquotient(I, J)as well asI:Jto the ideal quotient ofIbyJ.
Tests on Ideals
The usual tests f in J, issubset(I, J), and I == J are available.
Saturation
If $Rloc$ is the localization of a multivariate polynomial ring $R$ at a multplicative subset $U$ of $R$, then the ideal theory of $Rloc$ is a simplified version of the ideal theory of $R$ (see, for instance, David Eisenbud (1995)). In particular, each ideal $I$ of $Rloc$ is the extension $J\cdot Rloc$ of an ideal $J$ of $R$. The ideal
\[\{f\in R \mid uf\in J \text{ for some } u\in U\}\]
is independent of the choice of $J$ and is the largest ideal of $R$ which extends to $I$. It is, thus, the contraction of $I$ to $R$, that is, the preimage of $I$ under the localization map. We call this ideal the saturation of $I$ over $R$. In OSCAR, it is obtained as follows:
saturated_ideal — Methodsaturated_ideal(I::MPolyLocalizedIdeal)Given an ideal I of a localization, say, Rloc of a multivariate polynomial ring, say, R, return the largest ideal of R whose extension to Rloc is I. This is the preimage of I under the localization map.
The function does not neccessarily return a minimal set of generators for the resulting ideal.
Examples
julia> R, (x,) = PolynomialRing(QQ, ["x"])
(Multivariate Polynomial Ring in x over Rational Field, fmpq_mpoly[x])
julia> U = powers_of_element(x)
powers of fmpq_mpoly[x]
julia> Rloc, iota = Localization(R, U);
julia> I = ideal(Rloc, [x+x^2])
ideal in localization of Multivariate Polynomial Ring in x over Rational Field at the powers of fmpq_mpoly[x] generated by the elements (x^2 + x)//1
julia> saturated_ideal(I)
ideal(x + 1)
julia> U = complement_of_ideal(R, [0])
complement of maximal ideal corresponding to point with coordinates fmpq[0]
julia> Rloc, iota = Localization(R, U);
julia> I = ideal(Rloc, [x+x^2])
ideal in localization of Multivariate Polynomial Ring in x over Rational Field at the complement of maximal ideal corresponding to point with coordinates fmpq[0] generated by the elements (x^2 + x)//1
julia> saturated_ideal(I)
ideal(x)A Framework for Localizing Rings
For the convenience of the developer, we outline a general framework for creating concrete instances of localized rings in OSCAR, addressing relevant abstract types as well as a standardized set of functions whose concrete behaviour must be implemented.
We roughly follow the outline of the previous subsection on localizing multivariate rings which provides illustrating examples. With regard to notation, the name Rloc will refer to the localization of a commutative ring R with 1.
Localized Rings
All multiplicatively closed subsets should belong to the AbsMultSet abstract type and all localized rings should belong to the AbsLocalizedRing abstract type.
The basic functionality that has to be realized for any concrete instance of AbsMultSet is the containment check for elements in multiplicatively closed subsets via the in function.
For each concrete instance of AbsLocalizedRing, the Localization constructor as well as the functions base_ring and inverted_set need to be implemented. Moreover, as for any other type of rings in OSCAR, methods for the standardized set of functions of OSCAR's general Ring Interface must be supplied.
Elements of Localized Rings
All elements of localized rings should belong to the AbsLocalizedRingElem abstract type.
Coercing (pairs of) elements of R into fractions in Rloc must be possible as indicated below:
(Rloc::AbsLocalizedRing)(f::RingElem)
(Rloc::AbsLocalizedRing)(f::RingElem, g::RingElem; check::Bool=true)The first constructor maps the element f of R to the fraction f//1 in Rloc. The second constructor takes a pair f, g of elements of R to the fraction f//g in Rloc. The default check = true stands for testing whether g is an admissible denominator. As this test is often expensive, it may be convenient to set check = false.
For any concrete instance of type AbsLocalizedRingElem, methods for the functions parent, numerator, and denominator must be provided. Moreover, if a cancellation function for the type of fractions under consideration is not yet available, such a function should be implemented and named reduce_fraction.
Homomorphisms From Localized Rings
The abstract type for homomorphisms from localized rings is MPolyLocalizedRingHom. For each concrete instance, the functions domain and codomain as well as restricted_map must be realized. Here, the latter function is meant to return the composition with the localization map.
Ideals in Localized Rings
All ideals in localized rings belong to the abstract type AbsLocalizedIdeal. For a concrete instance, the constructors to be implemented are:
ideal(W::AbsLocalizedRing, f::AbsLocalizedRingElem)
ideal(W::AbsLocalizedRing, v::Vector{LocalizedRingElemType}) where {LocalizedRingElemType<:AbsLocalizedRingElem}The usual getter functions base_ring, gens, ngens, and gen must be realized.
Moreover, a method for ideal membership via the in function is required.