Skip to content

Commit

Permalink
sage.schemes: Some more cosmetic doctest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Mar 25, 2023
1 parent c60de8b commit ee09844
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 23 deletions.
12 changes: 5 additions & 7 deletions src/sage/schemes/affine/affine_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,13 +619,11 @@ def change_ring(self, R):
- ``R`` -- commutative ring or morphism.
OUTPUT:
- affine space over ``R``.
OUTPUT: An affine space over ``R``.
.. NOTE::
There is no need to have any relation between `R` and the base ring
There is no need to have any relation between ``R`` and the base ring
of this space, if you want to have such a relation, use
``self.base_extend(R)`` instead.
Expand Down Expand Up @@ -840,7 +838,7 @@ def subscheme(self, X, **kwds):

def _an_element_(self):
r"""
Return an element of this affine space,used both for illustration and
Return an element of this affine space, used both for illustration and
testing purposes.
OUTPUT: a point in the affine space
Expand All @@ -859,7 +857,7 @@ def _an_element_(self):

def chebyshev_polynomial(self, n, kind='first', monic=False):
"""
Generates an endomorphism of this affine line by a Chebyshev polynomial.
Generate an endomorphism of this affine line by a Chebyshev polynomial.
Chebyshev polynomials are a sequence of recursively defined orthogonal
polynomials. Chebyshev of the first kind are defined as `T_0(x) = 1`,
Expand Down Expand Up @@ -1101,7 +1099,7 @@ def weil_restriction(self):
the Weil restriction to the prime subfield.
OUTPUT: Affine space of dimension ``d * self.dimension_relative()``
over the base field of ``self.base_ring()``.
over the base field of ``self.base_ring()``.
EXAMPLES::
Expand Down
19 changes: 10 additions & 9 deletions src/sage/schemes/generic/algebraic_scheme.py
Original file line number Diff line number Diff line change
Expand Up @@ -1207,17 +1207,17 @@ def irreducible_components(self):
`\P^4_{\QQ}` then find the irreducible components::
sage: PP.<x,y,z,w,v> = ProjectiveSpace(4, QQ)
sage: V = PP.subscheme( (x^2 - y^2 - z^2)*(w^5 - 2*v^2*z^3)* w * (v^3 - x^2*z) )
sage: V = PP.subscheme((x^2 - y^2 - z^2) * (w^5 - 2*v^2*z^3) * w * (v^3 - x^2*z))
sage: V.irreducible_components()
[
Closed subscheme of Projective Space of dimension 4 over Rational Field defined by:
w,
w,
Closed subscheme of Projective Space of dimension 4 over Rational Field defined by:
x^2 - y^2 - z^2,
x^2 - y^2 - z^2,
Closed subscheme of Projective Space of dimension 4 over Rational Field defined by:
x^2*z - v^3,
x^2*z - v^3,
Closed subscheme of Projective Space of dimension 4 over Rational Field defined by:
w^5 - 2*z^3*v^2
w^5 - 2*z^3*v^2
]
We verify that the irrelevant ideal is not accidentally returned
Expand Down Expand Up @@ -1454,7 +1454,7 @@ def union(self, other):
sage: A.subscheme([x]) + A.subscheme([y^2 - (x^3+1)])
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
x^4 - x*y^2 + x
x^4 - x*y^2 + x
Saving and loading::
Expand Down Expand Up @@ -2037,7 +2037,7 @@ def specialization(self, D=None, phi=None):
- ``D`` -- dictionary (optional)
- ``phi`` -- SpecializationMorphism (optional)
- ``phi`` -- :class:`SpecializationMorphism` (optional)
OUTPUT: :class:`SchemeMorphism_polynomial`
Expand All @@ -2057,9 +2057,10 @@ def specialization(self, D=None, phi=None):
sage: P.<x,y,z> = AffineSpace(S, 3)
sage: X = P.subscheme([x^2 + a*c*y^2 - b*z^2])
sage: from sage.rings.polynomial.flatten import SpecializationMorphism
sage: phi = SpecializationMorphism(P.coordinate_ring(),dict({c:2,a:1}))
sage: phi = SpecializationMorphism(P.coordinate_ring(), dict({c: 2, a: 1}))
sage: X.specialization(phi=phi)
Closed subscheme of Affine Space of dimension 3 over Univariate Polynomial Ring in b over Rational Field defined by:
Closed subscheme of Affine Space of dimension 3
over Univariate Polynomial Ring in b over Rational Field defined by:
x^2 + 2*y^2 + (-b)*z^2
"""
if D is None:
Expand Down
11 changes: 4 additions & 7 deletions src/sage/schemes/generic/morphism.py
Original file line number Diff line number Diff line change
Expand Up @@ -1300,12 +1300,9 @@ def __copy__(self):

def coordinate_ring(self):
r"""
Returns the coordinate ring of the ambient projective space
the multivariable polynomial ring over the base ring
Return the coordinate ring of the ambient projective space.
OUTPUT:
- ring
OUTPUT: A multivariable polynomial ring over the base ring.
EXAMPLES::
Expand Down Expand Up @@ -2079,7 +2076,7 @@ def specialization(self, D=None, phi=None, ambient=None):
sage: Q.specialization({c: 1})
(1 : 1)
::
::
sage: R.<a,b> = PolynomialRing(QQ)
sage: P.<x,y> = ProjectiveSpace(R, 1)
Expand All @@ -2106,7 +2103,7 @@ def specialization(self, D=None, phi=None, ambient=None):
(2 : 1)
sage: Q2.codomain()
Closed subscheme of Projective Space of dimension 1 over Rational Field defined by:
x - 2*y
x - 2*y
::
Expand Down

0 comments on commit ee09844

Please sign in to comment.