4. Residue Class-Wise Affine Mappings

This chapter describes the functionality available for calculating with rcwa mappings.

4.1 The categories and families of rcwa mappings

4.1-1 IsRcwaMapping
> IsRcwaMapping( f )( filter )

The category of all rcwa mappings.

4.1-2 IsRationalBasedRcwaMapping
> IsRationalBasedRcwaMapping( f )( filter )

The category of all "rational-based" (hence all integral and all semilocal integral) rcwa mappings.

4.1-3 IsIntegralRcwaMapping
> IsIntegralRcwaMapping( f )( filter )

The category of all integral rcwa mappings.

4.1-4 IntegralRcwaMappingsFamily
> IntegralRcwaMappingsFamily( family )

The family of all integral rcwa mappings.

4.1-5 IsSemilocalIntegralRcwaMapping
> IsSemilocalIntegralRcwaMapping( f )( filter )

The category of all semilocal integral rcwa mappings.

4.1-6 SemilocalIntegralRcwaMappingsFamily
> SemilocalIntegralRcwaMappingsFamily( primes )( function )

The family of rcwa mappings over Z_pi, where pi is the set of primes given as argument primes.

4.1-7 IsModularRcwaMapping
> IsModularRcwaMapping( f )( filter )

The category of all modular rcwa mappings.

4.1-8 ModularRcwaMappingsFamily
> ModularRcwaMappingsFamily( q )( function )

The family of rcwa mappings over the ring GF( q )[ x ].

4.2 Constructing rcwa mappings

4.2-1 IntegralRcwaMapping
> IntegralRcwaMapping( coeffs )( function )
> IntegralRcwaMapping( perm, range )( function )
> IntegralRcwaMapping( modulus, val )( function )
> RcwaMapping( coeffs )( function )
> RcwaMapping( perm, range )( function )
> RcwaMapping( modulus, val )( function )

Construction of the integral rcwa mapping

(a)

with coefficients coeffs resp.

(b)

acting on the translates of range by integral multiples of the length of range as the translates of the action of the finite permutation perm on range to the respective intervals, where moved points of perm outside range are ignored (range must entirely consist out of positive integers less than 2^28, since GAP permutations can only move these), resp.

(c)

with modulus modulus and with values prescribed by the list val, which consists of 2*modulus pairs giving preimage and image for 2 points per residue class (mod modulus).

In case (a), coeffs is a list of m lists of 3 integers each (where m is the modulus of the mapping), giving the coefficients a_r, b_r and c_r for r = 0, ..., m - 1 as described in the introduction.



gap> f := RcwaMapping([[1,1,1],[1,-1,1],[1,1,1],[1,-1,1]]);
<integral rcwa mapping with modulus 2>
gap> f = RcwaMapping((2,3),[2..3]);
true
gap> g := RcwaMapping((1,2,3)(8,9),[4..20]);
<integral rcwa mapping with modulus 17>
gap> Action(Group(g),[4..20]);
Group([ ( 5, 6) ])
gap> T := RcwaMapping([[1,0,2],[3,1,2]]); # The Collatz mapping.
<integral rcwa mapping with modulus 2>
gap> T := RcwaMapping(2,[[1,2],[2,1],[3,5],[4,2]]); # The same, by mod. and values.
<integral rcwa mapping with modulus 2>
gap> t := RcwaMapping(1,[[-1,1],[1,-1]]); # The involution n -> -n.
Integral rcwa mapping: n -> -n


4.2-2 SemilocalIntegralRcwaMapping
> SemilocalIntegralRcwaMapping( pi, coeffs )( function )
> RcwaMapping( pi, coeffs )( function )

Construction of the rcwa mapping of Z_pi with coefficients coeffs, where the set of primes pi is given as argument primes.



gap> d := RcwaMapping([2],[[1/3,0,1]]);
Rcwa mapping of Z_[ 2 ]: n -> 1/3 n
gap> RcwaMapping([2,3],ShallowCopy(Coefficients(T)));
<rcwa mapping of Z_[ 2, 3 ] with modulus 2>


4.2-3 ModularRcwaMapping
> ModularRcwaMapping( q, modulus, coeffs )( function )
> RcwaMapping( q, modulus, coeffs )( function )

Construction of the rcwa mapping of GF( q )[ x ] with modulus modulus and coefficients coeffs.



