示例#1
0
    def __call__(self, P):
        r"""
        Make morphisms callable.

        INPUT:

        - ``P`` -- a scheme point.

        OUTPUT:

        The image scheme point.

        EXAMPLES::

            sage: R.<x> = PolynomialRing(QQ)
            sage: phi = R.hom([QQ(7)])
            sage: X = Spec(QQ); Y = Spec(R)
            sage: f = X.hom(phi)
            sage: f(X.an_element())
            Traceback (most recent call last):
            ...
            NotImplementedError
        """
        if not is_SchemeTopologicalPoint(P) and P in self.domain():
            raise TypeError, "P (=%s) must be a topological scheme point of %s" % (
                P, self)
        S = self.ring_homomorphism().inverse_image(P.prime_ideal())
        return self.codomain()(S)
示例#2
0
文件: morphism.py 项目: dagss/sage
    def __call__(self, P):
        r"""
        Make morphisms callable.

        INPUT:

        - ``P`` -- a scheme point.

        OUTPUT:

        The image scheme point.

        EXAMPLES::

            sage: R.<x> = PolynomialRing(QQ)
            sage: phi = R.hom([QQ(7)])
            sage: X = Spec(QQ); Y = Spec(R)
            sage: f = X.hom(phi)
            sage: f(X.an_element())
            Traceback (most recent call last):
            ...
            NotImplementedError
        """
        if not is_SchemeTopologicalPoint(P) and P in self.domain():
            raise TypeError, "P (=%s) must be a topological scheme point of %s"%(P, self)
        S = self.ring_homomorphism().inverse_image(P.prime_ideal())
        return self.codomain()(S)
示例#3
0
 def __call__(self, P):
     if not is_SchemeTopologicalPoint(P) and P in self.domain():
         raise TypeError, "P (=%s) must be a topological scheme point of %s"%(P, self)
     S = self.ring_homomorphism().inverse_image(P.prime_ideal())
     return self.codomain()(S)