3. Residue-Class-Wise Affine Groups

In this chapter, we describe the functionality provided by this package for computing with residue-class-wise affine groups.

3.1 Constructing residue-class-wise affine groups

Residue-class-wise affine groups can be constructed using either Group, GroupByGenerators or GroupWithGenerators as usual, cp. the GAP reference manual.



gap> G := Group(ClassTransposition(0,2,1,4),ClassShift(0,5));
<rcwa group over Z with 2 generators>
gap> IsTame(G); Size(G); IsSolvable(G); IsPerfect(G);
true
infinity
false
false


There are methods for the operations View, Display, Print and String which are applicable to rcwa groups. All rcwa groups over a ring R are subgroups of RCWA(R). The group RCWA(R) itself is not finitely generated, thus cannot be constructed as described above. It is handled as a special case:

3.1-1 RCWA
> RCWA( R )( function )

Returns: The group RCWA(R) of all residue-class-wise affine permutations of the ring R.



gap> RCWA_Z := RCWA(Integers);
RCWA(Z)
gap> IsSubgroup(RCWA_Z,G);
true


Examples of rcwa permutations can be obtained via Random(RCWA(R)), see Section 3.10.

We denote the group which is generated by all class transpositions of the ring R by CT(R). This group is handled as a special case as well:

3.1-2 CT
> CT( R )( function )

Returns: The group CT(R) which is generated by all class transpositions of the ring R.



gap> CT_Z := CT(Integers);
CT(Z)
gap> IsSimple(CT_Z); # One of a longer list of stored attributes/properties.
true
gap> IsSubgroup(CT_Z,G);
false


Another way of constructing an rcwa group is taking the image of an rcwa representation:

3.1-3 IsomorphismRcwaGroupOverZ
> IsomorphismRcwaGroupOverZ( G )( attribute )
> IsomorphismRcwaGroup( G )( attribute )

Returns: A monomorphism from the group G to RCWA(Z).

Currently there are methods available for finite groups, for free products of finite groups and for free groups. The method for free products of finite groups uses the Table-Tennis Lemma (cp. e.g. Section II.B. in [H00]), and the method for free groups uses an adaptation of the construction given on page 27 in [H00] from PSL(2,C) to RCWA(Z).

In case G is a finite-degree permutation group, the image under a specific embedding can be obtained by RcwaGroupByPermGroup(G). The resulting group H satisfies the relation Action(H^ClassShift(0,1),[1..LargestMovedPoint(G)]) = G.



gap> F := FreeProduct(Group((1,2)(3,4),(1,3)(2,4)),Group((1,2,3)),
>                     SymmetricGroup(3));
<fp group on the generators [ f1, f2, f3, f4, f5 ]>
gap> IsomorphismRcwaGroup(F);
[ f1, f2, f3, f4, f5 ] -> [ <bijective rcwa mapping of Z with modulus 12>,
  <bijective rcwa mapping of Z with modulus 24>,
  <bijective rcwa mapping of Z with modulus 12>,
  <bijective rcwa mapping of Z with modulus 72>,
  <bijective rcwa mapping of Z with modulus 36> ]
gap> IsomorphismRcwaGroup(FreeGroup(2));
[ f1, f2 ] -> [ <wild bijective rcwa mapping of Z with modulus 8>,
  <wild bijective rcwa mapping of Z with modulus 8> ]
gap> F2 := Image(last);
<wild rcwa group over Z with 2 generators>


3.1-4 StructureDescription
> StructureDescription( G )( method )

Returns: A string which describes the structure of the rcwa group G to some extent.

The attribute StructureDescription for finite groups is documented in the GAP Reference Manual. Therefore we describe here only issues which are specific to infinite groups, and in particular to rcwa groups.

Wreath products are denoted by wr, and free products are denoted by *. The infinite cyclic group (Z,+) is denoted by Z, the infinite dihedral group is denoted by D0 and free groups of rank 2,3,4,dots are denoted by F2, F3, F4, dots. While for finite groups the symbol . is used to denote a non-split extension, for rcwa groups in general it stands for an extension which may be split or not. For wild groups in most cases it happens that there is a large section on which no structural information can be obtained. Such sections of the group with unknown structure are denoted by <unknown>. In general, the structure of a section denoted by <unknown> can be very complicate and very difficult to exhibit. While for isomorphic finite groups always the same structure description is computed, this cannot be guaranteed for isomorphic rcwa groups.



gap> G := Group(ClassTransposition(0,2,1,4),ClassShift(0,5));;
gap> StructureDescription(G);
"(Z x Z x Z x Z x Z x Z x Z) . (C2 x S7)"
gap> G := Group(ClassTransposition(0,2,1,4),
>               ClassShift(2,4),ClassReflection(1,2));;
gap> StructureDescription(G:short);
"Z^2.((S3xS3):2)"
gap> F2 := Image(IsomorphismRcwaGroup(FreeGroup(2)));;
gap> PSL2Z := Image(IsomorphismRcwaGroup(FreeProduct(CyclicGroup(3),
>                                                    CyclicGroup(2))));;
gap> G := DirectProduct(PSL2Z,F2);
<wild rcwa group over Z with 4 generators>
gap> StructureDescription(G);
"(C3 * C2) x F2"
gap> G := WreathProduct(G,CyclicGroup(IsRcwaGroupOverZ,infinity));
<wild rcwa group over Z with 5 generators>
gap> StructureDescription(G);
"((C3 * C2) x F2) wr Z"
gap> Collatz := RcwaMapping([[2,0,3],[4,-1,3],[4,1,3]]);;
gap> G := Group(Collatz,ClassShift(0,1));;
gap> StructureDescription(G:short);
"<unknown>.Z"