gap> R := PolynomialRing(GF(2),1);;
gap> x := IndeterminatesOfPolynomialRing(R)[1];; SetName(x,"x");;
gap> e := One(GF(2));; z := Zero(R);;
gap> r := ModularRcwaMapping( 2, x^2 + e,
>                             [ [ x^2 + x + e, z      , x^2 + e ],
>                               [ x^2 + x + e, x      , x^2 + e ],
>                               [ x^2 + x + e, x^2    , x^2 + e ],
>                               [ x^2 + x + e, x^2 + x, x^2 + e ] ] );
<rcwa mapping of GF(2)[x] with modulus Z(2)^0+x^2>


There is an auxiliary function for determining the correct order of the coefficient triples of a modular rcwa mapping:

4.2-4 AllGFqPolynomialsModDegree
> AllGFqPolynomialsModDegree( q, d, x )( function )

Returns a sorted list of all residues modulo a polynomial of degree d over GF( q ) in the variable x. This gives also the ordering in which the coefficients of a modular rcwa mapping are stored; thus, if f is a modular rcwa mapping over GF( q )[ x ] with coefficients list c, whose modulus m has degree d, then f maps a polynomial P with P mod m = r to

( c[ Position( res, r ) ][ 1 ] * P + c[ Position( res, r ) ][ 2 ] ) / c[ Position( res, r ) ][ 3 ]

where res denotes the list of residues returned by this function.


gap> AllGFqPolynomialsModDegree(2,4,x);
[ 0*Z(2), Z(2)^0, x, Z(2)^0+x, x^2, Z(2)^0+x^2, x+x^2, Z(2)^0+x+x^2, x^3,
  Z(2)^0+x^3, x+x^3, Z(2)^0+x+x^3, x^2+x^3, Z(2)^0+x^2+x^3, x+x^2+x^3,
  Z(2)^0+x+x^2+x^3 ]

The internal representation of an rcwa mapping of any kind is always converted to a normalized (reduced) form, i.e. for all r, the coefficients a_r, b_r and c_r are divided by their gcd and then multiplied by a suitable unit such that c_r equals its standard conjugate, and the mapping is reduced to the smallest possible modulus.

4.3 Extracting the components of rcwa mappings

4.3-1 Coefficients
> Coefficients( f )( method )

The coefficients of the rcwa mapping f.


gap> Coefficients(T);
[ [ 1, 0, 2 ], [ 3, 1, 2 ] ]
gap> Coefficients(r);
[ [ Z(2)^0+x+x^2, 0*Z(2), Z(2)^0+x^2 ], [ Z(2)^0+x+x^2, x, Z(2)^0+x^2 ],
  [ Z(2)^0+x+x^2, x^2, Z(2)^0+x^2 ], [ Z(2)^0+x+x^2, x+x^2, Z(2)^0+x^2 ] ]

4.3-2 Modulus
> Modulus( f )( operation )

The modulus of the rcwa mapping f. See also Modulus (5.3-6) for rcwa groups, and IsTame (4.10-2).


gap> u := RcwaMapping([[3,0,5],[9,1,5],[3,-1,5],[9,-2,5],[9,4,5]]);;
gap> Modulus(u);
5
gap> Modulus(r);
Z(2)^0+x^2

4.4 Flat and order-preserving mappings, multiplier and divisor

4.4-1 Multiplier
> Multiplier( f )( attribute )

The multiplier of the rcwa mapping f.


gap> Multiplier(g);
1
gap> Multiplier(u);
9
gap> Multiplier(T);
3
gap> Multiplier(d);
1
gap> Multiplier(r);
Z(2)^0+x+x^2

4.4-2 Divisor
> Divisor( f )( attribute )

The divisor of the rcwa mapping f.


gap> Divisor(g);
1
gap> Divisor(u);
5
gap> Divisor(T);
2
gap> Divisor(d);
1
gap> Divisor(r);
Z(2)^0+x^2

4.4-3 IsFlat
> IsFlat( f )( property )

Indicates whether the rcwa mapping f is flat or not. See also IsFlat (5.3-8) for rcwa groups.


gap> IsFlat(g);
true
gap> IsFlat(u);
false
gap> IsFlat(T);
false
gap> IsFlat(d);
true
gap> IsFlat(r);
false

