Exemplo n.º 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)
Exemplo n.º 2
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)
Exemplo n.º 3
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
Exemplo n.º 4
0
Arquivo: spec.py Projeto: chos9/sage
    def __init__(self, R, S=None):
        """
        Construct the spectrum of the ring ``R``.

        See :class:`Spec` for details.

        EXAMPLES::

            sage: Spec(ZZ)
            Spectrum of Integer Ring
        """
        if not is_CommutativeRing(R):
            raise TypeError, "R (=%s) must be a commutative ring"%R
        self.__R = R
        if not S is None:
            if not is_CommutativeRing(S):
                raise TypeError, "S (=%s) must be a commutative ring"%S
            try:
                S.hom(R)
            except TypeError:
                raise ValueError, "There must be a natural map S --> R, but S = %s and R = %s"%(S,R)
        AffineScheme.__init__(self, S)
Exemplo n.º 5
0
    def __init__(self, R, S=None):
        """
        Construct the spectrum of the ring ``R``.

        See :class:`Spec` for details.

        EXAMPLES::

            sage: Spec(ZZ)
            Spectrum of Integer Ring
        """
        if not is_CommutativeRing(R):
            raise TypeError("R (=%s) must be a commutative ring"%R)
        self.__R = R
        if not S is None:
            if not is_CommutativeRing(S):
                raise TypeError("S (=%s) must be a commutative ring"%S)
            try:
                S.hom(R)
            except TypeError:
                raise ValueError("There must be a natural map S --> R, but S = %s and R = %s"%(S,R))
        AffineScheme.__init__(self, S)