3.2 Direct products and wreath products

The class of groups which can faithfully be represented as rcwa groups over the integers is closed under taking direct products, wreath products with finite groups and wreath products with the infinite cyclic group (Z,+). For information on how direct products and wreath products of subgroups of RCWA(Z) are embedded into RCWA(Z), see Section 3.9 below.

3.2-1 DirectProduct
> DirectProduct( G1, G2, ... )( method )

Returns: An rcwa group isomorphic to the direct product of the rcwa groups over Z given as arguments.

There is certainly no unique or canonical way to embed a direct product of rcwa groups into RCWA(Z). This method chooses to embed the groups G1, G2, G3 ... via restrictions by n -> mn, n -> mn+1, n -> mn+2 ... (-> Restriction (3.9-1)), where m denotes the number of groups given as arguments.



gap> F2 := Image(IsomorphismRcwaGroup(FreeGroup(2)));;
gap> F2xF2 := DirectProduct(F2,F2);
<wild rcwa group over Z with 4 generators>
gap> Image(Projection(F2xF2,1)) = F2;
true


3.2-2 WreathProduct
> WreathProduct( G, P )( method )
> WreathProduct( G, Z )( method )

Returns: An rcwa group isomorphic to the wreath product of the rcwa group G over Z with the finite permutation group P, respectively with the infinite cyclic group Z.

The first-mentioned method embeds the DegreeAction(P)th direct power of G using the method for DirectProduct, and lets the permutation group P act naturally on the set of residue classes modulo DegreeAction(P). The second-mentioned method restricts (-> Restriction (3.9-1)) the group G to the residue class 3(4), and maps the generator of the infinite cyclic group Z to ClassTransposition(0,2,1,2) * ClassTransposition(0,2,1,4).



gap> F2 := Image(IsomorphismRcwaGroup(FreeGroup(2)));;
gap> F2wrA5 := WreathProduct(F2,AlternatingGroup(5));;
gap> Embedding(F2wrA5,1);
[ <wild bijective rcwa mapping of Z with modulus 8>,
  <wild bijective rcwa mapping of Z with modulus 8> ] ->
[ <wild bijective rcwa mapping of Z with modulus 40>,
  <wild bijective rcwa mapping of Z with modulus 40> ]
gap> Embedding(F2wrA5,2);
[ (1,2,3,4,5), (3,4,5) ] ->
[ <bijective rcwa mapping of Z with modulus 5, of order 5>,
  <bijective rcwa mapping of Z with modulus 5, of order 3> ]
gap> ZwrZ := WreathProduct(Group(ClassShift(0,1)),Group(ClassShift(0,1)));
<wild rcwa group over Z with 2 generators>
gap> Embedding(ZwrZ,1);
[ ClassShift(0,1) ] ->
[ <tame bijective rcwa mapping of Z with modulus 4, of order infinity> ]
gap> Embedding(ZwrZ,2);
[ ClassShift(0,1) ] -> [ <wild bijective rcwa mapping of Z with modulus 4> ]


3.3 The membership test

There is a method for the operation in. Given an rcwa group G and an rcwa mapping g, this method tries to decide whether g is an element of G or not. It can always decide this question if G is tame. For wild groups this is sometimes not the case. On Info level 2 of InfoRCWA the method gives information on reasons why g is an element of G or not.

The direct product of two free groups of rank 2 can faithfully be represented as an rcwa group. According to [M58] this implies that in general the membership problem for rcwa groups is algorithmically undecidable.



gap> G := Group(ClassShift(0,3),ClassTransposition(0,3,2,6));;
gap> ClassShift(2,6)^7*ClassTransposition(0,3,2,6)*ClassShift(0,3)^-3 in G;
true
gap> ClassShift(0,1) in G;
false


3.4 Basic attributes and properties of rcwa groups

There is a method available for the operation Size. An rcwa group is finite if and only if it is tame and its action on a suitably chosen respected partition (see RespectedPartition (3.11-1)) is faithful. Hence the problem of computing the order of an rcwa group reduces to the problem of deciding whether it is tame, the problem of deciding whether it acts faithfully on a respected partition and the problem of computing the order of the finite permutation group induced on the respected partition. Basic attributes derived from the affine partial mappings of the elements of an rcwa group and their coefficients are Modulus, Multiplier, Divisor and PrimeSet. The modulus of an rcwa group is the lcm of the moduli of its elements in case such an lcm exists and 0 otherwise. The multiplier resp. divisor of an rcwa group is the lcm of the multipliers resp. divisors of its elements in case such an lcm exists and infty otherwise. The prime set of an rcwa group is the union of the prime sets of its elements. There are shorthands Mod, Mult and Div defined for Modulus, Multiplier resp. Divisor. Technically, the modulus of an rcwa group is stored as an attribute ModulusOfRcwaGroup.

A tame rcwa group, i.e. one with modulus 0, has the property IsTame. An rcwa group is called integral resp. class-wise order-preserving if all of its elements are so. There are corresponding methods available for IsIntegral and IsClassWiseOrderPreserving.



