Beispiel #1
0
    def super_categories(self):
        r"""
        Return the super categories of bases of (the Hopf dual of) the
        symmetric functions in non-commuting variables.

        OUTPUT:

        - a list of categories

        TESTS::

            sage: from sage.combinat.ncsym.bases import NCSymOrNCSymDualBases
            sage: NCSym = SymmetricFunctionsNonCommutingVariables(QQ)
            sage: NCSymOrNCSymDualBases(NCSym).super_categories()
            [Category of realizations of Symmetric functions in
              non-commuting variables over the Rational Field,
             Category of graded hopf algebras with basis over Rational Field,
             Join of Category of realizations of hopf algebras over Rational Field
              and Category of graded algebras over Rational Field]
        """
        R = self.base().base_ring()
        from sage.categories.graded_hopf_algebras_with_basis import GradedHopfAlgebrasWithBasis
        return [
            self.base().Realizations(),
            GradedHopfAlgebrasWithBasis(R),
            GradedHopfAlgebras(R).Realizations()
        ]
Beispiel #2
0
    def __init__(self, M, prefix='T', category=None, **options):
        r"""
        Initialize ``self``.

        EXAMPLES::

            sage: C = CombinatorialFreeModule(QQ, ['a','b','c'])
            sage: TA = TensorAlgebra(C)
            sage: TestSuite(TA).run()
            sage: m = SymmetricFunctions(QQ).m()
            sage: Tm = TensorAlgebra(m)
            sage: TestSuite(Tm).run()
        """
        self._base_module = M
        R = M.base_ring()
        category = GradedHopfAlgebrasWithBasis(
            R.category()).or_subcategory(category)

        CombinatorialFreeModule.__init__(self,
                                         R,
                                         IndexedFreeMonoid(M.indices()),
                                         prefix=prefix,
                                         category=category,
                                         **options)

        # the following is not the best option, but it's better than nothing.
        self._print_options['tensor_symbol'] = options.get(
            'tensor_symbol', tensor.symbol)
Beispiel #3
0
    def __init__(self, R, names, prefix):
        r"""
        Initialize ``self``.

        EXAMPLES::

            sage: F = ShuffleAlgebra(QQ, 'xyz'); F
            Shuffle Algebra on 3 generators ['x', 'y', 'z'] over Rational Field
            sage: TestSuite(F).run()  # long time

        TESTS::

            sage: ShuffleAlgebra(24, 'toto')
            Traceback (most recent call last):
            ...
            TypeError: argument R must be a ring

            sage: F = ShuffleAlgebra(QQ, 'xyz', prefix='f'); F
            Shuffle Algebra on 3 generators ['x', 'y', 'z'] over Rational Field
            sage: F.gens()
            Family (f[word: x], f[word: y], f[word: z])
        """
        if R not in Rings():
            raise TypeError("argument R must be a ring")
        self._alphabet = names
        self.__ngens = self._alphabet.cardinality()
        cat = GradedHopfAlgebrasWithBasis(R).Commutative().Connected()
        CombinatorialFreeModule.__init__(self,
                                         R,
                                         Words(names, infinite=False),
                                         latex_prefix="",
                                         prefix=prefix,
                                         category=cat)
Beispiel #4
0
    def super_categories(self):
        r"""
        The super categories of ``self``.

        EXAMPLES::

            sage: Sym = SymmetricFunctions(QQ['t'])
            sage: from sage.combinat.sf.new_kschur import KBoundedSubspaceBases
            sage: KB = Sym.kBoundedSubspace(3)
            sage: KBB = KBoundedSubspaceBases(KB); KBB
            Category of k bounded subspace bases of 3-bounded Symmetric Functions over Univariate Polynomial Ring in t over Rational Field
            sage: KBB.super_categories()
            [Category of realizations of 3-bounded Symmetric Functions over Univariate Polynomial Ring in t over Rational Field, Join of Category of graded coalgebras with basis over Univariate Polynomial Ring in t over Rational Field and Category of subobjects of sets]
        """
        R = self.base().base_ring()
        category = GradedHopfAlgebrasWithBasis(R) if self.t == 1 else GradedCoalgebrasWithBasis(R)
        return [Realizations(self.base()), category.Subobjects()]
    def __init__(self, base_ring):
        """
        EXAMPLES::

            sage: H = GradedHopfAlgebrasWithBasis(QQ).Connected().example()
            sage: TestSuite(H).run()

        """
        CombinatorialFreeModule.__init__(
            self,
            base_ring,
            NonNegativeIntegers(),
            category=GradedHopfAlgebrasWithBasis(base_ring).Connected())
Beispiel #6
0
    def __init__(self, Y):
        """
        Initialize ``self``.

        EXAMPLES::

            sage: grY = Yangian(QQ, 4).graded_algebra()
            sage: TestSuite(grY).run()  # long time
        """
        if Y._filtration != 'loop':
            raise ValueError("the Yangian must have the loop filtration")
        cat = GradedHopfAlgebrasWithBasis(Y.base_ring())
        GradedYangianBase.__init__(self, Y, cat)
Beispiel #7
0
    def __init__(self, Y):
        """
        Initialize ``self``.

        EXAMPLES::

            sage: grY = Yangian(QQ, 4, filtration='natural').graded_algebra()
            sage: TestSuite(grY).run(skip='_test_antipode')
        """
        if Y._filtration != 'natural':
            raise ValueError("the Yangian must have the natural filtration")
        cat = GradedHopfAlgebrasWithBasis(Y.base_ring()).Connected().Commutative()
        GradedYangianBase.__init__(self, Y, cat)
Beispiel #8
0
    def __init__(self, R, names):
        """
        Initialize ``self``.

        EXAMPLES::

            sage: D = ShuffleAlgebra(QQ, 'ab').dual_pbw_basis()
            sage: TestSuite(D).run()  # long time
        """
        self._alphabet = names
        self._alg = ShuffleAlgebra(R, names)
        cat = GradedHopfAlgebrasWithBasis(R).Commutative().Connected()
        CombinatorialFreeModule.__init__(self, R, Words(names), prefix='S',
                                         category=cat)
Beispiel #9
0
    def super_categories(self):
        r"""
        TESTS::

            sage: from sage.combinat.ncsf_qsym.generic_basis_code import BasesOfQSymOrNCSF
            sage: QSym = QuasiSymmetricFunctions(QQ)
            sage: BasesOfQSymOrNCSF(QSym).super_categories()
            [Category of realizations of Quasisymmetric functions over the Rational Field,
             Category of graded hopf algebras with basis over Rational Field,
             Join of Category of graded hopf algebras over Rational Field and Category of realizations of hopf algebras over Rational Field]

        """
        R = self.base().base_ring()
        from sage.categories.graded_hopf_algebras_with_basis import GradedHopfAlgebrasWithBasis
        from sage.categories.graded_hopf_algebras import GradedHopfAlgebras
        return [self.base().Realizations(),
                GradedHopfAlgebrasWithBasis(R),
                GradedHopfAlgebras(R).Realizations()]