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)
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)
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)