gap> g1 := RcwaMapping((1,2),[1..2]);;
gap> g2 := RcwaMapping((1,2,3),[1..3]);;
gap> g3 := RcwaMapping((1,2,3,4,5),[1..5]);;
gap> List([g1,g2,g3],Modulus);
[ 2, 3, 5 ]
gap> G := Group(g1,g2,g3);;
gap> Size(G);
265252859812191058636308480000000
gap> List([Modulus,Multiplier,Divisor,PrimeSet,
>          IsIntegral,IsClassWiseOrderPreserving],f->f(G));
[ 30, 1, 1, [ 2, 3, 5 ], true, true ]


3.5 Permutation- and matrix representations

3.5-1 IsomorphismPermGroup
> IsomorphismPermGroup( G )( method )

Returns: An isomorphism from the finite rcwa group G to a finite-degree permutation group.



gap> IsomorphismPermGroup(Group(ClassTransposition(0,2,1,2),
>                               ClassTransposition(0,3,1,3)));
[ ClassTransposition(0,2,1,2), ClassTransposition(0,3,1,3) ] -> 
[ (1,2)(3,4)(5,6), (1,2)(4,5) ]


3.5-2 IsomorphismMatrixGroup
> IsomorphismMatrixGroup( G )( attribute )

Returns: An isomorphism from the rcwa group G to a matrix group, provided that G embeds into a matrix group and that there is a suitable method available. Both conditions are fulfilled if G is tame.



gap> G := Group(ClassTransposition(0,2,1,4),ClassShift(2,4));
<rcwa group over Z with 2 generators>
gap> phi := IsomorphismMatrixGroup(G);;
gap> FieldOfMatrixGroup(Image(phi));
Rationals
gap> DegreeOfMatrixGroup(Image(phi));
10
gap> Display(GeneratorsOfGroup(Image(phi))[1]*One(GF(5)));
 . . . . . . 3 2 . .
 . . . . . . . 1 . .
 . . . . . . . . 3 2
 . . . . . . . . . 1
 . . . . 1 . . . . .
 . . . . . 1 . . . .
 2 1 . . . . . . . .
 . 1 . . . . . . . .
 . . 2 1 . . . . . .
 . . . 1 . . . . . .
gap> Display(GeneratorsOfGroup(Image(phi))[2]*One(GF(5)));
 1 . . . . . . . . .
 . 1 . . . . . . . .
 . . 1 4 . . . . . .
 . . . 1 . . . . . .
 . . . . 1 . . . . .
 . . . . . 1 . . . .
 . . . . . . 1 . . .
 . . . . . . . 1 . .
 . . . . . . . . 1 .
 . . . . . . . . . 1


3.6 Factoring elements into generators

3.6-1 PreImagesRepresentative
> PreImagesRepresentative( phi, g )( method )

Returns: A representative of the set of preimages of g under the homomorphism phi from a free group to an rcwa group.

This method can be used for factoring elements of rcwa groups into generators. It can also be used for finding nontrivial relations among the generators if the respective group is not free and the method returns a factorization which does not happen to be equal to one which is already known. The homomorphism phi must map the generators of the free group to the generators of the rcwa group one-by-one. This method is also suitable for wild groups. The implementation is based on RepresentativeActionPreImage (3.7-3).



gap> a  := RcwaMapping([[2,0,3],[4,-1,3],[4,1,3]]);; # Collatz' permutation.
gap> nu := RcwaMapping([[1,1,1]]);;                  # n -> n + 1.
gap> SetName(nu,"nu"); SetName(a,"a"); # For displaying purposes.
gap> G  := Group(a,nu);
<rcwa group over Z with 2 generators>
gap> phi := EpimorphismFromFreeGroup(G);
[ a, nu ] -> [ a, nu ]
gap> F := Source(phi);
<free group on the generators [ a, nu ]>
gap> w := Comm(F.1^2*F.2^4,F.1*F.2^3);
nu^-4*a^-2*nu^-3*a*nu^4*a*nu^3
gap> g := w^phi;
<bijective rcwa mapping of Z with modulus 8>
gap> pre := PreImagesRepresentative(phi,g);
nu^-4*a^-1*nu^-1*a^-1*nu^3*a*nu^-1*a*nu^3
gap> rel := w/pre; # pre <> w --> We have a nontrivial relation!
nu^-4*a^-2*nu^-3*a*nu^5*a^-1*nu^-3*a*nu*a*nu^4
gap> rel := rel^(F.2^-4*F.1^-1); # Cyclically reduced form.
a^-1*nu^-3*a*nu^5*a^-1*nu^-3*a*nu
gap> rel^phi;
IdentityMapping( Integers )


3.6-2 PreImagesRepresentatives
> PreImagesRepresentatives( phi, g )( operation )

Returns: A list of representatives of the set of preimages of g under the homomorphism phi from a free group to an rcwa group.

Quite frequently, computing several preimages is not harder than computing just one, i.e. often several preimages are found simultaneously. This operation is called by PreImagesRepresentative (3.6-1), which simply chooses the shortest representative. For a slightly more concise description see there.



gap> w := Comm(F.1*F.2,Comm(F.1,F.2^2)); # We continue the example above.
nu^-1*a^-1*nu^-2*a^-1*nu^2*a^2*nu*a^-1*nu^-2*a*nu^2
gap> g := w^phi;
<bijective rcwa mapping of Z with modulus 16>
gap> pre := PreImagesRepresentatives(phi,g);
[ nu^-1*a^-2*nu^-2*a*nu^2*a*nu^-1*a^-1*nu^2*a,
  nu^-1*a^-1*nu^-2*a^-1*nu^2*a^2*nu^-1*a^-1*nu^2*a ]
