“Named” Permutation groups (such as the symmetric group, S_n)#
You can construct the following permutation groups:
- – SymmetricGroup, \(S_n\) of order \(n!\) (n can also be a list \(X\) of distinct
positive integers, in which case it returns \(S_X\))
- – AlternatingGroup, \(A_n\) of order \(n!/2\) (n can also be a list \(X\)
of distinct positive integers, in which case it returns \(A_X\))
– DihedralGroup, \(D_n\) of order \(2n\)
– GeneralDihedralGroup, \(Dih(G)\), where G is an abelian group
– CyclicPermutationGroup, \(C_n\) of order \(n\)
– DiCyclicGroup, nonabelian groups of order \(4m\) with a unique element of order 2
- – TransitiveGroup, \(n^{th}\) transitive group of degree \(d\)
from the GAP tables of transitive groups
– TransitiveGroups(d), TransitiveGroups(), set of all of the above
- – PrimitiveGroup, \(n^{th}\) primitive group of degree \(d\)
from the GAP tables of primitive groups
– PrimitiveGroups(d), PrimitiveGroups(), set of all of the above
– MathieuGroup(degree), Mathieu group of degree 9, 10, 11, 12, 21, 22, 23, or 24.
– KleinFourGroup, subgroup of \(S_4\) of order \(4\) which is not \(C_2 \times C_2\)
– QuaternionGroup, non-abelian group of order \(8\), \(\{\pm 1, \pm I, \pm J, \pm K\}\)
– SplitMetacyclicGroup, nonabelian groups of order \(p^m\) with cyclic subgroups of index p
– SemidihedralGroup, nonabelian 2-groups with cyclic subgroups of index 2
- – PGL(n,q), projective general linear group of \(n\times n\) matrices over
the finite field GF(q)
- – PSL(n,q), projective special linear group of \(n\times n\) matrices over
the finite field GF(q)
- – PSp(2n,q), projective symplectic linear group of \(2n\times 2n\) matrices
over the finite field GF(q)
- – PSU(n,q), projective special unitary group of \(n \times n\) matrices having
coefficients in the finite field \(GF(q^2)\) that respect a fixed nondegenerate sesquilinear form, of determinant 1.
- – PGU(n,q), projective general unitary group of \(n\times n\) matrices having
coefficients in the finite field \(GF(q^2)\) that respect a fixed nondegenerate sesquilinear form, modulo the centre.
– SuzukiGroup(q), Suzuki group over GF(q), \(^2 B_2(2^{2k+1}) = Sz(2^{2k+1})\).
- – ComplexReflectionGroup, the complex reflection group \(G(m, p, n)\) or
the exceptional complex reflection group \(G_m\)
– SmallPermutationGroup, a permutation realization of an group specified by its GAP id.
AUTHOR:
David Joyner (2007-06): split from permgp.py (suggested by Nick Alexander)
REFERENCES:
Cameron, P., Permutation Groups. New York: Cambridge University Press, 1999.
Wielandt, H., Finite Permutation Groups. New York: Academic Press, 1964.
Dixon, J. and Mortimer, B., Permutation Groups, Springer-Verlag, Berlin/New York, 1996.
Note
Though Suzuki groups are okay, Ree groups should not be wrapped as permutation groups - the construction is too slow - unless (for small values or the parameter) they are made using explicit generators.
- class sage.groups.perm_gps.permgroup_named.AlternatingGroup(domain=None)#
Bases:
PermutationGroup_symalt
The alternating group of order \(n!/2\), as a permutation group.
INPUT:
n
– a positive integer, or list or tuple thereof
Note
This group is also available via
groups.permutation.Alternating()
.EXAMPLES:
sage: G = AlternatingGroup(6) sage: G.order() 360 sage: G Alternating group of order 6!/2 as a permutation group sage: G.category() Category of finite enumerated permutation groups sage: TestSuite(G).run() # long time sage: G = AlternatingGroup([1,2,4,5]) sage: G Alternating group of order 4!/2 as a permutation group sage: G.domain() {1, 2, 4, 5} sage: G.category() Category of finite enumerated permutation groups sage: TestSuite(G).run()
- class sage.groups.perm_gps.permgroup_named.ComplexReflectionGroup(m, p=None, n=None)#
Bases:
PermutationGroup_unique
A finite complex reflection group as a permutation group.
We can realize \(G(m,1,n)\) as \(m\) copies of the symmetric group \(S_n\) with \(s_i\) for \(1 \leq i < n\) acting as the usual adjacent transposition on each copy of \(S_n\). We construct the cycle \(s_n = (n, 2n, \ldots, mn)\).
We construct \(G(m,p,n)\) as a subgroup of \(G(m,1,n)\) by \(s_i \mapsto s_i\) for all \(1 \leq i < n\),
\[s_n \mapsto s_n^{-1} s_{n-1} s_n, \qquad\qquad s_{n+1} \mapsto s_n^p.\]Note that if \(p = m\), then \(s_{n+1} = 1\), in which case we do not consider it as a generator.
The exceptional complex reflection groups \(G_m\) (in the Shephard-Todd classification) are not yet implemented.
INPUT:
One of the following:
m, p, n
– positive integers to construct \(G(m,p,n)\)m
– integer such that \(4 \leq m \leq 37\) to construct an exceptional complex reflection \(G_m\)
Note
This group is also available via
groups.permutation.ComplexReflection()
.Note
The convention for the index set is for \(G(m, 1, n)\) to have the complex reflection of order \(m\) correspond to \(s_n\); i.e., \(s_n^m = 1\) and \(s_i^2 = 1\) for all \(i < m\).
EXAMPLES:
sage: G = groups.permutation.ComplexReflection(3, 1, 5) sage: G.order() 29160 sage: G Complex reflection group G(3, 1, 5) as a permutation group sage: G.category() Join of Category of finite enumerated permutation groups and Category of finite complex reflection groups sage: G = groups.permutation.ComplexReflection(3, 3, 4) sage: G.cardinality() 648 sage: s1, s2, s3, s4 = G.simple_reflections() sage: s4*s2*s4 == s2*s4*s2 True sage: (s4*s3*s2)^2 == (s2*s4*s3)^2 True sage: G = groups.permutation.ComplexReflection(6, 2, 3) sage: G.cardinality() 648 sage: s1, s2, s3, s4 = G.simple_reflections() sage: s3^2 == G.one() True sage: s4^3 == G.one() True sage: s4 * s3 * s2 == s3 * s2 * s4 True sage: (s3*s2*s1)^2 == (s1*s3*s2)^2 True sage: s3 * s1 * s3 == s1 * s3 * s1 True sage: s4 * s3 * (s2*s3)^(2-1) == s2 * s4 True sage: G = groups.permutation.ComplexReflection(4, 2, 5) sage: G.cardinality() 61440 sage: G = groups.permutation.ComplexReflection(4) Traceback (most recent call last): ... NotImplementedError: exceptional complex reflection groups are not yet implemented
REFERENCES:
- codegrees()#
Return the codegrees of
self
.Let \(G\) be a complex reflection group. The codegrees \(d_1^* \leq d_2^* \leq \cdots \leq d_{\ell}^*\) of \(G\) can be defined by:
\[\prod_{i=1}^{\ell} (q - d_i^* - 1) = \sum_{g \in G} \det(g) q^{\dim(V^g)},\]where \(V\) is the natural complex vector space that \(G\) acts on and \(\ell\) is the
rank()
.If \(m = 1\), then we are in the special case of the symmetric group and the codegrees are \((n-2, n-3, \ldots 1, 0)\). Otherwise the codegrees are \(((n-1)m, (n-2)m, \ldots, m, 0)\).
EXAMPLES:
sage: C = groups.permutation.ComplexReflection(4, 1, 3) sage: C.codegrees() (8, 4, 0) sage: G = groups.permutation.ComplexReflection(3, 3, 4) sage: G.codegrees() (6, 5, 3, 0) sage: S = groups.permutation.ComplexReflection(1, 1, 3) sage: S.codegrees() (1, 0)
- degrees()#
Return the degrees of
self
.The degrees of a complex reflection group are the degrees of the fundamental invariants of the ring of polynomial invariants.
If \(m = 1\), then we are in the special case of the symmetric group and the degrees are \((2, 3, \ldots, n, n+1)\). Otherwise the degrees are \((m, 2m, \ldots, (n-1)m, nm/p)\).
EXAMPLES:
sage: C = groups.permutation.ComplexReflection(4, 1, 3) sage: C.degrees() (4, 8, 12) sage: G = groups.permutation.ComplexReflection(4, 2, 3) sage: G.degrees() (4, 6, 8) sage: Gp = groups.permutation.ComplexReflection(4, 4, 3) sage: Gp.degrees() (3, 4, 8) sage: S = groups.permutation.ComplexReflection(1, 1, 3) sage: S.degrees() (2, 3)
Check that the product of the degrees is equal to the cardinality:
sage: prod(C.degrees()) == C.cardinality() True sage: prod(G.degrees()) == G.cardinality() True sage: prod(Gp.degrees()) == Gp.cardinality() True sage: prod(S.degrees()) == S.cardinality() True
- index_set()#
Return the index set of
self
.EXAMPLES:
sage: G = groups.permutation.ComplexReflection(4, 1, 3) sage: G.index_set() (1, 2, 3) sage: G = groups.permutation.ComplexReflection(1, 1, 3) sage: G.index_set() (1, 2) sage: G = groups.permutation.ComplexReflection(4, 2, 3) sage: G.index_set() (1, 2, 3, 4) sage: G = groups.permutation.ComplexReflection(4, 4, 3) sage: G.index_set() (1, 2, 3)
- simple_reflection(i)#
Return the
i
-th simple reflection ofself
.EXAMPLES:
sage: G = groups.permutation.ComplexReflection(3, 1, 4) sage: G.simple_reflection(2) (2,3)(6,7)(10,11) sage: G.simple_reflection(4) (4,8,12) sage: G = groups.permutation.ComplexReflection(1, 1, 4) sage: G.simple_reflections() Finite family {1: (1,2), 2: (2,3), 3: (3,4)}
- class sage.groups.perm_gps.permgroup_named.CyclicPermutationGroup(n)#
Bases:
PermutationGroup_unique
A cyclic group of order n, as a permutation group.
INPUT:
n – a positive integer
Note
This group is also available via
groups.permutation.Cyclic()
.EXAMPLES:
sage: G = CyclicPermutationGroup(8) sage: G.order() 8 sage: G Cyclic group of order 8 as a permutation group sage: G.category() Category of finite enumerated permutation groups sage: TestSuite(G).run() sage: C = CyclicPermutationGroup(10) sage: C.is_abelian() True sage: C = CyclicPermutationGroup(10) sage: C.as_AbelianGroup() Multiplicative Abelian group isomorphic to C2 x C5
- as_AbelianGroup()#
Returns the corresponding Abelian Group instance.
EXAMPLES:
sage: C = CyclicPermutationGroup(8) sage: C.as_AbelianGroup() Multiplicative Abelian group isomorphic to C8
- is_abelian()#
Return True if this group is abelian.
EXAMPLES:
sage: C = CyclicPermutationGroup(8) sage: C.is_abelian() True
- is_commutative()#
Return True if this group is commutative.
EXAMPLES:
sage: C = CyclicPermutationGroup(8) sage: C.is_commutative() True
- class sage.groups.perm_gps.permgroup_named.DiCyclicGroup(n)#
Bases:
PermutationGroup_unique
The dicyclic group of order \(4n\), for \(n\geq 2\).
INPUT:
n – a positive integer, two or greater
OUTPUT:
This is a nonabelian group similar in some respects to the dihedral group of the same order, but with far fewer elements of order 2 (it has just one). The permutation representation constructed here is based on the presentation
\[\langle a, x\mid a^{2n}=1, x^{2}=a^{n}, x^{-1}ax=a^{-1}\rangle\]For \(n=2\) this is the group of quaternions (\({\pm 1, \pm I,\pm J, \pm K}\)), which is the nonabelian group of order 8 that is not the dihedral group \(D_4\), the symmetries of a square. For \(n=3\) this is the nonabelian group of order 12 that is not the dihedral group \(D_6\) nor the alternating group \(A_4\). This group of order 12 is also the semi-direct product of \(C_2\) by \(C_4\), \(C_3\rtimes C_4\). [Con]
When the order of the group is a power of 2 it is known as a “generalized quaternion group.”
IMPLEMENTATION:
The presentation above means every element can be written as \(a^{i}x^{j}\) with \(0\leq i<2n\), \(j=0,1\). We code \(a^i\) as the symbol \(i+1\) and code \(a^{i}x\) as the symbol \(2n+i+1\). The two generators are then represented using a left regular representation.
Note
This group is also available via
groups.permutation.DiCyclic()
.EXAMPLES:
A dicyclic group of order 384, with a large power of 2 as a divisor:
sage: n = 3*2^5 sage: G = DiCyclicGroup(n) sage: G.order() 384 sage: a = G.gen(0) sage: x = G.gen(1) sage: a^(2*n) () sage: a^n==x^2 True sage: x^-1*a*x==a^-1 True
A large generalized quaternion group (order is a power of 2):
sage: n = 2^10 sage: G = DiCyclicGroup(n) sage: G.order() 4096 sage: a = G.gen(0) sage: x = G.gen(1) sage: a^(2*n) () sage: a^n==x^2 True sage: x^-1*a*x==a^-1 True
Just like the dihedral group, the dicyclic group has an element whose order is half the order of the group. Unlike the dihedral group, the dicyclic group has only one element of order 2. Like the dihedral groups of even order, the center of the dicyclic group is a subgroup of order 2 (thus has the unique element of order 2 as its non-identity element).
sage: G = DiCyclicGroup(3*5*4) sage: G.order() 240 sage: two = [g for g in G if g.order()==2]; two [(1,5)(2,6)(3,7)(4,8)(9,13)(10,14)(11,15)(12,16)] sage: G.center().order() 2
For small orders, we check this is really a group we do not have in Sage otherwise.
sage: G = DiCyclicGroup(2) sage: H = DihedralGroup(4) sage: G.is_isomorphic(H) False sage: G = DiCyclicGroup(3) sage: H = DihedralGroup(6) sage: K = AlternatingGroup(6) sage: G.is_isomorphic(H) or G.is_isomorphic(K) False
AUTHOR:
Rob Beezer (2009-10-18)
- is_abelian()#
Return True if this group is abelian.
EXAMPLES:
sage: D = DiCyclicGroup(12) sage: D.is_abelian() False
- is_commutative()#
Return True if this group is commutative.
EXAMPLES:
sage: D = DiCyclicGroup(12) sage: D.is_commutative() False
- class sage.groups.perm_gps.permgroup_named.DihedralGroup(n)#
Bases:
PermutationGroup_unique
The Dihedral group of order \(2n\) for any integer \(n\geq 1\).
INPUT:
n
– a positive integer
OUTPUT:
The dihedral group of order \(2n\), as a permutation group
Note
This group is also available via
groups.permutation.Dihedral()
.EXAMPLES:
sage: DihedralGroup(1) Dihedral group of order 2 as a permutation group sage: DihedralGroup(2) Dihedral group of order 4 as a permutation group sage: DihedralGroup(2).gens() ((3,4), (1,2)) sage: DihedralGroup(5).gens() ((1,2,3,4,5), (1,5)(2,4)) sage: sorted(DihedralGroup(5)) [(), (2,5)(3,4), (1,2)(3,5), (1,2,3,4,5), (1,3)(4,5), (1,3,5,2,4), (1,4)(2,3), (1,4,2,5,3), (1,5,4,3,2), (1,5)(2,4)] sage: G = DihedralGroup(6) sage: G.order() 12 sage: G = DihedralGroup(5) sage: G.order() 10 sage: G Dihedral group of order 10 as a permutation group sage: G.gens() ((1,2,3,4,5), (1,5)(2,4)) sage: DihedralGroup(0) Traceback (most recent call last): ... ValueError: n must be positive
- class sage.groups.perm_gps.permgroup_named.GeneralDihedralGroup(factors)#
Bases:
PermutationGroup_generic
The Generalized Dihedral Group generated by the abelian group with direct factors in the input list.
INPUT:
factors
- a list of the sizes of the cyclic factors of the abelian group being dihedralized (this will be sorted once entered)
OUTPUT:
For a given abelian group (noting that each finite abelian group can be represented as the direct product of cyclic groups), the General Dihedral Group it generates is simply the semi-direct product of the given group with \(C_2\), where the nonidentity element of \(C_2\) acts on the abelian group by turning each element into its inverse. In this implementation, each input abelian group will be standardized so as to act on a minimal amount of letters. This will be done by breaking the direct factors into products of p-groups, before this new set of factors is ordered from smallest to largest for complete standardization. Note that the generalized dihedral group corresponding to a cyclic group, \(C_n\), is simply the dihedral group \(D_n\).
EXAMPLES:
As is noted in [TW1980], \(Dih(C_3 \times C_3)\) has the presentation
\[\langle a, b, c\mid a^{3}, b^{3}, c^{2}, ab = ba, ac = ca^{-1}, bc = cb^{-1} \rangle\]Note also the fact, verified by [TW1980], that the dihedralization of \(C_3 \times C_3\) is the only nonabelian group of order 18 with no element of order 6.
sage: G = GeneralDihedralGroup([3,3]) sage: G Generalized dihedral group generated by C3 x C3 sage: G.order() 18 sage: G.gens() ((4,5,6), (2,3)(5,6), (1,2,3)) sage: a = G.gens()[2]; b = G.gens()[0]; c = G.gens()[1] sage: a.order() == 3, b.order() == 3, c.order() == 2 (True, True, True) sage: a*b == b*a, a*c == c*a.inverse(), b*c == c*b.inverse() (True, True, True) sage: G.subgroup([a,b,c]) == G True sage: G.is_abelian() False sage: all(x.order() != 6 for x in G) True
If all of the direct factors are \(C_2\), then the action turning each element into its inverse is trivial, and the semi-direct product becomes a direct product.
sage: G = GeneralDihedralGroup([2,2,2]) sage: G.order() 16 sage: G.gens() ((7,8), (5,6), (3,4), (1,2)) sage: G.is_abelian() True sage: H = KleinFourGroup() sage: G.is_isomorphic(H.direct_product(H)[0]) True
If two nonidentical input lists generate isomorphic abelian groups, then they will generate identical groups (with each direct factor broken up into its prime factors), but they will still have distinct descriptions. Note that If \(gcd(n,m)=1\), then \(C_n \times C_m \cong C_{nm}\), while the general dihedral groups generated by isomorphic abelian groups should be themselves isomorphic.
sage: G = GeneralDihedralGroup([6,34,46,14]) sage: H = GeneralDihedralGroup([7,17,3,46,2,2,2]) sage: G == H, G.gens() == H.gens() (True, True) sage: [x.order() for x in G.gens()] [23, 17, 7, 2, 3, 2, 2, 2, 2] sage: G Generalized dihedral group generated by C6 x C34 x C46 x C14 sage: H Generalized dihedral group generated by C7 x C17 x C3 x C46 x C2 x C2 x C2
A cyclic input yields a Classical Dihedral Group.
sage: G = GeneralDihedralGroup([6]) sage: D = DihedralGroup(6) sage: G.is_isomorphic(D) True
A Generalized Dihedral Group will always have size twice the underlying group, be solvable (as it has an abelian subgroup with index 2), and, unless the underlying group is of the form \({C_2}^n\), be nonabelian (by the structure theorem of finite abelian groups and the fact that a semi-direct product is a direct product only when the underlying action is trivial).
sage: G = GeneralDihedralGroup([6,18,33,60]) sage: (6*18*33*60)*2 427680 sage: G.order() 427680 sage: G.is_solvable() True sage: G.is_abelian() False
AUTHOR:
Kevin Halasz (2012-7-12)
- class sage.groups.perm_gps.permgroup_named.JankoGroup(n)#
Bases:
PermutationGroup_unique
Janko Groups \(J1, J2\), and \(J3\). (Note that \(J4\) is too big to be treated here.)
INPUT:
n
– an integer among \(\{1,2,3\}\).
EXAMPLES:
sage: G = groups.permutation.Janko(1); G # optional - gap_package_atlasrep internet Janko group J1 of order 175560 as a permutation group
- class sage.groups.perm_gps.permgroup_named.KleinFourGroup#
Bases:
PermutationGroup_unique
The Klein 4 Group, which has order \(4\) and exponent \(2\), viewed as a subgroup of \(S_4\).
OUTPUT:
the Klein 4 group of order 4, as a permutation group of degree 4.
Note
This group is also available via
groups.permutation.KleinFour()
.EXAMPLES:
sage: G = KleinFourGroup(); G The Klein 4 group of order 4, as a permutation group sage: sorted(G) [(), (3,4), (1,2), (1,2)(3,4)]
- AUTHOR:
– Bobby Moretti (2006-10)
- class sage.groups.perm_gps.permgroup_named.MathieuGroup(n)#
Bases:
PermutationGroup_unique
The Mathieu group of degree \(n\).
INPUT:
n – a positive integer in {9, 10, 11, 12, 21, 22, 23, 24}.
OUTPUT:
the Mathieu group of degree n, as a permutation group
Note
This group is also available via
groups.permutation.Mathieu()
.EXAMPLES:
sage: G = MathieuGroup(12) sage: G Mathieu group of degree 12 and order 95040 as a permutation group
- class sage.groups.perm_gps.permgroup_named.PGL(n, q, name='a')#
Bases:
PermutationGroup_plg
The projective general linear groups over GF(q).
INPUT:
n – positive integer; the degree
q – prime power; the size of the ground field
name – (default: ‘a’) variable name of indeterminate of finite field GF(q)
OUTPUT:
PGL(n,q)
Note
This group is also available via
groups.permutation.PGL()
.EXAMPLES:
sage: G = PGL(2,3); G Permutation Group with generators [(3,4), (1,2,4)] sage: print(G) The projective general linear group of degree 2 over Finite Field of size 3 sage: G.base_ring() Finite Field of size 3 sage: G.order() 24 sage: G = PGL(2, 9, 'b'); G Permutation Group with generators [(3,10,9,8,4,7,6,5), (1,2,4)(5,6,8)(7,9,10)] sage: G.base_ring() Finite Field in b of size 3^2 sage: G.category() Category of finite enumerated permutation groups sage: TestSuite(G).run() # long time
- class sage.groups.perm_gps.permgroup_named.PGU(n, q, name='a')#
Bases:
PermutationGroup_pug
The projective general unitary groups over GF(q).
INPUT:
n – positive integer; the degree
q – prime power; the size of the ground field
name – (default: ‘a’) variable name of indeterminate of finite field GF(q)
OUTPUT:
PGU(n,q)
Note
This group is also available via
groups.permutation.PGU()
.EXAMPLES:
sage: PGU(2,3) The projective general unitary group of degree 2 over Finite Field of size 3 sage: G = PGU(2, 8, name='alpha'); G The projective general unitary group of degree 2 over Finite Field in alpha of size 2^3 sage: G.base_ring() Finite Field in alpha of size 2^3
- class sage.groups.perm_gps.permgroup_named.PSL(n, q, name='a')#
Bases:
PermutationGroup_plg
The projective special linear groups over GF(q).
INPUT:
n – positive integer; the degree
q – either a prime power (the size of the ground field) or a finite field
name – (default: ‘a’) variable name of indeterminate of finite field GF(q)
OUTPUT:
the group PSL(n,q)
Note
This group is also available via
groups.permutation.PSL()
.EXAMPLES:
sage: G = PSL(2,3); G Permutation Group with generators [(2,3,4), (1,2)(3,4)] sage: G.order() 12 sage: G.base_ring() Finite Field of size 3 sage: print(G) The projective special linear group of degree 2 over Finite Field of size 3
We create two groups over nontrivial finite fields:
sage: G = PSL(2, 4, 'b'); G Permutation Group with generators [(3,4,5), (1,2,3)] sage: G.base_ring() Finite Field in b of size 2^2 sage: G = PSL(2, 8); G Permutation Group with generators [(3,8,6,4,9,7,5), (1,2,3)(4,7,5)(6,9,8)] sage: G.base_ring() Finite Field in a of size 2^3 sage: G.category() Category of finite enumerated permutation groups sage: TestSuite(G).run() # long time
- ramification_module_decomposition_hurwitz_curve()#
Helps compute the decomposition of the ramification module for the Hurwitz curves X (over CC say) with automorphism group G = PSL(2,q), q a “Hurwitz prime” (ie, p is \(\pm 1 \pmod 7\)). Using this computation and Borne’s formula helps determine the G-module structure of the RR spaces of equivariant divisors can be determined explicitly.
The output is a list of integer multiplicities: [m1,…,mn], where n is the number of conj classes of G=PSL(2,p) and mi is the multiplicity of pi_i in the ramification module of a Hurwitz curve with automorphism group G. Here IrrRepns(G) = [pi_1,…,pi_n] (in the order listed in the output of self.character_table()).
- REFERENCE: David Joyner, Amy Ksir, Roger Vogeler,
“Group representations on Riemann-Roch spaces of some Hurwitz curves,” preprint, 2006.
EXAMPLES:
sage: G = PSL(2,13) sage: G.ramification_module_decomposition_hurwitz_curve() # random, optional - gap_packages [0, 7, 7, 12, 12, 12, 13, 15, 14]
This means, for example, that the trivial representation does not occur in the ramification module of a Hurwitz curve with automorphism group PSL(2,13), since the trivial representation is listed first and that entry has multiplicity 0. The “randomness” is due to the fact that GAP randomly orders the conjugacy classes of the same order in the list of all conjugacy classes. Similarly, there is some randomness to the ordering of the characters.
If you try to use this function on a group PSL(2,q) where q is not a (smallish) “Hurwitz prime”, an error message will be printed.
- ramification_module_decomposition_modular_curve()#
Helps compute the decomposition of the ramification module for the modular curve X(p) (over CC say) with automorphism group G = PSL(2,q), q a prime > 5. Using this computation and Borne’s formula helps determine the G-module structure of the RR spaces of equivariant divisors can be determined explicitly.
The output is a list of integer multiplicities: [m1,…,mn], where n is the number of conj classes of G=PSL(2,p) and mi is the multiplicity of pi_i in the ramification module of a modular curve with automorphism group G. Here IrrRepns(G) = [pi_1,…,pi_n] (in the order listed in the output of self.character_table()).
- REFERENCE: D. Joyner and A. Ksir, ‘Modular representations
on some Riemann-Roch spaces of modular curves \(X(N)\)’, Computational Aspects of Algebraic Curves, (Editor: T. Shaska) Lecture Notes in Computing, WorldScientific, 2005.)
EXAMPLES:
sage: G = PSL(2,7) sage: G.ramification_module_decomposition_modular_curve() # random, optional - gap_packages [0, 4, 3, 6, 7, 8]
This means, for example, that the trivial representation does not occur in the ramification module of X(7), since the trivial representation is listed first and that entry has multiplicity 0. The “randomness” is due to the fact that GAP randomly orders the conjugacy classes of the same order in the list of all conjugacy classes. Similarly, there is some randomness to the ordering of the characters.
- class sage.groups.perm_gps.permgroup_named.PSU(n, q, name='a')#
Bases:
PermutationGroup_pug
The projective special unitary groups over GF(q).
INPUT:
n – positive integer; the degree
q – prime power; the size of the ground field
name – (default: ‘a’) variable name of indeterminate of finite field GF(q)
OUTPUT:
PSU(n,q)
Note
This group is also available via
groups.permutation.PSU()
.EXAMPLES:
sage: PSU(2,3) The projective special unitary group of degree 2 over Finite Field of size 3 sage: G = PSU(2, 8, name='alpha'); G The projective special unitary group of degree 2 over Finite Field in alpha of size 2^3 sage: G.base_ring() Finite Field in alpha of size 2^3
- class sage.groups.perm_gps.permgroup_named.PSp(n, q, name='a')#
Bases:
PermutationGroup_plg
The projective symplectic linear groups over GF(q).
INPUT:
n – positive integer; the degree
q – prime power; the size of the ground field
name – (default: ‘a’) variable name of indeterminate of finite field GF(q)
OUTPUT:
PSp(n,q)
Note
This group is also available via
groups.permutation.PSp()
.EXAMPLES:
sage: G = PSp(2,3); G Permutation Group with generators [(2,3,4), (1,2)(3,4)] sage: G.order() 12 sage: G = PSp(4,3); G Permutation Group with generators [(3,4)(6,7)(9,10)(12,13)(17,20)(18,21)(19,22)(23,32)(24,33)(25,34)(26,38)(27,39)(28,40)(29,35)(30,36)(31,37), (1,5,14,17,27,22,19,36,3)(2,6,32)(4,7,23,20,37,13,16,26,40)(8,24,29,30,39,10,33,11,34)(9,15,35)(12,25,38)(21,28,31)] sage: G.order() 25920 sage: print(G) The projective symplectic linear group of degree 4 over Finite Field of size 3 sage: G.base_ring() Finite Field of size 3 sage: G = PSp(2, 8, name='alpha'); G Permutation Group with generators [(3,8,6,4,9,7,5), (1,2,3)(4,7,5)(6,9,8)] sage: G.base_ring() Finite Field in alpha of size 2^3
- class sage.groups.perm_gps.permgroup_named.PermutationGroup_plg(gens=None, gap_group=None, canonicalize=True, domain=None, category=None)#
Bases:
PermutationGroup_unique
- base_ring()#
EXAMPLES:
sage: G = PGL(2,3) sage: G.base_ring() Finite Field of size 3 sage: G = PSL(2,3) sage: G.base_ring() Finite Field of size 3
- matrix_degree()#
EXAMPLES:
sage: G = PSL(2,3) sage: G.matrix_degree() 2
- class sage.groups.perm_gps.permgroup_named.PermutationGroup_pug(gens=None, gap_group=None, canonicalize=True, domain=None, category=None)#
Bases:
PermutationGroup_plg
- field_of_definition()#
EXAMPLES:
sage: PSU(2,3).field_of_definition() Finite Field in a of size 3^2
- class sage.groups.perm_gps.permgroup_named.PermutationGroup_symalt(gens=None, gap_group=None, canonicalize=True, domain=None, category=None)#
Bases:
PermutationGroup_unique
This is a class used to factor out some of the commonality in the SymmetricGroup and AlternatingGroup classes.
- class sage.groups.perm_gps.permgroup_named.PermutationGroup_unique(gens=None, gap_group=None, canonicalize=True, domain=None, category=None)#
Bases:
CachedRepresentation
,PermutationGroup_generic
Todo
Fix the broken hash.
sage: G = SymmetricGroup(6) sage: G3 = G.subgroup([G((1,2,3,4,5,6)),G((1,2))]) sage: hash(G) == hash(G3) # todo: Should be True! False
- class sage.groups.perm_gps.permgroup_named.PrimitiveGroup(d, n)#
Bases:
PermutationGroup_unique
The primitive group from the GAP tables of primitive groups.
INPUT:
d
– non-negative integer. the degree of the group.n
– positive integer. the index of the group in the GAP database, starting at 1
OUTPUT:
The
n
-th primitive group of degreed
.EXAMPLES:
sage: PrimitiveGroup(0,1) Trivial group sage: PrimitiveGroup(1,1) Trivial group sage: G = PrimitiveGroup(5, 2); G D(2*5) sage: G.gens() ((2,4)(3,5), (1,2,3,5,4)) sage: G.category() Category of finite enumerated permutation groups
Warning
this follows GAP’s naming convention of indexing the primitive groups starting from
1
:sage: PrimitiveGroup(5,0) Traceback (most recent call last): ... ValueError: index n must be in {1,..,5}
Only primitive groups of “small” degree are available in GAP’s database:
sage: PrimitiveGroup(2^12,1) Traceback (most recent call last): ... GAPError: Error, Primitive groups of degree 4096 are not known!
- group_primitive_id()#
Return the index of this group in the GAP database of primitive groups.
OUTPUT:
A positive integer, following GAP’s conventions.
EXAMPLES:
sage: G = PrimitiveGroup(5,2); G.group_primitive_id() 2
- sage.groups.perm_gps.permgroup_named.PrimitiveGroups(d=None)#
Return the set of all primitive groups of a given degree
d
INPUT:
d
– an integer (optional)
OUTPUT:
The set of all primitive groups of a given degree
d
up to isomorphisms using GAP. Ifd
is not specified, it returns the set of all primitive groups up to isomorphisms stored in GAP.EXAMPLES:
sage: PrimitiveGroups(3) Primitive Groups of degree 3 sage: PrimitiveGroups(7) Primitive Groups of degree 7 sage: PrimitiveGroups(8) Primitive Groups of degree 8 sage: PrimitiveGroups() Primitive Groups
The database is currently limited:
sage: PrimitiveGroups(2^12).cardinality() Traceback (most recent call last): ... GAPError: Error, Primitive groups of degree 4096 are not known!
Todo
This enumeration helper could be extended based on
PrimitiveGroupsIterator
in GAP. This method allows to enumerate groups with specified properties such as transitivity, solvability, …, without creating all groups.
- class sage.groups.perm_gps.permgroup_named.PrimitiveGroupsAll#
Bases:
DisjointUnionEnumeratedSets
The infinite set of all primitive groups up to isomorphisms.
EXAMPLES:
sage: L = PrimitiveGroups(); L Primitive Groups sage: L.category() Category of facade infinite enumerated sets sage: L.cardinality() +Infinity sage: p = L.__iter__() sage: (next(p), next(p), next(p), next(p), ....: next(p), next(p), next(p), next(p)) (Trivial group, Trivial group, S(2), A(3), S(3), A(4), S(4), C(5))
- class sage.groups.perm_gps.permgroup_named.PrimitiveGroupsOfDegree(n)#
Bases:
CachedRepresentation
,Parent
The set of all primitive groups of a given degree up to isomorphisms.
EXAMPLES:
sage: S = PrimitiveGroups(5); S Primitive Groups of degree 5 sage: S.list() [C(5), D(2*5), AGL(1, 5), A(5), S(5)] sage: S.an_element() C(5)
We write the cardinality of all primitive groups of degree 5:
sage: for G in PrimitiveGroups(5): ....: print(G.cardinality()) 5 10 20 60 120
- cardinality()#
Return the cardinality of
self
.OUTPUT:
An integer. The number of primitive groups of a given degree up to isomorphism.
EXAMPLES:
sage: PrimitiveGroups(0).cardinality() 1 sage: PrimitiveGroups(2).cardinality() 1 sage: PrimitiveGroups(7).cardinality() 7 sage: PrimitiveGroups(12).cardinality() 6 sage: [PrimitiveGroups(i).cardinality() for i in range(11)] [1, 1, 1, 2, 2, 5, 4, 7, 7, 11, 9]
- class sage.groups.perm_gps.permgroup_named.QuaternionGroup#
Bases:
DiCyclicGroup
The quaternion group of order 8.
OUTPUT:
The quaternion group of order 8, as a permutation group. See the
DiCyclicGroup
class for a generalization of this construction.Note
This group is also available via
groups.permutation.Quaternion()
.EXAMPLES:
The quaternion group is one of two non-abelian groups of order 8, the other being the dihedral group \(D_4\). One way to describe this group is with three generators, \(I, J, K\), so the whole group is then given as the set \(\{\pm 1, \pm I, \pm J, \pm K\}\) with relations such as \(I^2=J^2=K^2=-1\), \(IJ=K\) and \(JI=-K\).
The examples below illustrate how to use this group in a similar manner, by testing some of these relations. The representation used here is the left-regular representation.
sage: Q = QuaternionGroup() sage: I = Q.gen(0) sage: J = Q.gen(1) sage: K = I*J sage: [I,J,K] [(1,2,3,4)(5,6,7,8), (1,5,3,7)(2,8,4,6), (1,8,3,6)(2,7,4,5)] sage: neg_one = I^2; neg_one (1,3)(2,4)(5,7)(6,8) sage: J^2 == neg_one and K^2 == neg_one True sage: J*I == neg_one*K True sage: Q.center().order() == 2 True sage: neg_one in Q.center() True
AUTHOR:
Rob Beezer (2009-10-09)
- class sage.groups.perm_gps.permgroup_named.SemidihedralGroup(m)#
Bases:
PermutationGroup_unique
The semidihedral group of order \(2^m\).
INPUT:
m
- a positive integer; the power of 2 that is the group’s order
OUTPUT:
The semidihedral group of order \(2^m\). These groups can be thought of as a semidirect product of \(C_{2^{m-1}}\) with \(C_2\), where the nontrivial element of \(C_2\) is sent to the element of the automorphism group of \(C_{2^{m-1}}\) that sends elements to their \(-1+2^{m-2}\) th power. Thus, the group has the presentation:
\[\langle x, y\mid x^{2^{m-1}}, y^{2}, y^{-1}xy=x^{-1+2^{m-2}} \rangle\]This family is notable because it is made up of non-abelian 2-groups that all contain cyclic subgroups of index 2. It is one of only four such families.
EXAMPLES:
In [Gor1980] it is shown that the semidihedral groups have center of order 2. It is also shown that they have a Frattini subgroup equal to their commutator, which is a cyclic subgroup of order \(2^{m-2}\).
sage: G = SemidihedralGroup(12) sage: G.order() == 2^12 True sage: G.commutator() == G.frattini_subgroup() True sage: G.commutator().order() == 2^10 True sage: G.commutator().is_cyclic() True sage: G.center().order() 2 sage: G = SemidihedralGroup(4) sage: len([H for H in G.subgroups() if H.is_cyclic() and H.order() == 8]) 1 sage: G.gens() ((2,4)(3,7)(6,8), (1,2,3,4,5,6,7,8)) sage: x = G.gens()[1]; y = G.gens()[0] sage: x.order() == 2^3; y.order() == 2 True True sage: y*x*y == x^(-1+2^2) True
AUTHOR:
Kevin Halasz (2012-8-7)
- class sage.groups.perm_gps.permgroup_named.SmallPermutationGroup(order, gap_id)#
Bases:
PermutationGroup_generic
A GAP SmallGroup, returned as a permutation group.
GAP contains a library SGL of small groups, each identified by its GAP SmallGroup id. (MAGMA uses the same identifiers). The GAP SmallGroup id is a pair
[n,k]
consisting ofn
, the order of the group, andk
, an index determining the group specifically. This class can construct the group as a permutation group from this data.INPUT:
order
– the order of the groupgap_id
– the numerical index in the GAP id of the group
Generators may be obtained through the
gens()
method. These could change for a particular group in later releases of GAP. In many instances the degree of the constructed groupSmallPermutationGroup(n,k)
will be a permutation group on \(n\) letters, but this will not always be true.EXAMPLES:
sage: G = SmallPermutationGroup(12,4); G Group of order 12 and GAP Id 4 as a permutation group sage: G.gens() ((1,2)(3,5)(4,10)(6,8)(7,12)(9,11), (1,3)(2,5)(4,7)(6,9)(8,11)(10,12), (1,4,8)(2,6,10)(3,7,11)(5,9,12)) sage: G.character_table() [ 1 1 1 1 1 1] [ 1 -1 -1 1 1 -1] [ 1 -1 1 1 -1 1] [ 1 1 -1 1 -1 -1] [ 2 0 -2 -1 0 1] [ 2 0 2 -1 0 -1] sage: def numgps(n): return ZZ(libgap.NumberSmallGroups(n)) sage: all(SmallPermutationGroup(n,k).id()==[n,k] for n in [1..64] for k in [1..numgps(n)]) True sage: H = SmallPermutationGroup(6,1) sage: H.is_abelian() False sage: [H.centralizer(g) for g in H.conjugacy_classes_representatives()] [Subgroup generated by [(1,2)(3,6)(4,5), (1,3,5)(2,4,6)] of (Group of order 6 and GAP Id 1 as a permutation group), Subgroup generated by [(1,2)(3,6)(4,5)] of (Group of order 6 and GAP Id 1 as a permutation group), Subgroup generated by [(1,3,5)(2,4,6), (1,5,3)(2,6,4)] of (Group of order 6 and GAP Id 1 as a permutation group)]
- gap_small_group()#
Return the GAP small group object corresponding to
self
.GAP realizes some small groups as PermutationGroup, others as PcGroups (polycyclic groups). The
SmallPermutationGroup
class always returns a PermutationGroup, but in the process of creating this group a GAP SmallGroup is generated. This method returns that group.EXAMPLES:
sage: SmallPermutationGroup(168,41).gap_small_group() <pc group of size 168 with 5 generators> sage: SmallPermutationGroup(168,42).gap_small_group() Group([ (3,4)(5,6), (1,2,3)(4,5,7) ])
- order()#
Return the order of the group corresponding to
self
.EXAMPLES:
sage: [SmallPermutationGroup(21,k).order() for k in [1,2]] [21, 21]
- class sage.groups.perm_gps.permgroup_named.SplitMetacyclicGroup(p, m)#
Bases:
PermutationGroup_unique
The split metacyclic group of order \(p^m\).
INPUT:
p
– a prime number that is the prime underlying this p-groupm
– a positive integer such that the order of this group is the \(p^m\). Be aware that, for even \(p\), \(m\) must be greater than 3, while for odd \(p\), \(m\) must be greater than 2.
OUTPUT:
The split metacyclic group of order \(p^m\). This family of groups has presentation
\[\langle x, y\mid x^{p^{m-1}}, y^{p}, y^{-1}xy=x^{1+p^{m-2}} \rangle\]This family is notable because, for odd \(p\), these are the only \(p\)-groups with a cyclic subgroup of index \(p\), a result proven in [Gor1980]. It is also shown in [Gor1980] that this is one of four families containing nonabelian 2-groups with a cyclic subgroup of index 2 (with the others being the dicyclic groups, the dihedral groups, and the semidihedral groups).
EXAMPLES:
Using the last relation in the group’s presentation, one can see that the elements of the form \(y^{i}x\), \(0 \leq i \leq p-1\) all have order \(p^{m-1}\), as it can be shown that their \(p\) th powers are all \(x^{p^{m-2}+p}\), an element with order \(p^{m-2}\). Manipulation of the same relation shows that none of these elements are powers of any other. Thus, there are \(p\) cyclic maximal subgroups in each split metacyclic group. It is also proven in [Gor1980] that this family has commutator subgroup of order \(p\), and the Frattini subgroup is equal to the center, with this group being cyclic of order \(p^{m-2}\). These characteristics are necessary to identify these groups in the case that \(p=2\), although the possession of a cyclic maximal subgroup in a non-abelian \(p\)-group is enough for odd \(p\) given the group’s order.
sage: G = SplitMetacyclicGroup(2,8) sage: G.order() == 2**8 True sage: G.is_abelian() False sage: len([H for H in G.subgroups() if H.order() == 2^7 and H.is_cyclic()]) 2 sage: G.commutator().order() 2 sage: G.frattini_subgroup() == G.center() True sage: G.center().order() == 2^6 True sage: G.center().is_cyclic() True sage: G = SplitMetacyclicGroup(3,3) sage: len([H for H in G.subgroups() if H.order() == 3^2 and H.is_cyclic()]) 3 sage: G.commutator().order() 3 sage: G.frattini_subgroup() == G.center() True sage: G.center().order() 3
AUTHOR:
Kevin Halasz (2012-8-7)
- class sage.groups.perm_gps.permgroup_named.SuzukiGroup(q, name='a')#
Bases:
PermutationGroup_unique
The Suzuki group over GF(q), \(^2 B_2(2^{2k+1}) = Sz(2^{2k+1})\).
A wrapper for the GAP function SuzukiGroup.
INPUT:
q – 2^n, an odd power of 2; the size of the ground field. (Strictly speaking, n should be greater than 1, or else this group os not simple.)
name – (default: ‘a’) variable name of indeterminate of finite field GF(q)
OUTPUT:
A Suzuki group.
Note
This group is also available via
groups.permutation.Suzuki()
.EXAMPLES:
sage: SuzukiGroup(8) Permutation Group with generators [(1,2)(3,10)(4,42)(5,18)(6,50)(7,26)(8,58)(9,34)(12,28)(13,45)(14,44)(15,23)(16,31)(17,21)(19,39)(20,38)(22,25)(24,61)(27,60)(29,65)(30,55)(32,33)(35,52)(36,49)(37,59)(40,54)(41,62)(43,53)(46,48)(47,56)(51,63)(57,64), (1,28,10,44)(3,50,11,42)(4,43,53,64)(5,9,39,52)(6,36,63,13)(7,51,60,57)(8,33,37,16)(12,24,55,29)(14,30,48,47)(15,19,61,54)(17,59,22,62)(18,23,34,31)(20,38,49,25)(21,26,45,58)(27,32,41,65)(35,46,40,56)] sage: print(SuzukiGroup(8)) The Suzuki group over Finite Field in a of size 2^3 sage: G = SuzukiGroup(32, name='alpha') sage: G.order() 32537600 sage: G.order().factor() 2^10 * 5^2 * 31 * 41 sage: G.base_ring() Finite Field in alpha of size 2^5
REFERENCES:
- base_ring()#
EXAMPLES:
sage: G = SuzukiGroup(32, name='alpha') sage: G.base_ring() Finite Field in alpha of size 2^5
- class sage.groups.perm_gps.permgroup_named.SuzukiSporadicGroup#
Bases:
PermutationGroup_unique
Suzuki Sporadic Group
EXAMPLES:
sage: G = groups.permutation.SuzukiSporadic(); G # optional - gap_package_atlasrep internet Sporadic Suzuki group acting on 1782 points
- class sage.groups.perm_gps.permgroup_named.SymmetricGroup(domain=None)#
Bases:
PermutationGroup_symalt
The full symmetric group of order \(n!\), as a permutation group.
If \(n\) is a list or tuple of positive integers then it returns the symmetric group of the associated set.
INPUT:
n
– a positive integer, or list or tuple thereof
Note
This group is also available via
groups.permutation.Symmetric()
.EXAMPLES:
sage: G = SymmetricGroup(8) sage: G.order() 40320 sage: G Symmetric group of order 8! as a permutation group sage: G.degree() 8 sage: S8 = SymmetricGroup(8) sage: G = SymmetricGroup([1,2,4,5]) sage: G Symmetric group of order 4! as a permutation group sage: G.domain() {1, 2, 4, 5} sage: G = SymmetricGroup(4) sage: G Symmetric group of order 4! as a permutation group sage: G.domain() {1, 2, 3, 4} sage: G.category() Join of Category of finite enumerated permutation groups and Category of finite weyl groups and Category of well generated finite irreducible complex reflection groups
- Element#
alias of
SymmetricGroupElement
- algebra(base_ring, category=None)#
Return the symmetric group algebra associated to
self
.INPUT:
base_ring
– a ringcategory
– a category (default: the category ofself
)
If
self
is the symmetric group on \(1,\ldots,n\), then this is special cased to take advantage of the features inSymmetricGroupAlgebra
. Otherwise the usual group algebra is returned.EXAMPLES:
sage: S4 = SymmetricGroup(4) sage: S4.algebra(QQ) Symmetric group algebra of order 4 over Rational Field sage: S3 = SymmetricGroup([1,2,3]) sage: A = S3.algebra(QQ); A Symmetric group algebra of order 3 over Rational Field sage: a = S3.an_element(); a (2,3) sage: A(a) (2,3)
We illustrate the choice of the category:
sage: A.category() Join of Category of coxeter group algebras over Rational Field and Category of finite group algebras over Rational Field and Category of finite dimensional cellular algebras with basis over Rational Field sage: A = S3.algebra(QQ, category=Semigroups()) sage: A.category() Category of finite dimensional unital cellular semigroup algebras over Rational Field
In the following case, a usual group algebra is returned:
sage: S = SymmetricGroup([2,3,5]) sage: S.algebra(QQ) Algebra of Symmetric group of order 3! as a permutation group over Rational Field sage: a = S.an_element(); a (3,5) sage: S.algebra(QQ)(a) (3,5)
- cartan_type()#
Return the Cartan type of
self
The symmetric group \(S_n\) is a Coxeter group of type \(A_{n-1}\).
EXAMPLES:
sage: A = SymmetricGroup([2,3,7]); A.cartan_type() ['A', 2] sage: A = SymmetricGroup([]); A.cartan_type() ['A', 0]
- conjugacy_class(g)#
Return the conjugacy class of
g
inside the symmetric groupself
.INPUT:
g
– a partition or an element of the symmetric groupself
OUTPUT:
A conjugacy class of a symmetric group.
EXAMPLES:
sage: G = SymmetricGroup(5) sage: g = G((1,2,3,4)) sage: G.conjugacy_class(g) Conjugacy class of cycle type [4, 1] in Symmetric group of order 5! as a permutation group
- conjugacy_classes()#
Return a list of the conjugacy classes of
self
.EXAMPLES:
sage: G = SymmetricGroup(5) sage: G.conjugacy_classes() [Conjugacy class of cycle type [1, 1, 1, 1, 1] in Symmetric group of order 5! as a permutation group, Conjugacy class of cycle type [2, 1, 1, 1] in Symmetric group of order 5! as a permutation group, Conjugacy class of cycle type [2, 2, 1] in Symmetric group of order 5! as a permutation group, Conjugacy class of cycle type [3, 1, 1] in Symmetric group of order 5! as a permutation group, Conjugacy class of cycle type [3, 2] in Symmetric group of order 5! as a permutation group, Conjugacy class of cycle type [4, 1] in Symmetric group of order 5! as a permutation group, Conjugacy class of cycle type [5] in Symmetric group of order 5! as a permutation group]
- conjugacy_classes_iterator()#
Iterate over the conjugacy classes of
self
.EXAMPLES:
sage: G = SymmetricGroup(5) sage: list(G.conjugacy_classes_iterator()) == G.conjugacy_classes() True
- conjugacy_classes_representatives()#
Return a complete list of representatives of conjugacy classes in a permutation group \(G\).
Let \(S_n\) be the symmetric group on \(n\) letters. The conjugacy classes are indexed by partitions \(\lambda\) of \(n\). The ordering of the conjugacy classes is reverse lexicographic order of the partitions.
EXAMPLES:
sage: G = SymmetricGroup(5) sage: G.conjugacy_classes_representatives() [(), (1,2), (1,2)(3,4), (1,2,3), (1,2,3)(4,5), (1,2,3,4), (1,2,3,4,5)]
sage: S = SymmetricGroup(['a','b','c']) sage: S.conjugacy_classes_representatives() [(), ('a','b'), ('a','b','c')]
- coxeter_matrix()#
Return the Coxeter matrix of
self
.EXAMPLES:
sage: A = SymmetricGroup([2,3,7,'a']); A.coxeter_matrix() [1 3 2] [3 1 3] [2 3 1]
- index_set()#
Return the index set for the descents of the symmetric group
self
.EXAMPLES:
sage: S8 = SymmetricGroup(8) sage: S8.index_set() (1, 2, 3, 4, 5, 6, 7) sage: S = SymmetricGroup([3,1,4,5]) sage: S.index_set() (3, 1, 4)
- major_index(parameter=None)#
Return the major index generating polynomial of
self
, which is a gadget counting the elements ofself
by major index.INPUT:
parameter
– an element of a ring; the result is more explicit with a formal variable (default: elementq
of Univariate Polynomial Ring inq
over Integer Ring)
\[P(q) = \sum_{g\in S_n} q^{ \operatorname{major\ index}(g) }\]EXAMPLES:
sage: S4 = SymmetricGroup(4) sage: S4.major_index() q^6 + 3*q^5 + 5*q^4 + 6*q^3 + 5*q^2 + 3*q + 1 sage: K.<t> = QQ[] sage: S4.major_index(t) t^6 + 3*t^5 + 5*t^4 + 6*t^3 + 5*t^2 + 3*t + 1
- reflections()#
Return the list of all reflections in
self
.EXAMPLES:
sage: A = SymmetricGroup(3) sage: A.reflections() [(1,2), (1,3), (2,3)]
- simple_reflection(i)#
For \(i\) in the index set of
self
, this returns the elementary transposition \(s_i = (i,i+1)\).EXAMPLES:
sage: A = SymmetricGroup(5) sage: A.simple_reflection(3) (3,4) sage: A = SymmetricGroup([2,3,7]) sage: A.simple_reflections() Finite family {2: (2,3), 3: (3,7)}
- young_subgroup(comp)#
Return the Young subgroup associated with the composition
comp
.EXAMPLES:
sage: S = SymmetricGroup(8) sage: c = Composition([2,2,2,2]) sage: S.young_subgroup(c) Subgroup generated by [(7,8), (5,6), (3,4), (1,2)] of (Symmetric group of order 8! as a permutation group) sage: S = SymmetricGroup(['a','b','c']) sage: S.young_subgroup([2,1]) Subgroup generated by [('a','b')] of (Symmetric group of order 3! as a permutation group) sage: Y = S.young_subgroup([2,2,2,2,2]) Traceback (most recent call last): ... ValueError: the composition is not of expected size
- class sage.groups.perm_gps.permgroup_named.TransitiveGroup(d, n)#
Bases:
PermutationGroup_unique
The transitive group from the GAP tables of transitive groups.
INPUT:
d – non-negative integer; the degree
n – positive integer; the index of the group in the GAP database, starting at 1
OUTPUT:
the n-th transitive group of degree d
Note
This group is also available via
groups.permutation.Transitive()
.EXAMPLES:
sage: TransitiveGroup(0,1) Transitive group number 1 of degree 0 sage: TransitiveGroup(1,1) Transitive group number 1 of degree 1 sage: G = TransitiveGroup(5, 2); G Transitive group number 2 of degree 5 sage: G.gens() ((1,2,3,4,5), (1,4)(2,3)) sage: G.category() Category of finite enumerated permutation groups
Warning
this follows GAP’s naming convention of indexing the transitive groups starting from
1
:sage: TransitiveGroup(5,0) Traceback (most recent call last): ... ValueError: index n must be in {1,..,5}
Warning
only transitive groups of “small” degree are available in GAP’s database:
sage: TransitiveGroup(32,1) Traceback (most recent call last): ... NotImplementedError: only the transitive groups of degree at most 31 are available in GAP's database
- degree()#
Return the degree of this permutation group
EXAMPLES:
sage: TransitiveGroup(8, 44).degree() 8
- transitive_number()#
Return the index of this group in the GAP database, starting at 1
EXAMPLES:
sage: TransitiveGroup(8, 44).transitive_number() 44
- sage.groups.perm_gps.permgroup_named.TransitiveGroups(d=None)#
INPUT:
d
– an integer (optional)
Returns the set of all transitive groups of a given degree
d
up to isomorphisms. Ifd
is not specified, it returns the set of all transitive groups up to isomorphisms.EXAMPLES:
sage: TransitiveGroups(3) Transitive Groups of degree 3 sage: TransitiveGroups(7) Transitive Groups of degree 7 sage: TransitiveGroups(8) Transitive Groups of degree 8 sage: TransitiveGroups() Transitive Groups
Warning
in practice, the database currently only contains transitive groups up to degree 31:
sage: TransitiveGroups(32).cardinality() Traceback (most recent call last): ... NotImplementedError: only the transitive groups of degree at most 31 are available in GAP's database
- class sage.groups.perm_gps.permgroup_named.TransitiveGroupsAll#
Bases:
DisjointUnionEnumeratedSets
The infinite set of all transitive groups up to isomorphisms.
EXAMPLES:
sage: L = TransitiveGroups(); L Transitive Groups sage: L.category() Category of facade infinite enumerated sets sage: L.cardinality() +Infinity sage: p = L.__iter__() sage: (next(p), next(p), next(p), next(p), next(p), next(p), next(p), next(p)) (Transitive group number 1 of degree 0, Transitive group number 1 of degree 1, Transitive group number 1 of degree 2, Transitive group number 1 of degree 3, Transitive group number 2 of degree 3, Transitive group number 1 of degree 4, Transitive group number 2 of degree 4, Transitive group number 3 of degree 4)
- class sage.groups.perm_gps.permgroup_named.TransitiveGroupsOfDegree(n)#
Bases:
CachedRepresentation
,Parent
The set of all transitive groups of a given (small) degree up to isomorphism.
EXAMPLES:
sage: S = TransitiveGroups(4); S Transitive Groups of degree 4 sage: list(S) [Transitive group number 1 of degree 4, Transitive group number 2 of degree 4, Transitive group number 3 of degree 4, Transitive group number 4 of degree 4, Transitive group number 5 of degree 4] sage: TransitiveGroups(5).an_element() Transitive group number 1 of degree 5
We write the cardinality of all transitive groups of degree 5:
sage: for G in TransitiveGroups(5): ....: print(G.cardinality()) 5 10 20 60 120
- cardinality()#
Return the cardinality of
self
, that is the number of transitive groups of a given degree.EXAMPLES:
sage: TransitiveGroups(0).cardinality() 1 sage: TransitiveGroups(2).cardinality() 1 sage: TransitiveGroups(7).cardinality() 7 sage: TransitiveGroups(12).cardinality() 301 sage: [TransitiveGroups(i).cardinality() for i in range(11)] [1, 1, 1, 2, 5, 5, 16, 7, 50, 34, 45]
Warning
GAP comes with a database containing all transitive groups up to degree 31:
sage: TransitiveGroups(32).cardinality() Traceback (most recent call last): ... NotImplementedError: only the transitive groups of degree at most 31 are available in GAP's database