4.4-4 IsClassWiseOrderPreserving
> IsClassWiseOrderPreserving( f )( property )

Indicates whether the rational-based rcwa mapping f is class-wise order-preserving or not. See also IsClassWiseOrderPreserving (5.3-9) for rcwa groups.


gap> IsClassWiseOrderPreserving(g);
true
gap> IsClassWiseOrderPreserving(u);
true
gap> IsClassWiseOrderPreserving(T);
true
gap> IsClassWiseOrderPreserving(t);
false
gap> IsClassWiseOrderPreserving(d);
true

4.5 Checking for equality

4.5-1 \=
> \=( f, g )( method )

Tests whether the rcwa mappings f and g are equal. Since rcwa mappings are stored in a normalized form, this requires only comparing their coefficients.


gap> RcwaMapping([[1,1,1],[2,-2,2],[3,3,3],[4,-4,4]])
>  = RcwaMapping([[1,1,1],[1,-1,1]]);
true

4.6 Printing and displaying rcwa mappings

4.6-1 Print
> Print( f )( method )

Prints the rcwa mapping f in GAP-readable format.


gap> Print(T,"\n");
IntegralRcwaMapping( [ [ 1, 0, 2 ], [ 3, 1, 2 ] ] )
gap> Print(d,"\n");
SemilocalIntegralRcwaMapping( [ 2 ], [ [ 1/3, 0, 1 ] ] )
gap> Print(r,"\n");
ModularRcwaMapping( 2, Z(2)^0+x^2, [ [ Z(2)^0+x+x^2, 0*Z(2), Z(2)^0+x^2 ],
  [ Z(2)^0+x+x^2, x, Z(2)^0+x^2 ], [ Z(2)^0+x+x^2, x^2, Z(2)^0+x^2 ],
  [ Z(2)^0+x+x^2, x+x^2, Z(2)^0+x^2 ] ] )

The string printed by this method may be obtained with

4.6-2 String
> String( f )( method )

Converts the rcwa mapping f to a string. The string is the same as the one which is produced by Print.


gap> String(d);
"SemilocalIntegralRcwaMapping( [ 2 ], [ [ 1/3, 0, 1 ] ] )"

4.6-3 Display
> Display( f )( method )

Displays the rcwa mapping f in a nice human-readable form.


gap> SetName(u,"u");
gap> Display(u);

Integral rcwa mapping with modulus 5

                n mod 5                |                 n^u
---------------------------------------+--------------------------------------
  0                                    | 3n/5
  1                                    | (9n + 1)/5
  2                                    | (3n - 1)/5
  3                                    | (9n - 2)/5
  4                                    | (9n + 4)/5

gap> SetName(r,"r");
gap> Display(r);
 
Rcwa mapping of GF(2)[x] with modulus Z(2)^0+x^2
 
      P mod Z(2)+x^2      |                        P^r
--------------------------+---------------------------------------------------
 0*Z(2)                   | (Z(2)+x+x^2)*P/(Z(2)+x^2)
 Z(2)                     | ((Z(2)+x+x^2)*P + x)/(Z(2)+x^2)
 x                        | ((Z(2)+x+x^2)*P + x^2)/(Z(2)+x^2)
 Z(2)+x                   | ((Z(2)+x+x^2)*P + x+x^2)/(Z(2)+x^2)


4.7 Images and preimages under rcwa mappings

4.7-1 ImageElm
> ImageElm( f, n )( method )
> \^( f, n )( method )

Computes the image of the integer n under the rcwa mapping f.


gap> 15^T;
23
gap> 7^d;
7/3
gap> p := (x^3+x^2+x+One(R))^r;
Z(2)^0+x^3

4.7-2 PreImageElm
> PreImageElm( f, n )( method )

Computes the preimage of the integer n under the bijective rcwa mapping f.


gap> PreImageElm(u,8);
4
gap> PreImageElm(d,37/17);
111/17
gap> PreImageElm(r,p);
Z(2)^0+x+x^2+x^3

If the mapping f is not bijective, we can use

4.7-3 PreImagesElm
> PreImagesElm( f, n )( method )

Computes the set of preimages of the integer n under the rcwa mapping f.

If the preimage contains a full residue class but is not equal to the full source of the mapping, it is not representable as a set in GAP and the method will give up. In this case, we can get at least a representative of the preimage by PreImagesRepresentative (4.7-4).