gap> rel := pre[1]/pre[2];
nu^-1*a^-2*nu^-2*a*nu^2*a^-1*nu^-2*a*nu^2*a*nu
gap> rel := (rel^(F.2^-1*F.1^-1))^-1; # Cyclically reduced form.
nu^-2*a^-1*nu^2*a*nu^-2*a^-1*nu^2*a
gap> rel^phi;
IdentityMapping( Integers )


3.7 The action of an rcwa group on the underlying ring

The support, i.e. set of moved points, of an rcwa group can be determined by Support or MovedPoints (these are synonyms). Sometimes testing for transitivity on the underlying ring is feasible. This is e.g. the case for tame groups over Z. Further it is often possible to determine group elements which map a given tuple of elements of the underlying ring to a given other tuple, if such elements exist.

3.7-1 IsTransitive
> IsTransitive( G, Integers )( method )

Returns: true if the rcwa group G acts transitively on Z and false otherwise.

If G is wild, this may fail or run into an infinite loop.



gap> G := Group(ClassTransposition(1,2,0,4),ClassShift(0,2));;
gap> IsTransitive(G,Integers);
true


3.7-2 RepresentativeAction
> RepresentativeAction( G, src, dest, act )( method )

Returns: An element of G which maps src to dest under the action given by act.

If an element satisfying this condition does not exist, this method either returns fail or runs into an infinite loop. The problem to decide whether src and dest lie in the same orbit under the action of G in general seems to be hard. The method is based on RepresentativeActionPreImage (3.7-3), and it basically just computes an image under an epimorphism. As this involves multiplications of rcwa mappings, this can be quite expensive if the group G is wild, the preimage is a rather long word and coefficient explosion happens to occur.



gap> a := RcwaMapping([[2,0,3],[4,-1,3],[4,1,3]]);; # Collatz' permutation.
gap> G := Group(a,ClassShift(1,4));
<rcwa group over Z with 2 generators>
gap> elm := RepresentativeAction(G,[7,4,9],[4,5,13],OnTuples);
<bijective rcwa mapping of Z with modulus 12>
gap> Display(elm);

Bijective rcwa mapping of Z with modulus 12

               n mod 12                |                 n^f
---------------------------------------+--------------------------------------
   0  2  3  6  8 11                    | n
   1  7 10                             | n - 3
   4                                   | n + 1
   5  9                                | n + 4

gap> List([7,4,9],n->n^elm);
[ 4, 5, 13 ]
gap> elm := RepresentativeAction(G,[5,4,9],[13,5,4],OnTuples);
<bijective rcwa mapping of Z with modulus 9>
gap> Display(elm);

Bijective rcwa mapping of Z with modulus 9

                n mod 9                |                 n^f
---------------------------------------+--------------------------------------
  0                                    | 4n/9
  1                                    | (8n - 26)/9
  2                                    | (8n + 2)/9
  3                                    | (8n + 3)/9
  4                                    | (16n - 19)/9
  5                                    | (16n + 37)/9
  6                                    | (8n + 33)/9
  7                                    | (16n - 49)/9
  8                                    | (16n + 7)/9

gap> RepresentativeAction(G,[7,4,9],[4,5,8],OnTuples);
<bijective rcwa mapping of Z with modulus 256>


3.7-3 RepresentativeActionPreImage
> RepresentativeActionPreImage( G, src, dest, act, F )( operation )

Returns: The result of RepresentativeAction(G,src,dest,act) as word in generators.

The argument F is a free group whose generators are used as letters of the returned word. Note that the dependency is just in the opposite direction than suggested above (RepresentativeAction calls RepresentativeActionPreImage) and that the evaluation of the word sometimes takes much more time than its determination. For this reason, RepresentativeActionPreImage is sometimes much faster than RepresentativeAction. The used algorithm is based on computing balls of increasing radius around src and dest until they intersect nontrivially. It avoids multiplying rcwa mappings. Of course the other warnings given in the description of RepresentativeAction (3.7-2) apply to this operation as well.



gap> g := ClassTransposition(0,2,1,2)*ClassShift(0,3);;      SetName(g,"g");
gap> h := ClassTransposition(3,4,4,6)*ClassReflection(0,4);; SetName(h,"h");
gap> G := Group(g,h);;
gap> F := FreeGroup("g","h");; phi := EpimorphismByGenerators(F,G);;
gap> w1 := RepresentativeActionPreImage(G,[1,2,3,4],[2,3,5,7],OnPoints,F);
h^-1*g^3*h^-1*g^-1*h^-2
gap> elm1 := w1^phi;
<bijective rcwa mapping of Z with modulus 864>
gap> List([1,2,3,4],n->n^elm1); # `OnPoints' permits reordering
[ 2, 7, 3, 5 ]
gap> w2 := RepresentativeActionPreImage(G,[1,2,3,4],[2,3,5,7],OnTuples,F);
g*h^-1*g^-1*h^-1*g^-2*h*g^-2*h^2*g^-1*h*g
gap> elm2 := w2^phi;
<bijective rcwa mapping of Z with modulus 432>
gap> List([1,2,3,4],n->n^elm2); # `OnTuples' does not permit reordering
[ 2, 3, 5, 7 ]


3.7-4 RepresentativeAction
> RepresentativeAction( RCWA(R), P1, P2 )( method )

Returns: An element of RCWA(R) which maps the partition P1 to P2.

