Construct groups of small order and “named” groups as quotients of free groups. These groups are available through tab completion by typing groups.presentation.<tab> or by importing the required methods. Tab completion is made available through Sage’s group catalog. Some examples are engineered from entries in [THOMAS-WOODS].
Groups available as finite presentations:
AUTHORS:
EXAMPLES:
sage: groups.presentation.Cyclic(4)
Finitely presented group < a | a^4 >
You can also import the desired functions:
sage: from sage.groups.finitely_presented_named import CyclicPresentation
sage: CyclicPresentation(4)
Finitely presented group < a | a^4 >
Build the Alternating group of order as a finitely presented group.
INPUT:
OUTPUT:
Alternating group as a finite presentation, implementation uses GAP to find an isomorphism from a permutation representation to a finitely presented group representation. Due to this fact, the exact output presentation may not be the same for every method call on a constant n.
EXAMPLES:
sage: A6 = groups.presentation.Alternating(6)
sage: A6.as_permutation_group().is_isomorphic(AlternatingGroup(6)), A6.order()
(True, 360)
TESTS:
sage: #even permutation test..
sage: A1 = groups.presentation.Alternating(1); A2 = groups.presentation.Alternating(2)
sage: A1.is_isomorphic(A2), A1.order()
(True, 1)
sage: A3 = groups.presentation.Alternating(3); A3.order(), A3.as_permutation_group().is_cyclic()
(3, True)
sage: A8 = groups.presentation.Alternating(8); A8.order()
20160
Build cyclic group of order as a finitely presented group.
INPUT:
OUTPUT:
The cyclic group of order as finite presentation.
EXAMPLES:
sage: groups.presentation.Cyclic(10)
Finitely presented group < a | a^10 >
sage: n = 8; C = groups.presentation.Cyclic(n)
sage: C.as_permutation_group().is_isomorphic(CyclicPermutationGroup(n))
True
TESTS:
sage: groups.presentation.Cyclic(0)
Traceback (most recent call last):
...
ValueError: finitely presented group order must be positive
Build the dicyclic group of order , for
, as a finitely
presented group.
INPUT:
OUTPUT:
The dicyclic group of order is defined by the presentation
Note
This group is also available as a permutation group via groups.permutation.DiCyclic.
EXAMPLES:
sage: D = groups.presentation.DiCyclic(9); D
Finitely presented group < a, b | a^18, b^2*a^-9, b^-1*a*b*a >
sage: D.as_permutation_group().is_isomorphic(groups.permutation.DiCyclic(9))
True
TESTS:
sage: Q = groups.presentation.DiCyclic(2)
sage: Q.as_permutation_group().is_isomorphic(QuaternionGroup())
True
sage: all([groups.presentation.DiCyclic(i).as_permutation_group(
....: ).is_isomorphic(groups.permutation.DiCyclic(i)) for i in [5,8,12,2^5]])
True
sage: groups.presentation.DiCyclic(1)
Traceback (most recent call last):
...
ValueError: input integer must be greater than 1
Build the Dihedral group of order as a finitely presented group.
INPUT:
OUTPUT:
Dihedral group of order .
EXAMPLES:
sage: D = groups.presentation.Dihedral(7); D
Finitely presented group < a, b | a^7, b^2, (a*b)^2 >
sage: D.as_permutation_group().is_isomorphic(DihedralGroup(7))
True
TESTS:
sage: n = 9
sage: D = groups.presentation.Dihedral(n)
sage: D.ngens() == 2
True
sage: groups.presentation.Dihedral(0)
Traceback (most recent call last):
...
ValueError: finitely presented group order must be positive
Return canonical presentation of finitely generated abelian group.
INPUT:
OUTPUT:
Finitely generated abelian group,
as a finite presentation, where
forms the invariants of the input list.
EXAMPLES:
sage: groups.presentation.FGAbelian([2,2])
Finitely presented group < a, b | a^2, b^2, a^-1*b^-1*a*b >
sage: groups.presentation.FGAbelian([2,3])
Finitely presented group < a | a^6 >
sage: groups.presentation.FGAbelian([2,4])
Finitely presented group < a, b | a^2, b^4, a^-1*b^-1*a*b >
You can create free abelian groups:
sage: groups.presentation.FGAbelian([0])
Finitely presented group < a | >
sage: groups.presentation.FGAbelian([0,0])
Finitely presented group < a, b | a^-1*b^-1*a*b >
sage: groups.presentation.FGAbelian([0,0,0])
Finitely presented group < a, b, c | a^-1*c^-1*a*c, a^-1*b^-1*a*b, c^-1*b^-1*c*b >
And various infinite abelian groups:
sage: groups.presentation.FGAbelian([0,2])
Finitely presented group < a, b | a^2, a^-1*b^-1*a*b >
sage: groups.presentation.FGAbelian([0,2,2])
Finitely presented group < a, b, c | a^2, b^2, a^-1*c^-1*a*c, a^-1*b^-1*a*b, c^-1*b^-1*c*b >
Outputs are reduced to minimal generators and relations:
sage: groups.presentation.FGAbelian([3,5,2,7,3])
Finitely presented group < a, b | a^3, b^210, a^-1*b^-1*a*b >
sage: groups.presentation.FGAbelian([3,210])
Finitely presented group < a, b | a^3, b^210, a^-1*b^-1*a*b >
The trivial group is an acceptable output:
sage: groups.presentation.FGAbelian([])
Finitely presented group < | >
sage: groups.presentation.FGAbelian([1])
Finitely presented group < | >
sage: groups.presentation.FGAbelian([1,1,1,1,1,1,1,1,1,1])
Finitely presented group < | >
Input list must consist of positive integers:
sage: groups.presentation.FGAbelian([2,6,3,9,-4])
Traceback (most recent call last):
...
ValueError: input list must contain nonnegative entries
sage: groups.presentation.FGAbelian([2,'a',4])
Traceback (most recent call last):
...
TypeError: unable to convert 'a' to an integer
TESTS:
sage: ag = groups.presentation.FGAbelian([2,2])
sage: ag.as_permutation_group().is_isomorphic(groups.permutation.KleinFour())
True
sage: G = groups.presentation.FGAbelian([2,4,8])
sage: C2 = CyclicPermutationGroup(2)
sage: C4 = CyclicPermutationGroup(4)
sage: C8 = CyclicPermutationGroup(8)
sage: gg = (C2.direct_product(C4)[0]).direct_product(C8)[0]
sage: gg.is_isomorphic(G.as_permutation_group())
True
sage: all([groups.presentation.FGAbelian([i]).as_permutation_group().is_isomorphic(groups.presentation.Cyclic(i).as_permutation_group()) for i in [2..35]])
True
Build the Klein group of order as a finitely presented group.
OUTPUT:
Klein four group () as a finitely presented group.
EXAMPLES:
sage: K = groups.presentation.KleinFour(); K
Finitely presented group < a, b | a^2, b^2, a^-1*b^-1*a*b >
Build the Quaternion group of order 8 as a finitely presented group.
OUTPUT:
Quaternion group as a finite presentation.
EXAMPLES:
sage: Q = groups.presentation.Quaternion(); Q
Finitely presented group < a, b | a^4, b^2*a^-2, a*b*a*b^-1 >
sage: Q.as_permutation_group().is_isomorphic(QuaternionGroup())
True
TESTS:
sage: Q = groups.presentation.Quaternion()
sage: Q.order(), Q.is_abelian()
(8, False)
sage: Q.is_isomorphic(groups.presentation.DiCyclic(2))
True
Build the Symmetric group of order as a finitely presented group.
INPUT:
OUTPUT:
Symmetric group as a finite presentation, implementation uses GAP to find an isomorphism from a permutation representation to a finitely presented group representation. Due to this fact, the exact output presentation may not be the same for every method call on a constant n.
EXAMPLES:
sage: S4 = groups.presentation.Symmetric(4)
sage: S4.as_permutation_group().is_isomorphic(SymmetricGroup(4))
True
TESTS:
sage: S = [groups.presentation.Symmetric(i) for i in range(1,4)]; S[0].order()
1
sage: S[1].order(), S[2].as_permutation_group().is_isomorphic(DihedralGroup(3))
(2, True)
sage: S5 = groups.presentation.Symmetric(5)
sage: perm_S5 = S5.as_permutation_group(); perm_S5.is_isomorphic(SymmetricGroup(5))
True
sage: groups.presentation.Symmetric(8).order()
40320