Пример #1
0
    def __init__(self, R):
        """
        TESTS::

            sage: PolyhedralSets(AA)
            Category of polyhedral sets over Algebraic Real Field
        """
        Category_over_base_ring.__init__(self, R)
Пример #2
0
    def __init__(self, R):
        """
        TESTS::

            sage: PolyhedralSets(AA)
            Category of polyhedral sets over Algebraic Real Field
        """
        Category_over_base_ring.__init__(self, R)
Пример #3
0
    def __init__(self, R):
        """
        TESTS::

            sage: PolyhedralSets((1,2,3))
            Traceback (most recent call last):
            ...
            TypeError: base ring R (=(1, 2, 3)) must be ZZ, QQ, or RDF.
        """
        from sage.rings.all import ZZ, QQ, RDF
        if R not in [ZZ, QQ, RDF]:
            raise TypeError('base ring R (='+str(R)+') must be ZZ, QQ, or RDF.')
        Category_over_base_ring.__init__(self, R, 'Polyhedra')
Пример #4
0
    def __init__(self, base, name=None):
        r"""
        Initialize ``self``.

        EXAMPLES::

            sage: from sage.categories.manifolds import Manifolds
            sage: C = Manifolds(RR)
            sage: TestSuite(C).run(skip="_test_category_over_bases")
        """
        if base not in Fields().Topological():
            raise ValueError("base must be a topological field")
        Category_over_base_ring.__init__(self, base, name)
Пример #5
0
    def __init__(self, base, name=None):
        r"""
        Initialize ``self``.

        EXAMPLES::

            sage: from sage.categories.manifolds import Manifolds
            sage: C = Manifolds(RR)
            sage: TestSuite(C).run(skip="_test_category_over_bases")
        """
        if base not in Fields().Topological():
            raise ValueError("base must be a topological field")
        Category_over_base_ring.__init__(self, base, name)
Пример #6
0
    def __init__(self, base_space, base_field, name=None):
        r"""
        Initialize ``self``.

        EXAMPLES::

            sage: M = Manifold(2, 'M')
            sage: from sage.categories.vector_bundles import VectorBundles
            sage: C = VectorBundles(M, RR)
            sage: TestSuite(C).run(skip="_test_category_over_bases")

        """
        if base_field not in Fields().Topological():
            raise ValueError("base field must be a topological field")
        self._base_space = base_space
        Category_over_base_ring.__init__(self, base_field, name)
Пример #7
0
    def __init__(self, base_category, base_ring):
        """
        EXAMPLES::

            sage: C = Semigroups().Algebras(QQ)
            sage: C
            Category of semigroup algebras over Rational Field
            sage: C.base_category()
            Category of semigroups
            sage: C.super_categories()
            [Category of algebras with basis over Rational Field, Category of set algebras over Rational Field]

        TESTS::

            sage: C._short_name()
            'Algebras'
            sage: latex(C) # todo: improve that
            \mathbf{Algebras}(\mathbf{Semigroups})
        """
        CovariantConstructionCategory.__init__(self, base_category, base_ring)
        Category_over_base_ring.__init__(self, base_ring)
Пример #8
0
    def _repr_object_names(self):
        r"""
        Return the name of the objects of this category.

        .. SEEALSO:: :meth:`Category._repr_object_names`

        EXAMPLES::

            sage: M = Manifold(2, 'M')
            sage: from sage.categories.vector_bundles import VectorBundles
            sage: VectorBundles(M, RR)._repr_object_names()
            'vector bundles over Real Field with 53 bits of precision with base
             space 2-dimensional differentiable manifold M'

        """
        base_space = self._base_space
        return Category_over_base_ring._repr_object_names(self) + \
               " with base space %s"%base_space
Пример #9
0
 def __init__(self, R):
     Category_over_base_ring.__init__(self, R)