The arguments P1 and P2 must be partitions of the underlying ring R into the same number of disjoint unions of residue classes. The method for R = Z recognizes the option IsTame. If this option is set, the returned mapping is tame provided that there is a tame mapping which satisfies the given condition. If the option IsTame is not set and the partitions P1 and P2 both consist entirely of single residue classes, then the returned mapping is affine on any residue class in P1.



gap> P1 := List([[0,3],[1,3],[2,9],[5,9],[8,9]],ResidueClass);
[ 0(3), 1(3), 2(9), 5(9), 8(9) ]
gap> P2 := List([[0,2],[1,8],[5,16],[3,4],[13,16]],ResidueClass);
[ 0(2), 1(8), 5(16), 3(4), 13(16) ]
gap> elm := RepresentativeAction(RCWA(Integers),P1,P2);
<bijective rcwa mapping of Z with modulus 9>




gap> P1^elm = P2;
true
gap> Display(elm);

Bijective rcwa mapping of Z with modulus 9

                n mod 9                |                 n^f
---------------------------------------+--------------------------------------
  0 3 6                                | 2n/3
  1 4 7                                | (8n - 5)/3
  2                                    | (16n + 13)/9
  5                                    | (4n + 7)/9
  8                                    | (16n - 11)/9

gap> elm := RepresentativeAction(RCWA(Integers),P1,P2:IsTame);
<tame bijective rcwa mapping of Z with modulus 1152>
gap> P := RespectedPartition(elm);;
gap> Length(P);
313
gap> elm := RepresentativeAction(RCWA(Integers),
>             [ResidueClass(1,3),Union(ResidueClass(0,3),ResidueClass(2,3))],
>             [Union(ResidueClass(2,5),ResidueClass(4,5)),
>              Union(ResidueClass(0,5),ResidueClass(1,5),ResidueClass(3,5))]);
<bijective rcwa mapping of Z with modulus 6>
gap> [ResidueClass(1,3),Union(ResidueClass(0,3),ResidueClass(2,3))]^elm;
[ 2(5) U 4(5), Z \ 2(5) U 4(5) ]


3.7-5 ShortOrbits
> ShortOrbits( G, S, maxlng )( operation )
> ShortCycles( g, S, maxlng )( operation )

Returns: A list of all finite orbits of the rcwa group G resp. of all finite cycles of the bijective rcwa mapping g of length at most maxlng which intersect nontrivially with the set S.



gap> G := Group(ClassTransposition(1,4,2,4)  * ClassTransposition(1,4,3,4),
>               ClassTransposition(3,9,6,18) * ClassTransposition(1,6,3,9));;
gap> List(ShortOrbits(G,[-15..15],100),orb->StructureDescription(Action(G,orb)));
[ "A15", "A4", "1", "1", "C3", "1", "((C2 x C2 x C2) : C7) : C3", "1", "1", 
  "C3", "A19" ]
gap> ShortCycles(mKnot(5),[1..100],20);
[ [ 1 ], [ 2 ], [ 3 ], [ 4 ], [ 5, 6 ], [ 7, 8 ], 
  [ 9, 10, 12, 14, 16, 13, 11 ], [ 15, 18 ], 
  [ 17, 20, 24, 28, 23, 19, 22, 26, 21 ], 
  [ 45, 54, 64, 76, 61, 49, 58, 47, 56 ], 
  [ 59, 70, 84, 100, 120, 144, 172, 206, 165, 198, 159, 190, 228, 183, 147, 
      176, 141, 113, 91, 73 ] ]


3.7-6 Projections
> Projections( G, m )( operation )

Returns: The projections of the rcwa group G to the unions of residue classes (mod m) which it fixes setwise.

The corresponding partition of a set of representatives for the residue classes (mod m) can be obtained by the operation OrbitsModulo(G,m).



gap> G := Group(ClassTransposition(0,2,1,2),ClassShift(3,4));;
gap> Projections(G,4);
[ [ ClassTransposition(0,2,1,2), ClassShift(3,4) ] ->
    [ <bijective rcwa mapping of Z with modulus 4>,
      IdentityMapping( Integers ) ],
  [ ClassTransposition(0,2,1,2), ClassShift(3,4) ] ->
    [ <bijective rcwa mapping of Z with modulus 4>,
      <bijective rcwa mapping of Z with modulus 4> ] ]
gap> List(last,phi->Support(Image(phi)));
[ 0(4) U 1(4), 2(4) U 3(4) ]


3.7-7 Ball
> Ball( G, p, r, act )( method )
> Ball( G, g, r )( method )

Returns: The ball of radius r around the point p under the action act of the group G, respectively the ball of radius r around the element g in the group G.

All balls are understood w.r.t. GeneratorsOfGroup(G). As membership tests can be expensive, the latter method does not check whether g is indeed an element of G. The methods require that point comparisons resp. element comparisons are cheap. They are not only applicable to rcwa groups.



gap> PSL2Z := Image(IsomorphismRcwaGroup(FreeProduct(CyclicGroup(2),
>                                                    CyclicGroup(3))));
<wild rcwa group over Z with 2 generators>
gap> List([1..10],k->Length(Ball(PSL2Z,[0,1],k,OnTuples)));
[ 4, 8, 14, 22, 34, 50, 74, 106, 154, 218 ]
gap> Ball(Group((1,2),(2,3),(3,4)),(),2);
[ (), (3,4), (2,3), (2,3,4), (2,4,3), (1,2), (1,2)(3,4), (1,2,3), (1,3,2) ]