gap> PreImagesElm(T,8);
[ 16, 5 ]
gap> PreImagesElm(ZeroIntegralRcwaMapping,0);
Integers

4.7-4 PreImagesRepresentative
> PreImagesRepresentative( f, n )( method )

A representative of the set of preimages of the element n under the rcwa mapping f.


gap> ZeroOne := RcwaMapping([[0,0,1],[0,1,1]]);;
gap> PreImagesRepresentative(ZeroOne,1);
1

4.8 Testing for injectivity, surjectivity and bijectivity

4.8-1 IsInjective
> IsInjective( f )( method )
> IsSurjective( f )( method )
> IsBijective( f )( method )

Tests whether the rcwa mapping f is injective, surjective resp. bijective.



gap> IsInjective(T);
false
gap> IsSurjective(T);
true
gap> IsBijective(u);
true
gap> a_2 := RcwaMapping([2],[[3,0,2],[3,1,4],[3,0,2],[3,-1,4]]);
<rcwa mapping of Z_[ 2 ] with modulus 4>
gap> a_23 := RcwaMapping([2,3],[[3,0,2],[3,1,4],[3,0,2],[3,-1,4]]);
<rcwa mapping of Z_[ 2, 3 ] with modulus 4>
gap> IsInjective(a_2);
false
gap> IsSurjective(a_2);
true
gap> IsBijective(a_23);
true
gap> IsBijective(r);
true


4.9 Arithmetical operations and neutral elements

4.9-1 \+
> \+( f, g )( method )
> \-( f, g )( method )

Computes the (pointwise) sum resp. difference of the rcwa mappings f and g.



gap> a := RcwaMapping([[3,0,2],[3, 1,4],[3,0,2],[3,-1,4]]);;
gap> b := RcwaMapping([[3,0,2],[3,13,4],[3,0,2],[3,-1,4]]);;
gap> Display(a + b);

Integral rcwa mapping with modulus 4

                n mod 4                |                 n^f
---------------------------------------+--------------------------------------
  0 2                                  | 3n
  1                                    | (3n + 7)/2
  3                                    | (3n - 1)/2

gap> Display(a - b);

Integral rcwa mapping with modulus 4

                n mod 4                |                 n^f
---------------------------------------+--------------------------------------
  0 2 3                                | 0
  1                                    | -3

gap> d+d+d;
IdentityMapping( Z_[ 2 ] )
gap> e := One(r);;
gap> e+e;
ZeroMapping( GF(2)[x], GF(2)[x] )
gap> p^(r+e) = p^r + p;
true


4.9-2 \*
> \*( f, g )( method )

Computes the product (composition) of the rcwa mappings f and g. The mapping f is applied first.



gap> Display(a*b);

Integral rcwa mapping with modulus 16

               n mod 16                |                 n^f
---------------------------------------+--------------------------------------
   0  4  8 12                          | 9n/4
   1                                   | (9n + 55)/16
   2 10                                | (9n - 2)/8
   3 11                                | (9n - 3)/8
   5 13                                | (9n + 3)/8
   6 14                                | (9n + 26)/8
   7                                   | (9n + 49)/16
   9                                   | (9n - 1)/16
  15                                   | (9n - 7)/16

gap> s := RcwaMapping(2,x,[[One(R),Zero(R),One(R)],[x,Zero(R),One(R)]]);
<rcwa mapping of GF(2)[x] with modulus x>
gap> s^2=s;
true   # a non-trivial idempotent
gap> IsInjective(s) or IsSurjective(s);
false  # certainly not a group element ...
gap> Display(s*r-r*s);
 
Rcwa mapping of GF(2)[x] with modulus x+x^3
 
       P mod x+x^3        |                        P^f
--------------------------+---------------------------------------------------
 0*Z(2)     Z(2)          |
 x          x^2           |
 Z(2)+x^2   x+x^2         | 0*Z(2)
 Z(2)+x     Z(2)+x+x^2    | x



Multiplying rational-based rcwa mappings and (finite) permutations is forbidden, since GAP-permutations can only move positive integers less than 2^28; more precisely, one would encounter problems like the following:


gap> (1,2)^RcwaMapping([[-1,0,1]]);
(-2,-1)
gap> (1,2)^RcwaMapping([[1,2^28,1]]);
(268435457,268435458)

