Base class for groups#

class sage.groups.group.AbelianGroup#

Bases: 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: Group

class sage.groups.group.FiniteGroup#

Bases: 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: 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()                                             # needs sage.libs.gap sage.modules sage.rings.finite_rings
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
is_trivial()#

Return True if this group is the trivial group.

A group is trivial, if it consists only of the identity element.

Warning

It is in principle undecidable whether a group is trivial, for example, if the group is given by a finite presentation. Thus, this method may not terminate.

EXAMPLES:

sage: groups.presentation.Cyclic(1).is_trivial()
True

sage: G.<a,b> = FreeGroup('a, b')
sage: H = G / (a^2, b^3, a*b*~a*~b)
sage: H.is_trivial()
False

A non-trivial presentation of the trivial group:

sage: F.<a,b> = FreeGroup()
sage: J = F / ((~a)*b*a*(~b)^2, (~b)*a*b*(~a)^2)
sage: J.is_trivial()
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, **kwds)#

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()                                                     # needs sage.groups
sage: from sage.groups.group import is_Group
sage: is_Group(F)                                                               # needs sage.groups
True
sage: is_Group("a string")
False