3.8 Conjugacy in RCWA(R) and CT(R)

3.8-1 IsConjugate
> IsConjugate( RCWA(R), f, g )( method )
> IsConjugate( CT(R), f, g )( method )

Returns: true if the bijective rcwa mappings f and g are conjugate in RCWA(R) or CT(R), respectively, and false otherwise.

The author does not know a general way to solve the conjugacy problem for elements of RCWA(R) or CT(R), thus the method may fail or run into an infinite loop.



gap> IsConjugate(RCWA(Integers),ClassTransposition(0,2,1,4),
>                               ClassTransposition(1,2,0,4));
true
gap> IsConjugate(RCWA(Integers),ClassTransposition(0,2,1,4),ClassShift(0,1));
false


In its 2-argument form, ShortCycles(f,maxlng) returns a list of all cycles of f of length at most maxlng which do not correspond to cycles consisting of residue classes. The cycles are sorted by increasing length. If for some value of maxlng the lists List(ShortCycles(f,maxlng),Length) and List(ShortCycles(g,maxlng),Length) differ, then f and g are clearly not conjugate.



gap> a := RcwaMapping([[2,0,3],[4,-1,3],[4,1,3]]);; # Collatz' permutation.
gap> ShortCycles(a,5);
[ [ 0 ], [ 1 ], [ -1 ], [ 2, 3 ], [ -3, -2 ], [ 4, 5, 7, 9, 6 ],
  [ -9, -6, -4, -5, -7 ] ]


3.8-2 RepresentativeAction
> RepresentativeAction( RCWA(R), f, g )( method )
> RepresentativeAction( CT(R), f, g )( method )

Returns: An rcwa mapping x such that f^x = g, if such an x exists and fail otherwise.

This method may fail for the same reasons as IsConjugate (3.8-1).



gap> rep := RepresentativeAction(RCWA(Integers),ClassTransposition(0,2,1,4),
>                                               ClassTransposition(1,2,0,4));
<bijective rcwa mapping of Z with modulus 2>
gap> ClassTransposition(0,2,1,4)^rep = ClassTransposition(1,2,0,4); # check
true
gap> Factorization(rep);
[ ClassTransposition(0,2,1,2) ]


3.8-3 NrConjugacyClassesOfRCWAZOfOrder
> NrConjugacyClassesOfRCWAZOfOrder( ord )( function )

Returns: The number of conjugacy classes of RCWA(Z) of elements of order ord, as given in Corollary 2.7.1 (b) in [K05].



gap> List([2,105],NrConjugacyClassesOfRCWAZOfOrder);
[ infinity, 218 ]


3.9 Restriction and induction

There are monomorphisms from the group RCWA(Z) into itself. The support of the image of such a monomorphism is the image of a given injective rcwa mapping. Therefore these monomorphisms are called restriction monomorphisms. They play a key role in various methods to construct rcwa groups of certain types. To mention the simplest example: Given a set of rcwa groups, their images under restriction monomorphisms associated to rcwa mappings with pairwise distjoint images generate a group which is isomorphic to their direct product (cp. Section 3.2).

3.9-1 Restriction
> Restriction( g, f )( operation )
> Restriction( G, f )( operation )

Returns: The restriction of the rcwa mapping g resp. the rcwa group G by the injective rcwa mapping f.

By definition, the restriction g_f of an rcwa mapping g by an injective rcwa mapping f is the unique rcwa mapping which satisfies the equation f * g_f = g * f and which fixes the complement of the image of f pointwise. If f is bijective, the restriction of g by f is just the conjugate of g under f.

The restriction of an rcwa group G by an injective rcwa mapping f is defined as the group whose elements are the restrictions of the elements of G by f. The restriction of G by f acts on the image of f and fixes its complement pointwise.



gap> F2tilde := Restriction(F2,RcwaMapping([[5,3,1]]));
<wild rcwa group over Z with 2 generators>
gap> Support(F2tilde);
3(5)


3.9-2 Induction
> Induction( g, f )( operation )
> Induction( G, f )( operation )

Returns: The induction of the rcwa mapping g resp. the rcwa group G by the injective rcwa mapping f.

By definition, induction is the right inverse of restriction. This means that it is Induction(Restriction(g,f),f) = g resp. Induction(Restriction(G,f),f) = G. The mapping g resp. the group G must not move points outside the image of f.



gap> Induction(F2tilde,RcwaMapping([[5,3,1]])) = F2;
true


3.10 Getting pseudo-random elements of RCWA(R) and CT(R)

There are methods for the operation Random for RCWA(R) and CT(R). These methods are designed to be suitable for generating interesting examples. No particular distribution is guaranteed.



gap> elm := Random(RCWA(Integers));
<bijective rcwa mapping of Z with modulus 60>
gap> Display(elm);

Bijective rcwa mapping of Z with modulus 12

               n mod 12                |                 n^f
---------------------------------------+--------------------------------------
   0  2  4  6  8 10                    | 3n + 2
   1  5  9                             | -n + 2
   3  7                                | (n - 7)/2
  11                                   | (-n + 20)/3



The elements which are returned by this method are obtained by multiplying class shifts (see ClassShift (2.2-1)), class reflections (see ClassReflection (2.2-2)) and class transpositions (see ClassTransposition (2.2-3)). These factors can be retrieved by factoring:



