Ticket #11599: trac_11599_rename_morphisms.2.patch

File trac_11599_rename_morphisms.2.patch, 52.9 KB (added by vbraun, 10 years ago)

Rebased patch

  • sage/categories/schemes.py

    # HG changeset patch
    # User Volker Braun <vbraun@stp.dias.ie>
    # Date 1324030521 0
    # Node ID e916c959ea369542d797bfee73b133cabf13d60c
    # Parent  da867e08b49bf22781c6b434ff7d76cecf69b311
    Trac #11599: Rename morphism classes
    
    The scheme morphisms that are points are currently called
    SchemeMorphism_coordinates and the more generic
    morphisms are SchemeMorphism_on_points, which I find very
    confusing. Similar with _point_morphism_class which does
    not(!) construct the morphism Spec(K)->X.
    
    This patch renames
    SchemeMorphism_coordinates_... -> SchemeMorphism_point_...
    _point_morphism_class -> _morphism_class
    _homset_class -> _point_homset_class
    
    diff --git a/sage/categories/schemes.py b/sage/categories/schemes.py
    a b  
    163163                the parent for Hom(R, S) to be in a different class::
    164164
    165165                    sage: Hom(Spec(ZZ), Spec(ZZ)).__class__
    166                     <class 'sage.schemes.generic.homset.SchemeHomset_coordinates_with_category'>
     166                    <class 'sage.schemes.generic.homset.SchemeHomset_points_spec_with_category'>
    167167
    168168                Currently, and to minimize the changes, this is done
    169169                by delegating the job to SchemeHomset. This is not
  • sage/schemes/elliptic_curves/ell_generic.py

    diff --git a/sage/schemes/elliptic_curves/ell_generic.py b/sage/schemes/elliptic_curves/ell_generic.py
    a b  
    167167        # purposes.
    168168        from sage.rings.all import is_FiniteField, is_IntegerModRing
    169169        if is_FiniteField(K) or is_IntegerModRing(K):
    170             self._point_morphism_class = self._point_class = ell_point.EllipticCurvePoint_finite_field
     170            self._morphism_class = self._point_class = ell_point.EllipticCurvePoint_finite_field
    171171        elif K.is_field():
    172172            if is_NumberField(K):
    173                 self._point_morphism_class = self._point_class = ell_point.EllipticCurvePoint_number_field
     173                self._morphism_class = self._point_class = ell_point.EllipticCurvePoint_number_field
    174174            else:
    175                 self._point_morphism_class = self._point_class = ell_point.EllipticCurvePoint_field
     175                self._morphism_class = self._point_class = ell_point.EllipticCurvePoint_field
    176176        else:
    177             self._point_morphism_class = self._point_class = ell_point.EllipticCurvePoint
     177            self._morphism_class = self._point_class = ell_point.EllipticCurvePoint
    178178
    179179    def _defining_params_(self):
    180180        r"""
     
    850850        else:
    851851            raise ValueError, "No point with x-coordinate %s on %s"%(x, self)
    852852
    853     def _homset_class(self, *args, **kwds):
     853    def _point_homset_class(self, *args, **kwds):
    854854        r"""
    855855        Internal function. Returns the (abstract) group of points on this
    856856        elliptic curve over a ring.
     
    858858        EXAMPLES::
    859859       
    860860            sage: E=EllipticCurve(GF(5),[1,1])
    861             sage: E._homset_class(Spec(GF(5^10,'a'),GF(5)), E)
     861            sage: E._point_homset_class(Spec(GF(5^10,'a'),GF(5)), E)
    862862            Abelian group of points on Elliptic Curve defined
    863863            by y^2 = x^3 + x + 1 over Finite Field in a of size 5^10
    864864        """
    865         return homset.SchemeHomsetModule_abelian_variety_coordinates_field(*args, **kwds)
     865        return homset.SchemeHomset_points_abelian_variety_field(*args, **kwds)
    866866
    867867    def __getitem__(self, n):
    868868        r"""
  • sage/schemes/elliptic_curves/ell_point.py

    diff --git a/sage/schemes/elliptic_curves/ell_point.py b/sage/schemes/elliptic_curves/ell_point.py
    a b  
    1414fields.
    1515
    1616The class ``EllipticCurvePoint``, which is based on
    17 ``SchemeMorphism_projective_coordinates_ring``, currently has little
    18 extra functionality.
     17``SchemeMorphism_point_projective_ring``, currently has little extra
     18functionality.
    1919
    2020EXAMPLES:
    2121
     
    136136from sage.structure.sequence  import Sequence
    137137
    138138from sage.schemes.plane_curves.projective_curve import Hasse_bounds
    139 from sage.schemes.generic.morphism import (SchemeMorphism_projective_coordinates_ring,
    140                                            SchemeMorphism_abelian_variety_coordinates_field,
    141                                            is_SchemeMorphism, SchemeMorphism_coordinates)
     139from sage.schemes.generic.morphism import (SchemeMorphism_point_projective_ring,
     140                                           SchemeMorphism_point_abelian_variety_field,
     141                                           is_SchemeMorphism)
    142142
    143143from constructor import EllipticCurve
    144144                                           
    145145oo = rings.infinity       # infinity
    146146
    147 class EllipticCurvePoint(SchemeMorphism_projective_coordinates_ring):
     147class EllipticCurvePoint(SchemeMorphism_point_projective_ring):
    148148    """
    149149    A point on an elliptic curve.
    150150    """
     
    171171            return -1
    172172
    173173
    174 class EllipticCurvePoint_field(SchemeMorphism_abelian_variety_coordinates_field):
     174class EllipticCurvePoint_field(SchemeMorphism_point_abelian_variety_field):
    175175    """
    176176    A point on an elliptic curve over a field.  The point has coordinates
    177177    in the base field.
     
    269269            #v = (R.zero(),R.one(),R.zero())
    270270            v = (0,1,0)
    271271        if check:
    272             # mostly from SchemeMorphism_projective_coordinates_field
     272            # mostly from SchemeMorphism_point_projective_field
    273273            d = point_homset.codomain().ambient_space().ngens()
    274274            if not isinstance(v,(list,tuple)):
    275275                raise TypeError, \
     
    303303            if not test == 0:
    304304                raise TypeError, "Coordinates %s do not define a point on %s"%(list(v),curve)
    305305               
    306         SchemeMorphism_abelian_variety_coordinates_field.__init__(self, point_homset, v, check=False)
     306        SchemeMorphism_point_abelian_variety_field.__init__(self, point_homset, v, check=False)
    307307        #AdditiveGroupElement.__init__(self, point_homset)
    308308       
    309309    def _repr_(self):
  • sage/schemes/generic/affine_space.py

    diff --git a/sage/schemes/generic/affine_space.py b/sage/schemes/generic/affine_space.py
    a b  
    240240            raise TypeError, "Second argument (= %s) must be a finite field."%F
    241241        return [ P for P in self.base_extend(F) ]
    242242
    243     def _point_morphism_class(self, *args, **kwds):
    244         return morphism.SchemeMorphism_on_points_affine_space(*args, **kwds)
    245 
    246243    def __cmp__(self, right):
    247244        """
    248245        EXAMPLES::
     
    275272        """
    276273        return "\\mathbf{A}_{%s}^%s"%(latex(self.base_ring()), self.dimension_relative())
    277274   
    278     def _homset_class(self, *args, **kwds):
    279         return homset.SchemeHomset_affine_coordinates(*args, **kwds)
     275    def _morphism_class(self, *args, **kwds):
     276        return morphism.SchemeMorphism_polynomial_affine_space(*args, **kwds)
     277
     278    def _point_homset_class(self, *args, **kwds):
     279        return homset.SchemeHomset_points_affine(*args, **kwds)
    280280
    281281    def _point_class(self, *args, **kwds):
    282         return morphism.SchemeMorphism_affine_coordinates(*args, **kwds)
     282        return morphism.SchemeMorphism_point_affine(*args, **kwds)
    283283
    284284    def _repr_(self):
    285285        """
  • sage/schemes/generic/algebraic_scheme.py

    diff --git a/sage/schemes/generic/algebraic_scheme.py b/sage/schemes/generic/algebraic_scheme.py
    a b  
    521521        """
    522522        return "Subscheme of %s"%self.__A
    523523
    524     def _homset_class(self, *args, **kwds):
    525         return self.__A._homset_class(*args, **kwds)
     524    def _point_homset_class(self, *args, **kwds):
     525        return self.__A._point_homset_class(*args, **kwds)
    526526
    527527    def _point_class(self, *args, **kwds):
    528528        return self.__A._point_class(*args, **kwds)
     
    14721472          x^2 - y*z
    14731473    """
    14741474
    1475     def _point_morphism_class(self, *args, **kwds):
    1476         return morphism.SchemeMorphism_on_points_affine_space(*args, **kwds)
     1475    def _morphism_class(self, *args, **kwds):
     1476        return morphism.SchemeMorphism_polynomial_affine_space(*args, **kwds)
    14771477
    14781478    def dimension(self):
    14791479        """
     
    16681668          x^2 - y*z
    16691669    """
    16701670
    1671     def _point_morphism_class(self, *args, **kwds):
     1671    def _morphism_class(self, *args, **kwds):
    16721672        r"""
    16731673        Construct a morphism determined by action on points of ``self``.
    16741674
     
    16771677        INPUT:
    16781678
    16791679        - same as for
    1680           :class:`~sage.schemes.generic.morphism.SchemeMorphism_on_points_projective_space`.
     1680          :class:`~sage.schemes.generic.morphism.SchemeMorphism_polynomial_projective_space`.
    16811681
    16821682        OUPUT:
    16831683
    1684         - :class:`~sage.schemes.generic.morphism.SchemeMorphism_on_points_projective_space`.
     1684        - :class:`~sage.schemes.generic.morphism.SchemeMorphism_polynomial_projective_space`.
    16851685
    16861686        TESTS::
    16871687
     
    16941694              To:   Projective Space of dimension 2 over Rational Field
    16951695              Defn: Defined on coordinates by sending (x : y) to
    16961696                (x^2 : x*y : y^2)
    1697             sage: P1._point_morphism_class(H12, [x^2,x*y, y^2])
     1697            sage: P1._morphism_class(H12, [x^2,x*y, y^2])
    16981698            Scheme morphism:
    16991699              From: Projective Space of dimension 1 over Rational Field
    17001700              To:   Projective Space of dimension 2 over Rational Field
    17011701              Defn: Defined on coordinates by sending (x : y) to
    17021702                (x^2 : x*y : y^2)
    17031703        """
    1704         return morphism.SchemeMorphism_on_points_projective_space(*args, **kwds)
     1704        return morphism.SchemeMorphism_polynomial_projective_space(*args, **kwds)
    17051705
    17061706    def dimension(self):
    17071707        """
     
    20502050        super(AlgebraicScheme_subscheme_toric, self).__init__(toric_variety,
    20512051                                                              polynomials)
    20522052
    2053     def _point_morphism_class(self, *args, **kwds):
     2053    def _morphism_class(self, *args, **kwds):
    20542054        r"""
    20552055        Construct a morphism determined by action on points of ``self``.
    20562056
    20572057        INPUT:
    20582058
    20592059        - same as for
    2060           :class:`~sage.schemes.generic.morphism.SchemeMorphism_on_points_toric_variety`.
     2060          :class:`~sage.schemes.generic.morphism.SchemeMorphism_polynomial_toric_variety`.
    20612061
    20622062        OUPUT:
    20632063
    2064         - :class:`~sage.schemes.generic.morphism.SchemeMorphism_on_points_toric_variety`.
     2064        - :class:`~sage.schemes.generic.morphism.SchemeMorphism_polynomial_toric_variety`.
    20652065
    20662066        TESTS::
    20672067
     
    20712071            Defining z0, z1, z2, z3
    20722072            sage: P1 = P1xP1.subscheme(z0-z2)
    20732073            sage: H = P1.Hom(P1xP1)
    2074             sage: P1._point_morphism_class(H, [z0,z1,z0,z3])
     2074            sage: P1._morphism_class(H, [z0,z1,z0,z3])
    20752075            Scheme morphism:
    20762076              From: Closed subscheme of 2-d toric variety
    20772077              covered by 4 affine patches defined by:
     
    20802080              Defn: Defined on coordinates by sending [z0 : z1 : z2 : z3] to
    20812081                    [z2 : z1 : z2 : z3]
    20822082        """
    2083         from sage.schemes.generic.toric_morphism import SchemeMorphism_on_points_toric_variety
    2084         return SchemeMorphism_on_points_toric_variety(*args, **kwds)
     2083        from sage.schemes.generic.toric_morphism import SchemeMorphism_polynomial_toric_variety
     2084        return SchemeMorphism_polynomial_toric_variety(*args, **kwds)
    20852085
    20862086    def affine_patch(self, i):
    20872087        r"""
  • sage/schemes/generic/homset.py

    diff --git a/sage/schemes/generic/homset.py b/sage/schemes/generic/homset.py
    a b  
    1 """
     1r"""
    22Set of homomorphisms between two schemes
    33
     4For schemes `X` and `Y`, this module implements the set of morphisms
     5`Hom(X,Y)`. This is done by :class:`SchemeHomset_generic`.
     6
     7As a special case, the hom sets can also represent the points of a
     8scheme. Recall that the `K`-rational points of a scheme `X` over `k`
     9can be identified with the set of morphisms `Spec(K) \to X`. In Sage,
     10the rational points are implemented by such scheme morphisms. This is
     11done by :class:`SchemeHomset_points` and its subclasses.
     12
    413.. note::
    514
    615    You should not create the homsets manually. Instead, use the
     
    2534from sage.schemes.generic.morphism import (
    2635    SchemeMorphism,
    2736    SchemeMorphism_structure_map, SchemeMorphism_spec,
    28     SchemeMorphism_affine_coordinates,
    29     SchemeMorphism_projective_coordinates_field )
    30 from sage.schemes.generic.toric_morphism import SchemeMorphism_toric_coordinates_field
     37    SchemeMorphism_point_affine,
     38    SchemeMorphism_point_projective_ring,
     39    SchemeMorphism_point_projective_field )
     40from sage.schemes.generic.toric_morphism import SchemeMorphism_point_toric_field
    3141
    3242
    3343
     
    162172        Y = extra_args.pop('Y')
    163173        base_ring = extra_args.pop('base_ring')
    164174        if is_Spec(X):
    165             return Y._homset_class(X, Y, category=category, base=base_ring, **extra_args)
    166         return SchemeHomset_generic(X, Y, category=category, base=base_ring, **extra_args)
     175            return Y._point_homset_class(X, Y, category=category, base=base_ring, **extra_args)
     176        try:
     177            return X._homset_class(X, Y, category=category, base=base_ring, **extra_args)
     178        except AttributeError:
     179            return SchemeHomset_generic(X, Y, category=category, base=base_ring, **extra_args)
    167180
    168181
    169182SchemeHomset = SchemeHomsetFactory('sage.schemes.generic.homset.SchemeHomset')
     
    284297              To:   Rational Field
    285298       
    286299            sage: H = Hom(Spec(QQ, ZZ), Spec(ZZ)); H
    287             Set of rational points of Spectrum of Rational Field
     300            Set of rational points of Spectrum of Integer Ring
    288301       
    289302            sage: phi = H(f); phi
    290303            Affine Scheme morphism:
     
    313326            TypeError: x must be a ring homomorphism, list or tuple
    314327        """
    315328        if isinstance(x, (list, tuple)):
    316             return self.domain()._point_morphism_class(self, x, check=check)
     329            return self.domain()._morphism_class(self, x, check=check)
    317330       
    318331        if is_RingHomomorphism(x):
    319332            return SchemeMorphism_spec(self, x, check=check)
     
    321334        raise TypeError, "x must be a ring homomorphism, list or tuple"
    322335
    323336
    324 
    325 class SchemeHomset_coordinates(SchemeHomset_generic):
     337#*******************************************************************
     338# Base class for points
     339#*******************************************************************
     340class SchemeHomset_points(SchemeHomset_generic):
    326341    """
    327342    Set of rational points of the scheme.
    328343
     
    336351
    337352    EXAMPLES::
    338353
    339         sage: from sage.schemes.generic.homset import SchemeHomset_coordinates
    340         sage: SchemeHomset_coordinates(Spec(QQ), AffineSpace(ZZ,2))
     354        sage: from sage.schemes.generic.homset import SchemeHomset_points
     355        sage: SchemeHomset_points(Spec(QQ), AffineSpace(ZZ,2))
    341356        Set of rational points of Affine Space of dimension 2 over Rational Field
    342357    """
    343358
     
    351366
    352367        EXAMPLES::
    353368
    354             sage: from sage.schemes.generic.homset import SchemeHomset_coordinates
    355             sage: SchemeHomset_coordinates(Spec(QQ), AffineSpace(ZZ,2))
     369            sage: from sage.schemes.generic.homset import SchemeHomset_points
     370            sage: SchemeHomset_points(Spec(QQ), AffineSpace(ZZ,2))
    356371            Set of rational points of Affine Space of dimension 2 over Rational Field
    357372        """
    358373        if check and not is_Spec(X):
    359374            raise ValueError('The domain must be an affine scheme.')
    360375        SchemeHomset_generic.__init__(self, X, Y, category=category, check=check, base=base)
    361376
     377    def _element_constructor_(self, *v, **kwds):
     378        """
     379        The element contstructor.
     380
     381        INPUT:
     382
     383        - ``v`` -- anything that determines a scheme morphism in the
     384          hom set.
     385
     386        OUTPUT:
     387
     388        The scheme morphism determined by ``v``.
     389
     390        EXAMPLES::
     391       
     392            sage: A2 = AffineSpace(ZZ,2)
     393            sage: F = GF(3)
     394            sage: F_points = A2(F);  type(F_points)
     395            <class 'sage.schemes.generic.homset.SchemeHomset_points_affine_with_category'>
     396            sage: F_points([2,5])
     397            (2, 2)
     398
     399            sage: P2 = ProjectiveSpace(GF(3),2)
     400            sage: F.<a> = GF(9,'a')
     401            sage: F_points = P2(F)
     402            sage: type(F_points)
     403            <class 'sage.schemes.generic.homset.SchemeHomset_points_projective_field_with_category'>
     404            sage: F_points([4,2*a])
     405            (1 : 2*a : 1)
     406        """
     407        if len(v) == 1:
     408            v = v[0]
     409        return self.codomain()._point_class(self, v, **kwds)
     410
    362411    def extended_codomain(self):
    363412        """
    364413        Return the codomain with extended base, if necessary.
     
    412461
    413462    def value_ring(self):
    414463        """
    415         Returns ``R` for a homset `X(Spec(R))`
     464        Returns `R` for a point homset `X(Spec(R))`
    416465
    417466        OUTPUT:
    418467       
     
    432481#*******************************************************************
    433482# Affine varieties
    434483#*******************************************************************
    435 class SchemeHomset_affine_coordinates(SchemeHomset_coordinates):
     484class SchemeHomset_points_spec(SchemeHomset_generic):
    436485    """
    437486    Set of rational points of an affine variety.
    438487
     
    442491
    443492    EXAMPLES::
    444493
    445         sage: from sage.schemes.generic.homset import SchemeHomset_affine_coordinates
    446         sage: SchemeHomset_affine_coordinates(Spec(QQ), AffineSpace(ZZ,2))
    447         Set of rational points of Affine Space of dimension 2 over Rational Field
     494        sage: from sage.schemes.generic.homset import SchemeHomset_points_spec
     495        sage: SchemeHomset_points_spec(Spec(QQ), Spec(QQ))
     496        Set of rational points of Spectrum of Rational Field
    448497    """
    449     def _element_constructor_(self, *v):
     498
     499    def _element_constructor_(self, *args, **kwds):
    450500        """
    451501        The element contstructor.
    452 
    453         INPUT:
    454 
    455         - ``v`` -- anything that determines a scheme morphism in the
    456           hom set.
     502        """
     503        return SchemeHomset_generic._element_constructor_(self, *args, **kwds)
     504       
     505    def _repr_(self):
     506        """
     507        Return a string representation of ``self``.
    457508
    458509        OUTPUT:
    459510
    460         The scheme morphism determined by ``v``.
     511        A string.
     512       
     513        EXAMPLES::
    461514
    462         EXAMPLES::
    463        
    464             sage: A2 = AffineSpace(ZZ,2)
    465             sage: F = GF(3)
    466             sage: F_points = A2(F);  type(F_points)
    467             <class 'sage.schemes.generic.homset.SchemeHomset_affine_coordinates_with_category'>
    468             sage: F_points([2,5])
    469             (2, 2)
     515            sage: from sage.schemes.generic.homset import SchemeHomset_points_spec
     516            sage: S = SchemeHomset_points_spec(Spec(QQ), Spec(QQ))
     517            sage: S._repr_()
     518            'Set of rational points of Spectrum of Rational Field'
    470519        """
    471         if len(v) == 1:
    472             v = v[0]
    473         return SchemeMorphism_affine_coordinates(self, v)
     520        return 'Set of rational points of '+str(self.codomain())
    474521
     522
     523
     524#*******************************************************************
     525# Affine varieties
     526#*******************************************************************
     527class SchemeHomset_points_affine(SchemeHomset_points):
     528    """
     529    Set of rational points of an affine variety.
     530
     531    INPUT:
     532   
     533    See :class:`SchemeHomset_generic`.
     534
     535    EXAMPLES::
     536
     537        sage: from sage.schemes.generic.homset import SchemeHomset_points_affine
     538        sage: SchemeHomset_points_affine(Spec(QQ), AffineSpace(ZZ,2))
     539        Set of rational points of Affine Space of dimension 2 over Rational Field
     540    """
    475541    def points(self, B=0):
    476542        r"""
    477543        Return some or all rational points of an affine scheme.
     
    521587#*******************************************************************
    522588# Projective varieties
    523589#*******************************************************************
    524 class SchemeHomset_projective_coordinates_field(SchemeHomset_coordinates):
     590class SchemeHomset_points_projective_field(SchemeHomset_points):
    525591    """
    526592    Set of rational points of a projective variety over a field.
    527593
     
    531597
    532598    EXAMPLES::
    533599
    534         sage: from sage.schemes.generic.homset import SchemeHomset_projective_coordinates_field
    535         sage: SchemeHomset_projective_coordinates_field(Spec(QQ), ProjectiveSpace(QQ,2))
     600        sage: from sage.schemes.generic.homset import SchemeHomset_points_projective_field
     601        sage: SchemeHomset_points_projective_field(Spec(QQ), ProjectiveSpace(QQ,2))
    536602        Set of rational points of Projective Space of dimension 2 over Rational Field
    537603    """
    538     def _element_constructor_(self, *v):
    539         """
    540         The element contstructor.
    541 
    542         INPUT:
    543 
    544         - ``v`` -- anything that determines a scheme morphism in the
    545           hom set.
    546 
    547         OUTPUT:
    548 
    549         The scheme morphism determined by ``v``.
    550 
    551         EXAMPLES::
    552        
    553             sage: P2 = ProjectiveSpace(GF(3),2)
    554             sage: F.<a> = GF(9,'a')
    555             sage: F_points = P2(F)
    556             sage: F_points([4,2*a])
    557             (1 : 2*a : 1)
    558         """
    559         if len(v) == 1:
    560             v = v[0]
    561         X = self.extended_codomain()
    562         return X.point(v)
    563 
    564604    def points(self, B=0):
    565605        """
    566606        Return some or all rational points of a projective scheme.
     
    595635        else:
    596636            raise TypeError, "Unable to enumerate points over %s."%R
    597637
    598 class SchemeHomset_projective_coordinates_ring(SchemeHomset_coordinates):
     638class SchemeHomset_points_projective_ring(SchemeHomset_points):
    599639    """
    600640    Set of rational points of a projective variety over a commutative ring.
    601641
     
    605645
    606646    EXAMPLES::
    607647
    608         sage: from sage.schemes.generic.homset import SchemeHomset_projective_coordinates_ring
    609         sage: SchemeHomset_projective_coordinates_ring(Spec(ZZ), ProjectiveSpace(ZZ,2))
     648        sage: from sage.schemes.generic.homset import SchemeHomset_points_projective_ring
     649        sage: SchemeHomset_points_projective_ring(Spec(ZZ), ProjectiveSpace(ZZ,2))
    610650        Set of rational points of Projective Space of dimension 2 over Integer Ring
    611651    """
    612     def _element_constructor_(self, *v):
     652    def _element_constructor_(self, *v, **kwds):
    613653        r"""
    614654        The element constructor.
    615655       
     
    617657
    618658        EXAMPLES::
    619659
    620             sage: from sage.schemes.generic.homset import SchemeHomset_projective_coordinates_ring
    621             sage: Hom = SchemeHomset_projective_coordinates_ring(Spec(ZZ), ProjectiveSpace(ZZ,2))
     660            sage: from sage.schemes.generic.homset import SchemeHomset_points_projective_ring
     661            sage: Hom = SchemeHomset_points_projective_ring(Spec(ZZ), ProjectiveSpace(ZZ,2))
    622662            sage: Hom(1,2,3)
    623663            Traceback (most recent call last):
    624664            ...
    625665            NotImplementedError
    626666        """
     667        check = kwds.get('check', True)
    627668        raise NotImplementedError
    628669
    629670    def points(self, B=0):
     
    641682
    642683        EXAMPLES::
    643684
    644             sage: from sage.schemes.generic.homset import SchemeHomset_projective_coordinates_ring
    645             sage: Hom = SchemeHomset_projective_coordinates_ring(Spec(ZZ), ProjectiveSpace(ZZ,2))
     685            sage: from sage.schemes.generic.homset import SchemeHomset_points_projective_ring
     686            sage: Hom = SchemeHomset_points_projective_ring(Spec(ZZ), ProjectiveSpace(ZZ,2))
    646687            sage: Hom.points(5)
    647688            Traceback (most recent call last):
    648689            ...
     
    662703#*******************************************************************
    663704# Abelian varieties
    664705#*******************************************************************
    665 class SchemeHomsetModule_abelian_variety_coordinates_field(SchemeHomset_projective_coordinates_field):
     706class SchemeHomset_points_abelian_variety_field(SchemeHomset_points_projective_field):
    666707    r"""
    667708    Set of rational points of an abelian variety.
    668709
     
    694735        True
    695736    """
    696737
     738    def _element_constructor_(self, *v, **kwds):
     739        """
     740        The element contstructor.
     741
     742        INPUT:
     743
     744        - ``v`` -- anything that determines a scheme morphism in the
     745          hom set.
     746
     747        OUTPUT:
     748
     749        The scheme morphism determined by ``v``.
     750
     751        EXAMPLES::
     752       
     753            sage: E = EllipticCurve('37a')
     754            sage: X = E(QQ)
     755            sage: P = X([0,1,0]);  P
     756            (0 : 1 : 0)
     757            sage: type(P)
     758            <class 'sage.schemes.elliptic_curves.ell_point.EllipticCurvePoint_number_field'>
     759        """
     760        if len(v) == 1:
     761            v = v[0]
     762        return self.codomain()._point_class(self.extended_codomain(), v, **kwds)
     763
    697764    def _repr_(self):
    698765        """
    699766        Return a string representation of ``self``.
     
    719786        return self
    720787   
    721788
     789from sage.structure.sage_object import register_unpickle_override
     790register_unpickle_override('sage.schemes.generic.homset',
     791                           'SchemeHomsetModule_abelian_variety_coordinates_field',
     792                           SchemeHomset_points_abelian_variety_field)
     793
    722794#*******************************************************************
    723795# Toric varieties
    724796#*******************************************************************
    725 class SchemeHomset_toric_coordinates_field(SchemeHomset_coordinates):
     797class SchemeHomset_points_toric_field(SchemeHomset_points):
    726798    """
    727799    Set of rational points of a toric variety.
    728800
    729801    INPUT:
    730802
    731     - same as for :class:`SchemeHomset_coordinates`.
     803    - same as for :class:`SchemeHomset_points`.
    732804
    733805    OUPUT:
    734806
    735807    A scheme morphism of type
    736     :class:`SchemeHomset_toric_coordinates_field`.
     808    :class:`SchemeHomset_points_toric_field`.
    737809
    738810    EXAMPLES::
    739811
     
    745817    TESTS::
    746818
    747819        sage: import sage.schemes.generic.homset as HOM
    748         sage: HOM.SchemeHomset_toric_coordinates_field(Spec(QQ), P1xP1)
     820        sage: HOM.SchemeHomset_points_toric_field(Spec(QQ), P1xP1)
    749821        Set of rational points of 2-d CPR-Fano toric variety covered by 4 affine patches
    750822    """
    751823    pass
  • sage/schemes/generic/morphism.py

    diff --git a/sage/schemes/generic/morphism.py b/sage/schemes/generic/morphism.py
    a b  
    1 """
     1r"""
    22Scheme morphism
    33
    44.. note::
     
    88    :meth:`~sage.structure.parent.Hom` methods that are inherited by
    99    all schemes.
    1010
     11If you want to extend the Sage library with some new kind of scheme,
     12your new class (say, ``myscheme``) should provide a methods
     13
     14* ``myscheme._morphism_class(*args, **kwds)`` return a morphism
     15  between to schemes in your category, usually defined via
     16  polynomials. Your point class should derive from
     17  :class:`SchemeMorphism_polynomial`. They will usually be elements of
     18  the hom set
     19  :class:`~sage.schemes.generic.homset.SchemeHomset_generic`.
     20
     21Optionally, you can also provide a special hom set for your
     22subcategory of schemes. If you want to do this, you should also
     23provide a method
     24
     25* ``myscheme._homset_class(*args, **kwds)`` (optional) return the
     26  homset, which must be a derived class of
     27  `class:`~sage.schemes.generic.homset.SchemeHomset_generic`. If your
     28  new homset class does not use ``myscheme._morphism_class`` then you
     29  do not have to provide it.
     30
     31Note that points on schemes are morphisms `Spec(K)\to X`, too. But we
     32typically use a different notation, so they are implemented in a
     33different derived class. For this, you should implement a method
     34
     35* ``myscheme._point_class(*args, **kwds)`` return a point, that is,
     36  morphism `Spec(K)\to X`. Your point class should derive from
     37  :class:`SchemeMorphism_point`.
     38
     39Optionally, you can also provide a special hom set for the points, for
     40example the point hom set can provide a method to enumerate all
     41points. If you want to do this, you should also provide a method
     42
     43* ``myscheme._point_homset_class(*args, **kwds)`` (optional) return
     44  the :mod:`~sage.schemes.generic.homset` of points. The hom sets of
     45  points are implemented in classes named ``SchemeHomset_points_...``.
     46  If your new homset class does not use ``myscheme._point_class`` then
     47  you do not have to provide it. 
     48
    1149AUTHORS:
    1250
    1351- David Kohel, William Stein
    1452
    1553- William Stein (2006-02-11): fixed bug where P(0,0,0) was allowed as
    1654  a projective point.
     55
     56- Volker Braun (2011-08-08): Renamed classes, more documentation, misc
     57  cleanups.
    1758"""
    1859
     60# Historical note: in trac #11599, V.B. renamed
     61# * _point_morphism_class -> _morphism_class
     62# * _homset_class -> _point_homset_class
     63
    1964#*****************************************************************************
    2065#  Copyright (C) 2006 David Kohel <kohel@maths.usyd.edu.au>
    2166#  Copyright (C) 2006 William Stein <wstein@gmail.com>
     
    4287
    4388    OUTPUT:
    4489   
    45     Boolean. Return ``True`` if ``f``a is a scheme morphism or a point
     90    Boolean. Return ``True`` if ``f`` is a scheme morphism or a point
    4691    on an elliptic curve.
    4792
    4893    EXAMPLES::
     
    80125    """
    81126    def __init__(self, parent):
    82127        """
    83         The Pyhon constructor.
     128        The Python constructor.
    84129       
    85130        EXAMPLES::
    86131       
     
    212257        A category.
    213258       
    214259        EXAMPLES::
    215 
    216         EXAMPLES::
    217260       
    218261            sage: A2 = AffineSpace(QQ,2)
    219262            sage: A2.structure_morphism().category()
     
    256299            sage: f * g
    257300            Traceback (most recent call last):
    258301            ...
    259             TypeError: unsupported operand type(s) for *: 'SchemeMorphism_structure_map' and 'SchemeMorphism_id'
     302            TypeError: unsupported operand type(s) for *:
     303            'SchemeMorphism_structure_map' and 'SchemeMorphism_id'
    260304        """
    261305        raise NotImplementedError
    262306
     
    282326            sage: id^2
    283327            Traceback (most recent call last):
    284328            ...
    285             TypeError: unsupported operand type(s) for *: 'SchemeMorphism_id' and 'SchemeMorphism_id'
     329            TypeError: unsupported operand type(s) for *:
     330            'SchemeMorphism_id' and 'SchemeMorphism_id'
    286331        """
    287332        if not self.is_endomorphism():
    288333            raise TypeError, "self must be an endomorphism."
     
    614659# The domain can be either affine or projective regardless
    615660# of the class
    616661############################################################################
    617 
    618 class SchemeMorphism_on_points(SchemeMorphism):
     662class SchemeMorphism_polynomial(SchemeMorphism):
    619663    """
    620     A morphism of schemes determined by rational functions that define
    621     what the morphism does on points in the ambient space.
     664    A morphism of schemes determined by polynomials that define what
     665    the morphism does on points in the ambient space.
    622666
    623667    INPUT:
    624668
     
    671715        """
    672716        The Python constructor.
    673717
    674         See :class:`SchemeMorphism_on_points` for details.
     718        See :class:`SchemeMorphism_polynomial` for details.
    675719
    676720        EXAMPLES::
    677721
     
    815859        return "Defined on coordinates by sending %s to\n%s"%(i,o)
    816860
    817861
    818 class SchemeMorphism_on_points_affine_space(SchemeMorphism_on_points):
     862class SchemeMorphism_polynomial_affine_space(SchemeMorphism_polynomial):
    819863    """
    820864    A morphism of schemes determined by rational functions that define
    821865    what the morphism does on points in the ambient affine space.
     
    837881    """
    838882    pass
    839883
    840 class SchemeMorphism_on_points_projective_space(SchemeMorphism_on_points):
     884class SchemeMorphism_polynomial_projective_space(SchemeMorphism_polynomial):
    841885    """
    842886    A morphism of schemes determined by rational functions that define
    843887    what the morphism does on points in the ambient projective space.
     
    907951        """
    908952        The Python constructor.
    909953
    910         See :class:`SchemeMorphism_on_points` for details.
     954        See :class:`SchemeMorphism_polynomial` for details.
    911955
    912956        EXAMPLES::
    913957
     
    918962              Defn: Defined on coordinates by sending (x : y) to
    919963                    (y : 2*x)
    920964        """
    921         SchemeMorphism_on_points.__init__(self, parent, polys, check)
     965        SchemeMorphism_polynomial.__init__(self, parent, polys, check)
    922966        if check:
    923967            # morphisms from projective space are always given by
    924968            # homogeneous polynomials of the same degree
     
    939983# by coordinates.
    940984############################################################################
    941985
    942 class SchemeMorphism_coordinates(SchemeMorphism):
     986class SchemeMorphism_point(SchemeMorphism):
    943987    """
    944988    Base class for rational points on schemes.
    945989
     
    10881132            sage: a != b
    10891133            True
    10901134        """
    1091         if not isinstance(other, SchemeMorphism_coordinates):
     1135        if not isinstance(other, SchemeMorphism_point):
    10921136            try:
    10931137                other = self.codomain().ambient_space()(other)
    10941138            except TypeError:
     
    11161160#*******************************************************************
    11171161# Affine varieties
    11181162#*******************************************************************
    1119 class SchemeMorphism_affine_coordinates(SchemeMorphism_coordinates):
     1163class SchemeMorphism_point_affine(SchemeMorphism_point):
    11201164    """
    11211165    A rational point on an affine scheme.
    11221166   
     
    11391183        """
    11401184        The Python constructor.
    11411185
    1142         See :class:`SchemeMorphism_affine_coordinates` for details.
     1186        See :class:`SchemeMorphism_point_affine` for details.
    11431187
    11441188        TESTS::
    11451189
    1146             sage: from sage.schemes.generic.morphism import SchemeMorphism_affine_coordinates
     1190            sage: from sage.schemes.generic.morphism import SchemeMorphism_point_affine
    11471191            sage: A3.<x,y,z> = AffineSpace(QQ, 3)
    1148             sage: SchemeMorphism_affine_coordinates(A3(QQ), [1,2,3])
     1192            sage: SchemeMorphism_point_affine(A3(QQ), [1,2,3])
    11491193            (1, 2, 3)
    11501194        """
    11511195        SchemeMorphism.__init__(self, X)
     
    11701214#*******************************************************************
    11711215# Projective varieties
    11721216#*******************************************************************
    1173 class SchemeMorphism_projective_coordinates_ring(SchemeMorphism_coordinates):
     1217class SchemeMorphism_point_projective_ring(SchemeMorphism_point):
    11741218    """
    11751219    A rational point of projective space over a ring (how?).
    11761220
     
    11781222
    11791223    EXAMPLES:
    11801224
    1181         sage: from sage.schemes.generic.morphism import SchemeMorphism_projective_coordinates_ring
    1182         sage: SchemeMorphism_projective_coordinates_ring(None, None)
     1225        sage: from sage.schemes.generic.morphism import SchemeMorphism_point_projective_ring
     1226        sage: SchemeMorphism_point_projective_ring(None, None)
    11831227        Traceback (most recent call last):
    11841228        ...
    11851229        NotImplementedError
     
    11911235       
    11921236        EXAMPLES:
    11931237
    1194             sage: from sage.schemes.generic.morphism import SchemeMorphism_projective_coordinates_ring
    1195             sage: SchemeMorphism_projective_coordinates_ring(None, None)
     1238            sage: from sage.schemes.generic.morphism import SchemeMorphism_point_projective_ring
     1239            sage: SchemeMorphism_point_projective_ring(None, None)
    11961240            Traceback (most recent call last):
    11971241            ...
    11981242            NotImplementedError
     
    12001244        raise NotImplementedError
    12011245
    12021246
    1203 class SchemeMorphism_projective_coordinates_field(SchemeMorphism_projective_coordinates_ring):
     1247class SchemeMorphism_point_projective_field(SchemeMorphism_point_projective_ring):
    12041248    """
    12051249    A rational point of projective space over a field.
    12061250   
     
    12321276        """
    12331277        The Python constructor.
    12341278
    1235         See :class:`SchemeMorphism_projective_coordinates_field` for details.
     1279        See :class:`SchemeMorphism_point_projective_field` for details.
    12361280       
    12371281        EXAMPLES::
    12381282
     
    12731317            if all_zero:
    12741318                raise ValueError, "%s does not define a valid point since all entries are 0"%repr(v)
    12751319
    1276             X.codomain()._check_satisfies_equations(v)
     1320            X.extended_codomain()._check_satisfies_equations(v)
    12771321               
    12781322        self._coords = v
    12791323
     
    12821326#*******************************************************************
    12831327# Abelian varieties
    12841328#*******************************************************************
    1285 class SchemeMorphism_abelian_variety_coordinates_field\
    1286         (AdditiveGroupElement, SchemeMorphism_projective_coordinates_field):
     1329class SchemeMorphism_point_abelian_variety_field\
     1330        (AdditiveGroupElement, SchemeMorphism_point_projective_field):
    12871331    """
    12881332    A rational point of an abelian variety over a field.
    12891333
  • sage/schemes/generic/projective_space.py

    diff --git a/sage/schemes/generic/projective_space.py b/sage/schemes/generic/projective_space.py
    a b  
    314314                raise TypeError("%s is not a homogeneous polynomial!" % f)
    315315        return polynomials
    316316
    317     def _point_morphism_class(self, *args, **kwds):
    318         return morphism.SchemeMorphism_on_points_projective_space(*args, **kwds)
    319 
    320317    def __cmp__(self, right):
    321318        """
    322319        EXAMPLES::
     
    351348        """
    352349        return "{\\mathbf P}_{%s}^%s"%(latex(self.base_ring()), self.dimension_relative())
    353350
    354     def _homset_class(self, *args, **kwds):
    355         return homset.SchemeHomset_projective_coordinates_ring(*args, **kwds)
     351    def _morphism_class(self, *args, **kwds):
     352        return morphism.SchemeMorphism_polynomial_projective_space(*args, **kwds)
     353
     354    def _point_homset_class(self, *args, **kwds):
     355        return homset.SchemeHomset_points_projective_ring(*args, **kwds)
    356356
    357357    def _point_class(self, *args, **kwds):
    358         return morphism.SchemeMorphism_projective_coordinates_ring(*args, **kwds)
     358        return morphism.SchemeMorphism_point_projective_ring(*args, **kwds)
    359359
    360360    def _repr_(self):
    361361        """
     
    550550
    551551
    552552class ProjectiveSpace_field(ProjectiveSpace_ring):
    553     def _homset_class(self, *args, **kwds):
    554         return homset.SchemeHomset_projective_coordinates_field(*args, **kwds)
     553    def _point_homset_class(self, *args, **kwds):
     554        return homset.SchemeHomset_points_projective_field(*args, **kwds)
    555555
    556556    def _point_class(self, *args, **kwds):
    557         return morphism.SchemeMorphism_projective_coordinates_field(*args, **kwds)
     557        return morphism.SchemeMorphism_point_projective_field(*args, **kwds)
    558558
    559559   
    560560class ProjectiveSpace_finite_field(ProjectiveSpace_field):
  • sage/schemes/generic/scheme.py

    diff --git a/sage/schemes/generic/scheme.py b/sage/schemes/generic/scheme.py
    a b  
    170170
    171171    __add__ = union
    172172
    173     def _point_morphism_class(self, *args, **kwds):
     173    def _morphism_class(self, *args, **kwds):
    174174        """
    175175        EXAMPLES::
    176176       
    177177            sage: X = Spec(QQ)
    178             sage: X._point_morphism_class()
     178            sage: X._morphism_class()
    179179            Traceback (most recent call last):
    180180            ...
    181181            NotImplementedError
     
    271271            return self.point_homset(S)
    272272        if is_Scheme(S):
    273273            return S.Hom(self)
    274         from sage.schemes.generic.morphism import SchemeMorphism_coordinates
     274        from sage.schemes.generic.morphism import SchemeMorphism_point
    275275        if isinstance(S, (list, tuple)):
    276276            args = S
    277         elif isinstance(S, SchemeMorphism_coordinates):
     277        elif isinstance(S, SchemeMorphism_point):
    278278            if S.codomain() == self:
    279279                return S
    280280        else:
     
    353353        if is_EllipticCurve(self):
    354354            return self._point_class(self, v, check=check)
    355355
    356         return self._point_class(self.point_homset(), v, check=check)
     356        return self.point_homset() (v, check=check)
    357357   
    358358    def _point_class(self):
    359359        """
     
    373373        """
    374374        raise NotImplementedError
    375375
    376     def _homset_class(self, *args, **kwds):
     376    def _point_homset_class(self, *args, **kwds):
    377377        """
    378378        Return the Hom set from ``self`` to another scheme.
    379379
     
    381381       
    382382            sage: from sage.schemes.generic.scheme import Scheme
    383383            sage: X = Scheme(QQ)
    384             sage: X._homset_class()
     384            sage: X._point_homset_class()
    385385            Traceback (most recent call last):
    386386            ...
    387387            NotImplementedError
  • sage/schemes/generic/spec.py

    diff --git a/sage/schemes/generic/spec.py b/sage/schemes/generic/spec.py
    a b  
    365365        return Spec(self.coordinate_ring().base_extend(new_base.coordinate_ring()),
    366366                    self.base_ring())
    367367
    368     def _homset_class(self, *args, **kwds):
     368    def _point_homset_class(self, *args, **kwds):
    369369        """
    370370        Return the Hom set class.
    371371       
    372372        EXAMPLES::
    373373       
    374             sage: Spec(QQ)._homset_class(Spec(QQ), Spec(ZZ))
    375             Set of rational points of Spectrum of Rational Field
     374            sage: Spec(QQ)._point_homset_class(Spec(QQ), Spec(ZZ))
     375            Set of rational points of Spectrum of Integer Ring
    376376        """
    377         from sage.schemes.generic.homset import SchemeHomset_coordinates
    378         return SchemeHomset_coordinates(*args, **kwds)
     377        from sage.schemes.generic.homset import SchemeHomset_points_spec
     378        return SchemeHomset_points_spec(*args, **kwds)
    379379
    380380
    381381SpecZ = Spec(ZZ)
  • sage/schemes/generic/toric_morphism.py

    diff --git a/sage/schemes/generic/toric_morphism.py b/sage/schemes/generic/toric_morphism.py
    a b  
    1818import scheme     
    1919from sage.schemes.generic.morphism import (
    2020    is_SchemeMorphism,
    21     SchemeMorphism_coordinates, SchemeMorphism_on_points
     21    SchemeMorphism_point, SchemeMorphism_polynomial
    2222)
    2323
    2424
    2525
    26 class SchemeMorphism_toric_coordinates_field(SchemeMorphism_coordinates):
     26class SchemeMorphism_point_toric_field(SchemeMorphism_point):
    2727    """
    2828    Construct a morphism determined by giving coordinates in a field.
    2929
     
    4242
    4343    OUTPUT:
    4444
    45     - :class:`SchemeMorphism_toric_coordinates_field`.
     45    - :class:`SchemeMorphism_point_toric_field`.
    4646
    4747    TESTS::
    4848
     
    5454    # Mimicking affine/projective classes
    5555    def __init__(self, X, coordinates, check=True):
    5656        r"""
    57         See :class:`SchemeMorphism_toric_coordinates_field` for documentation.
     57        See :class:`SchemeMorphism_point_toric_field` for documentation.
    5858
    5959        TESTS::
    6060
     
    6666        # Convert scheme to its set of points over the base ring
    6767        if scheme.is_Scheme(X):
    6868            X = X(X.base_ring())
    69         super(SchemeMorphism_toric_coordinates_field, self).__init__(X)
     69        super(SchemeMorphism_point_toric_field, self).__init__(X)
    7070        if check:
    7171            # Verify that there are the right number of coords
    7272            # Why is it not done in the parent?
     
    8787
    8888
    8989
    90 class SchemeMorphism_on_points_toric_variety(SchemeMorphism_on_points):
     90class SchemeMorphism_polynomial_toric_variety(SchemeMorphism_polynomial):
    9191    """
    92     Construct a morphism determined by action on points.
     92    Construct a morphism determined by homogeneous polynomials.
    9393
    9494    .. WARNING::
    9595
     
    9898    INPUT:
    9999
    100100    - same as for
    101       :class:`~sage.schemes.generic.morphism.SchemeMorphism_on_points`.
     101      :class:`~sage.schemes.generic.morphism.SchemeMorphism_polynomial`.
    102102
    103103    OUPUT:
    104104
    105     - :class:`~sage.schemes.generic.morphism.SchemeMorphism_on_points_toric_variety`.
     105    - :class:`~sage.schemes.generic.morphism.SchemeMorphism_polynomial_toric_variety`.
    106106
    107107    TESTS::
    108108
     
    113113        sage: P1 = P1xP1.subscheme(z0-z2)
    114114        sage: H = P1xP1.Hom(P1)
    115115        sage: import sage.schemes.generic.toric_morphism as MOR
    116         sage: MOR.SchemeMorphism_on_points_toric_variety(H, [z0,z1,z0,z3])
     116        sage: MOR.SchemeMorphism_polynomial_toric_variety(H, [z0,z1,z0,z3])
    117117        Scheme morphism:
    118118          From: 2-d toric variety covered by 4 affine patches
    119119          To:   Closed subscheme of 2-d toric variety
     
    125125
    126126    def __init__(self, parent, polynomials, check=True):
    127127        r"""
    128         See :class:`SchemeMorphism_on_points_toric_variety` for documentation.
     128        See :class:`SchemeMorphism_polynomial_toric_variety` for documentation.
    129129
    130130        TESTS::
    131131
     
    136136            sage: P1 = P1xP1.subscheme(z0-z2)
    137137            sage: H = P1xP1.Hom(P1)
    138138            sage: import sage.schemes.generic.toric_morphism as MOR
    139             sage: MOR.SchemeMorphism_on_points_toric_variety(H, [z0,z1,z0,z3])
     139            sage: MOR.SchemeMorphism_polynomial_toric_variety(H, [z0,z1,z0,z3])
    140140            Scheme morphism:
    141141              From: 2-d toric variety covered by 4 affine patches
    142142              To:   Closed subscheme of 2-d toric variety
     
    145145              Defn: Defined on coordinates by sending
    146146                    [z0 : z1 : z2 : z3] to [z0 : z1 : z0 : z3]
    147147        """
    148         SchemeMorphism_on_points.__init__(self, parent, polynomials, check)
     148        SchemeMorphism_polynomial.__init__(self, parent, polynomials, check)
    149149        if check:
    150150            # Check that defining polynomials are homogeneous (degrees can be
    151151            # different if the target uses weighted coordinates)
  • sage/schemes/generic/toric_variety.py

    diff --git a/sage/schemes/generic/toric_variety.py b/sage/schemes/generic/toric_variety.py
    a b  
    244244from sage.rings.quotient_ring_element import QuotientRingElement
    245245from sage.rings.quotient_ring import QuotientRing_generic
    246246from sage.schemes.generic.ambient_space import AmbientSpace
    247 from sage.schemes.generic.homset import (SchemeHomset_coordinates,
    248                                          SchemeHomset_toric_coordinates_field)
    249 from sage.schemes.generic.toric_morphism import (SchemeMorphism_on_points_toric_variety,
    250                                                  SchemeMorphism_toric_coordinates_field)
     247from sage.schemes.generic.homset import SchemeHomset_points_toric_field
     248from sage.schemes.generic.toric_morphism import (SchemeMorphism_polynomial_toric_variety,
     249                                                 SchemeMorphism_point_toric_field)
    251250
    252251
    253252
     
    619618        raise TypeError("coordinates %s are in the exceptional set!"
    620619                        % str(coordinates)) # Need str, coordinates is a tuple
    621620
    622     def _homset_class(self, *args, **kwds):
     621    def _point_homset_class(self, *args, **kwds):
    623622        r"""
    624623        Construct a `Hom`-space for ``self``.
    625624
    626625        INPUT:
    627626
    628627        - same as for
    629           :class:`~sage.schemes.generic.homset.SchemeHomset_toric_coordinates_field`.
     628          :class:`~sage.schemes.generic.homset.SchemeHomset_points_toric_field`.
    630629
    631630        OUPUT:
    632631
    633632        -
    634           :class:`~sage.schemes.generic.homset.SchemeHomset_toric_coordinates_field`.
     633          :class:`~sage.schemes.generic.homset.SchemeHomset_points_toric_field`.
    635634
    636635        TESTS::
    637636
    638637            sage: fan = FaceFan(lattice_polytope.octahedron(2))
    639638            sage: P1xP1 = ToricVariety(fan)
    640             sage: P1xP1._homset_class(Spec(QQ), P1xP1)
     639            sage: P1xP1._point_homset_class(Spec(QQ), P1xP1)
    641640            Set of rational points of 2-d toric variety
    642641            covered by 4 affine patches
    643642        """
    644         return SchemeHomset_toric_coordinates_field(*args, **kwds)
     643        return SchemeHomset_points_toric_field(*args, **kwds)
    645644
    646645    def _latex_(self):
    647646        r"""
     
    694693        INPUT:
    695694
    696695        - same as for
    697           :class:`~sage.schemes.generic.morphism.SchemeMorphism_toric_coordinates_field`.
     696          :class:`~sage.schemes.generic.morphism.SchemeMorphism_point_toric_field`.
    698697
    699698        OUPUT:
    700699
    701         :class:`~sage.schemes.generic.morphism.SchemeMorphism_toric_coordinates_field`.
     700        :class:`~sage.schemes.generic.morphism.SchemeMorphism_point_toric_field`.
    702701
    703702        TESTS::
    704703
     
    707706            sage: P1xP1._point_class(P1xP1, [1,2,3,4])
    708707            [1 : 2 : 3 : 4]
    709708        """
    710         return SchemeMorphism_toric_coordinates_field(*args, **kwds)
    711 
    712     def _point_morphism_class(self, *args, **kwds):
     709        return SchemeMorphism_point_toric_field(*args, **kwds)
     710
     711    def _morphism_class(self, *args, **kwds):
    713712        r"""
    714713        Construct a morphism determined by action on points of ``self``.
    715714
    716715        INPUT:
    717716
    718717        - same as for
    719           :class:`~sage.schemes.generic.morphism.SchemeMorphism_on_points_toric_variety`.
     718          :class:`~sage.schemes.generic.morphism.SchemeMorphism_polynomial_toric_variety`.
    720719
    721720        OUPUT:
    722721
    723         :class:`~sage.schemes.generic.morphism.SchemeMorphism_on_points_toric_variety`.
     722        :class:`~sage.schemes.generic.morphism.SchemeMorphism_polynomial_toric_variety`.
    724723
    725724        TESTS::
    726725
     
    730729            Defining z0, z1, z2, z3
    731730            sage: P1 = P1xP1.subscheme(z0-z2)
    732731            sage: H = P1xP1.Hom(P1)
    733             sage: P1xP1._point_morphism_class(H, [z0,z1,z0,z3])
     732            sage: P1xP1._morphism_class(H, [z0,z1,z0,z3])
    734733            Scheme morphism:
    735734              From: 2-d toric variety covered by 4 affine patches
    736735              To:   Closed subscheme of 2-d toric variety
     
    739738              Defn: Defined on coordinates by sending
    740739                    [z0 : z1 : z2 : z3] to [z0 : z1 : z0 : z3]
    741740        """
    742         return SchemeMorphism_on_points_toric_variety(*args, **kwds)
     741        return SchemeMorphism_polynomial_toric_variety(*args, **kwds)
    743742
    744743    def _repr_(self):
    745744        r"""
     
    977976        OUTPUT:
    978977
    979978        - :class:`scheme morphism
    980           <sage.schemes.generic.morphism.SchemeMorphism_on_points_toric_variety>`
     979          <sage.schemes.generic.morphism.SchemeMorphism_polynomial_toric_variety>`
    981980          if the default embedding morphism was defined for ``self``,
    982981          otherwise a ``ValueError`` exception is raised.
    983982
  • sage/schemes/hyperelliptic_curves/jacobian_generic.py

    diff --git a/sage/schemes/hyperelliptic_curves/jacobian_generic.py b/sage/schemes/hyperelliptic_curves/jacobian_generic.py
    a b  
    129129        except AttributeError:
    130130            raise ValueError, "Arguments must determine a valid Mumford divisor."
    131131
    132     def _homset_class(self, *args, **kwds):
     132    def _point_homset_class(self, *args, **kwds):
    133133        return jacobian_homset.JacobianHomset_divisor_classes(*args, **kwds)
    134134
    135135    def _point_class(self, *args, **kwds):
  • sage/schemes/hyperelliptic_curves/jacobian_homset.py

    diff --git a/sage/schemes/hyperelliptic_curves/jacobian_homset.py b/sage/schemes/hyperelliptic_curves/jacobian_homset.py
    a b  
    4848#*****************************************************************************
    4949
    5050from sage.rings.all import is_Polynomial, PolynomialRing, Integer, is_Integer, ZZ
    51 from sage.schemes.generic.homset import SchemeHomset_coordinates
     51from sage.schemes.generic.homset import SchemeHomset_points
    5252from sage.schemes.generic.morphism import is_SchemeMorphism
    5353from sage.schemes.generic.spec import Spec, is_Spec
    5454from jacobian_morphism import JacobianMorphism_divisor_class_field
    5555
    56 class JacobianHomset_divisor_classes(SchemeHomset_coordinates):
     56class JacobianHomset_divisor_classes(SchemeHomset_points):
    5757    def __init__(self, Y, X, **kwds):
    5858        R = X.base_ring()
    5959        S = Y.coordinate_ring()
    60         SchemeHomset_coordinates.__init__(self, Y, X, **kwds)
     60        SchemeHomset_points.__init__(self, Y, X, **kwds)
    6161        P2 = X.curve()._printing_ring
    6262        if S != R:
    6363            y = str(P2.gen())
     
    156156        else:
    157157            return -1
    158158
    159     def _point_morphism_class(self, *args, **kwds):
     159    def _morphism_class(self, *args, **kwds):
    160160        return JacobianMorphism_divisor_class_field(*args, **kwds)
    161161
    162162    def curve(self):
  • sage/schemes/plane_conics/constructor.py

    diff --git a/sage/schemes/plane_conics/constructor.py b/sage/schemes/plane_conics/constructor.py
    a b  
    3333                            is_RationalField)
    3434from sage.rings.number_field.number_field import is_NumberField                           
    3535from sage.schemes.generic.all import ProjectiveSpace
    36 from sage.schemes.generic.morphism import (SchemeMorphism_affine_coordinates,
    37                             SchemeMorphism_projective_coordinates_field)
     36from sage.schemes.generic.morphism import (
     37    SchemeMorphism_point_affine, SchemeMorphism_point_projective_field)
    3838from sage.structure.all import Sequence
    3939from sage.structure.element import is_Matrix
    4040
     
    148148        if len(F) == 5:
    149149            L=[]
    150150            for f in F:
    151                 if isinstance(f, SchemeMorphism_affine_coordinates):
     151                if isinstance(f, SchemeMorphism_point_affine):
    152152                    C = Sequence(f, universe = base_field)
    153153                    if len(C) != 2:
    154154                        raise TypeError, "points in F (=%s) must be planar"%F
    155155                    C.append(1)
    156                 elif isinstance(f, SchemeMorphism_projective_coordinates_field):
     156                elif isinstance(f, SchemeMorphism_point_projective_field):
    157157                    C = Sequence(f, universe = base_field)
    158158                elif isinstance(f, (list, tuple)):
    159159                    C = Sequence(f, universe = base_field)