Base class for groups

class sage.groups.group.AbelianGroup

Bases: sage.groups.group.Group

Generic abelian group.

is_abelian()

Return True.

EXAMPLES:

sage: from sage.groups.group import AbelianGroup
sage: G = AbelianGroup()
sage: G.is_abelian()
True
class sage.groups.group.AlgebraicGroup

Bases: sage.groups.group.Group

class sage.groups.group.FiniteGroup

Bases: sage.groups.group.Group

Generic finite group.

is_finite()

Return True.

EXAMPLES:

sage: from sage.groups.group import FiniteGroup
sage: G = FiniteGroup()
sage: G.is_finite()
True
class sage.groups.group.Group

Bases: sage.structure.parent.Parent

Base class for all groups

is_abelian()

Test whether this group is abelian.

EXAMPLES:

sage: from sage.groups.group import Group
sage: G = Group()
sage: G.is_abelian()
Traceback (most recent call last):
...
NotImplementedError
is_commutative()

Test whether this group is commutative.

This is an alias for is_abelian, largely to make groups work well with the Factorization class.

(Note for developers: Derived classes should override is_abelian, not is_commutative.)

EXAMPLES:

sage: SL(2, 7).is_commutative()
False
is_finite()

Returns True if this group is finite.

EXAMPLES:

sage: from sage.groups.group import Group
sage: G = Group()
sage: G.is_finite()
Traceback (most recent call last):
...
NotImplementedError
is_multiplicative()

Returns True if the group operation is given by * (rather than +).

Override for additive groups.

EXAMPLES:

sage: from sage.groups.group import Group
sage: G = Group()
sage: G.is_multiplicative()
True
order()

Return the number of elements of this group.

This is either a positive integer or infinity.

EXAMPLES:

sage: from sage.groups.group import Group
sage: G = Group()
sage: G.order()
Traceback (most recent call last):
...
NotImplementedError
quotient(H)

Return the quotient of this group by the normal subgroup \(H\).

EXAMPLES:

sage: from sage.groups.group import Group
sage: G = Group()
sage: G.quotient(G)
Traceback (most recent call last):
...
NotImplementedError
sage.groups.group.is_Group(x)

Return whether x is a group object.

INPUT:

  • x – anything.

OUTPUT:

Boolean.

EXAMPLES:

sage: F.<a,b> = FreeGroup()
sage: from sage.groups.group import is_Group
sage: is_Group(F)
True
sage: is_Group("a string")
False