コード例 #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)