gap> Factorization(elm);
[ ClassTransposition(0,2,3,4), ClassTransposition(3,4,4,6),
  ClassShift(0,2)^-1, ClassReflection(3,4), ClassReflection(1,4) ]


There is an auxiliary function ClassPairs([R,] m), which is used in this context. In its one-argument form, this function returns a list of 4-tuples (r_1,m_1,r_2,m_2) of integers corresponding to the unordered pairs of disjoint residue classes r_1(m_1) and r_2(m_2) with m_1, m_2 <= m. In its two-argument form, it does "the equivalent" for the ring R.



gap> List(ClassPairs(4),ClassTransposition);
[ ClassTransposition(0,2,1,2), ClassTransposition(0,2,1,4),
  ClassTransposition(0,2,3,4), ClassTransposition(0,3,1,3),
  ClassTransposition(0,3,2,3), ClassTransposition(0,4,1,4),
  ClassTransposition(0,4,2,4), ClassTransposition(0,4,3,4),
  ClassTransposition(1,2,0,4), ClassTransposition(1,2,2,4),
  ClassTransposition(1,3,2,3), ClassTransposition(1,4,2,4),
  ClassTransposition(1,4,3,4), ClassTransposition(2,4,3,4) ]
gap> List(last,TransposedClasses);
[ [ 0(2), 1(2) ], [ 0(2), 1(4) ], [ 0(2), 3(4) ], [ 0(3), 1(3) ],
  [ 0(3), 2(3) ], [ 0(4), 1(4) ], [ 0(4), 2(4) ], [ 0(4), 3(4) ],
  [ 1(2), 0(4) ], [ 1(2), 2(4) ], [ 1(3), 2(3) ], [ 1(4), 2(4) ],
  [ 1(4), 3(4) ], [ 2(4), 3(4) ] ]


3.11 Special attributes for tame rcwa groups

There is a couple of attributes which a priori make only sense for tame rcwa groups. In the sequel, these attributes are described in detail.

With their help, various structural information about a given tame rcwa group can be obtained. For example there are methods for IsSolvable and IsPerfect available for tame rcwa groups, while testing wild groups for solvability or perfectness is currently not always feasible. It is often also possible to compute the derived subgroup of a tame rcwa group.

3.11-1 RespectedPartition
> RespectedPartition( G )( attribute )
> RespectedPartition( g )( attribute )

Returns: A respected partition of the rcwa group G resp. of the rcwa mapping g.

A respected partition of G resp. g is a partition of the underlying ring R into a finite number of residue classes on which G resp. the cyclic group generated by g acts in a natural way as a permutation group, and on whose elements all elements of G resp. all powers of g are affine. Such a partition exists if and only if G resp. g is tame (see [K05], Theorem 2.5.8).

Related attributes are RespectedPartitionShort and RespectedPartitionLong. They are used to denote respected partitions consisting of residue classes r(m) where m divides the modulus of G resp. g, resp. where the modulus of G resp. g divides m.

There is an operation RespectsPartition(G,P) resp. RespectsPartition(g,P), which tests whether G resp. g respects a given partition P. The permutation induced by g on P can be computed efficiently using PermutationOpNC(g,P,OnPoints).



gap> G := Group(ClassTransposition(0,4,1,6),ClassShift(0,2));
<rcwa group over Z with 2 generators>
gap> IsTame(G);
true
gap> Size(G);
infinity
gap> P := RespectedPartition(G);
[ 3(6), 5(6), 0(8), 2(8), 4(8), 6(8), 1(12), 7(12) ]


3.11-2 ActionOnRespectedPartition
> ActionOnRespectedPartition( G )( attribute )

Returns: The action of the tame rcwa group G on RespectedPartition(G).



gap> H := ActionOnRespectedPartition(G);
Group([ (3,7)(5,8), (3,4,5,6) ])
gap> H = Action(G,P);
true
gap> StructureDescription(H);
"C2 x S4"


3.11-3 KernelOfActionOnRespectedPartition
> KernelOfActionOnRespectedPartition( G )( attribute )

Returns: The kernel of the action of the tame rcwa group G on RespectedPartition(G).

The method for KernelOfActionOnRespectedPartition uses the package Polycyclic [EN06]. The rank of the largest free abelian subgroup of the kernel of the action of G on its stored respected partition can be computed by RankOfKernelOfActionOnRespectedPartition(G).



gap> K := KernelOfActionOnRespectedPartition(G);
<rcwa group over Z with 3 generators>
gap> RankOfKernelOfActionOnRespectedPartition(G);
3
gap> Index(G,K);
48
gap> List(GeneratorsOfGroup(K),Factorization);
[ [ ClassShift(0,4)^2 ], [ ClassShift(2,4)^2 ], [ ClassShift(1,6)^2 ] ]
gap> IsomorphismPcpGroup(K);
[ <bijective rcwa mapping of Z with modulus 4>,
  <bijective rcwa mapping of Z with modulus 4>,
  <bijective rcwa mapping of Z with modulus 6> ] -> [ g6*g10, g8*g12, g14*g16
 ]


3.11-4 IntegralConjugate
> IntegralConjugate( G )( attribute )
> IntegralConjugate( g )( attribute )

Returns: Some integral conjugate of the tame rcwa group G resp. of the tame bijective rcwa mapping g in the group RCWA(R).

Such conjugates exist, see [K05], Theorem 2.5.14. In general there are infinitely many of them. An rcwa mapping mapping x such that G^x=IntegralConjugate(G) resp. g^x=IntegralConjugate(g) is stored as an attribute IntegralizingConjugator.



