Skip to content

Commit

Permalink
Ep/ Rename Spec to AffineScheme #3345 (#3425)
Browse files Browse the repository at this point in the history
* Rename Spec -> AffineScheme

Use `AffineScheme` only for the type, not the function.

* Rename proj for toric divisors to projectivization

As was recommended by Martin Bies and Wolfram Decker.

* Function ProjectiveScheme to projective_scheme and proj

* Fix: spec now extends the constructor AffineScheme

In particular, spec allows the argument to be a quotient ring or localized ring. Similarly for proj. Probably the tests would not have passed in the previous commit because of this

* add support for projective_scheme and affine_scheme

---------

Co-authored-by: Simon Brandhorst <brandhorst@math.uni-sb.de>
  • Loading branch information
paemurru and simonbrandhorst committed Feb 26, 2024
1 parent 3672388 commit b00d5e4
Show file tree
Hide file tree
Showing 161 changed files with 3,208 additions and 3,171 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The algebraic set $X = V(x^2+y^2) \subseteq \mathbb{A}^2$ is irreducible over
$k = \mathbb{R}$. But it is the union of two lines over $K = \mathbb{C}$,
i.e. $X$ is irreducible but geometrically reducible.
See
[`is_irreducible(X::AbsSpec{<:Field, <:MPolyAnyRing})`](@ref) for details.
[`is_irreducible(X::AbsAffineScheme{<:Field, <:MPolyAnyRing})`](@ref) for details.

## Rational points
To study the $k$-points, also called $k$-rational points, of the algebraic set $X$
Expand Down Expand Up @@ -97,7 +97,7 @@ algebraic_set(f::MPolyRingElem; check::Bool=true)
Convert an affine scheme to an affine algebraic set in order to ignore
its (non-reduced) scheme structure.
```@docs
algebraic_set(X::Spec; check::Bool=true)
algebraic_set(X::AffineScheme; check::Bool=true)
```

