Skip to content

Commit

Permalink
remove std_spec duplicate (#2512)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbrandhorst committed Jul 4, 2023
1 parent 1ef21a4 commit 01df56c
Showing 1 changed file with 16 additions and 56 deletions.
72 changes: 16 additions & 56 deletions src/AlgebraicGeometry/Schemes/AffineSchemes/Objects/Constructors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ end

########################################################
# (4) StdSpec (needed?)
# Calling this in a constructor should be avoided
# since we want to support all types of affine schemes.
# But StdSpec can be useful when implementing some
# comparison or properties.
########################################################

@doc raw"""
Expand All @@ -175,24 +179,7 @@ transform to a `Spec` of an `MPolyQuoLocRing`.
```jldoctest
julia> standard_spec(affine_space(QQ,5))
Spec of Localization of quotient of multivariate polynomial ring at products of 1 element
```
"""
function standard_spec(X::AbsSpec)
error("not implemented for input of type $(typeof(X))")
end

standard_spec(X::AbsSpec{<:Any, <:MPolyRing}) = Spec(MPolyQuoLocRing(OO(X), ideal(OO(X), [zero(OO(X))]), units_of(OO(X))))

@doc raw"""
standard_spec(X::AbsSpec{<:Any, <:MPolyQuoRing})
For an affine spectrum whose coordinate ring is the
quotient of a polynomial ring, this method computes
the standard spectrum.
# Examples
```jldoctest
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]);
julia> I = ideal(R, [x]);
Expand All @@ -202,25 +189,6 @@ Spec of Quotient of multivariate polynomial ring by ideal with 1 generator
julia> standard_spec(X)
Spec of Localization of quotient of multivariate polynomial ring at products of 1 element
```
"""
function standard_spec(X::AbsSpec{<:Any, <:MPolyQuoRing})
A = OO(X)
R = base_ring(A)
return Spec(MPolyQuoLocRing(R, modulus(A), units_of(R)))
end


@doc raw"""
standard_spec(X::AbsSpec{<:Any, <:MPolyLocRing})
For an affine spectrum whose coordinate ring is the
quotient of a polynomial ring, this method computes
the standard spectrum.
# Examples
```jldoctest
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]);
julia> I = ideal(R, [x]);
Expand All @@ -233,33 +201,25 @@ julia> standard_spec(X)
Spec of Localization of quotient of multivariate polynomial ring at complement of prime ideal
```
"""
standard_spec(X::AbsSpec{<:Any, <:MPolyLocRing}) = Spec(MPolyQuoLocRing(ambient_coordinate_ring(X), ideal(ambient_coordinate_ring(X), [zero(ambient_coordinate_ring(X))]), inverted_set(OO(X))))


@doc raw"""
standard_spec(X::AbsSpec{<:Any, <:MPolyQuoLocRing})
For an affine spectrum whose coordinate ring is the
quotient of a polynomial ring, this method computes
the standard spectrum.
function standard_spec(X::AbsSpec)
error("not implemented for input of type $(typeof(X))")
end

# Examples
```jldoctest
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]);
standard_spec(X::AbsSpec{<:Any, <:MPolyRing}) = Spec(MPolyQuoLocRing(OO(X), ideal(OO(X), [zero(OO(X))]), units_of(OO(X))))

julia> I = ideal(R, [x]);

julia> U = complement_of_prime_ideal(ideal(R, [y]));
# documented above
function standard_spec(X::AbsSpec{<:Any, <:MPolyQuoRing})
A = OO(X)
R = base_ring(A)
return Spec(MPolyQuoLocRing(R, modulus(A), units_of(R)))
end

julia> X = Spec(R, I, U)
Spec of Localization of quotient of multivariate polynomial ring at complement of prime ideal

julia> standard_spec(X)
Spec of Localization of quotient of multivariate polynomial ring at complement of prime ideal
```
"""
# documented above
standard_spec(X::AbsSpec{<:Any, <:MPolyLocRing}) = Spec(MPolyQuoLocRing(ambient_coordinate_ring(X), ideal(ambient_coordinate_ring(X), [zero(ambient_coordinate_ring(X))]), inverted_set(OO(X))))

#documented above
standard_spec(X::AbsSpec{<:Any, <:MPolyQuoLocRing}) = Spec(OO(X))


Expand Down

0 comments on commit 01df56c

Please sign in to comment.