Skip to content

Commit

Permalink
Update localizations and schemes. (#1110)
Browse files Browse the repository at this point in the history
  • Loading branch information
HechtiDerLachs committed Mar 9, 2022
1 parent 63551e1 commit b02ea95
Show file tree
Hide file tree
Showing 27 changed files with 2,216 additions and 768 deletions.
79 changes: 18 additions & 61 deletions docs/src/CommutativeAlgebra/localizations.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,24 @@ the general [Ring Interface](@ref) of Oscar! This has not been done to a full ex
for the previous two examples, but for `MPolyLocalizedRing`; see below.


### Homomorphisms for localized rings

Homomorphisms from localized rings to arbitrary algebras are of type
```@docs
AbsLocalizedRingHom
```
Note that, in order to be well-defined, we must have
that ``\phi'(u) \in S`` must be a unit for every element ``u \in U``.

The getters associated to this type which need to be implemented are
```@docs
domain(f::AbsLocalizedRingHom)
codomain(f::AbsLocalizedRingHom)
restricted_map(f::AbsLocalizedRingHom)
```
Any concrete instance `f` of `AbsLocalizedRingHom` can then be applied to elements
`a` of `domain(f)` by calling `f(a)`.

### Ideals in localized rings

One of the main reasons to implement localizations in the first place
Expand Down Expand Up @@ -408,64 +426,3 @@ lifted_denominator(a::MPolyQuoLocalizedRingElem)
fraction(a::MPolyQuoLocalizedRingElem)
```

## Homomorphisms of localized affine algebras
Suppose we are given two localizations of polynomial algebras
by means of commutative diagrams
```math
\begin{matrix}
R & → & P = R/I\\
↓ & & ↓ \\
V = R[T⁻¹] & → & P[T⁻¹]
\end{matrix}
```
and
```math
\begin{matrix}
S & → & Q = S/J\\
↓ & & ↓ \\
W = S[U⁻¹] & → & Q[U⁻¹].
\end{matrix}
```

**Lemma:**
For any homomorphism ``φ : P[T⁻¹] → Q[U⁻¹]`` the following holds.
```math
\begin{matrix}
&φ& \\
P[T⁻¹] & → & Q[U⁻¹]\\
↑ & & ↑\\
R[T⁻¹] & \dashrightarrow & S[U⁻¹]\\
↑ & ↗ ψ &↑ ι\\
R &→ &S[c⁻¹]\\
& η & ↑ κ\\
& & S
\end{matrix}
```
1) The composition of maps ``R → Q[U⁻¹]`` completely determines ``φ`` by the images ``xᵢ ↦ [aᵢ]/[bᵢ]`` with ``aᵢ ∈ S``, ``bᵢ ∈ U``.

2) Let ``ψ : R → S[U⁻¹]`` be the map determined by some choice of the images ``xᵢ↦ aᵢ/b``ᵢ as above. Then ``ψ`` extends to a map ``R[T⁻¹] → S[U⁻¹]`` if and only if for all ``t ∈ T : ψ(t) ∈ U``. This is not necessarily the case as the lift of images ``φ(t) ∈ Q[U⁻¹]`` in ``S[U⁻¹]`` need only be elements of ``U + J``.

3) Choosing a common denominator ``c`` for all ``ψ(xᵢ)``, we obtain a ring homomorphism ``η : R → S[c⁻¹]`` such that ``ψ = ι ∘ η``.

Upshot: In order to describe ``φ``, we may store some homomorphism
``ψ : R → S[U⁻¹]``
lifting it and keep in mind the ambiguity of choices for such ``ψ``.
The latter point 3) will be useful for reducing to a homomorphism
of finitely generated algebras.


A homomorphism of localized affine algebras is stored in
```@docs
MPolyQuoLocalizedRingHom{
BaseRingType,
BaseRingElemType,
RingType,
RingElemType,
DomainMultSetType,
CodomainMultSetType
}
```
An additional getter method is
```@docs
images(f::MPolyQuoLocalizedRingHom)
```
2 changes: 1 addition & 1 deletion docs/src/Experimental/elliptic_curves.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ A = ResidueRing(ZZ, ZZ(n))
S, (x,y,z) = PolynomialRing(A, ["x", "y", "z"])
T, _ = grade(S)
E = Oscar.ProjEllipticCurve(T(y^2*z - x^3 - 10*x*z^2 + 2*z^3))
PP = projective_space(A, 2)
PP = proj_space(A, 2)
Q = Oscar.Geometry.ProjSpcElem(PP[1], [A(1), A(3), A(1)])
P = Oscar.Point_EllCurve(E, Q)
P2 = Oscar.IntMult_Point_EllCurveZnZ(ZZ(2), P)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/Experimental/plane_curves.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ the projective plane as follows, where `K` is the base ring:
#### Example
```@repl oscar
K = QQ
PP = projective_space(K, 2)
PP = proj_space(K, 2)
```

Then, one can define a projective point as follows:
Expand Down
6 changes: 6 additions & 0 deletions experimental/Experimental.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ include("PlaneCurve.jl")
include("InvariantTheory.jl")
include("GITFans.jl")
include("GModule.jl")

include("Schemes/AffineSchemes.jl")
include("Schemes/SpecOpen.jl")
include("Schemes/Glueing.jl")
include("Schemes/ProjectiveSchemes.jl")

18 changes: 9 additions & 9 deletions experimental/PlaneCurve/DivisorCurve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ julia> T, _ = grade(S)
julia> C = Oscar.ProjPlaneCurve(T(y^2 + y*z + x^2))
Projective plane curve defined by x^2 + y^2 + y*z
julia> PP = projective_space(QQ, 2)
julia> PP = proj_space(QQ, 2)
(Projective space of dim 2 over Rational Field
, MPolyElem_dec{fmpq, fmpq_mpoly}[x[0], x[1], x[2]])
Expand Down Expand Up @@ -302,7 +302,7 @@ julia> T, _ = grade(S)
julia> C = Oscar.ProjPlaneCurve(T(y^2 + y*z + x^2))
Projective plane curve defined by x^2 + y^2 + y*z
julia> PP = projective_space(QQ, 2)
julia> PP = proj_space(QQ, 2)
(Projective space of dim 2 over Rational Field
, MPolyElem_dec{fmpq, fmpq_mpoly}[x[0], x[1], x[2]])
Expand Down Expand Up @@ -424,7 +424,7 @@ end

function divisor(C::ProjPlaneCurve{S}, F::Oscar.MPolyElem_dec{S}) where S <: FieldElem
R = parent(C.eq)
PP = projective_space(R.R.base_ring, 2)
PP = proj_space(R.R.base_ring, 2)
return divisor(PP[1], C, F)
end

Expand All @@ -449,7 +449,7 @@ julia> T, _ = grade(S)
julia> C = Oscar.ProjPlaneCurve(T(y^2 + y*z + x^2))
Projective plane curve defined by x^2 + y^2 + y*z
julia> PP = projective_space(QQ, 2)
julia> PP = proj_space(QQ, 2)
(Projective space of dim 2 over Rational Field
, MPolyElem_dec{fmpq, fmpq_mpoly}[x[0], x[1], x[2]])
Expand All @@ -471,7 +471,7 @@ end

function divisor(C::ProjPlaneCurve{S}, phi::AbstractAlgebra.Generic.Frac{T}) where {S <: FieldElem, T <: Oscar.MPolyElem_dec{S}}
R = parent(C.eq)
PP = projective_space(R.R.base_ring, 2)
PP = proj_space(R.R.base_ring, 2)
return divisor(PP[1], C, phi)
end

Expand Down Expand Up @@ -596,7 +596,7 @@ julia> T, _ = grade(S)
julia> C = Oscar.ProjPlaneCurve(T(y^2*z - x*(x-z)*(x+3*z)))
Projective plane curve defined by -x^3 - 2*x^2*z + 3*x*z^2 + y^2*z
julia> PP = projective_space(QQ, 2)
julia> PP = proj_space(QQ, 2)
(Projective space of dim 2 over Rational Field
, MPolyElem_dec{fmpq, fmpq_mpoly}[x[0], x[1], x[2]])
Expand Down Expand Up @@ -695,7 +695,7 @@ julia> T, _ = grade(S)
julia> C = Oscar.ProjPlaneCurve(T(y^2*z - x*(x-z)*(x+3*z)))
Projective plane curve defined by -x^3 - 2*x^2*z + 3*x*z^2 + y^2*z
julia> PP = projective_space(QQ, 2)
julia> PP = proj_space(QQ, 2)
(Projective space of dim 2 over Rational Field
, MPolyElem_dec{fmpq, fmpq_mpoly}[x[0], x[1], x[2]])
Expand Down Expand Up @@ -739,7 +739,7 @@ julia> T, _ = grade(S)
julia> C = Oscar.ProjPlaneCurve(T(y^2*z - x*(x-z)*(x+3*z)))
Projective plane curve defined by -x^3 - 2*x^2*z + 3*x*z^2 + y^2*z
julia> PP = projective_space(QQ, 2)
julia> PP = proj_space(QQ, 2)
(Projective space of dim 2 over Rational Field
, MPolyElem_dec{fmpq, fmpq_mpoly}[x[0], x[1], x[2]])
Expand Down Expand Up @@ -781,7 +781,7 @@ julia> T, _ = grade(S)
julia> C = Oscar.ProjPlaneCurve(T(y^2*z - x*(x-z)*(x+3*z)))
Projective plane curve defined by -x^3 - 2*x^2*z + 3*x*z^2 + y^2*z
julia> PP = projective_space(QQ, 2)
julia> PP = proj_space(QQ, 2)
(Projective space of dim 2 over Rational Field
, MPolyElem_dec{fmpq, fmpq_mpoly}[x[0], x[1], x[2]])
Expand Down
2 changes: 1 addition & 1 deletion experimental/PlaneCurve/ProjCurve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ julia> C = Oscar.ProjCurve(I)
Projective curve defined by the ideal(x^2, y^2*z, z^2)
julia> PP = projective_space(QQ, 3)
julia> PP = proj_space(QQ, 3)
(Projective space of dim 3 over Rational Field
, MPolyElem_dec{fmpq, fmpq_mpoly}[x[0], x[1], x[2], x[3]])
Expand Down
16 changes: 8 additions & 8 deletions experimental/PlaneCurve/ProjEllipticCurve.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export ProjEllipticCurve, discriminant, issmooth, j_invariant,
Point_EllCurve, curve, weierstrass_form, toweierstrass,
iselliptic, list_rand, proj_space
iselliptic, list_rand

################################################################################
# Helping functions
Expand Down Expand Up @@ -155,7 +155,7 @@ julia> T, _ = grade(S)
julia> F = T(-x^3 - 3*x^2*y - 3*x*y^2 - x*z^2 - y^3 + y^2*z - y*z^2 - 4*z^3)
-x^3 - 3*x^2*y - 3*x*y^2 - x*z^2 - y^3 + y^2*z - y*z^2 - 4*z^3
julia> PP = projective_space(QQ, 2)
julia> PP = proj_space(QQ, 2)
(Projective space of dim 2 over Rational Field
, MPolyElem_dec{fmpq, fmpq_mpoly}[x[0], x[1], x[2]])
Expand Down Expand Up @@ -186,7 +186,7 @@ mutable struct ProjEllipticCurve{S} <: ProjectivePlaneCurve{S}
v = shortformtest(eq.f)
T = parent(eq)
K = T.R.base_ring
PP = projective_space(K, 2)
PP = proj_space(K, 2)
V = gens(T)
new{S}(eq, 3, Dict{ProjEllipticCurve{S}, Int}(), Oscar.Geometry.ProjSpcElem(PP[1], [K(0), K(1), K(0)]), [hom(T, T, V), hom(T, T, V)], Hecke.EllipticCurve(v[2], v[1]))
end
Expand Down Expand Up @@ -218,7 +218,7 @@ mutable struct ProjEllipticCurve{S} <: ProjectivePlaneCurve{S}
K = T.R.base_ring
n = modulus(K)
gcd(Hecke.data(d), n) == ZZ(1) || error("The discriminant is not invertible")
PP = projective_space(K, 2)
PP = proj_space(K, 2)
V = gens(T)
E = new{S}()
E.eq = eq
Expand Down Expand Up @@ -274,7 +274,7 @@ julia> T, _ = grade(S)
julia> F = T(-x^3 - 3*x^2*y - 3*x*y^2 - x*z^2 - y^3 + y^2*z - y*z^2 - 4*z^3)
-x^3 - 3*x^2*y - 3*x*y^2 - x*z^2 - y^3 + y^2*z - y*z^2 - 4*z^3
julia> PP = projective_space(QQ, 2)
julia> PP = proj_space(QQ, 2)
(Projective space of dim 2 over Rational Field
, MPolyElem_dec{fmpq, fmpq_mpoly}[x[0], x[1], x[2]])
Expand Down Expand Up @@ -462,7 +462,7 @@ end
Return the projective space to which the point `P` belongs.
"""
function proj_space(P::Point_EllCurve{S}) where S <: FieldElem
function Oscar.Geometry.proj_space(P::Point_EllCurve{S}) where S <: FieldElem
return P.Pt.parent
end

Expand Down Expand Up @@ -564,7 +564,7 @@ julia> T, _ = grade(S)
y -> [1]
z -> [1], MPolyElem_dec{fmpq, fmpq_mpoly}[x, y, z])
julia> PP = projective_space(QQ, 2)
julia> PP = proj_space(QQ, 2)
(Projective space of dim 2 over Rational Field
, MPolyElem_dec{fmpq, fmpq_mpoly}[x[0], x[1], x[2]])
Expand Down Expand Up @@ -638,7 +638,7 @@ end
Return the projective space to which the base point of the elliptic curve `E` belongs.
"""
function proj_space(E::ProjEllipticCurve{S}) where S <: FieldElem
function Oscar.Geometry.proj_space(E::ProjEllipticCurve{S}) where S <: FieldElem
return base_point(E).parent
end

Expand Down
10 changes: 5 additions & 5 deletions experimental/PlaneCurve/ProjPlaneCurve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ julia> T, _ = grade(S)
julia> C = Oscar.ProjPlaneCurve(x^2*(x+y)*(y^3-x^2*z))
Projective plane curve defined by -x^5*z - x^4*y*z + x^3*y^3 + x^2*y^4
julia> PP = projective_space(QQ, 2)
julia> PP = proj_space(QQ, 2)
(Projective space of dim 2 over Rational Field
, MPolyElem_dec{fmpq, fmpq_mpoly}[x[0], x[1], x[2]])
Expand Down Expand Up @@ -74,7 +74,7 @@ julia> T, _ = grade(S)
y -> [1]
z -> [1], MPolyElem_dec{fmpq, fmpq_mpoly}[x, y, z])
julia> PP = projective_space(QQ, 2)
julia> PP = proj_space(QQ, 2)
(Projective space of dim 2 over Rational Field
, MPolyElem_dec{fmpq, fmpq_mpoly}[x[0], x[1], x[2]])
Expand Down Expand Up @@ -155,7 +155,7 @@ julia> T, _ = grade(S)
y -> [1]
z -> [1], MPolyElem_dec{fmpq, fmpq_mpoly}[x, y, z])
julia> PP = projective_space(QQ, 2)
julia> PP = proj_space(QQ, 2)
(Projective space of dim 2 over Rational Field
, MPolyElem_dec{fmpq, fmpq_mpoly}[x[0], x[1], x[2]])
Expand Down Expand Up @@ -223,7 +223,7 @@ end

function curve_intersect(C::ProjectivePlaneCurve{S}, D::ProjectivePlaneCurve{S}) where S <: FieldElem
R = parent(C.eq)
PP = projective_space(R.R.base_ring, 2)
PP = proj_space(R.R.base_ring, 2)
curve_intersect(PP[1], C, D)
end

Expand Down Expand Up @@ -298,7 +298,7 @@ end

function curve_singular_locus(C::ProjectivePlaneCurve)
R = parent(C.eq)
PP = projective_space(R.R.base_ring, 2)
PP = proj_space(R.R.base_ring, 2)
curve_singular_locus(PP[1], C)
end

Expand Down
Loading

0 comments on commit b02ea95

Please sign in to comment.