# Ticket #12734: trac_12734-point_scheme.2.patch

File trac_12734-point_scheme.2.patch, 2.0 KB (added by AlexGhitza, 9 years ago)
• ## sage/schemes/generic/spec.py

```# HG changeset patch
# User Alexandru Ghitza <aghitza@alum.mit.edu>
# Date 1374735191 -36000
#      Thu Jul 25 16:53:11 2013 +1000
# Node ID fc682a627ecf4c365ca1efeb5a3c545e156e1f11
# Parent  72bcd2f7a7b59ca30b86d3a1b409c54672d73afb
trac 12734: make call syntax of Spec more consistent

diff --git a/sage/schemes/generic/spec.py b/sage/schemes/generic/spec.py```
 a """ Call syntax for Spec. INPUT: INPUT/OUTPUT: - ``x`` -- a prime ideal of the coordinate ring, or an element (or list of elements) of the coordinate ring which generates a prime ideal. The argument ``x`` must be one of the following: OUTPUT: - a prime ideal of the coordinate ring; the output will be the corresponding point of X A point of this Spec. - an element (or list of elements) of the coordinate ring which generates a prime ideal; the output will be the corresponding point of X - a ring or a scheme S; the output will be the set X(S) of S-valued points on X EXAMPLES:: Point on Spectrum of Multivariate Polynomial Ring in x, y, z over Rational Field defined by the Ideal (x, y, z) of Multivariate Polynomial Ring in x, y, z over Rational Field This indicates the fix of :trac:`12734`:: sage: S = Spec(ZZ) sage: S(ZZ) Set of rational points of Spectrum of Integer Ring sage: S(S) Set of rational points of Spectrum of Integer Ring """ if is_CommutativeRing(x): return self.point_homset(x) from sage.schemes.all import is_Scheme if is_Scheme(x): return x.Hom(self) return SchemeTopologicalPoint_prime_ideal(self, x) def _an_element_(self):