sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.44k stars 480 forks source link

Allow GroupAlgebra to be used as base ring of a PolynomialRing #19518

Open Etn40ff opened 9 years ago

Etn40ff commented 9 years ago

The __init__ method of GroupAlgebra did not check for commutativity of the group so that this would happen:

sage: G = AbelianGroup(2)
sage: A = GroupAlgebra(G)
sage: A.is_commutative()
True
sage: A.is_ring()
True
sage: PolynomialRing(A,'x,y')

TypeError: The base ring Group algebra of group "Multiplicative Abelian group isomorphic to Z x Z " over base ring Integer Ring is not a commutative ring

Moreover the init function of PolynomialRing needs the method is_prime_field in order to work.

Component: group theory

Keywords: GroupAlgebra PolynomialRing

Author: Salvatore Stella

Branch/Commit: u/etn40ff/commutative_group_algebra @ 0936b72

Issue created by migration from https://trac.sagemath.org/ticket/19518

Etn40ff commented 9 years ago

Branch: u/etn40ff/commutative_group_algebra

Etn40ff commented 9 years ago

Commit: 491a113

Etn40ff commented 9 years ago

Changed keywords from none to GroupAlgebra PolynomialRing

Etn40ff commented 9 years ago

Author: Salvatore Stella

Etn40ff commented 9 years ago

Description changed:

--- 
+++ 
@@ -1 +1,17 @@
+The `__init__` method of GroupAlgebra did not check for commutativity of the group so that this would happen:

+```
+sage: G = AbelianGroup(2)
+sage: A = GroupAlgebra(G)
+sage: A.is_commutative()
+True
+sage: A.is_ring()
+True
+sage: PolynomialRing(A,'x,y')
+
+TypeError: The base ring Group algebra of group "Multiplicative Abelian group isomorphic to Z x Z " over base ring Integer Ring is not a commutative ring
+```
+
+Moreover the init function of PolynomialRing needs the method is_prime_field in
+order to work.
+
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Changed commit from 491a113 to c3ebef0

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

c3ebef0Fixed typo
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

0936b72Added missing :
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Changed commit from c3ebef0 to 0936b72

tscrim commented 8 years ago
comment:5

This has uncovered a couple of different bugs:

  1. We have an issue with translating to/from GAP:
sage: SU(2, 3).random_element()
[      1 2*a + 2]
[      0       1]
sage: SU(2, 4).random_element()
<repr(<sage.groups.matrix_gps.group_element.UnitaryMatrixGroup_gap_with_category.element_class at 0x7f826b84eaa0>) failed: ValueError: the given finite field has incompatible size>
  1. Abelian groups .algebra aren't returning group algebras.
  2. Commutative() does not commute with the Algebras functor construction.
sage: Groups().Commutative().Algebras(QQ)
Join of Category of group algebras over Rational Field and Category of commutative algebras over Rational Field and Category of commutative magma algebras over Rational Field
sage: Groups().Algebras(QQ).Commutative()
Category of commutative group algebras over Rational Field

The main problem for this ticket I think is the last one.

cheuberg commented 7 years ago
comment:6

doctests fail (cf. patchbot)