General schemes

Arbitrary schemes over a base ring $\mathbb k$ which are given by means of their affine patches and glueings are instances of

Scheme — Type
Scheme{BaseRingType<:Ring, BaseRingElemType<:RingElement}

A scheme over a ring $š•œ$ of type BaseRingType with elements of type BaseRingElemType.

source

Affine schemes over noetherian base rings

Let $\mathbb k$ be a commutative noetherian base ring (in practice: an algebraic extension of $\mathbb Q$ or $\mathbb F_p$). An affine scheme $X$ over $\mathbb k$ is given as

\[ X = \mathrm{Spec} \left(\mathbb k[x_1,\dots,x_n]/I\right)\]

for some polynomial ring $R = \mathbb k[x_1,\dots,x_n]$ and an ideal $I \subset R$. More generally, we can form the Spec of any localized affine algebra $L$ as an instance of

Spec — Type
Spec{BRT, BRET, RT, RET, MST} <: Scheme{BRT, BRET}

An affine scheme $X = Spec ((R/I)[S⁻¹])$ with $R = k[x₁,…,xā‚™]$ a free polynomial algebra of type RT over a base ring $k$ of type BRT, $I āŠ‚ R$ a finitely generated ideal with elements of type RET, and $S$ a multiplicative set in $R$ of type MST.

source

Internally, this merely stores an instance $L$ of MPolyQuoLocalizedRing. This ring can be obtained using

OO — Method
OO(X::Spec)

For $X = Spec ((š•œ[x₁,…,xā‚™]/I)[S⁻¹])$ this returns $(š•œ[x₁,…,xā‚™]/I)[S⁻¹]$.

source

One of the main reasons to allow such general schemes is that principal open subsets $U = \{ f \neq 0\}$ of affine schemes $X$, $f \in \mathcal O_X(X)$ are again affine; basically due to Rabinowitsch's trick:

\[ U = \mathrm{Spec} \left(\mathcal O_X(X)[f^{-1}]\right) = \mathrm{Spec} \left(\mathcal O_X(X)[t]/\langle 1 - t\cdot f \rangle\right).\]

This flexibility allows us to introduce and handle subschemes using the natural relations on their rings. Thus, we can, for instance, define subschemes via

subscheme — Method
subscheme(X::Spec, f::RingElem)

For a scheme $X = Spec ((š•œ[x₁,…,xā‚™]/I)[S⁻¹])$ and an element $f ∈ š•œ[x₁,…,xā‚™]$ this returns the closed subscheme defined by the ideal $I' = I + ⟨f⟩$.

source
hypersurface_complement — Method
hypersurface_complement(X::Spec, f::RingElem)

For a scheme $X = Spec ((š•œ[x₁,…,xā‚™]/I)[S⁻¹])$ and an element $f ∈ š•œ[x₁,…,xā‚™]$ this returns the open subscheme $U = X āˆ– V(f)$ defined by the complement of the vanishing locus of $f$.

source

Containments can be checked using

issubset — Method
issubset(X::Spec, Y::Spec)

Checks whether $X$ is a subset of $Y$ based on the comparison of their coordinate rings.

source
is_open_embedding — Method
is_open_embedding(X::Spec, Y::Spec)

Checks whether $X$ is openly embedded in $Y$.

source

The closure of a subscheme can be computed via

closure — Method
closure(X::Spec, Y::Spec)

Returns the closure of $X$ in $Y$.

source

Among the basic functionality for affine schemes we have

product — Method
product(X::Spec, Y::Spec)

Returns a triple $(XƗY, p₁, pā‚‚)$ consisting of the product $XƗY$ and the two projections $p₁ : XƗY → X$ and $pā‚‚ : XƗY → Y$.

source