# Finite groups#

class sage.categories.finite_groups.FiniteGroups(base_category)[source]#

The category of finite (multiplicative) groups.

EXAMPLES:

```sage: C = FiniteGroups(); C
Category of finite groups
sage: C.super_categories()
[Category of finite monoids, Category of groups]
sage: C.example()
General Linear Group of degree 2 over Finite Field of size 3
```
```>>> from sage.all import *
>>> C = FiniteGroups(); C
Category of finite groups
>>> C.super_categories()
[Category of finite monoids, Category of groups]
>>> C.example()
General Linear Group of degree 2 over Finite Field of size 3
```
class Algebras(category, *args)[source]#
class ParentMethods[source]#

Bases: `object`

extra_super_categories()[source]#

Implement Maschke’s theorem.

In characteristic 0 all finite group algebras are semisimple.

EXAMPLES:

```sage: FiniteGroups().Algebras(QQ).is_subcategory(Algebras(QQ).Semisimple())
True
sage: FiniteGroups().Algebras(FiniteField(7)).is_subcategory(Algebras(FiniteField(7)).Semisimple())
False
sage: FiniteGroups().Algebras(ZZ).is_subcategory(Algebras(ZZ).Semisimple())
False
sage: FiniteGroups().Algebras(Fields()).is_subcategory(Algebras(Fields()).Semisimple())
False

sage: Cat.Algebras(QQ).is_subcategory(Algebras(QQ).Semisimple())
True
sage: Cat.Algebras(GF(7)).is_subcategory(Algebras(GF(7)).Semisimple())
False
sage: Cat.Algebras(ZZ).is_subcategory(Algebras(ZZ).Semisimple())
False
sage: Cat.Algebras(Fields()).is_subcategory(Algebras(Fields()).Semisimple())
False
```
```>>> from sage.all import *
>>> FiniteGroups().Algebras(QQ).is_subcategory(Algebras(QQ).Semisimple())
True
>>> FiniteGroups().Algebras(FiniteField(Integer(7))).is_subcategory(Algebras(FiniteField(Integer(7))).Semisimple())
False
>>> FiniteGroups().Algebras(ZZ).is_subcategory(Algebras(ZZ).Semisimple())
False
>>> FiniteGroups().Algebras(Fields()).is_subcategory(Algebras(Fields()).Semisimple())
False

>>> Cat.Algebras(QQ).is_subcategory(Algebras(QQ).Semisimple())
True
>>> Cat.Algebras(GF(Integer(7))).is_subcategory(Algebras(GF(Integer(7))).Semisimple())
False
>>> Cat.Algebras(ZZ).is_subcategory(Algebras(ZZ).Semisimple())
False
>>> Cat.Algebras(Fields()).is_subcategory(Algebras(Fields()).Semisimple())
False
```
class ElementMethods[source]#

Bases: `object`

class ParentMethods[source]#

Bases: `object`

cardinality()[source]#

Returns the cardinality of `self`, as per `EnumeratedSets.ParentMethods.cardinality()`.

This default implementation calls `order()` if available, and otherwise resorts to `_cardinality_from_iterator()`. This is for backward compatibility only. Finite groups should override this method instead of `order()`.

EXAMPLES:

We need to use a finite group which uses this default implementation of cardinality:

```sage: G = groups.misc.SemimonomialTransformation(GF(5), 3); G           # needs sage.rings.number_field
Semimonomial transformation group over Finite Field of size 5 of degree 3
sage: G.cardinality.__module__                                          # needs sage.rings.number_field
'sage.categories.finite_groups'
sage: G.cardinality()                                                   # needs sage.rings.number_field
384
```
```>>> from sage.all import *
>>> G = groups.misc.SemimonomialTransformation(GF(Integer(5)), Integer(3)); G           # needs sage.rings.number_field
Semimonomial transformation group over Finite Field of size 5 of degree 3
>>> G.cardinality.__module__                                          # needs sage.rings.number_field
'sage.categories.finite_groups'
>>> G.cardinality()                                                   # needs sage.rings.number_field
384
```
cayley_graph_disabled(connecting_set=None)[source]#

AUTHORS:

• Bobby Moretti (2007-08-10)

• Robert Miller (2008-05-01): editing

conjugacy_classes()[source]#

Return a list with all the conjugacy classes of the group.

This will eventually be a fall-back method for groups not defined over GAP. Right now, it just raises a `NotImplementedError`, until we include a non-GAP way of listing the conjugacy classes representatives.

EXAMPLES:

```sage: from sage.groups.group import FiniteGroup
sage: G = FiniteGroup()
sage: G.conjugacy_classes()
Traceback (most recent call last):
...
NotImplementedError: Listing the conjugacy classes for group <sage.groups.group.FiniteGroup object at ...> is not implemented
```
```>>> from sage.all import *
>>> from sage.groups.group import FiniteGroup
>>> G = FiniteGroup()
>>> G.conjugacy_classes()
Traceback (most recent call last):
...
NotImplementedError: Listing the conjugacy classes for group <sage.groups.group.FiniteGroup object at ...> is not implemented
```
conjugacy_classes_representatives()[source]#

Return a list of the conjugacy classes representatives of the group.

EXAMPLES:

```sage: G = SymmetricGroup(3)
sage: G.conjugacy_classes_representatives()                             # needs sage.combinat
[(), (1,2), (1,2,3)]
```
```>>> from sage.all import *
>>> G = SymmetricGroup(Integer(3))
>>> G.conjugacy_classes_representatives()                             # needs sage.combinat
[(), (1,2), (1,2,3)]
```
monoid_generators()[source]#

Return monoid generators for `self`.

For finite groups, the group generators are also monoid generators. Hence, this default implementation calls `group_generators()`.

EXAMPLES:

```sage: A = AlternatingGroup(4)
sage: A.monoid_generators()
Family ((1,2,3), (2,3,4))
```
```>>> from sage.all import *
>>> A = AlternatingGroup(Integer(4))
>>> A.monoid_generators()
Family ((1,2,3), (2,3,4))
```
semigroup_generators()[source]#

Return semigroup generators for `self`.

For finite groups, the group generators are also semigroup generators. Hence, this default implementation calls `group_generators()`.

EXAMPLES:

```sage: A = AlternatingGroup(4)
sage: A.semigroup_generators()
Family ((1,2,3), (2,3,4))
```
```>>> from sage.all import *
>>> A = AlternatingGroup(Integer(4))
>>> A.semigroup_generators()
Family ((1,2,3), (2,3,4))
```
some_elements()[source]#

Return some elements of `self`.

EXAMPLES:

```sage: A = AlternatingGroup(4)
sage: A.some_elements()
Family ((1,2,3), (2,3,4))
```
```>>> from sage.all import *
>>> A = AlternatingGroup(Integer(4))
>>> A.some_elements()
Family ((1,2,3), (2,3,4))
```
example()[source]#

Return an example of finite group, as per `Category.example()`.

EXAMPLES:

```sage: G = FiniteGroups().example(); G
General Linear Group of degree 2 over Finite Field of size 3
```
```>>> from sage.all import *
>>> G = FiniteGroups().example(); G
General Linear Group of degree 2 over Finite Field of size 3
```