Skip to content

Commit b0343d1

Browse files
author
Release Manager
committed
gh-37346: sage.schemes.generic: fix docs
Fix various docs problems. I also removed the `SchemeRationalPoint` class entirely since it is not used anywhere in the entire Sage library. If anyone oppose this please notify me! URL: #37346 Reported by: grhkm21 Reviewer(s): Kwankyu Lee
2 parents 8daac35 + 4d248d9 commit b0343d1

File tree

7 files changed

+67
-59
lines changed

7 files changed

+67
-59
lines changed

build/pkgs/configure/checksums.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
tarball=configure-VERSION.tar.gz
2-
sha1=f4a7dd60c09ac2f3e1f8e388cbf2a527dcd5547c
3-
md5=c16cb118d9ad6a495f6c5d509b2ec570
4-
cksum=3417350968
2+
sha1=f7b6730426fe857cb7036a0daae23aca7cb03dec
3+
md5=e6d2b686e56ef1e5ecb5f248255870f7
4+
cksum=3124816602
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ab1a517b64b02bf15bbcb8d7c2d4d643bd5eff9b
1+
1db16f5f41fb1fa9cc6c6e4506d2a44d931d3dbe

src/sage/schemes/generic/glue.py

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,35 @@ class GluedScheme(scheme.Scheme):
1616
INPUT:
1717
1818
19-
- ``f`` - open immersion from a scheme U to a scheme
20-
X
19+
- ``f`` -- open immersion from a scheme `U` to a scheme
20+
`X`
2121
22-
- ``g`` - open immersion from U to a scheme Y
22+
- ``g`` -- open immersion from `U` to a scheme `Y`
2323
2424
25-
OUTPUT: The scheme obtained by gluing X and Y along the open set
26-
U.
25+
OUTPUT: The scheme obtained by gluing `X` and `Y` along the open set
26+
`U`.
2727
28-
.. note::
28+
.. NOTE::
2929
3030
Checking that `f` and `g` are open
3131
immersions is not implemented.
32+
33+
EXAMPLES::
34+
35+
sage: R.<x, y> = QQ[]
36+
sage: S.<xbar, ybar> = R.quotient(x * y - 1)
37+
sage: Rx = QQ["x"]
38+
sage: Ry = QQ["y"]
39+
sage: phi_x = Rx.hom([xbar])
40+
sage: phi_y = Ry.hom([ybar])
41+
sage: Sx = Schemes()(phi_x)
42+
sage: Sy = Schemes()(phi_y)
43+
sage: Sx.glue_along_domains(Sy)
44+
Scheme obtained by gluing X and Y along U, where
45+
X: Spectrum of Univariate Polynomial Ring in x over Rational Field
46+
Y: Spectrum of Univariate Polynomial Ring in y over Rational Field
47+
U: Spectrum of Quotient of Multivariate Polynomial Ring in x, y over Rational Field by the ideal (x*y - 1)
3248
"""
3349
def __init__(self, f, g, check=True):
3450
if check:
@@ -42,6 +58,23 @@ def __init__(self, f, g, check=True):
4258
self.__g = g
4359

4460
def gluing_maps(self):
61+
r"""
62+
Return the gluing maps of this glued scheme, i.e. the maps `f` and `g`.
63+
64+
EXAMPLES::
65+
66+
sage: R.<x, y> = QQ[]
67+
sage: S.<xbar, ybar> = R.quotient(x * y - 1)
68+
sage: Rx = QQ["x"]
69+
sage: Ry = QQ["y"]
70+
sage: phi_x = Rx.hom([xbar])
71+
sage: phi_y = Ry.hom([ybar])
72+
sage: Sx = Schemes()(phi_x)
73+
sage: Sy = Schemes()(phi_y)
74+
sage: Sxy = Sx.glue_along_domains(Sy)
75+
sage: Sxy.gluing_maps() == (Sx, Sy)
76+
True
77+
"""
4578
return self.__f, self.__g
4679

4780
def _repr_(self):

src/sage/schemes/generic/homset.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
Set of homomorphisms between two schemes
33
44
For schemes `X` and `Y`, this module implements the set of morphisms
5-
`Hom(X,Y)`. This is done by :class:`SchemeHomset_generic`.
5+
`\mathrm{Hom}(X,Y)`. This is done by :class:`SchemeHomset_generic`.
66
7-
As a special case, the Hom-sets can also represent the points of a
8-
scheme. Recall that the `K`-rational points of a scheme `X` over `k`
9-
can be identified with the set of morphisms `Spec(K) \to X`. In Sage
10-
the rational points are implemented by such scheme morphisms. This is
11-
done by :class:`SchemeHomset_points` and its subclasses.
7+
As a special case, the Hom-sets can also represent the points of a scheme.
8+
Recall that the `K`-rational points of a scheme `X` over `k` can be identified
9+
with the set of morphisms `\mathrm{Spec}(K) \to X`. In Sage the rational points
10+
are implemented by such scheme morphisms. This is done by
11+
:class:`SchemeHomset_points` and its subclasses.
1212
1313
.. note::
1414
@@ -407,12 +407,12 @@ def _element_constructor_(self, x, check=True):
407407
# *******************************************************************
408408

409409
class SchemeHomset_points(SchemeHomset_generic):
410-
"""
410+
r"""
411411
Set of rational points of the scheme.
412412
413-
Recall that the `K`-rational points of a scheme `X` over `k` can
414-
be identified with the set of morphisms `Spec(K) \to X`. In Sage,
415-
the rational points are implemented by such scheme morphisms.
413+
Recall that the `K`-rational points of a scheme `X` over `k` can be
414+
identified with the set of morphisms `\mathrm{Spec}(K) \to X`. In Sage, the
415+
rational points are implemented by such scheme morphisms.
416416
417417
If a scheme has a finite number of points, then the homset is
418418
supposed to implement the Python iterator interface. See
@@ -659,13 +659,13 @@ def _element_constructor_(self, *v, **kwds):
659659
return self.extended_codomain()._point(self, v, **kwds)
660660

661661
def extended_codomain(self):
662-
"""
662+
r"""
663663
Return the codomain with extended base, if necessary.
664664
665665
OUTPUT:
666666
667667
The codomain scheme, with its base ring extended to the
668-
codomain. That is, the codomain is of the form `Spec(R)` and
668+
codomain. That is, the codomain is of the form `\mathrm{Spec}(R)` and
669669
the base ring of the domain is extended to `R`.
670670
671671
EXAMPLES::
@@ -716,8 +716,8 @@ def _repr_(self):
716716
return 'Set of rational points of '+str(self.extended_codomain())
717717

718718
def value_ring(self):
719-
"""
720-
Return `R` for a point Hom-set `X(Spec(R))`.
719+
r"""
720+
Return `R` for a point Hom-set `X(\mathrm{Spec}(R))`.
721721
722722
OUTPUT:
723723

src/sage/schemes/generic/morphism.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
new Hom-set class does not use ``MyScheme._morphism`` then you
2929
do not have to provide it.
3030
31-
Note that points on schemes are morphisms `Spec(K)\to X`, too. But we
32-
typically use a different notation, so they are implemented in a
33-
different derived class. For this, you should implement a method
31+
Note that points on schemes are morphisms `\mathrm{Spec}(K)\to X`, too. But we
32+
typically use a different notation, so they are implemented in a different
33+
derived class. For this, you should implement a method
3434
35-
* ``MyScheme._point(*args, **kwds)`` returning a point, that is,
36-
a morphism `Spec(K)\to X`. Your point class should derive from
35+
* ``MyScheme._point(*args, **kwds)`` returning a point, that is, a morphism
36+
`\mathrm{Spec}(K)\to X`. Your point class should derive from
3737
:class:`SchemeMorphism_point`.
3838
3939
Optionally, you can also provide a special Hom-set for the points, for
@@ -1790,11 +1790,11 @@ def __init__(self, X):
17901790
############################################################################
17911791

17921792
class SchemeMorphism_point(SchemeMorphism):
1793-
"""
1793+
r"""
17941794
Base class for rational points on schemes.
17951795
17961796
Recall that the `K`-rational points of a scheme `X` over `k` can
1797-
be identified with the set of morphisms `Spec(K) \to X`. In Sage,
1797+
be identified with the set of morphisms `\mathrm{Spec}(K) \to X`. In Sage,
17981798
the rational points are implemented by such scheme morphisms.
17991799
18001800
EXAMPLES::

src/sage/schemes/generic/point.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -227,28 +227,3 @@ def _richcmp_(self, other, op):
227227
False
228228
"""
229229
return richcmp(self.__P, other.__P, op)
230-
231-
########################################################
232-
# Points on a scheme defined by a morphism
233-
########################################################
234-
235-
def is_SchemeRationalPoint(x):
236-
return isinstance(x, SchemeRationalPoint)
237-
238-
class SchemeRationalPoint(SchemePoint):
239-
def __init__(self, f):
240-
"""
241-
INPUT:
242-
243-
244-
- ``f`` - a morphism of schemes
245-
"""
246-
SchemePoint.__init__(self, f.codomain(), parent=f.parent())
247-
self.__f = f
248-
249-
def _repr_(self):
250-
return "Point on %s defined by the morphism %s" % (self.scheme(),
251-
self.morphism())
252-
253-
def morphism(self):
254-
return self.__f

src/sage/schemes/generic/scheme.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class Scheme(Parent):
7777
sage: ProjectiveSpace(4, QQ).category()
7878
Category of schemes over Rational Field
7979
80-
There is a special and unique `Spec(\ZZ)` that is the default base
80+
There is a special and unique `\mathrm{Spec}(\ZZ)` that is the default base
8181
scheme::
8282
8383
sage: Spec(ZZ).base_scheme() is Spec(QQ).base_scheme()
@@ -267,7 +267,7 @@ def __call__(self, *args):
267267

268268
@cached_method
269269
def point_homset(self, S=None):
270-
"""
270+
r"""
271271
Return the set of S-valued points of this scheme.
272272
273273
INPUT:
@@ -276,7 +276,7 @@ def point_homset(self, S=None):
276276
277277
OUTPUT:
278278
279-
The set of morphisms `Spec(S)\to X`.
279+
The set of morphisms `\mathrm{Spec}(S) \to X`.
280280
281281
EXAMPLES::
282282

0 commit comments

Comments
 (0)