def __init__(self, group, base_ring=IntegerRing()): r""" See :class:`GroupAlgebra` for full documentation. EXAMPLES:: sage: GroupAlgebra(GL(3, GF(7))) Group algebra of group "General Linear Group of degree 3 over Finite Field of size 7" over base ring Integer Ring """ from sage.groups.group import Group from sage.groups.old import Group as OldGroup if not base_ring.is_commutative(): raise NotImplementedError("Base ring must be commutative") if not isinstance(group, (Group, OldGroup)): raise TypeError('"%s" is not a group' % group) self._group = group CombinatorialFreeModule.__init__(self, base_ring, group, prefix='', bracket=False, category=HopfAlgebrasWithBasis(base_ring)) if not base_ring.has_coerce_map_from(group) : ## some matrix groups assume that coercion is only valid to ## other matrix groups. This is a workaround ## call _element_constructor_ to coerce group elements #try : self._populate_coercion_lists_(coerce_list=[base_ring, group]) #except TypeError : # self._populate_coercion_lists_( coerce_list = [base_ring] ) else : self._populate_coercion_lists_(coerce_list=[base_ring])
def super_categories(self): """ EXAMPLES:: sage: FiniteDimensionalHopfAlgebrasWithBasis(QQ).super_categories() [Category of finite dimensional bialgebras with basis over Rational Field, Category of hopf algebras with basis over Rational Field] """ R = self.base_ring() return [FiniteDimensionalBialgebrasWithBasis(R), HopfAlgebrasWithBasis(R)]
def __init__(self, R, G): """ EXAMPLES:: sage: from sage.categories.examples.hopf_algebras_with_basis import MyGroupAlgebra sage: A = MyGroupAlgebra(QQ, DihedralGroup(6)) sage: A.category() Category of hopf algebras with basis over Rational Field sage: TestSuite(A).run() """ self._group = G CombinatorialFreeModule.__init__(self, R, G, category = HopfAlgebrasWithBasis(R))
def super_categories(self): """ EXAMPLES:: sage: GradedHopfAlgebrasWithBasis(QQ).super_categories() [Category of graded bialgebras with basis over Rational Field, Category of graded hopf algebras over Rational Field, Category of hopf algebras with basis over Rational Field] """ R = self.base_ring() return [ GradedBialgebrasWithBasis(R), GradedHopfAlgebras(R), HopfAlgebrasWithBasis(R) ]