gap> IsIntegral(IntegralConjugate(G));
true
gap> G^IntegralizingConjugator(G) = IntegralConjugate(G);
true
gap> RespectedPartition(G);
[ 3(6), 5(6), 0(8), 2(8), 4(8), 6(8), 1(12), 7(12) ]
gap> RespectedPartition(G)^IntegralizingConjugator(G);
[ 0(8), 1(8), 2(8), 3(8), 4(8), 5(8), 6(8), 7(8) ]
gap> last = RespectedPartition(IntegralConjugate(G));
true




gap> Display(IntegralizingConjugator(G));

Bijective rcwa mapping of Z with modulus 24

               n mod 24                |                 n^f
---------------------------------------+--------------------------------------
   0  8 16                             | n + 2
   1 13                                | (2n + 16)/3
   2 10 18                             | n + 1
   3  9 15 21                          | (4n - 12)/3
   4 12 20                             | n
   5 11 17 23                          | (4n - 17)/3
   6 14 22                             | n - 1
   7 19                                | (2n + 7)/3



3.12 Drawing pictures of orbits on Z^2

RCWA permits drawing pictures of orbits of rcwa groups on Z^2. The pictures are written to files in bitmap- (bmp-) format. The author has successfully tested this feature both under Linux and under Windows, and the produced pictures can be processed further with many common graphics programs.

3.12-1 DrawOrbitPicture
> DrawOrbitPicture( G, p0, r, h, w, colored, palette, filename )( function )

Returns: Nothing.

Draws a picture of the orbit(s) of the point(s) p0 under the action of the group G on Z^2. The argument p0 is either one point or a list of points. The argument r denotes the radius of the ball around p0 to be computed. The size of the created picture is h x w pixels, where both dimensions must be multiples of 32. The argument colored is a boolean which indicates whether a 24-bit True-Color picture or a monochrome picture should be created. In the former case, palette must be a list of triples of integers in the range 0, dots, 255, denoting the RGB values of colors to be used. In the latter case, the argument palette is not used, and any value can be passed. The resulting picture is written in bitmap- (bmp-) format to a file named filename.



gap> PSL2Z := Image(IsomorphismRcwaGroup(FreeProduct(CyclicGroup(2),
>                                                    CyclicGroup(3))));;
gap> DrawOrbitPicture(PSL2Z,[0,1],20,512,512,false,fail,"~/images/example1.bmp");
gap> DrawOrbitPicture(PSL2Z,Combinations([1..4],2),20,512,512,true,
>                     [[255,0,0],[0,255,0],[0,0,255]],"~/images/example2.bmp");
gap> G := Group(ClassShift(0,1),ClassTransposition(1,2,0,4));;
gap> DrawOrbitPicture(G,[0,1],20,512,512,true,
>                     List([1..20],i->[255-12*i,255-12*i,255]),
>                     "~/images/example3.bmp");


DrawOrbitPicture makes use of the following utility function:

3.12-2 SaveAsBitmapPicture
> SaveAsBitmapPicture( picture, filename )( function )

Returns: Nothing.

Writes the pixel matrix picture to a bitmap- (bmp-) picture file named filename. The filename should include the entire pathname. The argument picture can be a GF(2) matrix, in which case a monochrome picture file is generated. In this case, zeros stand for black pixels and ones stand for white pixels. The argument picture can also be an integer matrix, in which case a 24-bit True Color picture file is generated. In this case, the entries of the matrix are supposed to be integers n = 65536 * red + 256 * green + blue in the range 0, dots, 2^24-1 specifying the RGB values of the colors of the pixels.

The picture can be read back into GAP by the function ReadFromBitmapPicture(filename).



gap> color   := n->32*(n mod 8)+256*32*(Int(n/8) mod 8)+65536*32*Int(n/64);;
gap> picture := List([1..512],y->List([1..512],x->color(Gcd(x,y)-1)));;
gap> SaveAsBitmapPicture(picture,"~/images/gcd.bmp");


The pictures created in the examples are shown on RCWA's webpage.

3.13 Some general utility functions

RCWA introduces a few small utility functions which can be used for groups in general: The function GeneratorsAndInverses(G) returns a list of generators of G and their inverses, EpimorphismByGenerators(G,H) is a shorthand for GroupHomomorphismByImages(G,H, GeneratorsOfGroup(G),GeneratorsOfGroup(H)) (there is also an NC version of this) and the function AllProducts(l,k) returns the list of all products of k entries of the list l.

3.14 The categories of rcwa groups

3.14-1 IsRcwaGroup
> IsRcwaGroup( G )( filter )
> IsRcwaGroupOverZ( G )( filter )
> IsRcwaGroupOverZ_pi( G )( filter )
> IsRcwaGroupOverGFqx( G )( filter )

Returns: true if G is an rcwa group resp. an rcwa group over the ring of integers resp. an rcwa group over a semilocalization of the ring of integers resp. an rcwa group over a polynomial ring in one variable over a finite field, and false otherwise.

Often the same methods can be used for rcwa groups over the ring of integers and over its semilocalizations. For this reason there is a category IsRcwaGroupOverZOrZ_pi which is the union of IsRcwaGroupOverZ and IsRcwaGroupOverZ_pi.

To allow distinguishing the groups RCWA(R) and CT(R) from others, they have the characteristic property IsNaturalRCWA or IsNaturalCT, respectively.




generated by GAPDoc2HTML