```@docs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Functionality which is not (yet) provided by a variety-specific implementation,
## Constructors
```@docs
variety(I::MPolyIdeal; check=true)
variety(X::AbsSpec{<:Field}; is_reduced=false, check::Bool=true)
variety(X::AbsAffineScheme{<:Field}; is_reduced=false, check::Bool=true)
variety(R::MPolyAnyRing; check=true)
```

Expand Down
50 changes: 25 additions & 25 deletions docs/src/AlgebraicGeometry/Schemes/AffineSchemes.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ defined over the integers, a finite field or algebraic field extensions of ``\ma

### General constructors

Besides `Spec(R)` for `R` of either one of the types `MPolyRing`, `MPolyQuoRing`, `MPolyLocRing`, or
Besides `spec(R)` for `R` of either one of the types `MPolyRing`, `MPolyQuoRing`, `MPolyLocRing`, or
`MPolyQuoLocRing`, we have the following constructors:
```@docs
Spec(R::MPolyRing, I::MPolyIdeal)
Spec(R::MPolyRing, U::AbsMPolyMultSet)
Spec(R::MPolyRing, I::MPolyIdeal, U::AbsMPolyMultSet)
spec(R::MPolyRing, I::MPolyIdeal)
spec(R::MPolyRing, U::AbsMPolyMultSet)
spec(R::MPolyRing, I::MPolyIdeal, U::AbsMPolyMultSet)
```
See [`inclusion_morphism(::AbsSpec, ::AbsSpec)`](@ref) for a way to obtain the ideal ``I`` from ``X = \mathrm{Spec}(R, I)``.
See [`inclusion_morphism(::AbsAffineScheme, ::AbsAffineScheme)`](@ref) for a way to obtain the ideal ``I`` from ``X = \mathrm{Spec}(R, I)``.

### Affine n-space

Expand All @@ -36,27 +36,27 @@ affine_space(kk::BRT, var_symbols::Vector{Symbol}) where {BRT<:Ring}
### Closed subschemes

```@docs
subscheme(X::AbsSpec, f::Vector{<:RingElem})
subscheme(X::AbsSpec, I::Ideal)
subscheme(X::AbsAffineScheme, f::Vector{<:RingElem})
subscheme(X::AbsAffineScheme, I::Ideal)
```

### Intersections

```@docs
Base.intersect(X::AbsSpec{BRT, <:Ring}, Y::AbsSpec{BRT, <:Ring}) where {BRT<:Ring}
Base.intersect(X::AbsAffineScheme{BRT, <:Ring}, Y::AbsAffineScheme{BRT, <:Ring}) where {BRT<:Ring}
```

### Open subschemes

```@docs
hypersurface_complement(X::AbsSpec, f::RingElem)
hypersurface_complement(X::AbsSpec, f::Vector{<:RingElem})
hypersurface_complement(X::AbsAffineScheme, f::RingElem)
hypersurface_complement(X::AbsAffineScheme, f::Vector{<:RingElem})
```

### Closure

```@docs
closure(X::AbsSpec, Y::AbsSpec)
closure(X::AbsAffineScheme, Y::AbsAffineScheme)
```


Expand All @@ -67,24 +67,24 @@ closure(X::AbsSpec, Y::AbsSpec)
Most affine schemes in Oscar ``X = \mathrm{Spec}(R)``
over a ring ``B``, come with an embedding into an
affine space ``\mathbb{A}_B``.
More precisely, `ambient_space(X)` is defined for `X = Spec(R)` if `R`
More precisely, `ambient_space(X)` is defined for `X = spec(R)` if `R`
is constructed from a polynomial ring.
In particular ``\mathrm{Spec}(\mathbb{Z})`` or ``\mathrm{Spec}(\mathbb{k})`` for ``\mathbb k``
a field do not have an ambient affine space.

```@docs
ambient_space(X::AbsSpec)
ambient_space(X::AbsAffineScheme)
```

### Other attributes

```@docs
base_ring(X::AbsSpec)
codim(X::AbsSpec)
ambient_embedding(X::AbsSpec)
dim(X::AbsSpec)
name(X::AbsSpec)
OO(X::AbsSpec)
base_ring(X::AbsAffineScheme)
codim(X::AbsAffineScheme)
ambient_embedding(X::AbsAffineScheme)
dim(X::AbsAffineScheme)
name(X::AbsAffineScheme)
OO(X::AbsAffineScheme)
```

### Type getters
Expand All @@ -97,16 +97,16 @@ source code for details.
## Properties

```@docs
is_open_embedding(X::AbsSpec, Y::AbsSpec)
is_closed_embedding(X::AbsSpec, Y::AbsSpec)
isempty(X::AbsSpec)
is_subscheme(X::AbsSpec, Y::AbsSpec)
is_open_embedding(X::AbsAffineScheme, Y::AbsAffineScheme)
is_closed_embedding(X::AbsAffineScheme, Y::AbsAffineScheme)
isempty(X::AbsAffineScheme)
is_subscheme(X::AbsAffineScheme, Y::AbsAffineScheme)
```


## Methods
```@docs
tangent_space(X::AbsSpec{<:Field}, P::AbsAffineRationalPoint)
tangent_space(X::AbsAffineScheme{<:Field}, P::AbsAffineRationalPoint)
```
### Comparison

Expand All @@ -119,5 +119,5 @@ For ``X`` and ``Y`` with different ambient affine space `X==Y` is always `false`
### Auxiliary methods

```@docs
is_non_zero_divisor(f::RingElem, X::AbsSpec)
is_non_zero_divisor(f::RingElem, X::AbsAffineScheme)
```
56 changes: 28 additions & 28 deletions docs/src/AlgebraicGeometry/Schemes/ArchitectureOfAffineSchemes.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The latter function must return a vector ``v = (a_1,\dots, a_r)``
of elements in ``R`` such that ``f = a_1 \cdot g_1 + \dots + a_r \cdot g_r``
where ``g_1,\dots,g_r`` is the set of `gens(I)`. When ``f`` does
not belong to ``I``, it must error. Note that the ring returned by
`quo` must again be admissible for the `AbsSpec` interface.
`quo` must again be admissible for the `AbsAffineScheme` interface.

With a view towards the use of the `ambient_coordinate_ring(X)` for computations,
it is customary to also implement
Expand Down Expand Up @@ -83,68 +83,68 @@ Note that the morphism ``P → R`` is induced by natural coercions.

The abstract type for affine schemes is
```@docs
AbsSpec{BaseRingType, RingType<:Ring}
AbsAffineScheme{BaseRingType, RingType<:Ring}
```
For any concrete instance of this type, we require the following
functions to be implemented:
- `base_ring(X::AbsSpec)`,
- `OO(X::AbsSpec)`.
- `base_ring(X::AbsAffineScheme)`,
- `OO(X::AbsAffineScheme)`.

A concrete instance of this type is
```@docs
Spec{BaseRingType, RingType}
AffineScheme{BaseRingType, RingType}
```
It provides an implementation of affine schemes for rings ``R`` of type
`MPolyRing`, `MPolyQuoRing`, `MPolyLocRing`, and `MPolyQuoLocRing`
defined over the integers or algebraic field extensions of ``\mathbb Q``.
This minimal implementation can be used internally, when deriving new
concrete types `MySpec<:AbsSpec` such as, for instance,
concrete types `MyAffineScheme<:AbsAffineScheme` such as, for instance,
group schemes, toric schemes, schemes of a particular dimension
like curves and surfaces, etc. To this end, one has to store
an instance `Y` of `Spec` in `MySpec` and implement the methods
an instance `Y` of `AffineScheme` in `MyAffineScheme` and implement the methods
```
underlying_scheme(X::MySpec)::Spec # return Y as above
underlying_scheme(X::MyAffineScheme)::AffineScheme # return Y as above
```
Then all methods implemented for `Spec` are automatically
forwarded to any instance of `MySpec`.
Then all methods implemented for `AffineScheme` are automatically
forwarded to any instance of `MyAffineScheme`.

**Note:** The above method necessarily returns an instance of `Spec`!
Of course, it can be overwritten for any higher type `MySpec<:AbsSpec` as needed.
**Note:** The above method necessarily returns an instance of `AffineScheme`!
Of course, it can be overwritten for any higher type `MyAffineScheme<:AbsAffineScheme` as needed.


## Existing types of affine scheme morphisms and how to derive new types

Any abstract morphism of affine schemes is of the following type:
```@docs
AbsSpecMor{DomainType<:AbsSpec,
CodomainType<:AbsSpec,
AbsAffineSchemeMor{DomainType<:AbsAffineScheme,
CodomainType<:AbsAffineScheme,
PullbackType<:Map,
MorphismType,
BaseMorType
}
```
Any such morphism has the attributes `domain`, `codomain` and `pullback`.
A concrete and minimalistic implementation exist for the type `SpecMor`:
A concrete and minimalistic implementation exist for the type `AffineSchemeMor`:
```@docs
SpecMor{DomainType<:AbsSpec,
CodomainType<:AbsSpec,
AffineSchemeMor{DomainType<:AbsAffineScheme,
CodomainType<:AbsAffineScheme,
PullbackType<:Map
}
```
This basic functionality consists of
- `compose(f::AbsSpecMor, g::AbsSpecMor)`,
- `identity_map(X::AbsSpec)`,
- `restrict(f::AbsSpecMor, X::AbsSpec, Y::AbsSpec; check::Bool=true)`,
- `==(f::AbsSpecMor, g::AbsSpecMor)`,
- `preimage(f::AbsSpecMor, Z::AbsSpec)`.
In particular, for every concrete instance of a type `MySpec<:AbsSpec` that
implements `underlying_scheme`, this basic functionality of `SpecMor`
- `compose(f::AbsAffineSchemeMor, g::AbsAffineSchemeMor)`,
- `identity_map(X::AbsAffineScheme)`,
- `restrict(f::AbsAffineSchemeMor, X::AbsAffineScheme, Y::AbsAffineScheme; check::Bool=true)`,
- `==(f::AbsAffineSchemeMor, g::AbsAffineSchemeMor)`,
- `preimage(f::AbsAffineSchemeMor, Z::AbsAffineScheme)`.
In particular, for every concrete instance of a type `MyAffineScheme<:AbsAffineScheme` that
implements `underlying_scheme`, this basic functionality of `AffineSchemeMor`
should run naturally.

We may derive higher types of morphisms of affine schemes `MySpecMor<:AbsSpecMor`
by storing an instance `g` of `SpecMor` inside an instance `f` of
`MySpecMor` and implementing
We may derive higher types of morphisms of affine schemes `MyAffineSchemeMor<:AbsAffineSchemeMor`
by storing an instance `g` of `AffineSchemeMor` inside an instance `f` of
`MyAffineSchemeMor` and implementing
```
underlying_morphism(f::MySpecMor)::SpecMor # return g
underlying_morphism(f::MyAffineSchemeMor)::AffineSchemeMor # return g
```
For example, this allows us to define closed embeddings.
20 changes: 10 additions & 10 deletions docs/src/AlgebraicGeometry/Schemes/CoveredSchemeMorphisms.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ This information is held by a `CoveringMorphism`:
The basic functionality of `CoveringMorphism`s comprises `domain` and `codomain` which
both return a `Covering`, together with
```
getindex(f::CoveringMorphism, U::AbsSpec)
getindex(f::CoveringMorphism, U::AbsAffineScheme)
```
which for ``U = U_i`` returns the `AbsSpecMor` ``f_i : U_i \to V_{F(i)}``.
which for ``U = U_i`` returns the `AbsAffineSchemeMor` ``f_i : U_i \to V_{F(i)}``.

Note that, in general, neither the `domain` nor the `codomain` of the `covering_morphism` of
`f : X \to Y` need to coincide with the `default_covering` of ``X``, respectively ``Y``.
Expand All @@ -34,8 +34,8 @@ interface.
```
For the user's convenience, also the domain and codomain
of the underlying `covering_morphism` are forwarded as `domain_covering` and
`codomain_covering`, respectively, together with `getindex(phi::CoveringMorphism, U::AbsSpec)`
as `getindex(f::AbsCoveredSchemeMorphism, U::AbsSpec)`.
`codomain_covering`, respectively, together with `getindex(phi::CoveringMorphism, U::AbsAffineScheme)`
as `getindex(f::AbsCoveredSchemeMorphism, U::AbsAffineScheme)`.

The minimal concrete type of an `AbsCoveredSchemeMorphism` which
implements this interface, is `CoveredSchemeMorphism`.
Expand Down Expand Up @@ -81,12 +81,12 @@ there is no need to realize the full `covering_morphism` of ``f``.
In order to facilitate such computations as lazy as possible, there are various fine-grained
entry points and caching mechanisms to realize ``f`` on open subsets:
```@docs
realize_on_patch(Phi::MorphismFromRationalFunctions, U::AbsSpec)
realize_on_open_subset(Phi::MorphismFromRationalFunctions, U::AbsSpec, V::AbsSpec)
realization_preview(Phi::MorphismFromRationalFunctions, U::AbsSpec, V::AbsSpec)
random_realization(Phi::MorphismFromRationalFunctions, U::AbsSpec, V::AbsSpec)
cheap_realization(Phi::MorphismFromRationalFunctions, U::AbsSpec, V::AbsSpec)
realize_maximally_on_open_subset(Phi::MorphismFromRationalFunctions, U::AbsSpec, V::AbsSpec)
realize_on_patch(Phi::MorphismFromRationalFunctions, U::AbsAffineScheme)
realize_on_open_subset(Phi::MorphismFromRationalFunctions, U::AbsAffineScheme, V::AbsAffineScheme)
realization_preview(Phi::MorphismFromRationalFunctions, U::AbsAffineScheme, V::AbsAffineScheme)
random_realization(Phi::MorphismFromRationalFunctions, U::AbsAffineScheme, V::AbsAffineScheme)
cheap_realization(Phi::MorphismFromRationalFunctions, U::AbsAffineScheme, V::AbsAffineScheme)
realize_maximally_on_open_subset(Phi::MorphismFromRationalFunctions, U::AbsAffineScheme, V::AbsAffineScheme)
realize(Phi::MorphismFromRationalFunctions)
```

2 changes: 1 addition & 1 deletion docs/src/AlgebraicGeometry/Schemes/CoveredSchemes.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Every element $U$ of the `affine_charts` of $D$ is either

* directly an element of the `affine_charts` of $C$;
* a `PrincipalOpenSubset` with some ancestor in the `affine_charts` of $C$;
* a `SimplifiedSpec` with some original in the `affine_charts` of $C$.
* a `SimplifiedAffineScheme` with some original in the `affine_charts` of $C$.

In all these cases, the affine subsets in the refinements form a tree and thus remember
their origins and ambient spaces. In particular, affine patches and also their gluings can be recycled
Expand Down
6 changes: 3 additions & 3 deletions docs/src/AlgebraicGeometry/Schemes/CoveringsAndGluings.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ CurrentModule = Oscar

## Constructors
```@docs
Covering(patches::Vector{<:AbsSpec})
Covering(patches::Vector{<:AbsAffineScheme})
disjoint_union(C1::Covering, C2::Covering)
```

Expand Down Expand Up @@ -44,7 +44,7 @@ The available concrete types are

## Constructors
```@docs
Gluing(X::AbsSpec, Y::AbsSpec, f::SchemeMor, g::SchemeMor)
Gluing(X::AbsAffineScheme, Y::AbsAffineScheme, f::SchemeMor, g::SchemeMor)
```

## Attributes
Expand All @@ -59,7 +59,7 @@ The available concrete types are
```@docs
compose(G::AbsGluing, H::AbsGluing)
maximal_extension(G::Gluing)
restrict(G::AbsGluing, f::AbsSpecMor, g::AbsSpecMor; check::Bool=true)
restrict(G::AbsGluing, f::AbsAffineSchemeMor, g::AbsAffineSchemeMor; check::Bool=true)
```


Expand Down
32 changes: 16 additions & 16 deletions docs/src/AlgebraicGeometry/Schemes/MorphismsOfAffineSchemes.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ CurrentModule = Oscar
### General constructors

```@docs
morphism(X::AbsSpec, Y::AbsSpec, f::Vector{<:RingElem}; check::Bool=true)
morphism(X::AbsAffineScheme, Y::AbsAffineScheme, f::Vector{<:RingElem}; check::Bool=true)
```

### Special constructors

```@docs
identity_map(X::AbsSpec{<:Any, <:MPolyRing})
inclusion_morphism(X::AbsSpec, Y::AbsSpec; check::Bool=true)
compose(f::AbsSpecMor, g::AbsSpecMor)
restrict(f::SpecMor, U::AbsSpec, V::AbsSpec)
identity_map(X::AbsAffineScheme{<:Any, <:MPolyRing})
inclusion_morphism(X::AbsAffineScheme, Y::AbsAffineScheme; check::Bool=true)
compose(f::AbsAffineSchemeMor, g::AbsAffineSchemeMor)
restrict(f::AffineSchemeMor, U::AbsAffineScheme, V::AbsAffineScheme)
```


Expand All @@ -29,16 +29,16 @@ restrict(f::SpecMor, U::AbsSpec, V::AbsSpec)
### General attributes

```@docs
domain(f::AbsSpecMor)
codomain(f::AbsSpecMor)
pullback(f::AbsSpecMor)
graph(f::AbsSpecMor)
domain(f::AbsAffineSchemeMor)
codomain(f::AbsAffineSchemeMor)
pullback(f::AbsAffineSchemeMor)
graph(f::AbsAffineSchemeMor)
```

### Special attributes

In addition to the standard getters and methods for instances
of `SpecMor`, we also have
of `AffineSchemeMor`, we also have
```@docs
image_ideal(f::ClosedEmbedding)
```
Expand All @@ -57,16 +57,16 @@ The following functions do exist but are currently undocumented:
## Properties

```@docs
is_isomorphism(f::AbsSpecMor)
is_inverse_of(f::AbsSpecMor, g::AbsSpecMor)
is_identity_map(f::AbsSpecMor)
is_isomorphism(f::AbsAffineSchemeMor)
is_inverse_of(f::AbsAffineSchemeMor, g::AbsAffineSchemeMor)
is_identity_map(f::AbsAffineSchemeMor)
```


## Methods

```@docs
fiber_product(f::AbsSpecMor, g::AbsSpecMor)
product(X::AbsSpec, Y::AbsSpec)
simplify(X::AbsSpec{<:AbstractAlgebra.Field})
fiber_product(f::AbsAffineSchemeMor, g::AbsAffineSchemeMor)
product(X::AbsAffineScheme, Y::AbsAffineScheme)
simplify(X::AbsAffineScheme{<:AbstractAlgebra.Field})
```

0 comments on commit b00d5e4

Please sign in to comment.