112
112
from sage .misc .cachefunc import cached_method
113
113
from sage .categories .pushout import ConstructionFunctor
114
114
from sage .combinat .free_module import CombinatorialFreeModule
115
- from sage .categories .all import Rings , HopfAlgebrasWithBasis , Hom
115
+ from sage .categories .all import Rings , GroupAlgebras , Hom
116
116
from sage .categories .morphism import SetMorphism
117
117
118
118
@@ -133,7 +133,7 @@ class GroupAlgebraFunctor (ConstructionFunctor) :
133
133
sage: loads(dumps(F)) == F
134
134
True
135
135
sage: GroupAlgebra(SU(2, GF(4, 'a')), IntegerModRing(12)).category()
136
- Category of hopf algebras with basis over Ring of integers modulo 12
136
+ Category of group algebras over Ring of integers modulo 12
137
137
"""
138
138
def __init__ (self , group ) :
139
139
r"""
@@ -143,7 +143,7 @@ def __init__(self, group) :
143
143
144
144
sage: from sage.algebras.group_algebra_new import GroupAlgebraFunctor
145
145
sage: GroupAlgebra(SU(2, GF(4, 'a')), IntegerModRing(12)).category()
146
- Category of hopf algebras with basis over Ring of integers modulo 12
146
+ Category of group algebras over Ring of integers modulo 12
147
147
"""
148
148
self .__group = group
149
149
@@ -206,7 +206,7 @@ def _apply_functor_to_morphism(self, f) :
206
206
codomain = self (f .codomain ())
207
207
return SetMorphism (Hom (self (f .domain ()), codomain , Rings ()), lambda x : sum (codomain (g ) * f (c ) for (g , c ) in dict (x ).iteritems ()))
208
208
209
- class GroupAlgebra (CombinatorialFreeModule , Algebra ):
209
+ class GroupAlgebra (CombinatorialFreeModule ):
210
210
r"""
211
211
Create the given group algebra.
212
212
@@ -231,10 +231,51 @@ class GroupAlgebra(CombinatorialFreeModule, Algebra):
231
231
TypeError: "1" is not a group
232
232
233
233
sage: GroupAlgebra(SU(2, GF(4, 'a')), IntegerModRing(12)).category()
234
- Category of hopf algebras with basis over Ring of integers modulo 12
234
+ Category of group algebras over Ring of integers modulo 12
235
235
sage: GroupAlgebra(KleinFourGroup()) is GroupAlgebra(KleinFourGroup())
236
236
True
237
237
238
+ The one of the group indexes the one of this algebra::
239
+
240
+ sage: A = GroupAlgebra(DihedralGroup(6), QQ)
241
+ sage: A.one_basis()
242
+ ()
243
+ sage: A.one()
244
+ ()
245
+
246
+ The product of two basis elements is induced by the product of the
247
+ corresponding elements of the group::
248
+
249
+ sage: A = GroupAlgebra(DihedralGroup(3), QQ)
250
+ sage: (a, b) = A._group.gens()
251
+ sage: a*b
252
+ (1,2)
253
+ sage: A.product_on_basis(a, b)
254
+ (1,2)
255
+
256
+ The basis elements are group-like for the coproduct:
257
+ `\Delta(g) = g \otimes g`::
258
+
259
+ sage: A = GroupAlgebra(DihedralGroup(3), QQ)
260
+ sage: (a, b) = A._group.gens()
261
+ sage: A.coproduct_on_basis(a)
262
+ (1,2,3) # (1,2,3)
263
+
264
+ The counit on the basis elements is 1::
265
+
266
+ sage: A = GroupAlgebra(DihedralGroup(6), QQ)
267
+ sage: (a, b) = A._group.gens()
268
+ sage: A.counit_on_basis(a)
269
+ 1
270
+
271
+ The antipode on basis elements is given by `\chi(g) = g^{-1}`::
272
+
273
+ sage: A = GroupAlgebra(DihedralGroup(3), QQ)
274
+ sage: (a, b) = A._group.gens(); a
275
+ (1,2,3)
276
+ sage: A.antipode_on_basis(a)
277
+ (1,3,2)
278
+
238
279
TESTS::
239
280
240
281
sage: A = GroupAlgebra(GL(3, GF(7)))
@@ -266,56 +307,17 @@ def __init__(self, group, base_ring=IntegerRing()):
266
307
CombinatorialFreeModule .__init__ (self , base_ring , group ,
267
308
prefix = '' ,
268
309
bracket = False ,
269
- category = HopfAlgebrasWithBasis (base_ring ))
310
+ category = GroupAlgebras (base_ring ))
270
311
271
312
if not base_ring .has_coerce_map_from (group ) :
272
313
## some matrix groups assume that coercion is only valid to
273
314
## other matrix groups. This is a workaround
274
315
## call _element_constructor_ to coerce group elements
275
316
#try :
276
- self ._populate_coercion_lists_ (coerce_list = [base_ring , group ])
277
- #except TypeError :
278
- # self._populate_coercion_lists_( coerce_list = [base_ring] )
279
- else :
280
- self ._populate_coercion_lists_ (coerce_list = [base_ring ])
317
+ self ._populate_coercion_lists_ (coerce_list = [group ])
281
318
282
319
# Methods taken from sage.categories.examples.hopf_algebras_with_basis:
283
320
284
- @cached_method
285
- def one_basis (self ):
286
- """
287
- Returns the one of the group, which indexes the one of this
288
- algebra, as per :meth:`AlgebrasWithBasis.ParentMethods.one_basis`.
289
-
290
- EXAMPLES::
291
-
292
- sage: A = GroupAlgebra(DihedralGroup(6), QQ)
293
- sage: A.one_basis()
294
- ()
295
- sage: A.one()
296
- ()
297
- """
298
- return self ._group .one ()
299
-
300
- def product_on_basis (self , g1 , g2 ):
301
- r"""
302
- Product, on basis elements, as per
303
- :meth:`AlgebrasWithBasis.ParentMethods.product_on_basis`.
304
-
305
- The product of two basis elements is induced by the product of
306
- the corresponding elements of the group.
307
-
308
- EXAMPLES::
309
-
310
- sage: A = GroupAlgebra(DihedralGroup(3), QQ)
311
- sage: (a, b) = A._group.gens()
312
- sage: a*b
313
- (1,2)
314
- sage: A.product_on_basis(a, b)
315
- (1,2)
316
- """
317
- return self .basis ()[g1 * g2 ]
318
-
319
321
@cached_method
320
322
def algebra_generators (self ):
321
323
r"""
@@ -336,53 +338,6 @@ def algebra_generators(self):
336
338
337
339
gens = algebra_generators
338
340
339
- def coproduct_on_basis (self , g ):
340
- r"""
341
- Coproduct, on basis elements, as per :meth:`HopfAlgebrasWithBasis.ParentMethods.coproduct_on_basis`.
342
-
343
- The basis elements are group-like: `\Delta(g) = g \otimes g`.
344
-
345
- EXAMPLES::
346
-
347
- sage: A = GroupAlgebra(DihedralGroup(3), QQ)
348
- sage: (a, b) = A._group.gens()
349
- sage: A.coproduct_on_basis(a)
350
- (1,2,3) # (1,2,3)
351
- """
352
- from sage .categories .all import tensor
353
- g = self .monomial (g )
354
- return tensor ([g , g ])
355
-
356
- def counit_on_basis (self , g ):
357
- r"""
358
- Counit, on basis elements, as per :meth:`HopfAlgebrasWithBasis.ParentMethods.counit_on_basis`.
359
-
360
- The counit on the basis elements is 1.
361
-
362
- EXAMPLES::
363
-
364
- sage: A = GroupAlgebra(DihedralGroup(6), QQ)
365
- sage: (a, b) = A._group.gens()
366
- sage: A.counit_on_basis(a)
367
- 1
368
- """
369
- return self .base_ring ().one ()
370
-
371
- def antipode_on_basis (self , g ):
372
- r"""
373
- Antipode, on basis elements, as per :meth:`HopfAlgebrasWithBasis.ParentMethods.antipode_on_basis`.
374
-
375
- It is given, on basis elements, by `\chi(g) = g^{-1}`
376
-
377
- EXAMPLES::
378
-
379
- sage: A = GroupAlgebra(DihedralGroup(3), QQ)
380
- sage: (a, b) = A._group.gens()
381
- sage: A.antipode_on_basis(a)
382
- (1,3,2)
383
- """
384
- return self .monomial (~ g )
385
-
386
341
# other methods:
387
342
388
343
def ngens (self ) :
0 commit comments