def __init__(self, base_ring, n, variable_name, filtration): r""" Initialize ``self``. EXAMPLES:: sage: Y = Yangian(QQ, 4, filtration='loop') sage: TestSuite(Y).run(skip="_test_antipode") # Not implemented sage: Y = Yangian(QQ, 4, filtration='natural') sage: G = Y.algebra_generators() sage: elts = [Y.one(), G[1,2,2], G[1,1,4], G[3,3,1], G[1,2,1]*G[2,1,4]] sage: TestSuite(Y).run(elements=elts) # long time """ self._n = n self._filtration = filtration category = HopfAlgebrasWithBasis(base_ring).Filtered() if filtration == 'natural': category = category.Connected() self._index_set = tuple(range(1, n + 1)) # The keys for the basis are tuples (l, i, j) indices = GeneratorIndexingSet(self._index_set) # We note that the generators are non-commutative, but we always sort # them, so they are, in effect, indexed by the free abelian monoid basis_keys = IndexedFreeAbelianMonoid(indices, bracket=False, prefix=variable_name) CombinatorialFreeModule.__init__(self, base_ring, basis_keys, sorting_key=Yangian._term_key, prefix=variable_name, category=category)
def __init__(self, base_ring, n, level, variable_name, filtration): """ Initialize ``self``. EXAMPLES:: sage: Y = Yangian(QQ, 4, 3) sage: TestSuite(Y).run(skip="_test_antipode") """ self._level = level self._n = n self._filtration = filtration category = HopfAlgebrasWithBasis(base_ring).Filtered() self._index_set = tuple(range(1, n + 1)) # The keys for the basis are tuples (l, i, j) indices = GeneratorIndexingSet(self._index_set, level) # We note that the generators are non-commutative, but we always sort # them, so they are, in effect, indexed by the free abelian monoid basis_keys = IndexedFreeAbelianMonoid(indices, bracket=False, prefix=variable_name) CombinatorialFreeModule.__init__(self, base_ring, basis_keys, prefix=variable_name, category=category)
def extra_super_categories(self): """ EXAMPLES:: sage: Groups().Algebras(QQ).super_categories() [Category of hopf algebras with basis over Rational Field, Category of monoid algebras over Rational Field] """ from sage.categories.hopf_algebras_with_basis import HopfAlgebrasWithBasis return [HopfAlgebrasWithBasis(self.base_ring())]
def __init__(self, base_ring, q, prefix='H'): """ Initialize ``self``. EXAMPLES:: sage: R.<q> = ZZ[] sage: H = HallAlgebra(R, q) sage: TestSuite(H).run() sage: R = PolynomialRing(ZZ, 'q').fraction_field() sage: q = R.gen() sage: H = HallAlgebra(R, q) sage: TestSuite(H).run() # long time sage: R.<q> = LaurentPolynomialRing(ZZ) sage: H = HallAlgebra(R, q) sage: TestSuite(H).run() # long time """ self._q = q try: q_inverse = q**-1 if not q_inverse in base_ring: hopf_structure = False else: hopf_structure = True except Exception: hopf_structure = False if hopf_structure: category = HopfAlgebrasWithBasis(base_ring) else: category = AlgebrasWithBasis(base_ring) CombinatorialFreeModule.__init__(self, base_ring, Partitions(), prefix=prefix, bracket=False, sorting_key=cmp_to_key(transpose_cmp), category=category) # Coercions I = self.monomial_basis() M = I.module_morphism(I._to_natural_on_basis, codomain=self, triangular='upper', unitriangular=True, inverse_on_support=lambda x: x.conjugate(), invertible=True) M.register_as_coercion() (~M).register_as_coercion()
def __init__(self, base_ring, q, prefix='I'): """ Initialize ``self``. EXAMPLES:: sage: R.<q> = ZZ[] sage: I = HallAlgebra(R, q).monomial_basis() sage: TestSuite(I).run() sage: R = PolynomialRing(ZZ, 'q').fraction_field() sage: q = R.gen() sage: I = HallAlgebra(R, q).monomial_basis() sage: TestSuite(I).run() sage: R.<q> = LaurentPolynomialRing(ZZ) sage: I = HallAlgebra(R, q).monomial_basis() sage: TestSuite(I).run() """ self._q = q try: q_inverse = q**-1 if not q_inverse in base_ring: hopf_structure = False else: hopf_structure = True except Exception: hopf_structure = False if hopf_structure: category = HopfAlgebrasWithBasis(base_ring) else: category = AlgebrasWithBasis(base_ring) CombinatorialFreeModule.__init__(self, base_ring, Partitions(), prefix=prefix, bracket=False, category=category) # Coercions if hopf_structure: e = SymmetricFunctions(base_ring).e() f = lambda la: q**sum(-((r * (r - 1)) // 2) for r in la) M = self.module_morphism(diagonal=f, codomain=e) M.register_as_coercion() (~M).register_as_coercion()
def extra_super_categories(self): """ EXAMPLES:: sage: Groups().Algebras(QQ).super_categories() [Category of hopf algebras with basis over Rational Field, Category of monoid algebras over Rational Field] sage: Groups().example().algebra(ZZ).categories() [Category of group algebras over Integer Ring, Category of hopf algebras with basis over Integer Ring, Category of bialgebras with basis over Integer Ring, Category of monoid algebras over Integer Ring, Category of semigroup algebras over Integer Ring, Category of algebras with basis over Integer Ring, Category of coalgebras with basis over Integer Ring, Category of set algebras over Integer Ring, Category of modules with basis over Integer Ring, Category of hopf algebras over Integer Ring, Category of bialgebras over Integer Ring, Category of algebras over Integer Ring, Category of rings, Category of rngs, Category of coalgebras over Integer Ring, Category of modules over Integer Ring, Category of bimodules over Integer Ring on the left and Integer Ring on the right, Category of left modules over Integer Ring, Category of right modules over Integer Ring, Category of commutative additive groups, Category of semirings, Category of commutative additive monoids, Category of commutative additive semigroups, Category of additive magmas, Category of monoids, Category of semigroups, Category of magmas, Category of sets, Category of sets with partial maps, Category of objects] """ from sage.categories.hopf_algebras_with_basis import HopfAlgebrasWithBasis return [HopfAlgebrasWithBasis(self.base_ring())]