Module: sage.groups.perm_gps.permgroup
Permutation groups
A permutation group is a finite group G whose elements are permutations
of a given finite set X (i.e., bijections X -> X) and whose group operation is
the composition of permutations. The number of elements of
is called the
degree of G.
In Sage a permutation is represented as either a string that defines a permutation using disjoint cycle notation, or a list of tuples, which represent disjoint cycles.
(a,...,b)(c,...,d)...(e,...,f) <--> [(a,...,b), (c,...,d),..., (e,...,f)] () = identity <--> []
You can make the "named" permutation groups (see permgp_named.py
)
and use the following constructions:
- permutation group generated by elements, - direct_product_permgroups, which takes a list of permutation groups and returns their direct product.
JOKE: Q: What's hot, chunky, and acts on a polygon? A: Dihedral soup. Renteln, P. and Dundes, A. "Foolproof: A Sampling of Mathematical Folk Humor." Notices Amer. Math. Soc. 52, 24-34, 2005.
Author: - David Joyner (2005-10-14): first version - David Joyner (2005-11-17) - William Stein (2005-11-26): rewrite to better wrap Gap - David Joyner (2005-12-21) - Stein and Joyner (2006-01-04): added conjugacy_class_representatives - David Joyner (2006-03): reorganization into subdirectory perm_gps; added __contains__, has_element; fixed _cmp_; added subgroup class+methods, PGL,PSL,PSp, PSU classes, - David Joyner (2006-06): added PGU, functionality to SymmetricGroup, AlternatingGroup, direct_product_permgroups - David Joyner (2006-08): added degree, ramification_module_decomposition_modular_curve and ramification_module_decomposition_hurwitz_curve methods to PSL(2,q), MathieuGroup, is_isomorphic - Bobby Moretti (2006)-10): Added KleinFourGroup, fixed bug in DihedralGroup - David Joyner (2006-10): added is_subgroup (fixing a bug found by Kiran Kedlaya), is_solvable, normalizer, is_normal_subgroup, Suzuki - David Kohel (2007-02): fixed __contains__ to not enumerate group elements, following the convention for __call__ - David Harvey, Mike Hansen, Nick Alexander, William Stein (2007-02,03,04,05): Various patches - Nathan Dunfield (2007-05): added orbits - David Joyner (2007-06): added subgroup method (suggested by David Kohel), composition_series, lower_central_series, upper_central_series, cayley_table, quotient_group, sylow_subgroup, is_cyclic, homology, homology_part, cohomology, cohomology_part, poincare_series, molien_series, is_simple, is_monomial, is_supersolvable, is_nilpotent, is_perfect, is_polycyclic, is_elementary_abelian, is_pgroup, gens_small, isomorphism_type_info_simple_group. moved all the "named" groups to a new file. - Nick Alexander (2007-07): move is_isomorphic to isomorphism_to, add from_gap_list - William Stein (2007-07): put is_isomorphic back (and make it better) - David Joyner (2007-08): fixed bugs in composition_series, upper/lower_central_series, derived_series, - David Joyner (2008-06): modified is_normal (reported by W. J. Palenstijn), and added normalizes
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.
Module-level Functions
x, [from_group=False], [check=True]) |
Return the permutation group associated to
(typically a list
of generators).
sage: G = PermutationGroup([[(1,2,3),(4,5)],[(3,4)]]) sage: G Permutation Group with generators [(1,2,3)(4,5), (3,4)]
We can also make permutation groups from PARI groups:
sage: H = pari('x^4 - 2*x^3 - 2*x + 1').polgalois() sage: G = PariGroup(H, 4); G PARI group [8, -1, 3, "D(4)"] of degree 4 sage: H = PermutationGroup(G); H # requires optional database_gap Transitive group number 3 of degree 4 sage: H.gens() # requires optional database_gap ((1,2,3,4), (1,3))
We can also create permutation groups whose generators are Gap permutation objects.
sage: p = gap('(1,2)(3,7)(4,6)(5,8)'); p (1,2)(3,7)(4,6)(5,8) sage: PermutationGroup([p]) Permutation Group with generators [(1,2)(3,7)(4,6)(5,8)]
There is an underlying gap object that implements each permutation group.
sage: G = PermutationGroup([[(1,2,3,4)]]) sage: G._gap_() Group( [ (1,2,3,4) ] ) sage: gap(G) Group( [ (1,2,3,4) ] ) sage: gap(G) is G._gap_() True sage: G = PermutationGroup([[(1,2,3),(4,5)],[(3,4)]]) sage: current_randstate().set_seed_gap() sage: G._gap_().DerivedSeries() [ Group( [ (1,2,3)(4,5), (3,4) ] ), Group( [ (1,5)(3,4), (1,5)(2,3), (1,5,4) ] ) ]
P) |
Takes the direct product of the permutation groups listed in P.
sage: G1 = AlternatingGroup([1,2,4,5]) sage: G2 = AlternatingGroup([3,4,6,7]) sage: D = direct_product_permgroups([G1,G2,G1]) sage: D.order() 1728 sage: D = direct_product_permgroups([G1]) sage: D==G1 True sage: direct_product_permgroups([]) Symmetric group of order 1! as a permutation group
G, src) |
sage: from sage.groups.perm_gps.permgroup import from_gap_list sage: G = PermutationGroup([[(1,2,3),(4,5)],[(3,4)]]) sage: L = from_gap_list(G, "[(1,2,3)(4,5), (3,4)]"); L [(1,2,3)(4,5), (3,4)] sage: L[0].parent() is G True sage: L[1].parent() is G True
x) |
Put a permutation in Gap format, as a string.
Class: PermutationGroup_generic
sage: G = PermutationGroup([[(1,2,3),(4,5)],[(3,4)]]) sage: G Permutation Group with generators [(1,2,3)(4,5), (3,4)] sage: G.center() Permutation Group with generators [()] sage: G.group_id() # requires optional database_gap [120, 34] sage: n = G.order(); n 120 sage: G = PermutationGroup([[(1,2,3),(4,5)],[(3,4)]]) sage: loads(G.dumps()) == G True
self, gens, [from_group=False], [check=True]) |
Initializes instance of self, a PermutationGroup_generic
object.
The flag from_group determines whether or not self should be
initialized as a Gap Group
object and sent to the Gap
interpreter. If gens are Gap objects, then self is initialized as a Gap
Group
.
We explicitly construct the alternating group on four elements.
sage: A4 = PermutationGroup([[(1,2,3)],[(2,3,4)]]); A4 Permutation Group with generators [(1,2,3), (2,3,4)] sage: A4.__init__([[(1,2,3)],[(2,3,4)]]); A4 Permutation Group with generators [(1,2,3), (2,3,4)] sage: A4.center() Permutation Group with generators [()] sage: loads(A4.dumps()) == A4 True
Functions: cayley_table,
center,
character_table,
cohomology,
cohomology_part,
composition_series,
conjugacy_classes_representatives,
conjugacy_classes_subgroups,
degree,
derived_series,
direct_product,
exponent,
gen,
gens,
gens_small,
group_id,
has_element,
homology,
homology_part,
id,
identity,
is_abelian,
is_commutative,
is_cyclic,
is_elementary_abelian,
is_isomorphic,
is_monomial,
is_nilpotent,
is_normal,
is_perfect,
is_pgroup,
is_polycyclic,
is_simple,
is_solvable,
is_subgroup,
is_supersolvable,
is_transitive,
isomorphism_to,
isomorphism_type_info_simple_group,
largest_moved_point,
list,
lower_central_series,
molien_series,
multiplication_table,
normal_subgroups,
normalizer,
normalizes,
orbits,
order,
poincare_series,
quotient_group,
random_element,
smallest_moved_point,
subgroup,
sylow_subgroup,
upper_central_series
self, [names=x]) |
Returns the multiplication table, or Cayley table, of the finite group G in the form of a matrix with symbolic coefficients. This function is useful for learning, teaching, and exploring elementary group theory. Of course, G must be a group of low order.
As the last line below illustrates, the ordering used here in the first row is the same as in G.list().
sage: G = PermutationGroup(['(1,2,3)', '(2,3)']) sage: G.cayley_table() [x0 x1 x2 x3 x4 x5] [x1 x0 x3 x2 x5 x4] [x2 x4 x0 x5 x1 x3] [x3 x5 x1 x4 x0 x2] [x4 x2 x5 x0 x3 x1] [x5 x3 x4 x1 x2 x0] sage: G.list()[3]*G.list()[3] == G.list()[4] True sage: G.cayley_table("y") [y0 y1 y2 y3 y4 y5] [y1 y0 y3 y2 y5 y4] [y2 y4 y0 y5 y1 y3] [y3 y5 y1 y4 y0 y2] [y4 y2 y5 y0 y3 y1] [y5 y3 y4 y1 y2 y0] sage: G.cayley_table(names="abcdef") [a b c d e f] [b a d c f e] [c e a f b d] [d f b e a c] [e c f a d b] [f d e b c a]
self) |
Return the subgroup of elements of that commute with every element of this group.
sage: G = PermutationGroup([[(1,2,3,4)]]) sage: G.center() Permutation Group with generators [(1,2,3,4)] sage: G = PermutationGroup([[(1,2,3,4)], [(1,2)]]) sage: G.center() Permutation Group with generators [()]
self) |
Returns the matrix of values of the irreducible characters of
a permutation group
at the conjugacy classes of
. The
columns represent the the conjugacy classes of
and the
rows represent the different irreducible characters in the
ordering given by GAP.
sage: G = PermutationGroup([[(1,2),(3,4)], [(1,2,3)]]) sage: G.order() 12 sage: G.character_table() [ 1 1 1 1] [ 1 1 -zeta3 - 1 zeta3] [ 1 1 zeta3 -zeta3 - 1] [ 3 -1 0 0] sage: G = PermutationGroup([[(1,2),(3,4)], [(1,2,3)]]) sage: CT = gap(G).CharacterTable()
Type print gap.eval("Display(
sage: G = PermutationGroup([[(1,2),(3,4)], [(1,2,3,4)]]) sage: G.order() 8 sage: G.character_table() [ 1 1 1 1 1] [ 1 -1 -1 1 1] [ 1 -1 1 -1 1] [ 1 1 -1 -1 1] [ 2 0 0 0 -2] sage: CT = gap(G).CharacterTable()
Again, type print gap.eval("Display(
sage: SymmetricGroup(2).character_table() [ 1 -1] [ 1 1] sage: SymmetricGroup(3).character_table() [ 1 -1 1] [ 2 0 -1] [ 1 1 1] sage: SymmetricGroup(5).character_table() [ 1 -1 1 1 -1 -1 1] [ 4 -2 0 1 1 0 -1] [ 5 -1 1 -1 -1 1 0] [ 6 0 -2 0 0 0 1] [ 5 1 1 -1 1 -1 0] [ 4 2 0 1 -1 0 -1] [ 1 1 1 1 1 1 1] sage: list(AlternatingGroup(6).character_table()) [(1, 1, 1, 1, 1, 1, 1), (5, 1, 2, -1, -1, 0, 0), (5, 1, -1, 2, -1, 0, 0), (8, 0, -1, -1, 0, zeta5^3 + zeta5^2 + 1, -zeta5^3 - zeta5^2), (8, 0, -1, -1, 0, -zeta5^3 - zeta5^2, zeta5^3 + zeta5^2 + 1), (9, 1, 0, 0, 1, -1, -1), (10, -2, 1, 1, 0, 0, 0)]
Suppose that you have a class function
on
and you
know the values
on the conjugacy class
elements in
conjugacy_classes_representatives(G)
=
. Since the irreducible characters
of
form an
-basis of the space
of all class functions (
a ``sufficiently large''
cyclotomic field), such a class function is a linear
combination of these basis elements,
. To find the coefficients
, you simply solve
the linear system
character_table_values(G)
*
,
where
=
character_table_values(G)
.
Author: - David Joyner and William Stein (2006-01-04)
self, n, [p=0]) |
Computes the group cohomology H_n(G, F), where F = Z if p=0 and F = Z/pZ if p >0 is a prime. Wraps HAP's GroupHomology function, written by Graham Ellis.
REQUIRES: GAP package HAP (in gap_packages-*.spkg).
sage: G = SymmetricGroup(3) sage: G.cohomology(5) # requires optional gap_packages Trivial Abelian Group sage: G.cohomology(5,2) # requires optional gap_packages Multiplicative Abelian Group isomorphic to C2 sage: G.homology(5,3) # requires optional gap_packages Trivial Abelian Group sage: G.homology(5,4) # requires optional gap_packages Traceback (most recent call last): ... ValueError: p must be 0 or prime
This computes
,
, resp.
Author: David Joyner and Graham Ellis
REFERENCES:
G. Ellis, "Computing group resolutions", J. Symbolic Computation. Vol.38, (2004)1077-1118
(Available at http://hamilton.nuigalway.ie/
.
D. Joyner, "A primer on computational group homology and cohomology",
http://front.math.ucdavis.edu/0706.0549
self, n, [p=0]) |
Computes the p-part of the group cohomology
, where
if
and
if
is a prime. Wraps HAP's Homology function, written by
Graham Ellis, applied to the
-Sylow subgroup of
.
REQUIRES: GAP package HAP (in gap_packages-*.spkg).
sage: G = SymmetricGroup(5) sage: G.cohomology_part(7,2) # requires optional gap_packages Multiplicative Abelian Group isomorphic to C2 x C2 x C2 sage: G = SymmetricGroup(3) sage: G.cohomology_part(2,3) Multiplicative Abelian Group isomorphic to C3
Author: David Joyner and Graham Ellis
self) |
Return the composition series of this group as a list of permutation groups.
These computations use pseudo-random numbers, so we set the seed for reproducible testing.
sage: set_random_seed(0) sage: G = PermutationGroup([[(1,2,3),(4,5)],[(3,4)]]) sage: G.composition_series() # random output [Permutation Group with generators [(1,2,3)(4,5), (3,4)], Permutation Group with generators [(1,5)(3,4), (1,5)(2,3), (1,5,4)], Permutation Group with generators [()]]
self) |
Returns a complete list of representatives of conjugacy classes in a permutation group G. The ordering is that given by GAP.
sage: G = PermutationGroup([[(1,2),(3,4)], [(1,2,3,4)]]) sage: cl = G.conjugacy_classes_representatives(); cl [(), (2,4), (1,2)(3,4), (1,2,3,4), (1,3)(2,4)] sage: cl[3] in G True
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)]
Author: David Joyner and William Stein (2006-01-04)
self) |
Returns a complete list of representatives of conjugacy classes of subgroups in a permutation group G. The ordering is that given by GAP.
sage: G = PermutationGroup([[(1,2),(3,4)], [(1,2,3,4)]]) sage: cl = G.conjugacy_classes_subgroups() sage: cl [Permutation Group with generators [()], Permutation Group with generators [(1,2)(3,4)], Permutation Group with generators [(1,3)(2,4)], Permutation Group with generators [(2,4)], Permutation Group with generators [(1,4)(2,3), (1,2)(3,4)], Permutation Group with generators [(1,3)(2,4), (2,4)], Permutation Group with generators [(1,3)(2,4), (1,2,3,4)], Permutation Group with generators [(1,3)(2,4), (1,2)(3,4), (1,2,3,4)]]
sage: G = SymmetricGroup(3) sage: G.conjugacy_classes_subgroups() [Permutation Group with generators [()], Permutation Group with generators [(2,3)], Permutation Group with generators [(1,2,3)], Permutation Group with generators [(1,3,2), (1,2)]]
Author: David Joyner (2006-10)
self) |
Synonym for largest_moved_point().
sage: G = PermutationGroup([[(1,2,3),(4,5)],[(3,4)]]) sage: G.degree() 5
self) |
Return the derived series of this group as a list of permutation groups.
These computations use pseudo-random numbers, so we set the seed for reproducible testing.
sage: set_random_seed(0) sage: G = PermutationGroup([[(1,2,3),(4,5)],[(3,4)]]) sage: G.derived_series() # random output [Permutation Group with generators [(1,2,3)(4,5), (3,4)], Permutation Group with generators [(1,5)(3,4), (1,5)(2,4), (2,4)(3,5)]]
self, other, [maps=True]) |
Wraps GAP's DirectProduct, Embedding, and Projection.
SAGE calls GAP's DirectProduct, which chooses an efficient representation for the direct product. The direct product of permutation groups will be a permutation group again. For a direct product D, the GAP operation Embedding(D,i) returns the homomorphism embedding the i-th factor into D. The GAP operation Projection(D,i) gives the projection of D onto the i-th factor.
Input:
This method returns a 5-tuple - a permutation groups and 4 morphisms.
sage: G = CyclicPermutationGroup(4) sage: D = G.direct_product(G,False) sage: D Permutation Group with generators [(1,2,3,4), (5,6,7,8)] sage: D,iota1,iota2,pr1,pr2 = G.direct_product(G) sage: D; iota1; iota2; pr1; pr2 Permutation Group with generators [(1,2,3,4), (5,6,7,8)] Homomorphism : Cyclic group of order 4 as a permutation group --> Permutation Group with generators [(1,2,3,4), (5,6,7,8)] Homomorphism : Cyclic group of order 4 as a permutation group --> Permutation Group with generators [(1,2,3,4), (5,6,7,8)] Homomorphism : Permutation Group with generators [(1,2,3,4), (5,6,7,8)] --> Cyclic group of order 4 as a permutation group Homomorphism : Permutation Group with generators [(1,2,3,4), (5,6,7,8)] --> Cyclic group of order 4 as a permutation group
sage: g=D([(1,3),(2,4)]); g (1,3)(2,4) sage: d=D([(1,4,3,2),(5,7),(6,8)]); d (1,4,3,2)(5,7)(6,8) sage: iota1(g); iota2(g); pr1(d); pr2(d) (1,3)(2,4) (5,7)(6,8) (1,4,3,2) (1,3)(2,4)
self) |
Computes the exponent of the group. The exponent
of a group
is the lcm of
the orders of its elements, that is,
is the smallest integer such that
for all
.
sage: G = AlternatingGroup(4) sage: G.exponent() 6
self, i) |
Returns the ith generator of self; that is, the ith element of the
list self.gens()
.
We explicitly construct the alternating group on four elements:
sage: A4 = PermutationGroup([[(1,2,3)],[(2,3,4)]]); A4 Permutation Group with generators [(1,2,3), (2,3,4)] sage: A4.gens() ((1,2,3), (2,3,4)) sage: A4.gen(0) (1,2,3) sage: A4.gen(1) (2,3,4) sage: A4.gens()[0]; A4.gens()[1] (1,2,3) (2,3,4)
self) |
Return tuple of generators of this group. These need not be minimal, as they are the generators used in defining this group.
sage: G = PermutationGroup([[(1,2,3)], [(1,2)]]) sage: G.gens() ((1,2,3), (1,2))
Note that the generators need not be minimal.
sage: G = PermutationGroup([[(1,2)], [(1,2)]]) sage: G.gens() ((1,2), (1,2))
sage: G = PermutationGroup([[(1,2,3,4), (5,6)], [(1,2)]]) sage: g = G.gens() sage: g[0] (1,2,3,4)(5,6) sage: g[1] (1,2)
self) |
Returns a generating set of G which has few elements. As neither irredundancy, nor minimal length is proven, it is fast.
sage: R = "(25,27,32,30)(26,29,31,28)( 3,38,43,19)( 5,36,45,21)( 8,33,48,24)" ## R = right sage: U = "( 1, 3, 8, 6)( 2, 5, 7, 4)( 9,33,25,17)(10,34,26,18)(11,35,27,19)" ## U = top sage: L = "( 9,11,16,14)(10,13,15,12)( 1,17,41,40)( 4,20,44,37)( 6,22,46,35)" ## L = left sage: F = "(17,19,24,22)(18,21,23,20)( 6,25,43,16)( 7,28,42,13)( 8,30,41,11)" ## F = front sage: B = "(33,35,40,38)(34,37,39,36)( 3, 9,46,32)( 2,12,47,29)( 1,14,48,27)" ## B = back or rear sage: D = "(41,43,48,46)(42,45,47,44)(14,22,30,38)(15,23,31,39)(16,24,32,40)" ## D = down or bottom sage: G = PermutationGroup([R,L,U,F,B,D]) sage: len(G.gens_small()) 2
self) |
Return the ID code of this group, which is a list of two integers. Requires "optional" database_gap-4.4.x package.
sage: G = PermutationGroup([[(1,2,3),(4,5)], [(1,2)]]) sage: G.group_id() # requires optional database_gap-4.4.6 package [12, 4]
self, item) |
Returns boolean value of "item in self" - however *ignores* parentage.
sage: G = CyclicPermutationGroup(4) sage: gens = G.gens() sage: H = DihedralGroup(4) sage: g = G([(1,2,3,4)]); g (1,2,3,4) sage: G.has_element(g) True sage: h = H([(1,2),(3,4)]); h (1,2)(3,4) sage: G.has_element(h) False
self, n, [p=0]) |
Computes the group homology
, where
if
and
if
is a prime. Wraps HAP's GroupHomology
function, written by Graham Ellis.
REQUIRES: GAP package HAP (in gap_packages-*.spkg).
Author: David Joyner and Graham Ellis
The example below computes
,
,
, and
,
resp. To compute the
-part of
, use the
homology_part
function.
sage: G = SymmetricGroup(5) sage: G.homology(7) # requires optional gap_packages Multiplicative Abelian Group isomorphic to C2 x C2 x C4 x C3 x C5 sage: G.homology(7,2) # requires optional gap_packages Multiplicative Abelian Group isomorphic to C2 x C2 x C2 x C2 x C2 sage: G.homology(7,3) # requires optional gap_packages Multiplicative Abelian Group isomorphic to C3 sage: G.homology(7,5) # requires optional gap_packages Multiplicative Abelian Group isomorphic to C5
REFERENCES:
G. Ellis, "Computing group resolutions", J. Symbolic Computation. Vol.38, (2004)1077-1118
(Available at http://hamilton.nuigalway.ie/
.
D. Joyner, "A primer on computational group homology and cohomology",
http://front.math.ucdavis.edu/0706.0549
self, n, [p=0]) |
Computes the
-part of the group homology
, where
if
and
if
is a prime. Wraps HAP's Homology function, written by
Graham Ellis, applied to the
-Sylow subgroup of
.
REQUIRES: GAP package HAP (in gap_packages-*.spkg).
sage: G = SymmetricGroup(5) sage: G.homology_part(7,2) # requires optional gap_packages Multiplicative Abelian Group isomorphic to C2 x C2 x C2 x C2 x C4
Author: David Joyner and Graham Ellis
self) |
(Same as self.group_id().) Return the ID code of this group, which is a list of two integers. Requires "optional" database_gap-4.4.x package.
sage: G = PermutationGroup([[(1,2,3),(4,5)], [(1,2)]]) sage: G.group_id() # requires optional database_gap-4.4.6 package [12, 4]
self) |
Return the identity element of this group.
sage: G = PermutationGroup([[(1,2,3),(4,5)]]) sage: e = G.identity() sage: e () sage: g = G.gen(0) sage: g*e (1,2,3)(4,5) sage: e*g (1,2,3)(4,5)
self) |
Return True if this group is abelian.
sage: G = PermutationGroup(['(1,2,3)(4,5)', '(1,2,3,4,5)']) sage: G.is_abelian() False sage: G = PermutationGroup(['(1,2,3)(4,5)']) sage: G.is_abelian() True
self) |
Return True if this group is commutative.
sage: G = PermutationGroup(['(1,2,3)(4,5)', '(1,2,3,4,5)']) sage: G.is_commutative() False sage: G = PermutationGroup(['(1,2,3)(4,5)']) sage: G.is_commutative() True
self) |
Return True if this group is cyclic.
sage: G = PermutationGroup(['(1,2,3)(4,5)', '(1,2,3,4,5)']) sage: G.is_cyclic() False sage: G = PermutationGroup(['(1,2,3)(4,5)']) sage: G.is_cyclic() True
self) |
Return True if this group is elementary abelian. An elementary abelian group is a finite Abelian group, where every nontrivial element has order p, where p is a prime.
sage: G = PermutationGroup(['(1,2,3)(4,5)', '(1,2,3,4,5)']) sage: G.is_elementary_abelian() False sage: G = PermutationGroup(['(1,2,3)','(4,5,6)']) sage: G.is_elementary_abelian() True
self, right) |
Return True if the groups are isomorphic. If mode="verbose" then an isomorphism is printed.
Input:
sage: v = ['(1,2,3)(4,5)', '(1,2,3,4,5)'] sage: G = PermutationGroup(v) sage: H = PermutationGroup(['(1,2,3)(4,5)']) sage: G.is_isomorphic(H) False sage: G.is_isomorphic(G) True sage: G.is_isomorphic(PermutationGroup(list(reversed(v)))) True
self) |
Returns True if the group is monomial. A finite group is monomial if every irreducible complex character is induced from a linear character of a subgroup.
sage: G = PermutationGroup(['(1,2,3)(4,5)']) sage: G.is_monomial() True
self) |
Return True if this group is nilpotent.
sage: G = PermutationGroup(['(1,2,3)(4,5)', '(1,2,3,4,5)']) sage: G.is_nilpotent() False sage: G = PermutationGroup(['(1,2,3)(4,5)']) sage: G.is_nilpotent() True
self, other) |
Return True if this group is a normal subgroup of other.
sage: AlternatingGroup(4).is_normal(SymmetricGroup(4)) True sage: H = PermutationGroup(['(1,2,3)(4,5)']) sage: G = PermutationGroup(['(1,2,3)(4,5)', '(1,2,3,4,5)']) sage: H.is_normal(G) False
self) |
Return True if this group is perfect. A group is perfect if it equals its derived subgroup.
sage: G = PermutationGroup(['(1,2,3)(4,5)', '(1,2,3,4,5)']) sage: G.is_perfect() False sage: G = PermutationGroup(['(1,2,3)(4,5)']) sage: G.is_perfect() False
self) |
Returns True if the group is a p-group. A finite group is a p-group if
its order is of the form
for a prime integer p and a nonnegative integer n.
sage: G = PermutationGroup(['(1,2,3,4,5)']) sage: G.is_pgroup() True
self) |
Return True if this group is polycyclic. A group is polycyclic if it has a subnormal series
with cyclic factors. (For finite groups this is the same as if the group is solvable - see
is_solvable
)].)
sage: G = PermutationGroup(['(1,2,3)(4,5)', '(1,2,3,4,5)']) sage: G.is_polycyclic() False sage: G = PermutationGroup(['(1,2,3)(4,5)']) sage: G.is_polycyclic() True
self) |
Returns True if the group is simple. A group is simple if it has no proper normal subgroups.
sage: G = PermutationGroup(['(1,2,3)(4,5)']) sage: G.is_simple() False
self) |
Returns True if the group is solvable.
sage: G = PermutationGroup(['(1,2,3)(4,5)']) sage: G.is_solvable() True
self, other) |
Returns true if self is a subgroup of other.
sage: G = AlternatingGroup(5) sage: H = SymmetricGroup(5) sage: G.is_subgroup(H) True
self) |
Returns True if the group is supersolvable. A finite group is supersolvable if it has a normal series with cyclic factors.
sage: G = PermutationGroup(['(1,2,3)(4,5)']) sage: G.is_supersolvable() True
self) |
Return True if self is a transitive group, i.e. if the action of self on self.set() is transitive.
sage: G = SymmetricGroup(5) sage: G.is_transitive() True sage: G = PermutationGroup(['(1,2)(3,4)(5,6)']) sage: G.is_transitive() False
self, right) |
Return an isomorphism self to right if the groups are isomorphic, otherwise None.
Input:
sage: G = PermutationGroup(['(1,2,3)(4,5)', '(1,2,3,4,5)']) sage: H = PermutationGroup(['(1,2,3)(4,5)']) sage: G.isomorphism_to(H) is None True sage: G = PermutationGroup([(1,2,3), (2,3)]) sage: H = PermutationGroup([(1,2,4), (1,4)]) sage: G.isomorphism_to(H) Homomorphism : Permutation Group with generators [(1,2,3), (2,3)] --> Permutation Group with generators [(1,2,4), (1,4)]
self) |
Is the group is simple, then this returns the name of the group.
sage: G = CyclicPermutationGroup(5) sage: G.isomorphism_type_info_simple_group() rec( series := "Z", parameter := 5, name := "Z(5)" )
self) |
Return the largest point moved by a permutation in this group.
sage: G = PermutationGroup([[(1,2),(3,4)], [(1,2,3,4)]]) sage: G.largest_moved_point() 4 sage: G = PermutationGroup([[(1,2),(3,4)], [(1,2,3,4,10)]]) sage: G.largest_moved_point() 10
self) |
Return list of all elements of this group.
sage: G = PermutationGroup([[(1,2,3,4)], [(1,2)]]) sage: G.list() [(), (3,4), (2,3), (2,3,4), (2,4,3), (2,4), (1,2), (1,2)(3,4), (1,2,3), (1,2,3,4), (1,2,4,3), (1,2,4), (1,3,2), (1,3,4,2), (1,3), (1,3,4), (1,3)(2,4), (1,3,2,4), (1,4,3,2), (1,4,2), (1,4,3), (1,4), (1,4,2,3), (1,4)(2,3)]
self) |
Return the lower central series of this group as a list of permutation groups.
These computations use pseudo-random numbers, so we set the seed for reproducible testing.
sage: set_random_seed(0) sage: G = PermutationGroup([[(1,2,3),(4,5)],[(3,4)]]) sage: G.lower_central_series() # random output [Permutation Group with generators [(1,2,3)(4,5), (3,4)], Permutation Group with generators [(1,5)(3,4), (1,5)(2,3), (1,3)(2,4)]]
self) |
Returns the Molien series of a transtive permutation group. The function
is sometimes called the "Molien series" of G. GAP's
MolienSeries
is associated to a character of a group G.
How are these related? A group G, given as a permutation
group on n points, has a "natural" representation of
dimension n, given by permutation matrices. The Molien series
of G is the one associated to that permutation representation of
G using the above formula. Character values then count fixed
points of the corresponding permutations.
sage: G = SymmetricGroup(5) sage: G.molien_series() # requires optional gap_packages 1/(-x^15 + x^14 + x^13 - x^10 - x^9 - x^8 + x^7 + x^6 + x^5 - x^2 - x + 1) sage: G = SymmetricGroup(3) sage: G.molien_series() # requires optional gap_packages 1/(-x^6 + x^5 + x^4 - x^2 - x + 1)
self, [names=x]) |
Returns the multiplication table, or Cayley table, of the finite group G in the form of a matrix with symbolic coefficients. This function is useful for learning, teaching, and exploring elementary group theory. Of course, G must be a group of low order.
As the last line below illustrates, the ordering used here in the first row is the same as in G.list().
sage: G = PermutationGroup(['(1,2,3)', '(2,3)']) sage: G.cayley_table() [x0 x1 x2 x3 x4 x5] [x1 x0 x3 x2 x5 x4] [x2 x4 x0 x5 x1 x3] [x3 x5 x1 x4 x0 x2] [x4 x2 x5 x0 x3 x1] [x5 x3 x4 x1 x2 x0] sage: G.list()[3]*G.list()[3] == G.list()[4] True sage: G.cayley_table("y") [y0 y1 y2 y3 y4 y5] [y1 y0 y3 y2 y5 y4] [y2 y4 y0 y5 y1 y3] [y3 y5 y1 y4 y0 y2] [y4 y2 y5 y0 y3 y1] [y5 y3 y4 y1 y2 y0] sage: G.cayley_table(names="abcdef") [a b c d e f] [b a d c f e] [c e a f b d] [d f b e a c] [e c f a d b] [f d e b c a]
self) |
Return the normal subgroups of this group as a (sorted in increasing order) list of permutation groups.
The normal subgroups of
are
, two copies
of
and
itself, as the following example shows.
sage: G = PSL(2,7) sage: D = G.direct_product(G) sage: H = D[0] sage: NH = H.normal_subgroups() sage: len(NH) 4 sage: NH[1].is_isomorphic(G) True sage: NH[2].is_isomorphic(G) True
self, g) |
Returns the normalizer of g in self.
sage: G = PermutationGroup([[(1,2),(3,4)], [(1,2,3,4)]]) sage: g = G([(1,3)]) sage: G.normalizer(g) Permutation Group with generators [(1,3), (2,4)] sage: g = G([(1,2,3,4)]) sage: G.normalizer(g) Permutation Group with generators [(1,2,3,4), (1,3)(2,4), (2,4)] sage: H = G.subgroup([G([(1,2,3,4)])]) sage: G.normalizer(H) Permutation Group with generators [(1,2,3,4), (1,3)(2,4), (2,4)]
self, other) |
Returns True if the group other is normalized by the self. Wraps GAP's IsNormal function.
A group G normalizes a group U if and only if for every
and
the element
is a member of U. Note
that U need not be a subgroup of G.
sage: G = PermutationGroup(['(1,2,3)(4,5)']) sage: H = PermutationGroup(['(1,2,3)(4,5)', '(1,2,3,4,5)']) sage: H.normalizes(G) False sage: G = SymmetricGroup(3) sage: H = PermutationGroup( [ (4,5,6) ] ) sage: G.normalizes(H) True sage: H.normalizes(G) True
In the last example, G and H are disjoint, so each normalizes the other.
self) |
Returns the orbits of [1,2,...,degree] under the group action.
sage: G = PermutationGroup([ [(3,4)], [(1,3)] ]) sage: G.orbits() [[1, 3, 4], [2]] sage: G = PermutationGroup([[(1,2),(3,4)], [(1,2,3,4,10)]]) sage: G.orbits() [[1, 2, 3, 4, 10], [5], [6], [7], [8], [9]]
The answer is cached:
sage: G.orbits() is G.orbits() True
Author: Nathan Dunfield
self) |
Return the number of elements of this group.
sage: G = PermutationGroup([[(1,2,3),(4,5)], [(1,2)]]) sage: G.order() 12
self, [p=2], [n=10]) |
Returns the Poincare series of G mod p (p must be a prime), for n>1
large. In other words, if you input a finite group G, a prime p,
and a positive integer n, it returns a quotient of polynomials
f(x)=P(x)/Q(x) whose coefficient of
equals the rank of the
vector space
, for all k in the range
.
REQUIRES: GAP package HAP (in gap_packages-*.spkg).
sage: G = SymmetricGroup(5) sage: G.poincare_series(2,10) # requires optional gap_packages (x^2 + 1)/(x^4 - x^3 - x + 1) sage: G = SymmetricGroup(3) sage: G.poincare_series(2,10) # requires optional gap_packages 1/(-x + 1)
Author: David Joyner and Graham Ellis
self, N) |
Returns the quotient group permgp/N, where N is a normal subgroup. Wraps the GAP operator "/".
sage: G = PermutationGroup([(1,2,3), (2,3)]) sage: N = PermutationGroup([(1,2,3)]) sage: G.quotient_group(N) Permutation Group with generators [(1,2)]
self) |
Return a random element of this group.
sage: G = PermutationGroup([[(1,2,3),(4,5)], [(1,2)]]) sage: G.random_element() (1,2)(4,5)
self) |
Return the smallest point moved by a permutation in this group.
sage: G = PermutationGroup([[(3,4)], [(2,3,4)]]) sage: G.smallest_moved_point() 2 sage: G = PermutationGroup([[(1,2),(3,4)], [(1,2,3,4,10)]]) sage: G.smallest_moved_point() 1
self, gens) |
Wraps the PermutationGroup_subgroup constructor. The argument gens is a list of elements of self.
sage: G = PermutationGroup([(1,2,3),(3,4,5)]) sage: g = G((1,2,3)) sage: G.subgroup([g]) Subgroup of Permutation Group with generators [(1,2,3), (3,4,5)] generated by [(1,2,3)]
self, p) |
Returns a Sylow p-subgroups of the finite group G, where p is a prime. This is a p-subgroup of G whose index in G is coprime to p. Wraps the GAP function SylowSubgroup.
sage: G = PermutationGroup(['(1,2,3)', '(2,3)']) sage: G.sylow_subgroup(2) Permutation Group with generators [(2,3)] sage: G.sylow_subgroup(5) Permutation Group with generators [()]
self) |
Return the upper central series of this group as a list of permutation groups.
These computations use pseudo-random numbers, so we set the seed for reproducible testing.
sage: set_random_seed(0) sage: G = PermutationGroup([[(1,2,3),(4,5)],[(3,4)]]) sage: G.upper_central_series() [Permutation Group with generators [()]]
Special Functions: __call__,
__cmp__,
__contains__,
__init__,
__iter__,
_coerce_impl,
_gap_init_,
_latex_,
_magma_init_,
_repr_
self, x, [check=True]) |
Coerce x into this permutation group.
The input can be either a string that defines a permutation in cycle notation, a permutation group element, a list of integers that gives the permutation as a mapping, a list of tuples, or the integer 1.
We illustrate each way to make a permutation in S4:
sage: G = SymmetricGroup(4) sage: G((1,2,3,4)) (1,2,3,4) sage: G([(1,2),(3,4)]) (1,2)(3,4) sage: G('(1,2)(3,4)') (1,2)(3,4) sage: G('(1,2)(3)(4)') (1,2) sage: G(((1,2,3),(4,))) (1,2,3) sage: G(((1,2,3,4),)) (1,2,3,4) sage: G([1,2,4,3]) (3,4) sage: G([2,3,4,1]) (1,2,3,4) sage: G(G((1,2,3,4))) (1,2,3,4) sage: G(1) ()
Some more examples:
sage: G = PermutationGroup([(1,2,3,4)]) sage: G([(1,3), (2,4)]) (1,3)(2,4) sage: G(G.0^3) (1,4,3,2) sage: G(1) () sage: G((1,4,3,2)) (1,4,3,2) sage: G([(1,2)]) Traceback (most recent call last): ... TypeError: permutation (1,2) not in Permutation Group with generators [(1,2,3,4)]
self, right) |
Compare self and right.
The ordering is whatever it is in Gap.
sage: G1 = PermutationGroup([[(1,2,3),(4,5)],[(3,4)]]) sage: G2 = PermutationGroup([[(1,2,3),(4,5)]]) sage: G1 > G2 True sage: G1 < G2 False
self, item) |
Returns boolean value of "item in self"
sage: G = SymmetricGroup(16) sage: g = G.gen(0) sage: h = G.gen(1) sage: g^7*h*g*h in G True sage: G = SymmetricGroup(4) sage: g = G((1,2,3,4)) sage: h = G((1,2)) sage: H = PermutationGroup([[(1,2,3,4)], [(1,2),(3,4)]]) sage: g in H True sage: h in H False
self) |
Return an iterator over the elements of this group.
sage: G = PermutationGroup([[(1,2,3)], [(1,2)]]) sage: [a for a in G] [(), (2,3), (1,2), (1,2,3), (1,3,2), (1,3)]
self, x) |
Implicit coercion of x into self.
We illustrate some arithmetic that involves implicit coercion of elements in different permutation groups.
sage: g1 = PermutationGroupElement([(1,2),(3,4,5)]) sage: g1.parent() Symmetric group of order 5! as a permutation group sage: g2 = PermutationGroupElement([(1,2)]) sage: g2.parent() Symmetric group of order 2! as a permutation group sage: g1*g2 (3,4,5) sage: g2*g2 () sage: g2*g1 (3,4,5)
We try to implicitly coerce in a non-permutation, which raises a TypeError:
sage: G = PermutationGroup([[(1,2,3,4)], [(1,2)]]) sage: G._coerce_impl(1) Traceback (most recent call last): ... TypeError: no implicit coercion of element into permutation group
self) |
Returns a string showing how to declare / initialize self in Gap.
Stored in the self.__gap
attribute.
The _gap_init_
method shows how you would define the Sage
PermutationGroup_generic
object in Gap:
sage: A4 = PermutationGroup([[(1,2,3)],[(2,3,4)]]); A4 Permutation Group with generators [(1,2,3), (2,3,4)] sage: A4._gap_init_() 'Group([((1,2,3)), ((2,3,4))])'
self) |
Method for describing self in LaTeX. Encapsulates self.gens()
in angle brackets to denote that self in generated by these elements.
Called by the latex()
function.
We explicitly construct the alternating group on four elements.
sage: A4 = PermutationGroup([[(1,2,3)],[(2,3,4)]]); A4 Permutation Group with generators [(1,2,3), (2,3,4)] sage: latex(A4) \langle (1,2,3), (2,3,4) \rangle sage: A4._latex_() '\\langle (1,2,3), (2,3,4) \\rangle'
self) |
Returns a string showing how to declare / intialize self in Magma.
We explicitly construct the alternating group on four elements. In Magma, one would type the string below to construct the group.
sage: A4 = PermutationGroup([[(1,2,3)],[(2,3,4)]]); A4 Permutation Group with generators [(1,2,3), (2,3,4)] sage: A4._magma_init_() 'PermutationGroup<4 | (1,2,3), (2,3,4)>'
self) |
Returns a string describing self.
We explicitly construct the alternating group on four elements. Note
that
the AlternatingGroup
class has its own representation string:
sage: A4 = PermutationGroup([[(1,2,3)],[(2,3,4)]]); A4 Permutation Group with generators [(1,2,3), (2,3,4)] sage: A4._repr_() 'Permutation Group with generators [(1,2,3), (2,3,4)]' sage: AlternatingGroup(4)._repr_() 'Alternating group of order 4!/2 as a permutation group'
Class: PermutationGroup_subgroup
sage: G = CyclicPermutationGroup(4) sage: gens = G.gens() sage: H = DihedralGroup(4) sage: PermutationGroup_subgroup(H,list(gens)) Subgroup of Dihedral group of order 8 as a permutation group generated by [(1,2,3,4)] sage: K=PermutationGroup_subgroup(H,list(gens)) sage: K.list() [(), (1,2,3,4), (1,3)(2,4), (1,4,3,2)] sage: K.ambient_group() Dihedral group of order 8 as a permutation group sage: K.gens() [(1,2,3,4)]
self, ambient, gens, [from_group=False], [check=True]) |
Initialization method for the PermutationGroup_subgroup
class.
INPUTS: ambient - the ambient group from which to construct this subgroup gens - the generators of the subgroup from_group - True: subroup is generated from a Gap string representation of the generators check- True: checks if gens are indeed elements of the ambient group
An example involving the dihedral group on four elements.
contains a cyclic subgroup or order four:
sage: G = DihedralGroup(4) sage: H = CyclicPermutationGroup(4) sage: gens = H.gens(); gens ((1,2,3,4),) sage: S = PermutationGroup_subgroup(G,list(gens)) sage: S Subgroup of Dihedral group of order 8 as a permutation group generated by [(1,2,3,4)] sage: S.list() [(), (1,2,3,4), (1,3)(2,4), (1,4,3,2)] sage: S.ambient_group() Dihedral group of order 8 as a permutation group
However,
does not contain a cyclic subgroup of order three:
sage: G = DihedralGroup(4) sage: H = CyclicPermutationGroup(3) sage: gens = H.gens() sage: S = PermutationGroup_subgroup(G,list(gens)) Traceback (most recent call last): ... TypeError: each generator must be in the ambient group
Functions: ambient_group,
gens
self) |
Return the ambient group related to self.
An example involving the dihedral group on four elements,
:
sage: G = DihedralGroup(4) sage: H = CyclicPermutationGroup(4) sage: gens = H.gens() sage: S = PermutationGroup_subgroup(G, list(gens)) sage: S.ambient_group() Dihedral group of order 8 as a permutation group sage: S.ambient_group() == G True
self) |
Return the generators for this subgroup.
An example involving the dihedral group on four elements,
:
sage: G = DihedralGroup(4) sage: H = CyclicPermutationGroup(4) sage: gens = H.gens() sage: S = PermutationGroup_subgroup(G, list(gens)) sage: S.gens() [(1,2,3,4)] sage: S.gens() == list(H.gens()) True
Special Functions: __cmp__,
__init__,
_latex_,
_repr_
self, other) |
Compare self and other. If self and other are in a common ambient group, then self <= other precisely if self is contained in other.
sage: G = CyclicPermutationGroup(4) sage: gens = G.gens() sage: H = DihedralGroup(4) sage: PermutationGroup_subgroup(H,list(gens)) Subgroup of Dihedral group of order 8 as a permutation group generated by [(1,2,3,4)] sage: K=PermutationGroup_subgroup(H,list(gens)) sage: G<K False sage: G>K False
self) |
Return latex representation of this group.
An example involving the dihedral group on four elements,
:
sage: G = DihedralGroup(4) sage: H = CyclicPermutationGroup(4) sage: gens = H.gens() sage: S = PermutationGroup_subgroup(G, list(gens)) sage: latex(S) Subgroup of Dihedral group of order 8 as a permutation group generated by [(1,2,3,4)] sage: S._latex_() 'Subgroup of Dihedral group of order 8 as a permutation group generated by [(1,2,3,4)]'
self) |
Returns a string representation / description of the permutation subgroup.
An example involving the dihedral group on four elements,
:
sage: G = DihedralGroup(4) sage: H = CyclicPermutationGroup(4) sage: gens = H.gens() sage: S = PermutationGroup_subgroup(G, list(gens)) sage: S Subgroup of Dihedral group of order 8 as a permutation group generated by [(1,2,3,4)] sage: S._repr_() 'Subgroup of Dihedral group of order 8 as a permutation group generated by [(1,2,3,4)]'
See About this document... for information on suggesting changes.