Пример #1
0
    def __init__(self, m, n, q, bar, R):
        """
        Initialize ``self``.

        TESTS::

            sage: O = algebras.QuantumMatrixCoordinate(4)
            sage: TestSuite(O).run()

            sage: O = algebras.QuantumMatrixCoordinate(10)
            sage: O.variable_names()
            ('x0101', ..., 'x1010')
            sage: O = algebras.QuantumMatrixCoordinate(11,3)
            sage: O.variable_names()
            ('x011', ..., 'x113')
            sage: O = algebras.QuantumMatrixCoordinate(3,11)
            sage: O.variable_names()
            ('x101', ..., 'x311')
        """
        gp_indices = [(i, j) for i in range(1, m + 1) for j in range(1, n + 1)]

        if m == n:
            cat = Bialgebras(R.category()).WithBasis()
        else:
            cat = Algebras(R.category()).WithBasis()

        self._m = m
        QuantumMatrixCoordinateAlgebra_abstract.__init__(
            self, gp_indices, n, q, bar, R, cat)
        # Set the names
        mb = len(str(m))
        nb = len(str(n))
        base = 'x{{:0>{}}}{{:0>{}}}'.format(mb, nb)
        names = [base.format(*k) for k in gp_indices]
        self._assign_names(names)
Пример #2
0
    def super_categories(self):
        """
        EXAMPLES::

            sage: HopfAlgebras(QQ).super_categories()
            [Category of bialgebras over Rational Field]
        """
        R = self.base_ring()
        return [Bialgebras(R)]
Пример #3
0
        def extra_super_categories(self):
            """
            The algebra of a monoid is a bialgebra and a monoid.

            EXAMPLES::

                sage: C = Monoids().Algebras(QQ)
                sage: C.extra_super_categories()
                [Category of bialgebras over Rational Field,
                 Category of monoids]
                sage: Monoids().Algebras(QQ).super_categories()
                [Category of bialgebras with basis over Rational Field,
                 Category of semigroup algebras over Rational Field,
                 Category of unital magma algebras over Rational Field]
            """
            from sage.categories.bialgebras import Bialgebras
            return [Bialgebras(self.base_ring()), Monoids()]
    def __init__(self, m, n, q, bar, R):
        """
        Initialize ``self``.

        TESTS::

            sage: O = algebras.QuantumMatrixCoordinate(4)
            sage: TestSuite(O).run()
        """
        gp_indices = [(i, j) for i in range(1, m + 1) for j in range(1, n + 1)]

        if m == n:
            cat = Bialgebras(R.category()).WithBasis()
        else:
            cat = Algebras(R.category()).WithBasis()

        self._m = m
        QuantumMatrixCoordinateAlgebra_abstract.__init__(self, gp_indices, n, q, bar, R, cat)
        # Set the names
        names = ['x{}{}'.format(*k) for k in gp_indices]
        self._assign_names(names)