4.9-3 Inverse
> Inverse( f )( method )

Computes the inverse mapping of the bijective rcwa mapping f.


gap> Display(Inverse(u));

Bijective integral rcwa mapping with modulus 9
 
                n mod 9                |                 n^f
---------------------------------------+--------------------------------------
  0 3 6                                | 5n/3
  1 4 7                                | (5n + 1)/3
  2                                    | (5n - 1)/9
  5                                    | (5n + 2)/9
  8                                    | (5n - 4)/9

gap> Display(Inverse(r));
 
Bijective rcwa mapping of GF(2)[x] with modulus Z(2)^0+x+x^2
 
     P mod Z(2)+x+x^2     |                        P^f
--------------------------+---------------------------------------------------
 0*Z(2)                   | (Z(2)+x^2)*P/(Z(2)+x+x^2)
 Z(2)                     | ((Z(2)+x^2)*P + x)/(Z(2)+x+x^2)
 x                        | ((Z(2)+x^2)*P + x^2)/(Z(2)+x+x^2)
 Z(2)+x                   | ((Z(2)+x^2)*P + x+x^2)/(Z(2)+x+x^2)


4.9-4 \^
> \^( f, g )( method )

Computes the conjugate f^g = g^-1fg of f under g.



gap> T^u;
<surjective integral rcwa mapping with modulus 18>
gap> Display(s^r);
 
Rcwa mapping of GF(2)[x] with modulus x+x^2+x^3
 
     P mod x+x^2+x^3      |                        P^f
--------------------------+---------------------------------------------------
 0*Z(2)     x             |
 x^2        x+x^2         | P
 Z(2)       Z(2)+x+x^2    | (x)*P
 Z(2)+x     Z(2)+x^2      | (x)*P + x



4.9-5 ZeroIntegralRcwaMapping
> ZeroIntegralRcwaMapping( global variable )
> Zero( f )( method )

The zero integral rcwa mapping, resp. the zero mapping in the family of rcwa mappings f belongs to.



gap> Zero(a);
ZeroMapping( Integers, Integers )
gap> Zero(r);
ZeroMapping( GF(2)[x], GF(2)[x] )


4.9-6 IdentityIntegralRcwaMapping
> IdentityIntegralRcwaMapping( global variable )
> One( f )( method )

The identity integral rcwa mapping, resp. the identity mapping in the family of rcwa mappings f belongs to.



gap> One(a);
IdentityMapping( Integers )
gap> One(d);
IdentityMapping( Z_[ 2 ] )


Sometimes this is also printed as IdentityMapping(R), where R denotes the ring f is acting on.

Caution: The set of rcwa mappings over a ring does not form a ring under addition and multiplication -- it holds only the left distibutive law ( a * (b + c) = a * b + a * c, but not necessary (a + b) * c = a * c + b * c ), and the zero mapping multiplicatively is only a right zero element ( a * 0 = 0 for all a, but 0 * a = 0 if and only if 0^a = 0 ).

4.10 Computing the order of an rcwa mapping

4.10-1 Order
> Order( f )( method )

Computes the multiplicative order of the bijective rcwa mapping f.

One of the two sufficient criteria for f having infinite order which are used by this package relies on a currently unproved hypothesis.


gap> Order(Comm(a,b));
6
gap> Order(u);
infinity

The other criterium applies in case that f is tame:

4.10-2 IsTame
> IsTame( f )( property )

Determines whether or not the rcwa mapping f is tame.

See also IsTame (5.3-10) for rcwa groups.


gap> IsTame(T);
false
gap> IsTame(a) or IsTame(b);
false
gap> IsTame(Comm(a,b));
true

4.11 Graph, transition matrix and prime set

4.11-1 RcwaGraph
> RcwaGraph( f )( operation )

Computes the graph associated to the rcwa mapping f.

For technical reasons, the residue classes 0(m) .. m-1(m) modulo the modulus m of f are identified with vertices named 1 .. m, in this order.

The result is returned as a GRAPE-graph, hence the package GRAPE has to be present; otherwise, fail is returned after issueing a warning.


gap> RcwaGraph(a);
rec( isGraph := true, order := 4, group := Group(()), 
  schreierVector := [ -1, -2, -3, -4 ], 
  adjacencies := [ [ 1, 3 ], [ 1, 2, 3, 4 ], [ 2, 4 ], [ 1, 2, 3, 4 ] ], 
  representatives := [ 1, 2, 3, 4 ], names := [ 1, 2, 3, 4 ] )

