Skip to content

Make Spec into a functor #16158

@pjbruin

Description

@pjbruin

Sage's Spec command currently produces a Spec object that derives from, but is not the same as, an AffineScheme. The goal of this ticket is

  • merge the existing Spec with AffineScheme by moving all existing methods of Spec to AffineScheme;
  • upgrade Spec to a functor from CommutativeRings to Schemes (or Schemes(A) if a base ring A is specified), returning objects of type AffineScheme.

Example of the new functionality:

sage: A.<x,y> = QQ[]
sage: Spec(A)
Spectrum of Multivariate Polynomial Ring in x, y over Rational Field
sage: type(Spec(A))
<class 'sage.schemes.generic.scheme.AffineScheme_with_category'>
sage: B.<t> = QQ[]
sage: f = A.hom((t^2, t^3))
sage: Spec(f)
Affine Scheme morphism:
  From: Spectrum of Univariate Polynomial Ring in t over Rational Field
  To:   Spectrum of Multivariate Polynomial Ring in x, y over Rational Field
  Defn: Ring morphism:
          From: Multivariate Polynomial Ring in x, y over Rational Field
          To:   Univariate Polynomial Ring in t over Rational Field
          Defn: x |--> t^2
                y |--> t^3

Two small user-visible changes had to be made to accommodate the new situation:

  • If S = Spec(A) is an affine scheme, then the syntax S(a_1, ..., a_n) to construct the topological point of S defined by the prime ideal P = (a1, ..., an) of A is no longer supported. The syntax S(A.ideal(a_1, ..., a_n)) now has to be used instead. This is because it conflicts with the much more useful application of this syntax to construct the point with coordinates (a1, ..., an) if S is (a subscheme of) an affine space An.
  • Given S = Spec(A) and another scheme X, the result of X(A) is the same as before (a point homset), but X(S), which used to be identical to this, now returns the standard scheme homset. To get the point homset, one now has to type X(A) or X(S.coordinate_ring()). This seems the "principle of least surprise" convention to me, and it is consistent with the fact that X.point_homset() only accepts rings, not affine schemes.

More improvements to affine schemes are made in #7946.

Depends on #15990
Depends on #16156
Depends on #16680

CC: @nthiery @vbraun

Component: algebraic geometry

Keywords: Spec functor affine scheme

Author: Peter Bruin

Branch/Commit: 185b49c

Reviewer: Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/16158

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions