示例#1
0
    def __init__(self, n, R, names):
        """
        EXAMPLES::

            sage: AffineSpace(3, Zp(5), 'y')
            Affine Space of dimension 3 over 5-adic Ring with capped relative precision 20
        """
        AmbientSpace.__init__(self, n, R)
        self._assign_names(names)
        AffineScheme.__init__(self, self.coordinate_ring(), R)
示例#2
0
    def __init__(self, n, R=ZZ, names=None):
        """
        EXAMPLES::

            sage: ProjectiveSpace(3, Zp(5), 'y')
            Projective Space of dimension 3 over 5-adic Ring with capped relative precision 20
        """
        names = normalize_names(n + 1, names)
        AmbientSpace.__init__(self, n, R)
        self._assign_names(names)
示例#3
0
    def __init__(self, n, R, names):
        """
        EXAMPLES::

            sage: AffineSpace(3, Zp(5), 'y')
            Affine Space of dimension 3 over 5-adic Ring with capped relative precision 20
        """
        AmbientSpace.__init__(self, n, R)
        self._assign_names(names)
        AffineScheme.__init__(self, self.coordinate_ring(), R)
示例#4
0
    def __init__(self, n, R, names):
        """
        EXAMPLES::

            sage: AffineSpace(3, Zp(5), 'y')
            Affine Space of dimension 3 over 5-adic Ring with capped relative precision 20
        """
        names = normalize_names(n, names)
        AmbientSpace.__init__(self, n, R)
        self._assign_names(names)
示例#5
0
    def __init__(self, n, R=ZZ, names=None):
        """
        EXAMPLES::

            sage: ProjectiveSpace(3, Zp(5), 'y')
            Projective Space of dimension 3 over 5-adic Ring with capped relative precision 20
        """
        names = normalize_names(n+1, names)
        AmbientSpace.__init__(self, n, R)
        self._assign_names(names)
示例#6
0
    def __init__(self, N, R=QQ, names=None):
        r"""
        The Python constructor.

        INPUT:

        - ``N`` - a list or tuple of positive integers.

        - ``R`` - a ring.

        - ``names`` - a tuple or list of strings. This must either be a single variable name
                    or the complete list of variables.

        EXAMPLES::

            sage: T.<x,y,z,u,v,w> = ProductProjectiveSpaces([2, 2], QQ)
            sage: T
            Product of projective spaces P^2 x P^2 over Rational Field
            sage: T.coordinate_ring()
            Multivariate Polynomial Ring in x, y, z, u, v, w over Rational Field
            sage: T[1].coordinate_ring()
            Multivariate Polynomial Ring in u, v, w over Rational Field

        ::

            sage: ProductProjectiveSpaces([1,1,1],ZZ, ['x', 'y', 'z', 'u', 'v', 'w'])
            Product of projective spaces P^1 x P^1 x P^1 over Integer Ring

        ::

            sage: T = ProductProjectiveSpaces([1, 1], QQ, 'z')
            sage: T.coordinate_ring()
            Multivariate Polynomial Ring in z0, z1, z2, z3 over Rational Field
        """
        assert isinstance(N, (tuple, list))
        N = [Integer(n) for n in N]
        assert isinstance(R, CommutativeRing)
        if len(N) < 2:
            raise ValueError("must be at least two components for a product")
        AmbientSpace.__init__(self, sum(N), R)
        self._dims = N
        start = 0
        self._components = []
        for i in range(len(N)):
            self._components.append(
                ProjectiveSpace(N[i], R, names[start:start + N[i] + 1]))
            start += N[i] + 1
        #Note that the coordinate ring should really be the tensor product of the component
        #coordinate rings. But we just deal with them as multihomogeneous polynomial rings
        self._coordinate_ring = PolynomialRing(R, sum(N) + len(N), names)
        self._assign_names(names)
示例#7
0
    def __init__(self, N, R = QQ, names = None):
        r"""
        The Python constructor.

        INPUT:

        - ``N`` - a list or tuple of positive integers.

        - ``R`` - a ring.

        - ``names`` - a tuple or list of strings. This must either be a single variable name
                    or the complete list of variables.

        EXAMPLES::

            sage: T.<x,y,z,u,v,w> = ProductProjectiveSpaces([2, 2], QQ)
            sage: T
            Product of projective spaces P^2 x P^2 over Rational Field
            sage: T.coordinate_ring()
            Multivariate Polynomial Ring in x, y, z, u, v, w over Rational Field
            sage: T[1].coordinate_ring()
            Multivariate Polynomial Ring in u, v, w over Rational Field

        ::

            sage: ProductProjectiveSpaces([1,1,1],ZZ, ['x', 'y', 'z', 'u', 'v', 'w'])
            Product of projective spaces P^1 x P^1 x P^1 over Integer Ring

        ::

            sage: T = ProductProjectiveSpaces([1, 1], QQ, 'z')
            sage: T.coordinate_ring()
            Multivariate Polynomial Ring in z0, z1, z2, z3 over Rational Field
        """
        assert isinstance(N, (tuple, list))
        N = [Integer(n) for n in N]
        assert isinstance(R, CommutativeRing)
        if len(N) < 2:
            raise ValueError("must be at least two components for a product")
        AmbientSpace.__init__(self, sum(N), R)
        self._dims = N
        start = 0
        self._components = []
        for i in range(len(N)):
            self._components.append(ProjectiveSpace(N[i],R,names[start:start+N[i]+1]))
            start += N[i]+1
        #Note that the coordinate ring should really be the tensor product of the component
        #coordinate rings. But we just deal with them as multihomogeneous polynomial rings
        self._coordinate_ring = PolynomialRing(R,sum(N)+ len(N),names)
        self._assign_names(names)
示例#8
0
    def __init__(self, n, R, names, ambient_projective_space, default_embedding_index):
        """
        EXAMPLES::

            sage: AffineSpace(3, Zp(5), 'y')
            Affine Space of dimension 3 over 5-adic Ring with capped relative precision 20
        """
        AmbientSpace.__init__(self, n, R)
        self._assign_names(names)
        AffineScheme.__init__(self, self.coordinate_ring(), R)

        index = default_embedding_index
        if index is not None:
            index = int(index)

        self._default_embedding_index = index
        self._ambient_projective_space = ambient_projective_space