4.11-2 TransitionMatrix
> TransitionMatrix( f, deg )( function )

Computes the transition matrix of degree deg of the rcwa mapping f.


gap> M := TransitionMatrix(a,7);;
gap> Display(M);
[ [  1,  0,  1,  0,  0,  1,  0 ],
  [  0,  1,  0,  0,  1,  1,  0 ],
  [  1,  0,  0,  1,  0,  0,  0 ],
  [  0,  1,  1,  0,  0,  0,  1 ],
  [  0,  1,  0,  0,  0,  1,  1 ],
  [  1,  0,  0,  0,  1,  0,  0 ],
  [  0,  0,  1,  1,  0,  0,  1 ] ]
gap> DeterminantMat(M);
-5
gap> M := TransitionMatrix(T,13);;
gap> Display(M*One(GF(2)));
 1 . . . . . . 1 . . . . .
 . . 1 . . . . 1 . . . . .
 . 1 . . . . . . . . 1 . .
 . . . . . 1 . . 1 . . . .
 1 . 1 . . . . . . . . . .
 . . . . . . . . 1 1 . . .
 . . . 1 . . . . . . . . .
 . . . . . . . . . . 1 1 .
 . . . . 1 . 1 . . . . . .
 . 1 . . . . . . . . . 1 .
 . . . . . 1 . . . 1 . . .
 . . . . 1 . . . . . . . 1
 . . . . . . 1 . . . . . 1
gap> DeterminantMat(M);
-16

4.11-3 PrimeSet
> PrimeSet( f )( operation )

Computes the prime set of the rcwa mapping f.

See also PrimeSet (5.3-7) for rcwa groups.


gap> PrimeSet(T);
[ 2, 3 ]
gap> PrimeSet(u);
[ 3, 5 ]
gap> PrimeSet(T^u);
[ 2, 3 ]
gap> PrimeSet(T^(u^-1));
[ 2, 3, 5 ]
gap> PrimeSet(r);
[ Z(2)^0+x, Z(2)^0+x+x^2 ]

4.12 The normal form of an rcwa mapping

4.12-1 ShortCycles
> ShortCycles( f, maxlng )( operation )

Computes all "single" finite cycles, hence all finite cycles not belonging to an infinite series, of the rcwa mapping f of length at most maxlng. Since in GAP, permutations cannot move negative integers, rationals or even polynomials, the cycles are returned as lists, for example, the list [-3,1,2,-2] denotes the cycle (-3,1,2,-2).


gap> ShortCycles(a,2);
[ [ 0 ], [ 1 ], [ -1 ], [ 2, 3 ], [ -3, -2 ] ]
gap> ShortCycles(a,5);
[ [ 0 ], [ 1 ], [ -1 ], [ 2, 3 ], [ -3, -2 ], [ 4, 6, 9, 7, 5 ],
  [ -9, -7, -5, -4, -6 ] ]
gap> ShortCycles(u,2);
[ [ 0 ], [ -1 ], [ 1, 2 ], [ 3, 5 ], [ -10, -6 ] ]
gap> ShortCycles(Comm(a,b),10);
[  ]
gap> ShortCycles(a*b,2);
[ [ 0 ], [ 2 ], [ 3 ], [ -26 ], [ 7 ], [ -3 ], [ -1 ] ]
gap> v := RcwaMapping([[-1,2,1],[1,-1,1],[1,-1,1]]);;
gap> w := RcwaMapping([[-1,3,1],[1,-1,1],[1,-1,1],[1,-1,1]]);;
gap> Order(v);
6
gap> Order(w);
8 
gap> ShortCycles(v,10);
[ [ 0, 2, 1 ] ]
gap> ShortCycles(w,10);
[ [ 0, 3, 2, 1 ] ]

4.12-2 CycleType
> CycleType( f )( attribute )

The cycle type of a tame integral rcwa mapping f is denoted by a list of two lists, where the first list contains the lengths of "halved" cycles, hence the cycles belonging to a series producing a cycle of only half of the "usual" length at some point,with the respective multiplicities, and the second list is the set of the lengths of all other cycles, sortedby increasing length.


