Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
| Download
GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
Project: cocalc-sagemath-dev-slelievre
Views: 4183461[1X5 [33X[0;0YGroups and Homomorphisms[133X[101X23[33X[0;0YIn this chapter we will show some computations with groups. The examples4deal mostly with permutation groups, because they are the easiest to input.5The functions mentioned here, like [2XGroup[102X ([14XReference: Groups[114X), [2XSize[102X6([14XReference: Size[114X) or [2XSylowSubgroup[102X ([14XReference: SylowSubgroup[114X), however, are7the same for all kinds of groups, although the algorithms which compute the8information of course will be different in most cases.[133X91011[1X5.1 [33X[0;0YPermutation groups[133X[101X1213[33X[0;0YPermutation groups are so easy to input because their elements, i.e.,14permutations, are so easy to type: they are entered and displayed in15disjoint cycle notation. So let's construct a permutation group:[133X1617[4X[32X Example [32X[104X18[4X[25Xgap>[125X [27Xs8 := Group( (1,2), (1,2,3,4,5,6,7,8) );[127X[104X19[4X[28XGroup([ (1,2), (1,2,3,4,5,6,7,8) ])[128X[104X20[4X[32X[104X2122[33X[0;0YWe formed the group generated by the permutations [10X(1,2)[110X and23[10X(1,2,3,4,5,6,7,8)[110X, which is well known to be the symmetric group [22XS_8[122X on24eight points, and assigned it to the identifier [10Xs8[110X. Now [22XS_8[122X contains the25alternating group on eight points which can be described in several ways,26e.g., as the group of all even permutations in [10Xs8[110X, or as its derived27subgroup. Once we ask [5XGAP[105X to verify that the group is an alternating group28acting in its natural permutation representation, the system will display29the group accordingly.[133X3031[4X[32X Example [32X[104X32[4X[25Xgap>[125X [27Xa8 := DerivedSubgroup( s8 );[127X[104X33[4X[28XGroup([ (1,2,3), (2,3,4), (2,4)(3,5), (2,6,4), (2,4)(5,7), [128X[104X34[4X[28X (2,8,6,4)(3,5) ])[128X[104X35[4X[25Xgap>[125X [27XSize( a8 ); IsAbelian( a8 ); IsPerfect( a8 );[127X[104X36[4X[28X20160[128X[104X37[4X[28Xfalse[128X[104X38[4X[28Xtrue[128X[104X39[4X[25Xgap>[125X [27XIsNaturalAlternatingGroup(a8);[127X[104X40[4X[28Xtrue[128X[104X41[4X[25Xgap>[125X [27Xa8;[127X[104X42[4X[28XAlt( [ 1 .. 8 ] )[128X[104X43[4X[32X[104X4445[33X[0;0YOnce information about a group like [10Xs8[110X or [10Xa8[110X has been computed, it is stored46in the group so that it can simply be looked up when it is required again.47This holds for all pieces of information in the previous example. Namely, [10Xa8[110X48stores its order and that it is nonabelian and perfect, and [10Xs8[110X stores its49derived subgroup [10Xa8[110X. Had we computed [10Xa8[110X as [10XCommutatorSubgroup( s8, s8 )[110X,50however, it would not have been stored, because it would then have been51computed as a function of [13Xtwo[113X arguments, and hence one could not attribute52it to just one of them. (Of course the function [2XCommutatorSubgroup[102X53([14XReference: CommutatorSubgroup[114X) can compute the commutator subgroup of [13Xtwo[113X54arbitrary subgroups.) The situation is a bit different for Sylow55[22Xp[122X-subgroups: The function [2XSylowSubgroup[102X ([14XReference: SylowSubgroup[114X) also56requires two arguments, namely a group and a prime [22Xp[122X, but the result is57stored in the group –namely together with the prime [22Xp[122X in a list that can be58accessed with [10XComputedSylowSubgroups[110X, but we won't dwell on the details59here.[133X6061[4X[32X Example [32X[104X62[4X[25Xgap>[125X [27Xsyl2 := SylowSubgroup( a8, 2 );; Size( syl2 );[127X[104X63[4X[28X64[128X[104X64[4X[25Xgap>[125X [27XNormalizer( a8, syl2 ) = syl2;[127X[104X65[4X[28Xtrue[128X[104X66[4X[25Xgap>[125X [27Xcent := Centralizer( a8, Centre( syl2 ) );; Size( cent );[127X[104X67[4X[28X192[128X[104X68[4X[25Xgap>[125X [27XDerivedSeries( cent );; List( last, Size );[127X[104X69[4X[28X[ 192, 96, 32, 2, 1 ][128X[104X70[4X[32X[104X7172[33X[0;0YWe have typed double semicolons after some commands to avoid the output of73the groups (which would be printed by their generator lists). Nevertheless,74the beginner is encouraged to type a single semicolon instead and study the75full output. This remark also applies for the rest of this tutorial.[133X7677[33X[0;0YWith the next examples, we want to calculate a subgroup of [10Xa8[110X, then its78normalizer and finally determine the structure of the extension. We begin by79forming a subgroup generated by three commuting involutions, i.e., a80subgroup isomorphic to the additive group of the vector space [22X2^3[122X.[133X8182[4X[32X Example [32X[104X83[4X[25Xgap>[125X [27Xelab := Group( (1,2)(3,4)(5,6)(7,8), (1,3)(2,4)(5,7)(6,8),[127X[104X84[4X[25X>[125X [27X (1,5)(2,6)(3,7)(4,8) );;[127X[104X85[4X[25Xgap>[125X [27XSize( elab );[127X[104X86[4X[28X8[128X[104X87[4X[25Xgap>[125X [27XIsElementaryAbelian( elab );[127X[104X88[4X[28Xtrue[128X[104X89[4X[32X[104X9091[33X[0;0YAs usual, [5XGAP[105X prints the group by giving all its generators. This can be92annoying, especially if there are many of them or if they are of huge93degree. It also makes it difficult to recognize a particular group when94there are already several around. Note that although it is no problem for [13Xus[113X95to specify a particular group to [5XGAP[105X, by using well-chosen identifiers such96as [10Xa8[110X and [10Xelab[110X, it is impossible for [5XGAP[105X to use these identifiers when97printing a group for us, because the group does not know which identifier(s)98point to it, in fact there can be several. In order to give a name to the99group itself (rather than to the identifier), you can use the function100[2XSetName[102X ([14XReference: SetName[114X). We do this with the name [10X2^3[110X here which101reflects the mathematical properties of the group. From now on, [5XGAP[105X will use102this name when printing the group for us, but we still cannot use this name103to specify the group to [5XGAP[105X, because the name does not know to which group104it was assigned (after all, you could assign the same name to several105groups). When talking to the computer, you must always use identifiers.[133X106107[4X[32X Example [32X[104X108[4X[25Xgap>[125X [27XSetName( elab, "<group of type 2^3>" ); elab;[127X[104X109[4X[28X<group of type 2^3>[128X[104X110[4X[25Xgap>[125X [27Xnorm := Normalizer( a8, elab );; Size( norm );[127X[104X111[4X[28X1344[128X[104X112[4X[32X[104X113114[33X[0;0YNow that we have the subgroup [10Xnorm[110X of order 1344 and its subgroup [10Xelab[110X, we115want to look at its factor group. But since we also want to find preimages116of factor group elements in [10Xnorm[110X, we really want to look at the [13Xnatural117homomorphism[113X defined on [10Xnorm[110X with kernel [10Xelab[110X and whose image is the factor118group.[133X119120[4X[32X Example [32X[104X121[4X[25Xgap>[125X [27Xhom := NaturalHomomorphismByNormalSubgroup( norm, elab );[127X[104X122[4X[28X<action epimorphism>[128X[104X123[4X[25Xgap>[125X [27Xf := Image( hom );[127X[104X124[4X[28XGroup([ (), (), (), (4,5)(6,7), (4,6)(5,7), (2,3)(6,7), (2,4)(3,5), [128X[104X125[4X[28X (1,2)(5,6) ])[128X[104X126[4X[25Xgap>[125X [27XSize( f );[127X[104X127[4X[28X168[128X[104X128[4X[32X[104X129130[33X[0;0YThe factor group is again represented as a permutation group (its first131three generators are trivial, meaning that the first three generators of the132preimage are in the kernel of [10Xhom[110X). However, the action domain of this133factor group has nothing to do with the action domain of [10Xnorm[110X. (It only134happens that both are subsets of the natural numbers.) We can now form135images and preimages under the natural homomorphism. The set of preimages of136an element under [10Xhom[110X is a coset modulo [10Xelab[110X. We use the function [2XPreImages[102X137([14XReference: PreImages[114X) here because [10Xhom[110X is not a bijection, so an element of138the range can have several preimages or none at all.[133X139140[4X[32X Example [32X[104X141[4X[25Xgap>[125X [27Xker:= Kernel( hom );[127X[104X142[4X[28X<group of type 2^3>[128X[104X143[4X[25Xgap>[125X [27Xx := (1,8,3,5,7,6,2);; Image( hom, x );[127X[104X144[4X[28X(1,7,5,6,2,3,4)[128X[104X145[4X[25Xgap>[125X [27Xcoset := PreImages( hom, last );[127X[104X146[4X[28XRightCoset(<group of type 2^3>,(2,8,6,7,3,4,5))[128X[104X147[4X[32X[104X148149[33X[0;0YNote that [5XGAP[105X is free to choose any representative for the coset of150preimages. Of course the quotient of two representatives lies in the kernel151of the homomorphism.[133X152153[4X[32X Example [32X[104X154[4X[25Xgap>[125X [27Xrep:= Representative( coset );[127X[104X155[4X[28X(2,8,6,7,3,4,5)[128X[104X156[4X[25Xgap>[125X [27Xx * rep^-1 in ker;[127X[104X157[4X[28Xtrue[128X[104X158[4X[32X[104X159160[33X[0;0YThe factor group [10Xf[110X is a simple group, i.e., it has no non-trivial normal161subgroups. [5XGAP[105X can detect this fact, and it can then also find the name by162which this simple group is known among group theorists. (Such names are of163course not available for non-simple groups.)[133X164165[4X[32X Example [32X[104X166[4X[25Xgap>[125X [27XIsSimple( f ); IsomorphismTypeInfoFiniteSimpleGroup( f );[127X[104X167[4X[28Xtrue[128X[104X168[4X[28Xrec( [128X[104X169[4X[28X name := "A(1,7) = L(2,7) ~ B(1,7) = O(3,7) ~ C(1,7) = S(2,7) ~ 2A(1,\[128X[104X170[4X[28X7) = U(2,7) ~ A(2,2) = L(3,2)", parameter := [ 2, 7 ], series := "L" )[128X[104X171[4X[25Xgap>[125X [27XSetName( f, "L_3(2)" );[127X[104X172[4X[32X[104X173174[33X[0;0YWe give [10Xf[110X the name [10XL_3(2)[110X because the last part of the name string reveals175that it is isomorphic to the simple linear group [22XL_3(2)[122X. This group,176however, also has a lot of other names. Names that are connected with a [10X=[110X177sign are different names for the same matrix group, e.g., [10XA(2,2)[110X is the Lie178type notation for the classical notation [10XL(3,2)[110X. Other pairs of names are179connected via [10X~[110X, these then specify other classical groups that are180isomorphic to that linear group (e.g., the symplectic group [10XS(2,7)[110X, whose181Lie type notation would be [10XC(1,7)[110X).[133X182183[33X[0;0YThe group [10Xnorm[110X acts on the eight elements of its normal subgroup [10Xelab[110X by184conjugation, yielding a representation of [22XL_3(2)[122X in [10Xs8[110X which leaves one185point fixed (namely point [10X1[110X). The image of this representation can be186computed with the function [2XAction[102X ([14XReference: Action homomorphisms[114X); it is187even contained in the group [10Xnorm[110X and we can show that [10Xnorm[110X is indeed a split188extension of the elementary abelian group [22X2^3[122X with this image of [22XL_3(2)[122X.[133X189190[4X[32X Example [32X[104X191[4X[25Xgap>[125X [27Xop := Action( norm, elab );[127X[104X192[4X[28XGroup([ (), (), (), (5,6)(7,8), (5,7)(6,8), (3,4)(7,8), (3,5)(4,6), [128X[104X193[4X[28X (2,3)(6,7) ])[128X[104X194[4X[25Xgap>[125X [27XIsSubgroup( a8, op ); IsSubgroup( norm, op );[127X[104X195[4X[28Xtrue[128X[104X196[4X[28Xtrue[128X[104X197[4X[25Xgap>[125X [27XIsTrivial( Intersection( elab, op ) );[127X[104X198[4X[28Xtrue[128X[104X199[4X[25Xgap>[125X [27XSetName( norm, "2^3:L_3(2)" );[127X[104X200[4X[32X[104X201202[33X[0;0YBy the way, you should not try the operator [10X<[110X instead of the function203[2XIsSubgroup[102X ([14XReference: IsSubgroup[114X). Something like[133X204205[4X[32X Example [32X[104X206[4X[25Xgap>[125X [27Xelab < a8;[127X[104X207[4X[28Xfalse[128X[104X208[4X[32X[104X209210[33X[0;0Ywill not cause an error, but the result does not signify anything about the211inclusion of one group in another; [10X<[110X tests which of the two groups is less212in some total order. On the other hand, the equality operator [10X=[110X in fact does213test the equality of its arguments.[133X214215[33X[0;0Y[13XSummary.[113X In this section we have used the elementary group functions to216determine the structure of a normalizer. We have assigned names to the217involved groups which reflect their mathematical structure and [5XGAP[105X uses218these names when printing the groups.[133X219220221[1X5.2 [33X[0;0YActions of Groups[133X[101X222223[33X[0;0YIn order to get another representation of [10Xa8[110X, we consider another action,224namely that on the elements of a certain conjugacy class by conjugation.[133X225226[33X[0;0YIn the following example we temporarily increase the line length limit from227its default value 80 to 82 in order to make the long expression fit into one228line.[133X229230[4X[32X Example [32X[104X231[4X[25Xgap>[125X [27Xccl := ConjugacyClasses( a8 );; Length( ccl );[127X[104X232[4X[28X14[128X[104X233[4X[25Xgap>[125X [27XList( ccl, c -> Order( Representative( c ) ) );[127X[104X234[4X[28X[ 1, 2, 2, 3, 6, 3, 4, 4, 5, 15, 15, 6, 7, 7 ][128X[104X235[4X[25Xgap>[125X [27XList( ccl, Size );[127X[104X236[4X[28X[ 1, 210, 105, 112, 1680, 1120, 2520, 1260, 1344, 1344, 1344, 3360, [128X[104X237[4X[28X 2880, 2880 ][128X[104X238[4X[32X[104X239240[33X[0;0YNote the difference between [2XOrder[102X ([14XReference: Order[114X) (which means the241element order), [2XSize[102X ([14XReference: Size[114X) (which means the size of the242conjugacy class) and [2XLength[102X ([14XReference: Length[114X) (which means the length of a243list). We choose to let [10Xa8[110X operate on the class of length 112.[133X244245[4X[32X Example [32X[104X246[4X[25Xgap>[125X [27Xclass := First( ccl, c -> Size(c) = 112 );;[127X[104X247[4X[25Xgap>[125X [27Xop := Action( a8, AsList( class ),OnPoints );;[127X[104X248[4X[32X[104X249250[33X[0;0YWe use [2XAsList[102X ([14XReference: AsList[114X) here to convert the conjugacy class into a251list of its elements whereas we wrote [10XAction( norm, elab )[110X directly in the252previous section. The reason is that the elementary abelian group [10Xelab[110X can253be quickly enumerated by [5XGAP[105X whereas the standard enumeration method for254conjugacy classes is slower than just explicit calculation of the elements.255However, [5XGAP[105X is reluctant to construct explicit element lists, because for256really large groups this direct method is infeasible.[133X257258[33X[0;0YNote also the function [2XFirst[102X ([14XReference: First[114X), used to find the first259element in a list which passes some test.[133X260261[33X[0;0YIn this example, we have specified the action function [2XOnPoints[102X ([14XReference:262OnPoints[114X) in this example, which is defined as [10XOnPoints( [110X[22Xd[122X[10X, [110X[22Xg[122X[10X ) = [110X[22Xd[122X[10X ^ [110X[22Xg[122X.263This [21Xcaret[121X operator denotes conjugation in a group if both arguments [22Xd[122X and [22Xg[122X264are group elements (contained in a common group), but it also denotes the265natural action of permutations on positive integers (and exponentiation of266integers as well, of course). It is in fact the default action and will be267supplied by the system if not given. Another common action is for example268always assumes [2XOnRight[102X ([14XReference: OnRight[114X), which means right269multiplication, defined as [22Xd[122X[10X * [110X[22Xg[122X. (Group actions in [5XGAP[105X are always from the270right.)[133X271272[33X[0;0YWe now have a permutation representation [10Xop[110X on 112 points, which we test for273primitivity. If it is not primitive, we can obtain a minimal block system274(i.e., one where the blocks have minimal length) by the function [2XBlocks[102X275([14XReference: Blocks[114X).[133X276277[4X[32X Example [32X[104X278[4X[25Xgap>[125X [27XIsPrimitive( op, [ 1 .. 112 ] );[127X[104X279[4X[28Xfalse[128X[104X280[4X[25Xgap>[125X [27Xblocks := Blocks( op, [ 1 .. 112 ] );;[127X[104X281[4X[32X[104X282283[33X[0;0YNote that we must specify the domain of the action. You might think that the284functions [2XIsPrimitive[102X ([14XReference: IsPrimitive[114X) and [2XBlocks[102X ([14XReference:285Blocks[114X) could use [10X[ 1 .. 112 ][110X as default domain if no domain was given. But286this is not so easy, for example would the default domain of [10XGroup( (2,3,4)287)[110X be [10X[ 1 .. 4 ][110X or [10X[ 2 .. 4 ][110X? To avoid confusion, all action functions288require that you specify the domain of action. If we had specified [10X[ 1 ..289113 ][110X in the primitivity test above, point 113 would have been a fixpoint290(and the action would not even have been transitive).[133X291292[33X[0;0YNow [10Xblocks[110X is a list of blocks (i.e., a list of lists), which we do not293print here for the sake of saving paper (try it for yourself). In fact all294we want to know is the size of the blocks, or rather how many there are (the295product of these two numbers must of course be 112). Then we can obtain a296new permutation group of the corresponding degree by letting [10Xop[110X act on these297blocks setwise.[133X298299[4X[32X Example [32X[104X300[4X[25Xgap>[125X [27XLength( blocks[1] ); Length( blocks );[127X[104X301[4X[28X2[128X[104X302[4X[28X56[128X[104X303[4X[25Xgap>[125X [27Xop2 := Action( op, blocks, OnSets );;[127X[104X304[4X[25Xgap>[125X [27XIsPrimitive( op2, [ 1 .. 56 ] );[127X[104X305[4X[28Xtrue[128X[104X306[4X[32X[104X307308[33X[0;0YNote that we give a third argument (the action function [2XOnSets[102X ([14XReference:309OnSets[114X)) to indicate that the action is not the default action on points but310an action on sets of elements given as sorted lists. (Section [14X'Reference:311Basic Actions'[114X lists all actions that are pre-defined by [5XGAP[105X.)[133X312313[33X[0;0YThe action of [10Xop[110X on the given block system gave us a new representation on31456 points which is primitive, i.e., the point stabilizer is a maximal315subgroup. We compute its preimage in the representation on eight points316using the associated action homomorphisms (which of course in this case are317monomorphisms). We construct the composition of two homomorphisms with the [10X*[110X318operator, reading left-to-right.[133X319320[4X[32X Example [32X[104X321[4X[25Xgap>[125X [27Xophom := ActionHomomorphism( a8, op );;[127X[104X322[4X[25Xgap>[125X [27Xophom2 := ActionHomomorphism( op, op2 );;[127X[104X323[4X[25Xgap>[125X [27Xcomposition := ophom * ophom2;;[127X[104X324[4X[25Xgap>[125X [27Xstab := Stabilizer( op2, 2 );;[127X[104X325[4X[25Xgap>[125X [27Xpreim := PreImages( composition, stab );[127X[104X326[4X[28XGroup([ (1,4,2), (3,6,7), (3,8,5,7,6), (1,4)(7,8) ])[128X[104X327[4X[32X[104X328329[33X[0;0YAlternatively, it is possible to create action homomorphisms immediately330(without creating the action first) by giving the same set of arguments to331[2XActionHomomorphism[102X ([14XReference: ActionHomomorphism[114X).[133X332333[4X[32X Example [32X[104X334[4X[25Xgap>[125X [27Xnophom := ActionHomomorphism( a8, AsList(class) );[127X[104X335[4X[28X<action homomorphism>[128X[104X336[4X[25Xgap>[125X [27XIsSurjective(nophom);[127X[104X337[4X[28Xfalse[128X[104X338[4X[25Xgap>[125X [27XImage(nophom,(1,2,3));[127X[104X339[4X[28X(2,43,14)(3,44,20)(4,45,26)(5,46,32)(6,47,38)(8,13,48)(9,19,53)(10,25,[128X[104X340[4X[28X58)(11,31,63)(12,37,68)(15,49,73)(16,50,74)(17,51,75)(18,52,76)(21,54,[128X[104X341[4X[28X77)(22,55,78)(23,56,79)(24,57,80)(27,59,81)(28,60,82)(29,61,83)(30,62,[128X[104X342[4X[28X84)(33,64,85)(34,65,86)(35,66,87)(36,67,88)(39,69,89)(40,70,90)(41,71,[128X[104X343[4X[28X91)(42,72,92)[128X[104X344[4X[32X[104X345346[33X[0;0YIn this situation, however (for performance reasons, avoiding computation an347image that might never be needed) the homomorphism is defined to be not into348the [13XImage[113X of the action, but into the [13Xfull symmetric group[113X, i.e. it is not349automatically surjective. Surjectivity can be enforced by giving the string350[10X"surjective"[110X as an extra last argument. The [10XImage[110X of the action homomorphism351of course is the same group in either case.[133X352353[4X[32X Example [32X[104X354[4X[25Xgap>[125X [27XSize(Range(nophom));[127X[104X355[4X[28X1974506857221074023536820372759924883412778680349753377966562950949028\[128X[104X356[4X[28X5896977181144089422435502777936659795733823785363827233491968638562181\[128X[104X357[4X[28X1850780464277094400000000000000000000000000[128X[104X358[4X[25Xgap>[125X [27XSize(Range(ophom));[127X[104X359[4X[28X20160[128X[104X360[4X[25Xgap>[125X [27Xnophom := ActionHomomorphism( a8, AsList(class),"surjective" );[127X[104X361[4X[28X<action epimorphism>[128X[104X362[4X[25Xgap>[125X [27XSize(Range(nophom));[127X[104X363[4X[28X20160[128X[104X364[4X[32X[104X365366[33X[0;0YContinuing the example, the normalizer of an element in the conjugacy class367[10Xclass[110X is a group of order 360, too. In fact, it is a conjugate of the368maximal subgroup we had found before, and a conjugating element in [10Xa8[110X is369found by the function [2XRepresentativeAction[102X ([14XReference:370RepresentativeAction[114X).[133X371372[4X[32X Example [32X[104X373[4X[25Xgap>[125X [27Xsgp := Normalizer( a8, Subgroup(a8,[Representative(class)]) );;[127X[104X374[4X[25Xgap>[125X [27XSize( sgp );[127X[104X375[4X[28X360[128X[104X376[4X[25Xgap>[125X [27XRepresentativeAction( a8, sgp, preim );[127X[104X377[4X[28X(2,4,3)[128X[104X378[4X[32X[104X379380[33X[0;0YOne of the most prominent actions of a group is on the cosets of a subgroup.381Naïvely this can be done by constructing the cosets and acting on them by382right multiplication.[133X383384[4X[32X Example [32X[104X385[4X[25Xgap>[125X [27Xcosets:=RightCosets(a8,norm);;[127X[104X386[4X[25Xgap>[125X [27Xop:=Action(a8,cosets,OnRight);[127X[104X387[4X[28XGroup([ (1,2,3)(4,6,5)(7,8,9)(10,12,11)(13,14,15), [128X[104X388[4X[28X (1,3,2)(4,9,13)(5,11,7)(6,15,10)(8,12,14), [128X[104X389[4X[28X (1,13)(2,7)(3,10)(4,11)(5,15)(6,9), [128X[104X390[4X[28X (1,8,13)(2,7,12)(3,9,5)(4,14,11)(6,10,15), [128X[104X391[4X[28X (2,3)(4,14)(5,7)(8,13)(9,12)(10,15), [128X[104X392[4X[28X (1,8)(2,3,11,6)(4,12,10,15)(5,7,14,9) ])[128X[104X393[4X[25Xgap>[125X [27XNrMovedPoints(op);[127X[104X394[4X[28X15[128X[104X395[4X[32X[104X396397[33X[0;0YA problem with this approach is that creating (and storing) all cosets can398be very memory intensive if the subgroup index gets large. Because of this,399[5XGAP[105X provides special objects which act like a list of elements, but do not400actually store elements but compute them on the go. Such a simulated list is401called an [13Xenumerator[113X. The easiest example of this concept is the [2XEnumerator[102X402([14XReference: Enumerator[114X) of a group. While it behaves like a list of403elements, it requires far less storage, and is applicable to potentially404huge groups for which it would be completely infeasible to write down all405elements:[133X406407[4X[32X Example [32X[104X408[4X[25Xgap>[125X [27Xenum:=Enumerator(SymmetricGroup(20));[127X[104X409[4X[28X<enumerator of perm group>[128X[104X410[4X[25Xgap>[125X [27XLength(enum);[127X[104X411[4X[28X2432902008176640000[128X[104X412[4X[25Xgap>[125X [27Xenum[123456789012345];[127X[104X413[4X[28X(1,4,15,3,14,11,8,17,6,18,5,7,20,13,10,9,2,12)[128X[104X414[4X[25Xgap>[125X [27XPosition(enum,(1,2,3,4,5,6,7,8,9,10));[127X[104X415[4X[28X71948729603[128X[104X416[4X[32X[104X417418[33X[0;0YFor the action on cosets the object of interest is the [2XRightTransversal[102X419([14XReference: RightTransversal[114X) of a subgroup. Again, it does not write out420actual elements and thus can be created even for subgroups of large index.[133X421422[4X[32X Example [32X[104X423[4X[25Xgap>[125X [27Xt:=RightTransversal(a8,norm);[127X[104X424[4X[28XRightTransversal(Alt( [ 1 .. 8 ] ),2^3:L_3(2))[128X[104X425[4X[25Xgap>[125X [27Xt[7];[127X[104X426[4X[28X(4,6,5)[128X[104X427[4X[25Xgap>[125X [27XPosition(t,(4,6,7,8,5));[127X[104X428[4X[28X8[128X[104X429[4X[25Xgap>[125X [27XPosition(t,(1,2,3));[127X[104X430[4X[28Xfail[128X[104X431[4X[32X[104X432433[33X[0;0YFor the action on cosets there is the added complication that not every434group element is in the transversal (as the last example shows) but the435action on cosets of a subgroup usually will not preserve a chosen set of436coset representatives. Because of this issue, all action functionality437actually uses [2XPositionCanonical[102X ([14XReference: PositionCanonical[114X) instead of438[2XPosition[102X ([14XReference: Position[114X). In general, for elements contained in a439list, [2XPositionCanonical[102X ([14XReference: PositionCanonical[114X) returns the same as440[10XPosition[110X. If the element is not contained in the list (and for special441lists, such as transversals), [10XPositionCanonical[110X returns the list element442representing the same objects, e.g. the transversal element representing the443same coset.[133X444445[4X[32X Example [32X[104X446[4X[25Xgap>[125X [27XPositionCanonical(t,(1,2,3));[127X[104X447[4X[28X2[128X[104X448[4X[25Xgap>[125X [27Xt[2];[127X[104X449[4X[28X(6,7,8)[128X[104X450[4X[25Xgap>[125X [27Xt[2]/(1,2,3);[127X[104X451[4X[28X(1,3,2)(6,7,8)[128X[104X452[4X[25Xgap>[125X [27Xlast in norm;[127X[104X453[4X[28Xtrue[128X[104X454[4X[32X[104X455456[33X[0;0YThus, acting on a [10XRightTransversal[110X with the [10XOnRight[110X action will in fact (in457a slight abuse of definitions) produce the action of a group on cosets of a458subgroup and is in general the most efficient way of creating this action.[133X459460[4X[32X Example [32X[104X461[4X[25Xgap>[125X [27XAction(a8,RightTransversal(a8,norm),OnRight);[127X[104X462[4X[28XGroup([ (1,2,3)(4,6,5)(7,8,9)(10,12,11)(13,14,15), [128X[104X463[4X[28X (1,3,2)(4,9,13)(5,11,7)(6,15,10)(8,12,14), [128X[104X464[4X[28X (1,13)(2,7)(3,10)(4,11)(5,15)(6,9), [128X[104X465[4X[28X (1,8,13)(2,7,12)(3,9,5)(4,14,11)(6,10,15), [128X[104X466[4X[28X (2,3)(4,14)(5,7)(8,13)(9,12)(10,15), [128X[104X467[4X[28X (1,8)(2,3,11,6)(4,12,10,15)(5,7,14,9) ])[128X[104X468[4X[32X[104X469470[33X[0;0Y[13XSummary.[113X In this section we have learned how groups can operate on [5XGAP[105X471objects such as integers and group elements. We have used [2XActionHomomorphism[102X472([14XReference: ActionHomomorphism[114X), among others, to construct the473corresponding actions and homomorphisms and have seen how transversals can474be used to create the action on cosets of a subgroup.[133X475476477[1X5.3 [33X[0;0YSubgroups as Stabilizers[133X[101X478479[33X[0;0YAction functions can also be used without constructing external sets. We480will try to find several subgroups in [10Xa8[110X as stabilizers of such actions. One481subgroup is immediately available, namely the stabilizer of one point. The482index of the stabilizer must of course be equal to the length of the orbit,483i.e., 8.[133X484485[4X[32X Example [32X[104X486[4X[25Xgap>[125X [27Xu8 := Stabilizer( a8, 1 );[127X[104X487[4X[28XGroup([ (2,3,4,5,6,7,8), (2,4,5,6,7,8,3) ])[128X[104X488[4X[25Xgap>[125X [27XIndex( a8, u8 );[127X[104X489[4X[28X8[128X[104X490[4X[25Xgap>[125X [27XOrbit( a8, 1 ); Length( last );[127X[104X491[4X[28X[ 1, 3, 2, 4, 5, 6, 7, 8 ][128X[104X492[4X[28X8[128X[104X493[4X[32X[104X494495[33X[0;0YThis gives us a hint how to find further subgroups. Each subgroup is the496stabilizer of a point of an appropriate transitive action (namely the action497on the cosets of that subgroup or another action that is equivalent to this498action). So the question is how to find other actions. The obvious thing is499to operate on pairs of points. So using the function [2XTuples[102X ([14XReference:500Tuples[114X) we first generate a list of all pairs.[133X501502[4X[32X Example [32X[104X503[4X[25Xgap>[125X [27Xpairs := Tuples( [1..8], 2 );;[127X[104X504[4X[32X[104X505506[33X[0;0YNow we would like to have [10Xa8[110X operate on this domain. But we cannot use the507default action [2XOnPoints[102X ([14XReference: OnPoints[114X) because powering a list by a508permutation via the caret operator [10X^[110X is not defined. So we must tell the509functions from the actions package how the group elements operate on the510elements of the domain (here and below, the word [21Xpackage[121X refers to the [5XGAP[105X511functionality for group actions, not to a [5XGAP[105X package). In our example we512can do this by simply passing [2XOnPairs[102X ([14XReference: OnPairs[114X) as an optional513last argument. All functions from the actions package accept such an514optional argument that describes the action. One example is [2XIsTransitive[102X515([14XReference: IsTransitive[114X).[133X516517[4X[32X Example [32X[104X518[4X[25Xgap>[125X [27XIsTransitive( a8, pairs, OnPairs );[127X[104X519[4X[28Xfalse[128X[104X520[4X[32X[104X521522[33X[0;0YThe action is of course not transitive, since the pairs [10X[ 1, 1 ][110X and [10X[ 1, 2523][110X cannot lie in the same orbit. So we want to find out what the orbits are.524The function [2XOrbits[102X ([14XReference: Orbits[114X) does that for us. It returns a list525of all the orbits. We look at the orbit lengths and representatives for the526orbits.[133X527528[4X[32X Example [32X[104X529[4X[25Xgap>[125X [27Xorbs := Orbits( a8, pairs, OnPairs );; Length( orbs );[127X[104X530[4X[28X2[128X[104X531[4X[25Xgap>[125X [27XList( orbs, Length );[127X[104X532[4X[28X[ 8, 56 ][128X[104X533[4X[25Xgap>[125X [27XList( orbs, o -> o[1] );[127X[104X534[4X[28X[ [ 1, 1 ], [ 1, 2 ] ][128X[104X535[4X[32X[104X536537[33X[0;0YThe action of [10Xa8[110X on the first orbit (this is the one containing [10X[1,1][110X, try538[10X[1,1] in orbs[1][110X) is of course equivalent to the original action, so we539ignore it and work with the second orbit.[133X540541[4X[32X Example [32X[104X542[4X[25Xgap>[125X [27Xu56 := Stabilizer( a8, orbs[2][1], OnPairs );; Index( a8, u56 );[127X[104X543[4X[28X56[128X[104X544[4X[32X[104X545546[33X[0;0YSo now we have found a second subgroup. To make the following computations a547little bit easier and more efficient we would now like to work on the points548[10X[ 1 .. 56 ][110X instead of the list of pairs. The function [2XActionHomomorphism[102X549([14XReference: ActionHomomorphism[114X) does what we need. It creates a homomorphism550defined on [10Xa8[110X whose image is a new group that acts on [10X[ 1 .. 56 ][110X in the551same way that [10Xa8[110X acts on the second orbit.[133X552553[4X[32X Example [32X[104X554[4X[25Xgap>[125X [27Xh56 := ActionHomomorphism( a8, orbs[2], OnPairs );;[127X[104X555[4X[25Xgap>[125X [27Xa8_56 := Image( h56 );;[127X[104X556[4X[32X[104X557558[33X[0;0YWe would now like to know if the subgroup [10Xu56[110X of index 56 that we found is559maximal or not. As we have used already in Section [14X5.2[114X, a subgroup is560maximal if and only if the action on the cosets of this subgroup is561primitive.[133X562563[4X[32X Example [32X[104X564[4X[25Xgap>[125X [27XIsPrimitive( a8_56, [1..56] );[127X[104X565[4X[28Xfalse[128X[104X566[4X[32X[104X567568[33X[0;0YRemember that we can leave out the function if we mean [2XOnPoints[102X ([14XReference:569OnPoints[114X) but that we have to specify the action domain for all action570functions.[133X571572[33X[0;0YWe see that [10Xa8_56[110X is not primitive. This means of course that the action of573[10Xa8[110X on [10Xorb[2][110X is not primitive, because those two actions are equivalent. So574the stabilizer [10Xu56[110X is not maximal. Let us try to find its supergroups. We575use the function [2XBlocks[102X ([14XReference: Blocks[114X) to find a block system. The576(optional) third argument in the following example tells [2XBlocks[102X ([14XReference:577Blocks[114X) that we want a block system where 1 and 3 lie in one block.[133X578579[4X[32X Example [32X[104X580[4X[25Xgap>[125X [27Xblocks := Blocks( a8_56, [1..56], [1,3] );;[127X[104X581[4X[32X[104X582583[33X[0;0YThe result is a list of sets, such that [10Xa8_56[110X acts on those sets. Now we584would like the stabilizer of this action on the sets. Because we want to585operate on the sets we have to pass [2XOnSets[102X ([14XReference: OnSets[114X) as third586argument.[133X587588[4X[32X Example [32X[104X589[4X[25Xgap>[125X [27Xu8_56 := Stabilizer( a8_56, blocks[1], OnSets );;[127X[104X590[4X[25Xgap>[125X [27XIndex( a8_56, u8_56 );[127X[104X591[4X[28X8[128X[104X592[4X[25Xgap>[125X [27Xu8b := PreImages( h56, u8_56 );; Index( a8, u8b );[127X[104X593[4X[28X8[128X[104X594[4X[25Xgap>[125X [27XIsConjugate( a8, u8, u8b );[127X[104X595[4X[28Xtrue[128X[104X596[4X[32X[104X597598[33X[0;0YSo we have found a supergroup of [10Xu56[110X that is conjugate in [10Xa8[110X to [10Xu8[110X. This is599not surprising, since [10Xu8[110X is a point stabilizer, and [10Xu56[110X is a two point600stabilizer in the natural action of [10Xa8[110X on eight points.[133X601602[33X[0;0YHere is a [13Xwarning[113X: If you specify [2XOnSets[102X ([14XReference: OnSets[114X) as third603argument to a function like [2XStabilizer[102X ([14XReference: Stabilizers[114X), you have to604make sure that the point (i.e. the second argument) is indeed a set.605Otherwise you will get a puzzling error message or even wrong results! In606the above example, the second argument [10Xblocks[1][110X came from the function607[2XBlocks[102X ([14XReference: Blocks[114X), which returns a list of sets, so everything was608OK.[133X609610[33X[0;0YActually there is a third block system of [10Xa8_56[110X that gives rise to a third611subgroup.[133X612613[4X[32X Example [32X[104X614[4X[25Xgap>[125X [27Xblocks := Blocks( a8_56, [1..56], [1,13] );;[127X[104X615[4X[25Xgap>[125X [27Xu28_56 := Stabilizer( a8_56, [1,13], OnSets );;[127X[104X616[4X[25Xgap>[125X [27Xu28 := PreImages( h56, u28_56 );;[127X[104X617[4X[25Xgap>[125X [27XIndex( a8, u28 );[127X[104X618[4X[28X28[128X[104X619[4X[32X[104X620621[33X[0;0YWe know that the subgroup [10Xu28[110X of index 28 is maximal, because we know that622[10Xa8[110X has no subgroups of index 2, 4, or 7. However we can also quickly verify623this by checking that [10Xa8_56[110X acts primitively on the 28 blocks.[133X624625[4X[32X Example [32X[104X626[4X[25Xgap>[125X [27XIsPrimitive( a8_56, blocks, OnSets );[127X[104X627[4X[28Xtrue[128X[104X628[4X[32X[104X629630[33X[0;0Y[2XStabilizer[102X ([14XReference: Stabilizers[114X) is not only applicable to groups like [10Xa8[110X631but also to their subgroups like [10Xu56[110X. So another method to find a new632subgroup is to compute the stabilizer of another point in [10Xu56[110X. Note that [10Xu56[110X633already leaves 1 and 2 fixed.[133X634635[4X[32X Example [32X[104X636[4X[25Xgap>[125X [27Xu336 := Stabilizer( u56, 3 );;[127X[104X637[4X[25Xgap>[125X [27XIndex( a8, u336 );[127X[104X638[4X[28X336[128X[104X639[4X[32X[104X640641[33X[0;0YOther functions are also applicable to subgroups. In the following we show642that [10Xu336[110X acts regularly on the 60 triples of [10X[ 4 .. 8 ][110X which contain no643element twice. We construct the list of these 60 triples with the function644[2XOrbit[102X ([14XReference: Orbit[114X) (using [2XOnTuples[102X ([14XReference: OnTuples[114X) as the645natural generalization of [2XOnPairs[102X ([14XReference: OnPairs[114X)) and then pass it as646action domain to the function [2XIsRegular[102X ([14XReference: IsRegular[114X). The positive647result of the regularity test means that this action is equivalent to the648actions of [10Xu336[110X on its 60 elements from the right.[133X649650[4X[32X Example [32X[104X651[4X[25Xgap>[125X [27XIsRegular( u336, Orbit( u336, [4,5,6], OnTuples ), OnTuples );[127X[104X652[4X[28Xtrue[128X[104X653[4X[32X[104X654655[33X[0;0YJust as we did in the case of the action on the pairs above, we now656construct a new permutation group that acts on [10X[ 1 .. 336 ][110X in the same way657that [10Xa8[110X acts on the cosets of [10Xu336[110X. But this time we let [10Xa8[110X operate on a658right transversal, just like [10Xnorm[110X did in the natural homomorphism above.[133X659660[4X[32X Example [32X[104X661[4X[25Xgap>[125X [27Xt := RightTransversal( a8, u336 );;[127X[104X662[4X[25Xgap>[125X [27Xa8_336 := Action( a8, t, OnRight );;[127X[104X663[4X[32X[104X664665[33X[0;0YTo find subgroups above [10Xu336[110X we again look for nontrivial block systems.[133X666667[4X[32X Example [32X[104X668[4X[25Xgap>[125X [27Xblocks := Blocks( a8_336, [1..336] );; blocks[1];[127X[104X669[4X[28X[ 1, 43, 85 ][128X[104X670[4X[32X[104X671672[33X[0;0YWe see that the union of [10Xu336[110X with its 43rd and its 85th coset is a subgroup673in [10Xa8_336[110X, its index is 112. We can obtain it as the closure of [10Xu336[110X with a674representative of the 43rd coset, which can be found as the 43rd element of675the transversal [10Xt[110X. Note that in the representation [10Xa8_336[110X on 336 points,676this subgroup corresponds to the stabilizer of the block [10X[ 1, 43, 85 ][110X.[133X677678[4X[32X Example [32X[104X679[4X[25Xgap>[125X [27Xu112 := ClosureGroup( u336, t[43] );;[127X[104X680[4X[25Xgap>[125X [27XIndex( a8, u112 );[127X[104X681[4X[28X112[128X[104X682[4X[32X[104X683684[33X[0;0YAbove this subgroup of index 112 lies a subgroup of index 56, which is not685conjugate to [10Xu56[110X. In fact, unlike [10Xu56[110X it is maximal. We obtain this subgroup686in the same way that we obtained [10Xu112[110X, this time forcing two points, namely6877 and 43 into the first block.[133X688689[4X[32X Example [32X[104X690[4X[25Xgap>[125X [27Xblocks := Blocks( a8_336, [1..336], [1,7,43] );;[127X[104X691[4X[25Xgap>[125X [27XLength( blocks );[127X[104X692[4X[28X56[128X[104X693[4X[25Xgap>[125X [27Xu56b := ClosureGroup( u112, t[7] );; Index( a8, u56b );[127X[104X694[4X[28X56[128X[104X695[4X[25Xgap>[125X [27XIsPrimitive( a8_336, blocks, OnSets );[127X[104X696[4X[28Xtrue[128X[104X697[4X[32X[104X698699[33X[0;0YWe already mentioned in Section [14X5.2[114X that there is another standard action of700permutations, namely the conjugation. E.g., since no other action is701specified in the following example, [2XOrbitLength[102X ([14XReference: OrbitLength[114X)702simply acts via [2XOnPoints[102X ([14XReference: OnPoints[114X), and because [3Xperm_1[103X[10X ^ [110X[3Xperm_2[103X703is defined as the conjugation of [3Xperm_2[103X on [3Xperm_1[103X, in fact we compute the704length of the conjugacy class of [10X(1,2)(3,4)(5,6)(7,8)[110X.[133X705706[4X[32X Example [32X[104X707[4X[25Xgap>[125X [27XOrbitLength( a8, (1,2)(3,4)(5,6)(7,8) );[127X[104X708[4X[28X105[128X[104X709[4X[25Xgap>[125X [27Xorb := Orbit( a8, (1,2)(3,4)(5,6)(7,8) );;[127X[104X710[4X[25Xgap>[125X [27Xu105 := Stabilizer( a8, (1,2)(3,4)(5,6)(7,8) );; Index( a8, u105 );[127X[104X711[4X[28X105[128X[104X712[4X[32X[104X713714[33X[0;0YNote that although the length of a conjugacy class of any element [22Xg[122X in any715finite group [22XG[122X can be computed as [10XOrbitLength( [110X[22XG[122X[10X, [110X[22Xg[122X[10X )[110X, the command [10XSize(716ConjugacyClass( [110X[22XG[122X[10X, [110X[22Xg[122X[10X ) )[110X is probably more efficient.[133X717718[4X[32X Example [32X[104X719[4X[25Xgap>[125X [27XSize( ConjugacyClass( a8, (1,2)(3,4)(5,6)(7,8) ) );[127X[104X720[4X[28X105[128X[104X721[4X[32X[104X722723[33X[0;0YOf course the stabilizer [10Xu105[110X is in fact the centralizer of the element724[10X(1,2)(3,4)(5,6)(7,8)[110X. [2XStabilizer[102X ([14XReference: Stabilizers[114X) notices that and725computes the stabilizer using the centralizer algorithm for permutation726groups. In the usual way we now look for the subgroups above [10Xu105[110X.[133X727728[4X[32X Example [32X[104X729[4X[25Xgap>[125X [27Xblocks := Blocks( a8, orb );; Length( blocks );[127X[104X730[4X[28X15[128X[104X731[4X[25Xgap>[125X [27Xblocks[1];[127X[104X732[4X[28X[ (1,2)(3,4)(5,6)(7,8), (1,3)(2,4)(5,7)(6,8), (1,4)(2,3)(5,8)(6,7), [128X[104X733[4X[28X (1,5)(2,6)(3,7)(4,8), (1,6)(2,5)(3,8)(4,7), (1,7)(2,8)(3,5)(4,6), [128X[104X734[4X[28X (1,8)(2,7)(3,6)(4,5) ][128X[104X735[4X[32X[104X736737[33X[0;0YTo find the subgroup of index 15 we again use closure. Now we must be a738little bit careful to avoid confusion. [10Xu105[110X is the stabilizer of739[10X(1,2)(3,4)(5,6)(7,8)[110X. We know that there is a correspondence between the740points of the orbit and the cosets of [10Xu105[110X. The point [10X(1,2)(3,4)(5,6)(7,8)[110X741corresponds to [10Xu105[110X. To get the subgroup above [10Xu105[110X that has index 15 in [10Xa8[110X,742we must form the closure of [10Xu105[110X with an element of the coset that743corresponds to any other point in the first block. If we choose the point744[10X(1,3)(2,4)(5,8)(6,7)[110X, we must use an element of [10Xa8[110X that maps745[10X(1,2)(3,4)(5,6)(7,8)[110X to [10X(1,3)(2,4)(5,8)(6,7)[110X. The function746[2XRepresentativeAction[102X ([14XReference: RepresentativeAction[114X) does what we need. It747takes a group and two points and returns an element of the group that maps748the first point to the second. In fact it also allows you to specify the749action as an optional fourth argument as usual, but we do not need this750here. If no such element exists in the group, i.e., if the two points do not751lie in one orbit under the group, [2XRepresentativeAction[102X ([14XReference:752RepresentativeAction[114X) returns [9Xfail[109X.[133X753754[4X[32X Example [32X[104X755[4X[25Xgap>[125X [27Xrep := RepresentativeAction( a8, (1,2)(3,4)(5,6)(7,8),[127X[104X756[4X[25X>[125X [27X (1,3)(2,4)(5,8)(6,7) );[127X[104X757[4X[28X(2,3)(6,8)[128X[104X758[4X[25Xgap>[125X [27Xu15 := ClosureGroup( u105, rep );; Index( a8, u15 );[127X[104X759[4X[28X15[128X[104X760[4X[32X[104X761762[33X[0;0Y[10Xu15[110X is of course a maximal subgroup, because [10Xa8[110X has no subgroups of index 3763or 5. There is in fact another class of subgroups of index 15 above [10Xu105[110X764that we get by adding [10X(2,3)(6,7)[110X to [10Xu105[110X.[133X765766[4X[32X Example [32X[104X767[4X[25Xgap>[125X [27Xu15b := ClosureGroup( u105, (2,3)(6,7) );; Index( a8, u15b );[127X[104X768[4X[28X15[128X[104X769[4X[25Xgap>[125X [27XRepresentativeAction( a8, u15, u15b );[127X[104X770[4X[28Xfail[128X[104X771[4X[32X[104X772773[33X[0;0Y[2XRepresentativeAction[102X ([14XReference: RepresentativeAction[114X) tells us that there774is no element [22Xg[122X in [10Xa8[110X such that [10Xu15 ^ [110X[22Xg[122X[10X = u15b[110X. Because [10X^[110X also denotes the775conjugation of subgroups this tells us that [10Xu15[110X and [10Xu15b[110X are not conjugate.[133X776777[33X[0;0Y[13XSummary.[113X In this section we have demonstrated some functions from the778actions package. There is a whole class of functions that we did not779mention, namely those that take a single element instead of a whole group as780first argument, e.g., [2XCycle[102X ([14XReference: Cycle[114X) and [2XPermutation[102X ([14XReference:781Permutation[114X). These are fully described in Chapter [14X'Reference: Group782Actions'[114X.[133X783784785[1X5.4 [33X[0;0YGroup Homomorphisms by Images[133X[101X786787[33X[0;0YWe have already seen examples of group homomorphisms in the last sections,788namely natural homomorphisms and action homomorphisms. In this section we789will show how to construct a group homomorphism [22XG → H[122X by specifying a790generating set for [22XG[122X and the images of these generators in [22XH[122X. We use the791function [10XGroupHomomorphismByImages( [3XG[103X[10X, [3XH[103X[10X, [3Xgens[103X[10X, [3Ximgs[103X[10X )[110X where [3Xgens[103X is a792generating set for [3XG[103X and [3Ximgs[103X is a list whose [22Xi[122Xth entry is the image of793[22X[3Xgens[103X[i][122X under the homomorphism.[133X794795[4X[32X Example [32X[104X796[4X[25Xgap>[125X [27Xs4 := Group((1,2,3,4),(1,2));; s3 := Group((1,2,3),(1,2));;[127X[104X797[4X[25Xgap>[125X [27Xhom := GroupHomomorphismByImages( s4, s3,[127X[104X798[4X[25X>[125X [27X GeneratorsOfGroup(s4), [(1,2),(2,3)] );[127X[104X799[4X[28X[ (1,2,3,4), (1,2) ] -> [ (1,2), (2,3) ][128X[104X800[4X[25Xgap>[125X [27XKernel( hom );[127X[104X801[4X[28XGroup([ (1,4)(2,3), (1,3)(2,4) ])[128X[104X802[4X[25Xgap>[125X [27XImage( hom, (1,2,3) );[127X[104X803[4X[28X(1,2,3)[128X[104X804[4X[25Xgap>[125X [27XSize( Image( hom, DerivedSubgroup(s4) ) );[127X[104X805[4X[28X3[128X[104X806[4X[32X[104X807808[4X[32X Example [32X[104X809[4X[25Xgap>[125X [27XPreImage( hom, (1,2,3) );[127X[104X810[4X[28XError, <map> must be an inj. and surj. mapping called from[128X[104X811[4X[28X<function "PreImage">( <arguments> )[128X[104X812[4X[28X called from read-eval loop at line 4 of *stdin*[128X[104X813[4X[28Xyou can 'quit;' to quit to outer loop, or[128X[104X814[4X[28Xyou can 'return;' to continue[128X[104X815[4X[26Xbrk>[126X [27Xquit;[127X[104X816[4X[32X[104X817818[4X[32X Example [32X[104X819[4X[25Xgap>[125X [27XPreImagesRepresentative( hom, (1,2,3) );[127X[104X820[4X[28X(1,4,2)[128X[104X821[4X[25Xgap>[125X [27XPreImage( hom, TrivialSubgroup(s3) ); # the kernel[127X[104X822[4X[28XGroup([ (1,4)(2,3), (1,3)(2,4) ])[128X[104X823[4X[32X[104X824825[33X[0;0YThis homomorphism from [22XS_4[122X onto [22XS_3[122X is well known from elementary group826theory. Images of elements and subgroups under [10Xhom[110X can be calculated with827the function [2XImage[102X ([14XReference: Image[114X). But since the mapping [10Xhom[110X is not828bijective, we cannot use the function [2XPreImage[102X ([14XReference: PreImage[114X) for829preimages of elements (they can have several preimages). Instead, we have to830use [2XPreImagesRepresentative[102X ([14XReference: PreImagesRepresentative[114X), which831returns one preimage if at least one exists (and would return [9Xfail[109X if none832exists, which cannot occur for our surjective [10Xhom[110X). On the other hand, we833can use [2XPreImage[102X ([14XReference: PreImage[114X) for the preimage of a set (which834always exists, even if it is empty).[133X835836[33X[0;0YSuppose we mistype the input when trying to construct a homomorphism as837below.[133X838839[4X[32X Example [32X[104X840[4X[25Xgap>[125X [27XGroupHomomorphismByImages( s4, s3,[127X[104X841[4X[25X>[125X [27X GeneratorsOfGroup(s4), [(1,2,3),(2,3)] );[127X[104X842[4X[28Xfail[128X[104X843[4X[32X[104X844845[33X[0;0YThere is no such homomorphism, hence [9Xfail[109X is returned. But note that because846of this, [2XGroupHomomorphismByImages[102X ([14XReference: GroupHomomorphismByImages[114X)847must do some checks, and this was also done for the mapping [10Xhom[110X above. One848can avoid these checks if one is sure that the desired homomorphism really849exists. For that, the function [2XGroupHomomorphismByImagesNC[102X ([14XReference:850GroupHomomorphismByImagesNC[114X) can be used; the [10XNC[110X stands for [21Xno check[121X.[133X851852[33X[0;0YBut note that horrible things can happen if [2XGroupHomomorphismByImagesNC[102X853([14XReference: GroupHomomorphismByImagesNC[114X) is used when the input does not854describe a homomorphism.[133X855856[4X[32X Example [32X[104X857[4X[25Xgap>[125X [27Xhom2 := GroupHomomorphismByImagesNC( s4, s3,[127X[104X858[4X[25X>[125X [27X GeneratorsOfGroup(s4), [(1,2,3),(2,3)] );[127X[104X859[4X[28X[ (1,2,3,4), (1,2) ] -> [ (1,2,3), (2,3) ][128X[104X860[4X[25Xgap>[125X [27XSize( Kernel(hom2) );[127X[104X861[4X[28X24[128X[104X862[4X[32X[104X863864[33X[0;0YIn other words, [5XGAP[105X claims that the kernel is the full [10Xs4[110X, yet [10Xhom2[110X865obviously has some non-trivial images! Clearly there is no such thing as a866homomorphism which maps an element of order 4 (namely, (1,2,3,4)) to an867element of order 3 (namely, (1,2,3)). [13XBut if you use the command868[2XGroupHomomorphismByImagesNC[102X ([14XReference: GroupHomomorphismByImagesNC[114X), [5XGAP[105X869trusts you.[113X[133X870871[4X[32X Example [32X[104X872[4X[25Xgap>[125X [27XIsGroupHomomorphism( hom2 );[127X[104X873[4X[28Xtrue[128X[104X874[4X[32X[104X875876[33X[0;0YAnd then it produces serious nonsense if the thing is not a homomorphism, as877seen above![133X878879[33X[0;0YBesides the safe command [2XGroupHomomorphismByImages[102X ([14XReference:880GroupHomomorphismByImages[114X), which returns [9Xfail[109X if the requested homomorphism881does not exist, there is the function [2XGroupGeneralMappingByImages[102X882([14XReference: GroupGeneralMappingByImages[114X), which returns a general mapping883(that is, a possibly multi-valued mapping) that can be tested with884[2XIsGroupHomomorphism[102X ([14XReference: IsGroupHomomorphism[114X).[133X885886[4X[32X Example [32X[104X887[4X[25Xgap>[125X [27Xhom2 := GroupGeneralMappingByImages( s4, s3,[127X[104X888[4X[25X>[125X [27X GeneratorsOfGroup(s4), [(1,2,3),(2,3)] );;[127X[104X889[4X[25Xgap>[125X [27XIsGroupHomomorphism( hom2 );[127X[104X890[4X[28Xfalse[128X[104X891[4X[32X[104X892893[33X[0;0YBut the possibility of testing for being a homomorphism is not the only894reason why [5XGAP[105X offers [13Xgroup general mappings[113X. Another (more important?)895reason is that their existence allows [21Xreversal of arrows[121X in a homomorphism896such as our original [10Xhom[110X. By this we mean the [2XGroupHomomorphismByImages[102X897([14XReference: GroupHomomorphismByImages[114X) with left and right sides exchanged,898in which case it is of course merely a [2XGroupGeneralMappingByImages[102X899([14XReference: GroupGeneralMappingByImages[114X).[133X900901[4X[32X Example [32X[104X902[4X[25Xgap>[125X [27Xrev := GroupGeneralMappingByImages( s3, s4,[127X[104X903[4X[25X>[125X [27X [(1,2),(2,3)], GeneratorsOfGroup(s4) );;[127X[104X904[4X[32X[104X905906[33X[0;0YNow [22Xhom[122X maps [22Xa[122X to [22Xb[122X if and only if [22Xrev[122X maps [22Xb[122X to [22Xa[122X, for [22Xa ∈[122X [10Xs4[110X and [22Xb ∈[122X [10Xs3[110X.907Since every such [22Xb[122X has four preimages under [10Xhom[110X, it now has four images908under [10Xrev[110X. Just as the four preimages form a coset of the kernel [22XV_4 ≤[122X[10Xs4[110X of909[10Xhom[110X, they also form a coset of the [13Xcokernel[113X [22XV_4 ≤[122X[10Xs4[110X of [10Xrev[110X. The cokernel910itself is the set of all images of [10XOne( s3 )[110X. (It is a normal subgroup in911the group of all images under [10Xrev[110X.) The operation [2XOne[102X ([14XReference: One[114X)912returns the identity element of a group. And this is why [5XGAP[105X wants to913perform such a reversal of arrows: it calculates the kernel of a914homomorphism like [10Xhom[110X as the cokernel of the reversed group general mapping915(here [10Xrev[110X).[133X916917[4X[32X Example [32X[104X918[4X[25Xgap>[125X [27XCoKernel( rev );[127X[104X919[4X[28XGroup([ (1,4)(2,3), (1,3)(2,4) ])[128X[104X920[4X[32X[104X921922[33X[0;0YThe reason why [10Xrev[110X is not a homomorphism is that it is not single-valued923(because [10Xhom[110X was not injective). But there is another critical condition: If924we reverse the arrows of a non-surjective homomorphism, we obtain a group925general mapping which is not defined everywhere, i.e., which is not total926(although it will be single-valued if the original homomorphism is927injective). [5XGAP[105X requires that a group homomorphism be both single-valued and928total, so you will get [9Xfail[109X if you say [10XGroupHomomorphismByImages( [3XG[103X[10X, [3XH[103X[10X,929[3Xgens[103X[10X, [3Ximgs[103X[10X )[110X where [3Xgens[103X does not generate [3XG[103X (even if this would give a930decent homomorphism on the subgroup generated by [3Xgens[103X). For a full931description, see Chapter [14X'Reference: Group Homomorphisms'[114X.[133X932933[33X[0;0YThe last example of this section shows that the notion of kernel and934cokernel naturally extends even to the case where neither [10Xhom2[110X nor its935inverse general mapping (with arrows reversed) is a homomorphism.[133X936937[4X[32X Example [32X[104X938[4X[25Xgap>[125X [27XCoKernel( hom2 ); Kernel( hom2 );[127X[104X939[4X[28XGroup([ (2,3), (1,3) ])[128X[104X940[4X[28XGroup([ (3,4), (2,3,4), (1,2,4) ])[128X[104X941[4X[25Xgap>[125X [27XIsGroupHomomorphism( InverseGeneralMapping( hom2 ) );[127X[104X942[4X[28Xfalse[128X[104X943[4X[32X[104X944945[33X[0;0Y[13XSummary.[113X In this section we have constructed homomorphisms by specifying946images for a set of generators. We have seen that by reversing the direction947of the mapping, we get group general mappings, which need not be948single-valued (unless the mapping was injective) nor total (unless the949mapping was surjective).[133X950951952[1X5.5 [33X[0;0YNice Monomorphisms[133X[101X953954[33X[0;0YFor some types of groups, the best method to calculate in an isomorphic955group in a [21Xbetter[121X representation (say, a permutation group). We call an956injective homomorphism, that will give such an isomorphic image a [21Xnice957monomorphism[121X.[133X958959[33X[0;0YFor example in the case of a matrix group we can take the action on the960underlying vector space (or a suitable subset) to obtain such a961monomorphism:[133X962963[4X[32X Example [32X[104X964[4X[25Xgap>[125X [27Xgrp:=GL(2,3);;[127X[104X965[4X[25Xgap>[125X [27Xdom:=GF(3)^2;;[127X[104X966[4X[25Xgap>[125X [27Xhom := ActionHomomorphism( grp, dom );; IsInjective( hom );[127X[104X967[4X[28Xtrue[128X[104X968[4X[25Xgap>[125X [27Xp := Image( hom,grp );[127X[104X969[4X[28XGroup([ (4,7)(5,8)(6,9), (2,7,6)(3,4,8) ])[128X[104X970[4X[32X[104X971972[33X[0;0YTo demonstrate the technique of nice monomorphisms, we compute the conjugacy973classes of the permutation group and lift them back into the matrix group974with the monomorphism [10Xhom[110X. Lifting back a conjugacy class means finding the975preimage of the representative and of the centralizer; the latter is called976[2XStabilizerOfExternalSet[102X ([14XReference: StabilizerOfExternalSet[114X) in [5XGAP[105X (because977conjugacy classes are represented as external sets, see Section [14X'Reference:978Conjugacy Classes'[114X).[133X979980[4X[32X Example [32X[104X981[4X[25Xgap>[125X [27Xpcls := ConjugacyClasses( p );; gcls := [ ];;[127X[104X982[4X[25Xgap>[125X [27Xfor pc in pcls do[127X[104X983[4X[25X>[125X [27X gc:=ConjugacyClass(grp,[127X[104X984[4X[25X>[125X [27X PreImagesRepresentative(hom,Representative(pc)));[127X[104X985[4X[25X>[125X [27X SetStabilizerOfExternalSet(gc,PreImage(hom,[127X[104X986[4X[25X>[125X [27X StabilizerOfExternalSet(pc)));[127X[104X987[4X[25X>[125X [27X Add( gcls, gc );[127X[104X988[4X[25X>[125X [27X od;[127X[104X989[4X[25Xgap>[125X [27XList( gcls, Size );[127X[104X990[4X[28X[ 1, 8, 12, 1, 8, 6, 6, 6 ][128X[104X991[4X[32X[104X992993[33X[0;0YAll the steps we have made above are automatically performed by [5XGAP[105X if you994simply ask for [10XConjugacyClasses( grp )[110X, provided that [5XGAP[105X already knows that995[10Xgrp[110X is finite (e.g., because you asked [10XIsFinite( grp )[110X before). The reason996for this is that a finite matrix group like [10Xgrp[110X is [21Xhandled by a nice997monomorphism[121X. For such groups, [5XGAP[105X uses the command [2XNiceMonomorphism[102X998([14XReference: NiceMonomorphism[114X) to construct a monomorphism (such as the [10Xhom[110X999in the previous example) and then proceeds as we have done above.[133X10001001[4X[32X Example [32X[104X1002[4X[25Xgap>[125X [27Xgrp:=GL(2,3);;[127X[104X1003[4X[25Xgap>[125X [27XIsHandledByNiceMonomorphism( grp );[127X[104X1004[4X[28Xtrue[128X[104X1005[4X[25Xgap>[125X [27Xhom := NiceMonomorphism( grp );[127X[104X1006[4X[28X<action isomorphism>[128X[104X1007[4X[25Xgap>[125X [27Xp :=Image(hom,grp);[127X[104X1008[4X[28XGroup([ (4,7)(5,8)(6,9), (2,7,6)(3,4,8) ])[128X[104X1009[4X[25Xgap>[125X [27Xcc := ConjugacyClasses( grp );; ForAll(cc, x-> x in gcls); [127X[104X1010[4X[28Xtrue[128X[104X1011[4X[25Xgap>[125X [27XForAll(gcls, x->x in cc); # cc and gcls might be ordered differently[127X[104X1012[4X[28Xtrue[128X[104X1013[4X[32X[104X10141015[33X[0;0YNote that a nice monomorphism might be defined on a larger group than [10Xgrp[110X1016–so we have to use [10XImage( hom, grp )[110X and not only [10XImage( hom )[110X.[133X10171018[33X[0;0YNice monomorphisms are not only used for matrix groups, but also for other1019kinds of groups in which one cannot calculate easily enough. As another1020example, let us show that the automorphism group of the quaternion group of1021order 8 is isomorphic to the symmetric group of degree 4 by examining the1022[21Xnice object[121X associated with that automorphism group.[133X10231024[4X[32X Example [32X[104X1025[4X[25Xgap>[125X [27Xp:=Group((1,7,6,8)(2,5,3,4), (1,2,6,3)(4,8,5,7));;[127X[104X1026[4X[25Xgap>[125X [27Xaut := AutomorphismGroup( p );; NiceMonomorphism(aut);;[127X[104X1027[4X[25Xgap>[125X [27Xniceaut := NiceObject( aut );[127X[104X1028[4X[28XGroup([ (1,4,2,3), (1,5,4)(2,6,3), (1,2)(3,4), (3,4)(5,6) ])[128X[104X1029[4X[25Xgap>[125X [27XIsomorphismGroups( niceaut, SymmetricGroup( 4 ) );[127X[104X1030[4X[28X[ (1,4,2,3), (1,5,4)(2,6,3), (1,2)(3,4), (3,4)(5,6) ] -> [128X[104X1031[4X[28X[ (1,4,3,2), (1,3,2), (1,3)(2,4), (1,2)(3,4) ][128X[104X1032[4X[32X[104X10331034[33X[0;0YThe range of a nice monomorphism is in most cases a permutation group,1035because nice monomorphisms are mostly action homomorphisms. In some cases,1036like in our last example, the group is solvable and you might prefer a pc1037group as nice object. You cannot change the nice monomorphism of the1038automorphism group (because it is the value of the attribute1039[2XNiceMonomorphism[102X ([14XReference: NiceMonomorphism[114X)), but you can compose it with1040an isomorphism from the permutation group to a pc group to obtain your1041personal nicer monomorphism. If you reconstruct the automorphism group, you1042can even prescribe it this nicer monomorphism as its [2XNiceMonomorphism[102X1043([14XReference: NiceMonomorphism[114X), because a newly-constructed group will not1044yet have a [2XNiceMonomorphism[102X ([14XReference: NiceMonomorphism[114X) set.[133X10451046[4X[32X Example [32X[104X1047[4X[25Xgap>[125X [27Xnicer := NiceMonomorphism(aut) * IsomorphismPcGroup(niceaut);;[127X[104X1048[4X[25Xgap>[125X [27Xaut2 := GroupByGenerators( GeneratorsOfGroup( aut ) );;[127X[104X1049[4X[25Xgap>[125X [27XSetIsHandledByNiceMonomorphism( aut2, true );[127X[104X1050[4X[25Xgap>[125X [27XSetNiceMonomorphism( aut2, nicer );[127X[104X1051[4X[25Xgap>[125X [27XNiceObject( aut2 ); # a pc group[127X[104X1052[4X[28XGroup([ f1*f2, f2^2*f3, f4, f3 ])[128X[104X1053[4X[32X[104X10541055[33X[0;0YThe star [10X*[110X denotes composition of mappings from the left to the right, as we1056have seen in Section [14X5.2[114X above. Reconstructing the automorphism group may of1057course result in the loss of other information [5XGAP[105X had already gathered,1058besides the (not-so-)nice monomorphism.[133X10591060[33X[0;0Y[13XSummary.[113X In this section we have seen how calculations in groups can be1061carried out in isomorphic images in nicer groups. We have seen that [5XGAP[105X1062pursues this technique automatically for certain classes of groups, e.g.,1063for matrix groups that are known to be finite.[133X106410651066[1X5.6 [33X[0;0YFurther Information about Groups and Homomorphisms[133X[101X10671068[33X[0;0YGroups and the functions for groups are treated in Chapter [14X'Reference:1069Groups'[114X. There are several chapters dealing with groups in specific1070representations, for example Chapter [14X'Reference: Permutation Groups'[114X on1071permutation groups, [14X'Reference: Polycyclic Groups'[114X on polycyclic (including1072finite solvable) groups, [14X'Reference: Matrix Groups'[114X on matrix groups and1073[14X'Reference: Finitely Presented Groups'[114X on finitely presented groups.1074Chapter [14X'Reference: Group Actions'[114X deals with group actions. Group1075homomorphisms are the subject of Chapter [14X'Reference: Group Homomorphisms'[114X.[133X1076107710781079