-
-
Notifications
You must be signed in to change notification settings - Fork 528
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #16158: Make Spec into a functor
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'' = (''a'',,1,,, ..., ''a,,n,,'') 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 (''a'',,1,,, ..., ''a,,n,,'') if ''S'' is (a subscheme of) an affine space '''A'''^''n''^. - 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. URL: http://trac.sagemath.org/16158 Reported by: pbruin Ticket author(s): Peter Bruin Reviewer(s): Travis Scrimshaw
- Loading branch information
Showing
7 changed files
with
536 additions
and
379 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.