gap> CycleType(t);
[ [ 2 ], [  ] ]
gap> CycleType(RcwaMapping([[1,1,1],[1,-1,1]]));
[ [  ], [ 2 ] ]
gap> CycleType(v);
[ [ 6 ], [  ] ]
gap> CycleType(w);
[ [ 8 ], [  ] ]
gap> g := RcwaMapping([[-1,0,1],[1,2,1],[1,0,1],[1,-2,1]]);;
gap> CycleType(g);
[ [ 2 ], [ 1, 2 ] ]
gap> CycleType(Comm(a,b));
[ [  ], [ 1, 6 ] ]

4.12-3 StandardConjugate
> StandardConjugate( f )( attribute )

Some "nice" canonical representative of the conjugacy class of the bijective integral rcwa mapping f in the whole group RCWA(Z). Two integral rcwa mappings are conjugate in RCWA(Z) if and only if their "standard conjugates" are equal.



gap> w_std := StandardConjugate(w);
<integral rcwa mapping with modulus 4>
gap> Order(w_std);
8
gap> ShortCycles(w_std,8);
[ [ 0, 1, 2, 3 ] ]
gap> ab := Comm(a,b);
<bijective integral rcwa mapping with modulus 18>
gap> ab_std := StandardConjugate(ab);
<integral rcwa mapping with modulus 7>
gap> Display(ab_std);

Integral rcwa mapping with modulus 7

                n mod 7                |                 n^f
---------------------------------------+--------------------------------------
  0                                    | n
  1 2 3 4 5                            | n + 1
  6                                    | n - 5

gap> f := RcwaMapping([[1,1,1],[1, 4,1],[1,1,1],[2,-2,1],
>                      [1,0,2],[1,-5,1],[1,1,1],[2,-2,1]]);
<integral rcwa mapping with modulus 8>
gap> f_std := StandardConjugate(f);
<integral rcwa mapping with modulus 3>
gap> Display(f_std);

Integral rcwa mapping with modulus 3

                n mod 3                |                 n^f
---------------------------------------+--------------------------------------
  0 1                                  | n + 1
  2                                    | n - 2



4.12-4 StandardizingConjugator
> StandardizingConjugator( f )( attribute )

An rcwa mapping mapping x, such that f^x is the "standard" representative of the conjugacy class of the bijective integral rcwa mapping f in the whole integral residue class-wise affine group.



gap> ab_tostd := StandardizingConjugator(ab);
<integral rcwa mapping with modulus 18>
gap> Display(ab_tostd);

Integral rcwa mapping with modulus 18

               n mod 18                |                 n^f
---------------------------------------+--------------------------------------
   0  9                                | 28n/9
   1 10                                | (7n + 2)/9
   2 11                                | (28n + 7)/9
   3 12                                | (28n + 42)/9
   4 13                                | (7n + 80)/9
   5 14                                | (7n + 55)/9
   6                                   | (7n + 156)/18
   7 16                                | (7n + 68)/9
   8 17                                | (28n - 35)/9
  15                                   | (7n + 57)/18

gap> ab^ab_tostd = ab_std;
true
gap> f_tostd := StandardizingConjugator(f);
<integral rcwa mapping with modulus 16>
gap> Display(f_tostd);

Integral rcwa mapping with modulus 16
 
               n mod 16                |                 n^f
---------------------------------------+--------------------------------------
   0  8                                | 9n/8
   1  9                                | (9n - 1)/8
   2 10                                | (9n + 6)/8
   3 11                                | (9n + 5)/8
   4                                   | (9n + 44)/16
   5 13                                | (9n - 29)/8
   6 14                                | (9n - 6)/8
   7 15                                | (9n - 7)/8
  12                                   | (9n + 20)/16

gap> f^f_tostd = f_std;
true


4.12-5 IsConjugate
> IsConjugate( R, f, g )( method )

Checks whether the bijective integral rcwa mappings f and g are conjugate in the whole group RCWA(Z), e.g. via comparing their "standard conjugates". This may fail or run into an infinite loop. The argument R has to be RCWA( Integers ).


gap> IsConjugate(RCWA(Integers),w,w_std);
true
gap> IsConjugate(RCWA(Integers),a,b);
false
gap> IsConjugate(RCWA(Integers),ab,ab_std);
true

 




generated by GAPDoc2HTML