Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/tst/testinstall/   (GAP Algebra Version 4.15.1©)  Datei vom 18.9.2025 mit Größe 116 kB image not shown  

Quelle  trans.tst   Sprache: unbekannt

 
Spracherkennung für: .tst vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

#@local S,b,comps,display,e,f,g,h,imglist,imgset,ind,ker,m,max,notation,p,per
#@local q,tmp,val,x,y

#
gap> START_TEST("trans.tst");
gap> display := UserPreference("TransformationDisplayLimit");;
gap> notation := UserPreference("NotationForTransformations");;
gap> SetUserPreference("TransformationDisplayLimit", 100);;
gap> SetUserPreference("NotationForTransformations", "input");;

# Test the kernel code 
#
# Test TransformationNC
gap> TransformationNC([211]);
Transformation( [ 211 ] )
gap> TransformationNC([1 .. 3]);
IdentityTransformation
gap> TransformationNC(List([1 .. 65537], i -> 1));
<transformation on 65537 pts with rank 1>
gap> IsTrans4Rep(last);
true
gap> TransformationNC(List([1 .. 65536], i -> 1));
<transformation on 65536 pts with rank 1>
gap> IsTrans2Rep(last);
true

# Test TransformationListListNC 
gap> TransformationListListNC("a", [123]);
Error, TransformationListListNC: <src> must have the same length as <ran> (len\
gths are 1 and 3)
gap> TransformationListListNC([1], [123]);
Error, TransformationListListNC: <src> must have the same length as <ran> (len\
gths are 1 and 3)
gap> TransformationListListNC("abc", [123]);
Error, TransformationListListNC: <src>[3] must be a positive small integer (no\
t a character)
gap> TransformationListListNC([123], "abc");
Error, TransformationListListNC: <ran>[3] must be a positive small integer (no\
t a character)
gap> TransformationListListNC([-123], [456]);
Error, TransformationListListNC: <src>[1] must be a positive small integer (no\
t the integer -1)
gap> TransformationListListNC([123], [4, -56]);
Error, TransformationListListNC: <ran>[2] must be a positive small integer (no\
t the integer -5)
gap> TransformationListListNC([123], [456]);
Transformation( [ 456456 ] )
gap> TransformationListListNC([123], [655366553665536]);
<transformation on 65536 pts with rank 65533>
gap> TransformationListListNC([123], [655376553765537]);
<transformation on 65537 pts with rank 65534>
gap> TransformationListListNC([213], [444]);
Transformation( [ 4444 ] )
gap> TransformationListListNC((), ());
Error, TransformationListListNC: <src> must be a small list (not a permutation\
 (small))
gap> TransformationListListNC([], ());
Error, TransformationListListNC: <ran> must be a small list (not a permutation\
 (small))
gap> TransformationListListNC([], []);
IdentityTransformation
gap> TransformationListListNC([1..100000], [1..100000]);
IdentityTransformation
gap> TransformationListList([1..1000000], Concatenation([100000], [2..1000000]));
<transformation on 100000 pts with rank 99999>
gap> TransformationListList([1..1000000], Concatenation([2], [2..1000000]));
Transformation( [ 22 ] )

# Test DegreeOfTransformation
gap> f := TransformationListListNC([12], [11]) ^ (34);;
gap> DegreeOfTransformation(f);
2
gap> f := TransformationListListNC([12], [11]) ^ (365537);;
gap> DegreeOfTransformation(f);
2
gap> DegreeOfTransformation(());
Error, DegreeOfTransformation: <f> must be a transformation (not a permutation\
 (small))

# Test RANK_TRANS
gap> RANK_TRANS(Transformation([123]));
0
gap> RANK_TRANS(Transformation([121]));
2
gap> RANK_TRANS(Transformation([121]) ^ (465537));
2
gap> RANK_TRANS("a");
Error, RANK_TRANS: <f> must be a transformation (not a list (string))
gap> RANK_TRANS(IdentityTransformation);
0
gap> RANK_TRANS(Transformation([1 .. 10]));
0

# Test RANK_TRANS_INT
gap> RANK_TRANS_INT(Transformation([121]), 0);
0
gap> RANK_TRANS_INT(Transformation([121]), 2);
2
gap> RANK_TRANS_INT(Transformation([121]), -2);
Error, RANK_TRANS_INT: <n> must be a non-negative small integer (not the integ\
er -2)
gap> RANK_TRANS_INT(Transformation([121]), "a");
Error, RANK_TRANS_INT: <n> must be a non-negative small integer (not a list (s\
tring))
gap> RANK_TRANS_INT("a", 2);
Error, RANK_TRANS_INT: <f> must be a transformation (not a list (string))
gap> RANK_TRANS_INT(Transformation([65537], [1]), 10);
10

# Test RANK_TRANS_LIST
gap> RANK_TRANS_LIST(Transformation([121]), 2);
Error, RANK_TRANS_LIST: <list> must be a small list (not the integer 2)
gap> RANK_TRANS_LIST(Transformation([121]), "a");
Error, RANK_TRANS_LIST: <list>[1] must be a positive small integer (not a char\
acter)
gap> RANK_TRANS_LIST(Transformation([121]) ^ (165537), "a");
Error, RANK_TRANS_LIST: <list>[1] must be a positive small integer (not a char\
acter)
gap> RANK_TRANS_LIST(Transformation([121]), [13]);
1
gap> RANK_TRANS_LIST(Transformation([12155]), [1 .. 10]);
8
gap> RANK_TRANS_LIST(Transformation([12155]), []);
0
gap> RANK_TRANS_LIST("a", [13]);
Error, RANK_TRANS_LIST: <f> must be a transformation (not a list (string))
gap> RANK_TRANS_LIST(Transformation([65537], [1]), 
>                    Concatenation([1], [65536 .. 70000]));
4465
gap> RANK_TRANS_LIST(Transformation([65537], [1]), []);
0

# Test IS_ID_TRANS
gap> IS_ID_TRANS(IdentityTransformation);
true
gap> IS_ID_TRANS(Transformation([21]) ^ 2);
true
gap> IS_ID_TRANS(Transformation([655371], [165537]) ^ 2);
true
gap> IS_ID_TRANS(());
Error, IS_ID_TRANS: <f> must be a transformation (not a permutation (small))

# Test LARGEST_MOVED_PT_TRANS
gap> LARGEST_MOVED_PT_TRANS(IdentityTransformation);
0
gap> LARGEST_MOVED_PT_TRANS(Transformation([12145]));
3
gap> LARGEST_MOVED_PT_TRANS(Transformation([65537], [1]));
65537
gap> LARGEST_MOVED_PT_TRANS("a");
Error, LARGEST_MOVED_PT_TRANS: <f> must be a transformation (not a list (strin\
g))

# Test LARGEST_IMAGE_PT
gap> LARGEST_IMAGE_PT(IdentityTransformation);
0
gap> LARGEST_IMAGE_PT(Transformation([12145]));
2
gap> LARGEST_IMAGE_PT(Transformation([65537], [1]));
65536
gap> LARGEST_IMAGE_PT("a");
Error, LARGEST_IMAGE_PT: <f> must be a transformation (not a list (string))

# Test SMALLEST_MOVED_PT_TRANS
gap> SMALLEST_MOVED_PT_TRANS(IdentityTransformation);
fail
gap> SMALLEST_MOVED_PT_TRANS(Transformation([12145]));
3
gap> SMALLEST_MOVED_PT_TRANS(Transformation([65537], [1]));
65537
gap> SMALLEST_MOVED_PT_TRANS("a");
Error, SMALLEST_MOVED_PT_TRANS: <f> must be a transformation (not a list (stri\
ng))

# Test SMALLEST_IMAGE_PT
gap> SMALLEST_IMAGE_PT(IdentityTransformation);
fail
gap> SMALLEST_IMAGE_PT(Transformation([12145]));
1
gap> SMALLEST_IMAGE_PT(Transformation([65537], [1]));
1
gap> SMALLEST_IMAGE_PT("a");
Error, SMALLEST_IMAGE_PT: <f> must be a transformation (not a list (string))

# Test NR_MOVED_PTS_TRANS
gap> NR_MOVED_PTS_TRANS(IdentityTransformation);
0
gap> NR_MOVED_PTS_TRANS(Transformation([12145]));
1
gap> NR_MOVED_PTS_TRANS(Transformation([12145111111]));
7
gap> NR_MOVED_PTS_TRANS(Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1));
4464
gap> NR_MOVED_PTS_TRANS("a");
Error, NR_MOVED_PTS_TRANS: <f> must be a transformation (not a list (string))

# Test MOVED_PTS_TRANS
gap> MOVED_PTS_TRANS(IdentityTransformation);
[  ]
gap> MOVED_PTS_TRANS(Transformation([12145]));
3 ]
gap> MOVED_PTS_TRANS(Transformation([12145111111]));
367891011 ]
gap> MOVED_PTS_TRANS(Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1)) 
> = [65537 .. 70000];
true
gap> MOVED_PTS_TRANS(Transformation([231]) ^ 3);
[  ]
gap> MOVED_PTS_TRANS("a");
Error, MOVED_PTS_TRANS: <f> must be a transformation (not a list (string))

# Test FLAT_KERNEL_TRANS
gap> FLAT_KERNEL_TRANS(IdentityTransformation);
[  ]
gap> FLAT_KERNEL_TRANS(Transformation([12145]));
12134 ]
gap> FLAT_KERNEL_TRANS(Transformation([12145111111]));
12134111111 ]
gap> FLAT_KERNEL_TRANS(Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1)) 
> = Concatenation([1 .. 65536], [65537 .. 70000] * 0 + 1);
true
gap> FLAT_KERNEL_TRANS("a");
Error, FLAT_KERNEL_TRANS: <f> must be a transformation (not a list (string))

# Test FLAT_KERNEL_TRANS_INT
gap> FLAT_KERNEL_TRANS_INT(IdentityTransformation, -1);
Error, FLAT_KERNEL_TRANS_INT: <n> must be a non-negative small integer (not th\
e integer -1)
gap> FLAT_KERNEL_TRANS_INT(IdentityTransformation, "a");
Error, FLAT_KERNEL_TRANS_INT: <n> must be a non-negative small integer (not a \
list (string))
gap> FLAT_KERNEL_TRANS_INT(IdentityTransformation, 10);
12345678910 ]
gap> FLAT_KERNEL_TRANS_INT(IdentityTransformation, 0);
[  ]
gap> FLAT_KERNEL_TRANS_INT(Transformation([12145]), 0);
[  ]
gap> FLAT_KERNEL_TRANS_INT(Transformation([12145]), 3);
121 ]
gap> FLAT_KERNEL_TRANS_INT(Transformation([12145]), 10);
1213456789 ]
gap> FLAT_KERNEL_TRANS_INT(Transformation([12145]), 5);
12134 ]
gap> FLAT_KERNEL_TRANS_INT(Transformation([12145111111]), 0);
[  ]
gap> FLAT_KERNEL_TRANS_INT(Transformation([12145111111]), 7);
1213411 ]
gap> FLAT_KERNEL_TRANS_INT(Transformation([12145111111]), 14);
12134111111567 ]
gap> FLAT_KERNEL_TRANS_INT(Transformation([12145111111]), 11);
12134111111 ]
gap> FLAT_KERNEL_TRANS_INT(Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1), 70000
> = Concatenation([1 .. 65536], [65537 .. 70000] * 0 + 1);
true
gap> FLAT_KERNEL_TRANS_INT(Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1), 65555
> = Concatenation([1 .. 65536], [65537 .. 65555] * 0 + 1);
true
gap> FLAT_KERNEL_TRANS_INT(Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1), 70010
> = Concatenation([1 .. 65536], [65537 .. 70000] * 0 + 1, List([1 .. 10], x -> x + 65536));
true
gap> FLAT_KERNEL_TRANS_INT(Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1), 10);
12345678910 ]
gap> FLAT_KERNEL_TRANS_INT(Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1), 0);
[  ]
gap> FLAT_KERNEL_TRANS_INT("a", 2);
Error, FLAT_KERNEL_TRANS_INT: <f> must be a transformation (not a list (string\
))

# Test IMAGE_SET_TRANS
gap> IMAGE_SET_TRANS(IdentityTransformation);
[  ]
gap> IMAGE_SET_TRANS(Transformation([12145]));
1245 ]
gap> IsSet(last);
true
gap> IMAGE_SET_TRANS(Transformation([12145111111]));
1245 ]
gap> IsSet(last);
true
gap> IMAGE_SET_TRANS(Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1)) 
> = [1 .. 65536];
true
gap> IMAGE_SET_TRANS("a");
Error, IMAGE_SET_TRANS: <f> must be a transformation (not a list (string))
gap> IMAGE_SET_TRANS(Transformation([21245]));
1245 ]
gap> IsSet(last);
true
gap> IMAGE_SET_TRANS(Transformation([42145111111]));
1245 ]
gap> IsSet(last);
true
gap> IMAGE_SET_TRANS(Transformation([1], [65537])) 
> = [2 .. 65537];
true
gap> f := ID_TRANS4;;
gap> IsTrans4Rep(f);
true
gap> IMAGE_SET_TRANS(f);
[  ]
gap> FLAT_KERNEL_TRANS(f);
[  ]

# Test IMAGE_SET_TRANS_INT
gap> IMAGE_SET_TRANS_INT(IdentityTransformation, -1);
Error, IMAGE_SET_TRANS_INT: <n> must be a non-negative small integer (not the \
integer -1)
gap> IMAGE_SET_TRANS_INT(IdentityTransformation, "a");
Error, IMAGE_SET_TRANS_INT: <n> must be a non-negative small integer (not a li\
st (string))
gap> IMAGE_SET_TRANS_INT(IdentityTransformation, 10);
12345678910 ]
gap> IMAGE_SET_TRANS_INT(IdentityTransformation, 0);
[  ]
gap> IMAGE_SET_TRANS_INT(Transformation([12145]), 0);
[  ]
gap> IMAGE_SET_TRANS_INT(Transformation([21145]), 3);
12 ]
gap> IMAGE_SET_TRANS_INT(Transformation([21145]), 10);
1245678910 ]
gap> IMAGE_SET_TRANS_INT(Transformation([12145]), 5);
1245 ]
gap> IMAGE_SET_TRANS_INT(Transformation([12145111111]), 0);
[  ]
gap> IMAGE_SET_TRANS_INT(Transformation([12145111111]), 7);
1245 ]
gap> IMAGE_SET_TRANS_INT(Transformation([12145111111]), 14);
1245121314 ]
gap> IMAGE_SET_TRANS_INT(Transformation([12145111111]), 11);
1245 ]
gap> IMAGE_SET_TRANS_INT(Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1), 70000
> = [1 .. 65536];
true
gap> IMAGE_SET_TRANS_INT(Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1), 65555
> = [1 .. 65536];
true
gap> IMAGE_SET_TRANS_INT(Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1), 70010
> = Concatenation([1 .. 65536], List([1 .. 10], x -> x + 70000));
true
gap> IMAGE_SET_TRANS_INT(Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1), 10);
12345678910 ]
gap> IMAGE_SET_TRANS_INT(Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1), 0);
[  ]
gap> IMAGE_SET_TRANS_INT("a", 2);
Error, IMAGE_SET_TRANS_INT: <f> must be a transformation (not a list (string))

# Test IMAGE_LIST_TRANS_INT
gap> IMAGE_LIST_TRANS_INT(IdentityTransformation, -1);
Error, IMAGE_LIST_TRANS_INT: <n> must be a non-negative small integer (not the\
 integer -1)
gap> IMAGE_LIST_TRANS_INT(IdentityTransformation, "a");
Error, IMAGE_LIST_TRANS_INT: <n> must be a non-negative small integer (not a l\
ist (string))
gap> IMAGE_LIST_TRANS_INT(IdentityTransformation, 10);
12345678910 ]
gap> IMAGE_LIST_TRANS_INT(IdentityTransformation, 0);
[  ]
gap> IMAGE_LIST_TRANS_INT(Transformation([12145]), 0);
[  ]
gap> IMAGE_LIST_TRANS_INT(Transformation([21145]), 3);
211 ]
gap> IMAGE_LIST_TRANS_INT(Transformation([21145]), 10);
21145678910 ]
gap> IMAGE_LIST_TRANS_INT(Transformation([12145]), 5);
12145 ]
gap> IMAGE_LIST_TRANS_INT(Transformation([12145111111]), 0);
[  ]
gap> IMAGE_LIST_TRANS_INT(Transformation([12145111111]), 7);
1214511 ]
gap> IMAGE_LIST_TRANS_INT(Transformation([12145111111]), 14);
12145111111121314 ]
gap> IMAGE_LIST_TRANS_INT(Transformation([12145111111]), 11);
12145111111 ]
gap> IMAGE_LIST_TRANS_INT(Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1), 70000
> = Concatenation([1 .. 65536], [65537 .. 70000] * 0 + 1);
true
gap> IMAGE_LIST_TRANS_INT(Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1), 65555
> = Concatenation([1 .. 65536], [65537 .. 65555] * 0 + 1);
true
gap> IMAGE_LIST_TRANS_INT(Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1), 70010
> = Concatenation([1 .. 65536], [65537 .. 70000] * 0 + 1, List([1 .. 10], x -> x + 70000));
true
gap> IMAGE_LIST_TRANS_INT(Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1), 10);
12345678910 ]
gap> IMAGE_LIST_TRANS_INT(Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1), 0);
[  ]
gap> IMAGE_LIST_TRANS_INT("a", 2);
Error, IMAGE_LIST_TRANS_INT: <f> must be a transformation (not a list (string)\
)

# Test KERNEL_TRANS 1
gap> KERNEL_TRANS(IdentityTransformation, -1);
Error, KERNEL_TRANS: <n> must be a non-negative small integer (not the integer\
 -1)
gap> KERNEL_TRANS(IdentityTransformation, "a");
Error, KERNEL_TRANS: <n> must be a non-negative small integer (not a list (str\
ing))
gap> KERNEL_TRANS(IdentityTransformation, 10);
[ [ 1 ], [ 2 ], [ 3 ], [ 4 ], [ 5 ], [ 6 ], [ 7 ], [ 8 ], [ 9 ], [ 10 ] ]
gap> KERNEL_TRANS(IdentityTransformation, 0);
[  ]
gap> KERNEL_TRANS(Transformation([12145]), 0);
[  ]
gap> KERNEL_TRANS(Transformation([12145]), 3);
[ [ 13 ], [ 2 ] ]
gap> KERNEL_TRANS(Transformation([12145]), 10);
[ [ 13 ], [ 2 ], [ 4 ], [ 5 ], [ 6 ], [ 7 ], [ 8 ], [ 9 ], [ 10 ] ]
gap> KERNEL_TRANS(Transformation([12145]), 5);
[ [ 13 ], [ 2 ], [ 4 ], [ 5 ] ]
gap> KERNEL_TRANS(Transformation([12145111111]), 0);
[  ]
gap> KERNEL_TRANS(Transformation([12145111111]), 7);
[ [ 1367 ], [ 2 ], [ 4 ], [ 5 ] ]
gap> KERNEL_TRANS(Transformation([12145111111]), 14);
[ [ 1367891011 ], [ 2 ], [ 4 ], [ 5 ], [ 12 ], [ 13 ], [ 14 ] ]
gap> KERNEL_TRANS(Transformation([12145111111]), 11);
[ [ 1367891011 ], [ 2 ], [ 4 ], [ 5 ] ]
gap> KERNEL_TRANS("a", 2);
Error, KERNEL_TRANS: <f> must be a transformation (not a list (string))
gap> KERNEL_TRANS(Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1), 10);
[ [ 1 ], [ 2 ], [ 3 ], [ 4 ], [ 5 ], [ 6 ], [ 7 ], [ 8 ], [ 9 ], [ 10 ] ]
gap> KERNEL_TRANS(Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1), 0);
[  ]

# Test KERNEL_TRANS 2
gap> f := Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1);; 
gap> ker := KERNEL_TRANS(f, 70000);;
gap> Length(ker) = RankOfTransformation(f, 70000);
true
gap> Union(ker) = [1 .. 70000];
true
gap> max := Maximum(List(ker, Length));
4465
gap> tmp := First(ker, x -> Length(x) = max);;                  
gap> ForAll(tmp, x -> x ^ f = tmp[1] ^ f);
true
gap> Filtered([1 .. DegreeOfTransformation(f)], x -> x ^ f = tmp[1] ^ f) = tmp;
true

# Test KERNEL_TRANS 3
gap> f := Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1);; 
gap> ker := KERNEL_TRANS(f, 65555);;
gap> Length(ker) = RankOfTransformation(f, 65555);
true
gap> Union(ker) = [1 .. 65555];
true
gap> max := Maximum(List(ker, Length));
20
gap> tmp := First(ker, x -> Length(x) = max);;                   
gap> ForAll(tmp, x -> x ^ f = tmp[1] ^ f);
true
gap> Filtered([1 .. 65555], x -> x ^ f = tmp[1] ^ f) = tmp;
true

# Test KERNEL_TRANS 4
gap> f := Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1);; 
gap> ker := KERNEL_TRANS(f, 70010);;
gap> Length(ker) = RankOfTransformation(f, 70010);
true
gap> Union(ker) = [1 .. 70010];
true
gap> max := Maximum(List(ker, Length));
4465
gap> tmp := First(ker, x -> Length(x) = max);;
gap> ForAll(tmp, x -> x ^ f = tmp[1] ^ f);
true
gap> Filtered([1 .. 70010], x -> x ^ f = tmp[1] ^ f) = tmp;
true

# Test PREIMAGES_TRANS_INT
gap> PREIMAGES_TRANS_INT(IdentityTransformation, 0);
Error, PREIMAGES_TRANS_INT: <pt> must be a positive small integer (not the int\
eger 0)
gap> PREIMAGES_TRANS_INT(IdentityTransformation, -1);
Error, PREIMAGES_TRANS_INT: <pt> must be a positive small integer (not the int\
eger -1)
gap> PREIMAGES_TRANS_INT(IdentityTransformation, "a");
Error, PREIMAGES_TRANS_INT: <pt> must be a positive small integer (not a list \
(string))
gap> PREIMAGES_TRANS_INT("a", 2);
Error, PREIMAGES_TRANS_INT: <f> must be a transformation (not a list (string))
gap> PREIMAGES_TRANS_INT(IdentityTransformation, 10);
10 ]
gap> PREIMAGES_TRANS_INT(Transformation([21145]), 3);
[  ]
gap> PREIMAGES_TRANS_INT(Transformation([21145]), 1);
23 ]
gap> PREIMAGES_TRANS_INT(Transformation([21145]), 10);
10 ]
gap> PREIMAGES_TRANS_INT(Transformation([12145]), 2);
2 ]
gap> PREIMAGES_TRANS_INT(Transformation([12145111111]), 1);
1367891011 ]
gap> PREIMAGES_TRANS_INT(Transformation([12145111111]), 14);
14 ]
gap> PREIMAGES_TRANS_INT(Transformation([12145111111]), 11);
[  ]
gap> PREIMAGES_TRANS_INT(Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1), 1
> = Concatenation([1], [65537 .. 70000]);
true
gap> PREIMAGES_TRANS_INT(Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1), 2);
2 ]
gap> PREIMAGES_TRANS_INT(Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1), 65555);
[  ]

# Test AS_TRANS_PERM_INT
gap> AS_TRANS_PERM_INT((123), "a");
Error, AS_TRANS_PERM_INT: <deg> must be a non-negative small integer (not a li\
st (string))
gap> AS_TRANS_PERM_INT((123), -1);
Error, AS_TRANS_PERM_INT: <deg> must be a non-negative small integer (not the \
integer -1)
gap> AS_TRANS_PERM_INT("a", 3);
Error, AS_TRANS_PERM_INT: <p> must be a permutation (not a list (string))
gap> AS_TRANS_PERM_INT((123), 0);
IdentityTransformation
gap> AS_TRANS_PERM_INT((123), 1);
Transformation( [ 22 ] )
gap> AS_TRANS_PERM_INT((123), 2);
Transformation( [ 233 ] )
gap> AS_TRANS_PERM_INT((123), 3);
Transformation( [ 231 ] )
gap> AsPermutation(last) = (123);
true
gap> AS_TRANS_PERM_INT((165537), 0);
IdentityTransformation
gap> AS_TRANS_PERM_INT((165537), 1);
<transformation on 65537 pts with rank 65536>
gap> f := AS_TRANS_PERM_INT((165537), 2);
<transformation on 65537 pts with rank 65536>
gap> PREIMAGES_TRANS_INT(f, 65537);
165537 ]
gap> last in KernelOfTransformation(f);
true
gap> AS_TRANS_PERM_INT((165537), 3);
<transformation on 65537 pts with rank 65536>
gap> AS_TRANS_PERM_INT((165537), 65537);
<transformation on 65537 pts with rank 65537>
gap> AsPermutation(last) = (165537);
true
gap> AS_TRANS_PERM_INT((12)(365537), 2);
Transformation( [ 21 ] )

# Test AS_TRANS_PERM
gap> AS_TRANS_PERM((123));
Transformation( [ 231 ] )
gap> AS_TRANS_PERM("a");
Error, AS_TRANS_PERM: <p> must be a permutation (not a list (string))
gap> AS_TRANS_PERM((165537));
<transformation on 65537 pts with rank 65537>
gap> AS_TRANS_PERM((165537) * (165537));
IdentityTransformation
gap> AS_TRANS_PERM((137) * (137));
IdentityTransformation

# Test AS_PERM_TRANS
gap> AS_PERM_TRANS(Transformation([231]));
(1,2,3)
gap> AS_PERM_TRANS(Transformation([232]));
fail
gap> AS_PERM_TRANS(Transformation([165537], [655371]));
(1,65537)
gap> AS_PERM_TRANS(Transformation([165537], [6553765537]));
fail
gap> AS_PERM_TRANS(());
Error, AS_PERM_TRANS: <f> must be a transformation (not a permutation (small))

# Test PermutationOfImage
gap> PermutationOfImage(Transformation([2672699115]));
fail
gap> PermutationOfImage(Transformation([381994105106]));
fail
gap> PermutationOfImage(Transformation([65537], [1]));
()
gap> PermutationOfImage(Transformation([1234567891]));
()
gap> PermutationOfImage(Transformation([2314567892]));
(1,2,3)
gap> PermutationOfImage(Transformation([1 .. 65537], x -> x + 1));
fail
gap> PermutationOfImage(1);
Error, PermutationOfImage: <f> must be a transformation (not the integer 1)

# Test RestrictedTransformation
gap> RestrictedTransformation(IdentityTransformation, [1, -1]);
Error, RestrictedTransformation: <list>[2] must be a positive small integer (n\
ot the integer -1)
gap> RestrictedTransformation(IdentityTransformation, "a");
Error, RestrictedTransformation: <list>[1] must be a positive small integer (n\
ot a character)
gap> RestrictedTransformation(IdentityTransformation, [1,, 3]);
Error, List Element: <list>[2] must have an assigned value
gap> RestrictedTransformation(IdentityTransformation, [1 .. 10]);
IdentityTransformation
gap> RestrictedTransformation(IdentityTransformation, [0]);
Error, RestrictedTransformation: <list>[1] must be a positive small integer (n\
ot the integer 0)
gap> RestrictedTransformation(Transformation([12145]), [135]);
Transformation( [ 121 ] )
gap> RestrictedTransformation(Transformation([21145]), [1 .. 3]);
Transformation( [ 211 ] )
gap> RestrictedTransformation(Transformation([21145]), [1 .. 10]);
Transformation( [ 211 ] )
gap> RestrictedTransformation(Transformation([12145]), [1 .. 5]);
Transformation( [ 121 ] )
gap> RestrictedTransformation(Transformation([12145111111]), 0);
Error, RestrictedTransformation: <list> must be a small list (not the integer \
0)
gap> RestrictedTransformation(Transformation([65537 .. 70000], 
>                                    [65537 .. 70000] * 0 + 1), [1 .. 65536]);
IdentityTransformation
gap> RestrictedTransformation(Transformation([65537 .. 70000], 
>                                    [65537 .. 70000] * 0 + 1), [65537 .. 65555]);
<transformation on 65555 pts with rank 65536>
gap> RestrictedTransformation(Transformation([65537 .. 70000], 
>                                    [65537 .. 70000] * 0 + 1), [1, -1]);
Error, RestrictedTransformation: <list>[2] must be a positive small integer (n\
ot the integer -1)
gap> RestrictedTransformation("a", [1 .. 10]);
Error, RestrictedTransformation: <f> must be a transformation (not a list (str\
ing))
gap> RestrictedTransformation(Transformation([323]), [1]);
Transformation( [ 323 ] )
gap> RestrictedTransformation(Transformation([1], [65537]), [1]);
<transformation on 65537 pts with rank 65536>

# Test AS_TRANS_TRANS
gap> AS_TRANS_TRANS(IdentityTransformation, -1);
Error, AS_TRANS_TRANS: <m> must be a non-negative small integer (not the integ\
er -1)
gap> AS_TRANS_TRANS(IdentityTransformation, "a");
Error, AS_TRANS_TRANS: <m> must be a non-negative small integer (not a list (s\
tring))
gap> AS_TRANS_TRANS(IdentityTransformation, 3);
IdentityTransformation
gap> AS_TRANS_TRANS(IdentityTransformation, 10);
IdentityTransformation
gap> AS_TRANS_TRANS(IdentityTransformation, 0);
IdentityTransformation
gap> AS_TRANS_TRANS(Transformation([12145]), 3);
Transformation( [ 121 ] )
gap> AS_TRANS_TRANS(Transformation([12145]), 7);
Transformation( [ 121 ] )
gap> AS_TRANS_TRANS(Transformation([22145111111]), 1);
fail
gap> AS_TRANS_TRANS(Transformation([65537 .. 70000], 
>                                  [65537 .. 70000] * 0 + 1), 65536);
IdentityTransformation
gap> AS_TRANS_TRANS(Transformation([65537 .. 70000], 
>                                  [65537 .. 70000] * 0 + 1), 65555);
<transformation on 65555 pts with rank 65536>
gap> AS_TRANS_TRANS(Transformation([65537 .. 70000], 
>                                  [65537 .. 70000] * 0 + 1), 70010);
<transformation on 70000 pts with rank 65536>
gap> AS_TRANS_TRANS(Transformation([65537 .. 70000], 
>                                  [65537 .. 70000] * 0 + 1), 0);
IdentityTransformation
gap> AS_TRANS_TRANS(Transformation([65537], [70000]), 65537); 
fail
gap> AS_TRANS_TRANS(Transformation([1], [65537]), 1);
fail
gap> AS_TRANS_TRANS(Transformation([1], [65537]), 0);
IdentityTransformation
gap> AS_TRANS_TRANS("a", 10);
Error, AS_TRANS_TRANS: <f> must be a transformation (not a list (string))

# Test TRIM_TRANS
gap> TRIM_TRANS(IdentityTransformation, -1);
Error, TRIM_TRANS: <m> must be a non-negative small integer (not the integer -\
1)
gap> TRIM_TRANS(IdentityTransformation, "a");
Error, TRIM_TRANS: <m> must be a non-negative small integer (not a list (strin\
g))
gap> TRIM_TRANS(IdentityTransformation, 3);
gap> TRIM_TRANS(IdentityTransformation, 10);
gap> TRIM_TRANS(IdentityTransformation, 0);
gap> TRIM_TRANS(Transformation([12111]), 3);
gap> TRIM_TRANS(Transformation([12111]), 7);
gap> TRIM_TRANS(Transformation([65537 .. 70000], 
>                              [65537 .. 70000] * 0 + 1), 65536);
gap> TRIM_TRANS(Transformation([65537 .. 70000], 
>                              [65537 .. 70000] * 0 + 1), 10);
gap> TRIM_TRANS(Transformation([65537 .. 70000], 
>                              [65537 .. 70000] * 0 + 1), 65555);
gap> TRIM_TRANS(Transformation([65537 .. 70000], 
>                              [65537 .. 70000] * 0 + 1), 70010);
gap> TRIM_TRANS(Transformation([65537 .. 70000], 
>                              [65537 .. 70000] * 0 + 1), 0);
gap> TRIM_TRANS("a", 10);
Error, TRIM_TRANS: <f> must be a transformation (not a list (string))

# Test for the issue with caching the degree of a transformation in PR #384
gap> x := Transformation([11]) ^ (1,2)(3,70000);
Transformation( [ 22 ] )
gap> IsTrans4Rep(x);
true
gap> HASH_FUNC_FOR_TRANS(x, 101);;
gap> x;
Transformation( [ 22 ] )
gap> x := Transformation([11]) ^ (1,70000);
<transformation on 70000 pts with rank 69999>
gap> IsTrans4Rep(x);
true
gap> HASH_FUNC_FOR_TRANS(x, 101);;

# Test IsInjectiveListTrans
gap> f := Transformation([93231827831210]);;
gap> IsInjectiveListTrans([12365], f);
true
gap> IsInjectiveListTrans([1 .. 5], f);     
false
gap> f := Transformation([65537 .. 70000], 
>                        [65537 .. 70000] * 0 + 1);;
gap> IsInjectiveListTrans(ImageSetOfTransformation(f), f);
true
gap> IsInjectiveListTrans([1 .. RankOfTransformation(f) + 1], f);   
false
gap> IsInjectiveListTrans([1 .. RankOfTransformation(f) + 1], 
>                            ImageListOfTransformation(f));
false
gap> f := Transformation([1234121212151107]);;
gap> IsInjectiveListTrans([1 .. 3], f);                    
true
gap> IsInjectiveListTrans([1 .. 4], f);
false
gap> IsInjectiveListTrans([1 .. 4], ImageListOfTransformation(f));
false
gap> IsInjectiveListTrans([1 .. 3], ImageListOfTransformation(f));
true
gap> f := Transformation([1193810116188411]);;
gap> RankOfTransformation(f);
8
gap> IsInjectiveListTrans([1 .. 5], f);                           
true
gap> IsInjectiveListTrans([1 .. 6], f);
false
gap> f := Transformation([55310101021211916]);;
gap> IsInjectiveListTrans([23], f);
true
gap> IsInjectiveListTrans([2347], f);
true
gap> IsInjectiveListTrans([23457], f);
false
gap> IsInjectiveListTrans([65536], f);
true
gap> IsInjectiveListTrans([1 .. 65536], f);
false
gap> IsInjectiveListTrans([1 .. 65536], ImageListOfTransformation(f));
false
gap> IsInjectiveListTrans([65536], ImageListOfTransformation(f));
true
gap> IsInjectiveListTrans(1, f);
Error, IsInjectiveListTrans: <list> must be a small list (not the integer 1)
gap> IsInjectiveListTrans([1], 1);
Error, IsInjectiveListTrans: <obj> must be a transformation or a list (not the\
 integer 1)
gap> IsInjectiveListTrans([12], "def");
Error, IsInjectiveListTrans: <obj>[1] must be a positive small integer (not a \
character)
gap> IsInjectiveListTrans(ID_TRANS4, "def");
Error, IsInjectiveListTrans: <list> must be a small list (not a transformation\
 (large))
gap> IsInjectiveListTrans([12], [2,3]);
Error, <obj> must be a list of positive small integers in the range [1 .. 2]
gap> IsInjectiveListTrans([1, []], f);
Error, IsInjectiveListTrans: <list>[2] must be a positive small integer (not a\
n empty plain list)
gap> IsInjectiveListTrans([1, []], [123]);
Error, IsInjectiveListTrans: <list>[2] must be a positive small integer (not a\
n empty plain list)
gap> IsInjectiveListTrans([1, []], ID_TRANS4);
Error, IsInjectiveListTrans: <list>[2] must be a positive small integer (not a\
n empty plain list)

# Test PermLeftQuoTransformationNC
gap> f := Transformation([381994105106]);;
gap> PermLeftQuoTransformationNC(f, f);
()
gap> p := (19108)(456);;
gap> PermLeftQuoTransformationNC(f * p, f);
(1,8,10,9)(4,6,5)
gap> PermLeftQuoTransformationNC(f * p, f ^ (2021));
(1,8,10,9)(4,6,5)
gap> PermLeftQuoTransformationNC(f, f * p);   
(1,9,10,8)(4,5,6)
gap> p := (18463105);;
gap> PermLeftQuoTransformationNC(f, f * p);
(1,8,4,6,3,10,5)
gap> PermLeftQuoTransformationNC(f * p, f);                     
(1,5,10,3,6,4,8)
gap> f := Transformation([65537 .. 70000], 
>                        [65537 .. 70000] * 0 + 1
>         * (1,65141413485)(139194385865536);;
gap> p := (11020)(414144159265);; 
gap> PermLeftQuoTransformationNC(f * p, f) = p ^ -1;
true
gap> PermLeftQuoTransformationNC(f, f * p) = p;   
true
gap> f := Transformation([26726991111125]);;
gap> PermLeftQuoTransformationNC(f, f * (123));
(1,2,3)
gap> g := f * (125);;
gap> PermLeftQuoTransformationNC(f, g);
(1,2,5)
gap> PermLeftQuoTransformationNC(g, f);
(1,5,2)
gap> f := Transformation([65537 .. 70000], 
>                        [65537 .. 70000] * 0 + 1);;
gap> g := f * (128491949135011593)(134119414194)(141319);;
gap> p := PermLeftQuoTransformationNC(f, g);
(19,1413)(194,1341,19414)(1593,12849,19491,3501)
gap> p := PermLeftQuoTransformationNC(f, g ^ (7000170002));
(19,1413)(194,1341,19414)(1593,12849,19491,3501)
gap> q := PermLeftQuoTransformationNC(g, f);
(19,1413)(194,19414,1341)(1593,3501,19491,12849)
gap> p = q ^ -1;
true
gap> q = p ^ -1;
true
gap> PermLeftQuoTransformationNC((), IdentityTransformation);
Error, PermLeftQuoTransformationNC: <f> must be a transformation (not a permut\
ation (small))
gap> PermLeftQuoTransformationNC(IdentityTransformation, ());
Error, PermLeftQuoTransformationNC: <g> must be a transformation (not a permut\
ation (small))
gap> PermLeftQuoTransformationNC((), ());
Error, PermLeftQuoTransformationNC: <f> must be a transformation (not a permut\
ation (small))
gap> g := Transformation([381994105106]);;
gap> f := (g ^ (220)) * (138)(69);;
gap> PermLeftQuoTransformationNC(f, g);
(1,20)(2,8,3)(6,9)
gap> f := Transformation([381913105106]);;
gap> g := (f ^ (265537)) *  (138)(69);;
gap> PermLeftQuoTransformationNC(f, g);
(1,3,8,2)(6,9)
gap> PermLeftQuoTransformationNC(g, f);
(1,65537)(2,8,3)(6,9)
gap> g := Transformation([65537 .. 70000], 
>                        [65537 .. 70000] * 0 + 1);;
gap> f := g ^ (7000170002);;
gap> PermLeftQuoTransformationNC(f, g);
()

# Test TRANS_IMG_KER_NC
gap> f := Transformation([65537 .. 70000], 
>                        [65537 .. 70000] * 0 + 1);;
gap> g := TRANS_IMG_KER_NC(ImageSetOfTransformation(f),
>                          FlatKernelOfTransformation(f));;
gap> g = TRANS_IMG_KER_NC(ImageSetOfTransformation(g), 
>                         FlatKernelOfTransformation(g));
true
gap> f := Transformation([4693951163871]);;
gap> g := TRANS_IMG_KER_NC(ImageSetOfTransformation(f),
>                          FlatKernelOfTransformation(f));
Transformation( [ 1345467358911 ] )
gap> FlatKernelOfTransformation(g) = FlatKernelOfTransformation(f);
true
gap> ImageSetOfTransformation(g) = ImageSetOfTransformation(f);
true
gap> f := Transformation([714542576414]);;
gap> g := TRANS_IMG_KER_NC(ImageSetOfTransformation(f),
> FlatKernelOfTransformation(f));
Transformation( [ 124546517424 ] )
gap> KernelOfTransformation(g) = KernelOfTransformation(f);
true
gap> ImageSetOfTransformation(f) = ImageSetOfTransformation(g);
true
gap> g ^ 2 = g;
false
gap> TRANS_IMG_KER_NC([54 .. 1], [1 .. 5]);
Transformation( [ 54321 ] )

# Test IDEM_IMG_KER_NC
gap> f := AsTransformation((4,21,13,62,7,56,9,77,91,43,99)
>                          (14,27,87,72,57,85));;
gap> g := IDEM_IMG_KER_NC(ImageSetOfTransformation(f),
>                         FlatKernelOfTransformation(f));;
gap> g = f ^ 0;
true
gap> f := Transformation([65537 .. 70000], 
>                        [65537 .. 70000] * 0 + 1);;
gap> g := IDEM_IMG_KER_NC(ImageSetOfTransformation(f),
>                          FlatKernelOfTransformation(f));;
gap> g ^ 2 = g;
true
gap> f := Transformation([4693951163871]) ^ 4;;
gap> g := IDEM_IMG_KER_NC(ImageSetOfTransformation(f),
>                         FlatKernelOfTransformation(f));
Transformation( [ 3339397399119 ] )
gap> g ^ 2 = g;
true
gap> f = g;
true
gap> FlatKernelOfTransformation(g) = FlatKernelOfTransformation(f);
true
gap> ImageSetOfTransformation(g) = ImageSetOfTransformation(f);
true
gap> f := Transformation([914542596414]);;
gap> g := IDEM_IMG_KER_NC(ImageSetOfTransformation(f),
>                         FlatKernelOfTransformation(f));
Transformation( [ 125456419525 ] )
gap> g ^ 2 = g;
true
gap> KernelOfTransformation(g) = KernelOfTransformation(f);
true
gap> ImageSetOfTransformation(f) = ImageSetOfTransformation(g);
true
gap> g ^ 2 = g;
true
gap> IDEM_IMG_KER_NC([54 .. 1], [1 .. 5]);
IdentityTransformation

# Test InverseOfTransformation
gap> InverseOfTransformation(IdentityTransformation);
IdentityTransformation
gap> f := Transformation( [ 5917952841 ] );;
gap> g := InverseOfTransformation(f);
Transformation( [ 3719114821 ] )
gap> f * g * f = f and g * f * g = g;
true
gap> f := Transformation([65537 .. 70000], 
>                        [65537 .. 70000] * 0 + 1);;
gap> g := InverseOfTransformation(f);;
gap> f * g * f = f and g * f * g = g;
true
gap> g := InverseOfTransformation(1);
Error, InverseOfTransformation: <f> must be a transformation (not the integer \
1)

# Test INV_LIST_TRANS
gap> f := Transformation([93231827831210]);;
gap> g := INV_LIST_TRANS([12365], f);
Transformation( [ 532456761 ] )
gap> ForAll([12365], i -> (i ^ f) ^ g = i);
true
gap> f := Transformation([65537 .. 70000], 
>                        [65537 .. 70000] * 0 + 1);;
gap> g := INV_LIST_TRANS(ImageSetOfTransformation(f), f);
IdentityTransformation
gap> ForAll(ImageSetOfTransformation(f), i -> (i ^ f) ^ g = i);
true
gap> f := Transformation([1234121212151107]);;
gap> g := INV_LIST_TRANS([1 .. 3], f);                    
Transformation( [ 12235678910111 ] )
gap> ForAll([1 .. 3], i -> (i ^ f) ^ g = i);
true
gap> f := Transformation([1193810116188411]);;
gap> g := INV_LIST_TRANS([1 .. 5], f);                           
Transformation( [ 12345674251 ] )
gap> ForAll([1 .. 5], i -> (i ^ f) ^ g = i);
true
gap> f := Transformation([55310101021211916]);;
gap> g := INV_LIST_TRANS([23], f);
Transformation( [ 12342 ] )
gap> ForAll([23], i -> (i ^ f) ^ g = i);
true
gap> g := INV_LIST_TRANS([2347], f);
Transformation( [ 1734267894 ] )
gap> ForAll([2347], i -> (i ^ f) ^ g = i);
true
gap> g := INV_LIST_TRANS([65536], f);
IdentityTransformation
gap> INV_LIST_TRANS([1, -1], f);
Error, INV_LIST_TRANS: <list>[2] must be a positive small integer (not the int\
eger -1)
gap> INV_LIST_TRANS("a", f);
Error, INV_LIST_TRANS: <list>[1] must be a positive small integer (not a chara\
cter)
gap> INV_LIST_TRANS(0, f);
Error, INV_LIST_TRANS: <list> must be a dense list (not the integer 0)
gap> INV_LIST_TRANS([12], "a");
Error, INV_LIST_TRANS: <f> must be a transformation (not a list (string))
gap> INV_LIST_TRANS([1, -1], Transformation([1], [65537]));
Error, INV_LIST_TRANS: <list>[2] must be a positive small integer (not the int\
eger -1)

# IndexPeriodOfTransformation
gap> f := Transformation([4389358105628]);;
gap> val := IndexPeriodOfTransformation(f);
35 ]
gap> ind := val[1];; per := val[2];;
gap> RankOfTransformation(f ^ (ind - 1), DegreeOfTransformation(f)) > 
>    RankOfTransformation(f ^ ind, DegreeOfTransformation(f));
true
gap> f ^ (ind + per) = f ^ ind;
true
gap> ForAny([1 .. per - 1], m -> f ^ (ind + m) = f ^ ind);
false
gap> f := Transformation([65537 .. 70000], 
>                        [65537 .. 70000] * 0 + 1
>         * (14918184141)(14140124);;
gap> val := IndexPeriodOfTransformation(f);
16 ]
gap> ind := val[1];; per := val[2];;
gap> RankOfTransformation(f ^ (ind - 1), DegreeOfTransformation(f)) > 
>    RankOfTransformation(f ^ ind, DegreeOfTransformation(f));
true
gap> f ^ (ind + per) = f ^ ind;
true
gap> ForAny([1 .. per - 1], m -> f ^ (ind + m) = f ^ ind);
false
gap> f := Transformation([165537246], 
>                        [655372357]);;
gap> IndexPeriodOfTransformation(f);
31 ]
gap> f := Transformation(
> [52327821493633444349481810304734135
>  331539193724262164797284725215023184226
>  40404432745354014]);;
gap> val := IndexPeriodOfTransformation(f);
144 ]
gap> ind := val[1];; per := val[2];;
gap> RankOfTransformation(f ^ (ind - 1), DegreeOfTransformation(f)) > 
>    RankOfTransformation(f ^ ind, DegreeOfTransformation(f));
true
gap> f ^ (ind + per) = f ^ ind;
true
gap> ForAny([1 .. per - 1], m -> f ^ (ind + m) = f ^ ind);
false
gap> f ^ 18 = f ^ 14;
true
gap> f :=
> Transformation( [ 74337760653724221649581662769,
>  38974456537489289594566385845633232,
>  38273628814185955519581665556187403789,
>  4748428237342526194413152741991569819,
>  858968699731227139911376533778279146,
>  326470849237681068 ] );;
gap> val := IndexPeriodOfTransformation(f);
1042 ]
gap> ind := val[1];; per := val[2];;
gap> RankOfTransformation(f ^ (ind - 1), DegreeOfTransformation(f)) > 
>    RankOfTransformation(f ^ ind, DegreeOfTransformation(f));
true
gap> f ^ (ind + per) = f ^ ind;
true
gap> ForAny([1 .. per - 1], m -> f ^ (ind + m) = f ^ ind);
false
gap> f :=
> Transformation( [ 455170268794231986464551571367,
>  5382051256791382943448471113952401258,
>  18392712586831538866143165516964646,
>  7029111381467841779445919351961493224,
>  457129012443616364349277198238526878,
>  76184833873839 ] );;
gap> val := IndexPeriodOfTransformation(f);
134 ]
gap> ind := val[1];; per := val[2];;
gap> RankOfTransformation(f ^ (ind - 1), DegreeOfTransformation(f)) > 
>    RankOfTransformation(f ^ ind, DegreeOfTransformation(f));
true
gap> f ^ (ind + per) = f ^ ind;
true
gap> ForAny([1 .. per - 1], m -> f ^ (ind + m) = f ^ ind);
false
gap> f :=
> Transformation( [ 14247015072136465685420693288,
>  6093100372715784958436820905578489310,
>  5176268329399348519350929551311776435,
>  19941170842295544446756457941008630,
>  38807760459938116062765013482782689917,
>  81163149022714198 ] );;
gap> val := IndexPeriodOfTransformation(f);
167 ]
gap> ind := val[1];; per := val[2];;
gap> RankOfTransformation(f ^ (ind - 1), DegreeOfTransformation(f)) > 
>    RankOfTransformation(f ^ ind, DegreeOfTransformation(f));
true
gap> f ^ (ind + per) = f ^ ind;
true
gap> ForAny([1 .. per - 1], m -> f ^ (ind + m) = f ^ ind);
false
gap> IndexPeriodOfTransformation(IdentityTransformation);
11 ]
gap> IndexPeriodOfTransformation("a");
Error, IndexPeriodOfTransformation: <f> must be a transformation (not a list (\
string))
gap> IndexPeriodOfTransformation(Transformation([21]));
12 ]

# Test SMALLEST_IDEM_POW_TRANS
gap> f := Transformation([4389358105628]);;
gap> m := SMALLEST_IDEM_POW_TRANS(f);
5
gap> IsIdempotent(f ^ m);
true
gap> f ^ (2 * m) = f ^ m;
true
gap> f := Transformation([523278214936334443494818,
103047341353315391937242621647972847,
2521502318422640404432745354014]);;
gap> SMALLEST_IDEM_POW_TRANS(f);
16
gap> f ^ 32 = f ^ 16;
true
gap> ForAny([1 .. 15], x -> f ^ (2 * x) = f ^ x);
false

# POW_KER_PERM 
gap> POW_KER_PERM([], (1,2,3));
[  ]
gap> POW_KER_PERM([1 .. 5], (1,2,3));
12345 ]
gap> POW_KER_PERM([1 .. 5] * 1, (1,2,3));
12345 ]
gap> POW_KER_PERM([1 .. 5] * 0 + 1, (1,2,3));
11111 ]
gap> POW_KER_PERM([1 .. 3], (1,2,3)(4,5));
123 ]
gap> POW_KER_PERM([1 .. 3] * 1, (1,2,3)(4,5));
123 ]
gap> POW_KER_PERM([1 .. 3] * 0 + 1, (1,2,3)(4,5));
111 ]
gap> POW_KER_PERM([1 .. 3], (1,2,3)(4,5));
123 ]
gap> POW_KER_PERM([1 .. 65537], (165537)) = [1 .. 65537];
true
gap> POW_KER_PERM([1 .. 65537] * 1, (165537)) = [1 .. 65537];
true
gap> POW_KER_PERM([1 .. 65538] * 0 + 1, (165537)) = [1 .. 65538] * 0 + 1;
true
gap> POW_KER_PERM([1 .. 100], (1,2,3)(6553765538)) = [1 .. 100];
true
gap> POW_KER_PERM([1 .. 100] * 1, (1,2,3)(6553765538)) = [1 .. 100];
true
gap> POW_KER_PERM([1 .. 100] * 0 + 1, (1,2,3)(6553765538)) = [1 .. 100] * 0 + 1;
true
gap> POW_KER_PERM([12], 1);
Error, POW_KER_PERM: <p> must be a permutation (not the integer 1)
gap> POW_KER_PERM(12);
Error, POW_KER_PERM: <p> must be a permutation (not the integer 2)
gap> Set(SymmetricGroup(3), p -> POW_KER_PERM([112], p)); 
[ [ 112 ], [ 121 ], [ 122 ] ]
gap> Set(SymmetricGroup(3), p -> POW_KER_PERM([123], p)); 
[ [ 123 ] ]
gap> Set(SymmetricGroup(3), p -> POW_KER_PERM([111], p)); 
[ [ 111 ] ]

# ON_KERNEL_ANTI_ACTION
gap> f := Transformation([8499973337077694118632942,
>  337556796389906498493589713702022611,
3997899048898585642106125985539926221,
3457441414925364598412877810833032534468,
732862348471479931523763497775511334791,
87876793185986]);;
gap> g := Transformation([1699736074179585497943366,
15447773415593846768699431229542106358,
347245393896734155729462762034522235,
75299822297840462861555690161212655526,
668936362561578338419323987852617839297,
4330155139444]);;
gap> ON_KERNEL_ANTI_ACTION(FlatKernelOfTransformation(g), f, 0);
12345678910111211513141511161718
  19920161821622232425263271617281629
  3014113132191933263435369373711113438
  18391403041312242433837842344452846
  111547245139487332554649303050471039
  44 ]
gap> last = FlatKernelOfTransformation(f * g);
true
gap> f := Transformation([212118181462917315218,
1712041912]) ^ (165537);;
gap> g := Transformation([11129132020214182073199,
18201811516]);;
gap> ON_KERNEL_ANTI_ACTION(FlatKernelOfTransformation(g, 65537), f, 0)
> = FlatKernelOfTransformation(f * g, 65537);
true
gap> ON_KERNEL_ANTI_ACTION([1 .. 65538], f, 0
> = FlatKernelOfTransformation(f, 65538);
true
gap> h := f * g ^ 3 * f * g * f ^ 10;
<transformation on 65537 pts with rank 65522>
gap> ON_KERNEL_ANTI_ACTION(FlatKernelOfTransformation(g), h, 0)
> = FlatKernelOfTransformation(h * g);
Error, ON_KERNEL_ANTI_ACTION: the length of <ker> must be at least 65537
gap> ON_KERNEL_ANTI_ACTION([1 .. 10], 
>                          Transformation([7143277665]), 0);
1234511667 ]
gap> ON_KERNEL_ANTI_ACTION([0], 
>                          Transformation([7143277665]), 15);
123451166789101112 ]
gap> ON_KERNEL_ANTI_ACTION([0], 
>                          Transformation([7143277665]), 5);
12345 ]
gap> ON_KERNEL_ANTI_ACTION([0], 
>                          Transformation([7143277665]), 10);
1234511667 ]
gap> ON_KERNEL_ANTI_ACTION([1 .. 15], 
>                          Transformation([7143277665]), 0);
123451166789101112 ]
gap> ON_KERNEL_ANTI_ACTION([1 .. 5], 
>                          Transformation([5153277665]), 0);
Error, ON_KERNEL_ANTI_ACTION: the length of <ker> must be at least 10
gap> ON_KERNEL_ANTI_ACTION([1 .. 5], IdentityTransformation, 0); 
12345 ]
gap> ON_KERNEL_ANTI_ACTION([1 .. 5], (), 0);
Error, ON_KERNEL_ANTI_ACTION: <f> must be a transformation (not a permutation \
(small))
gap> ON_KERNEL_ANTI_ACTION([], IdentityTransformation, 10);
[  ]
gap> ON_KERNEL_ANTI_ACTION([], IdentityTransformation, 10);
[  ]
gap> f := ID_TRANS4;;
gap> IsTrans4Rep(f);
true
gap> ON_KERNEL_ANTI_ACTION([], f, 10);
[  ]
gap> ON_KERNEL_ANTI_ACTION([], f, 10);
[  ]

# INV_KER_TRANS
gap> f := Transformation([95351031967]);;
gap> g := RightOne(f) * (2,4)(3,6,5);                                   
Transformation( [ 11663577 ] )
gap> ker := FlatKernelOfTransformation(g, DegreeOfTransformation(f));
1122345567 ]
gap> h := INV_KER_TRANS(ker, f);
Transformation( [ 776649101085 ] )
gap> OnKernelAntiAction(OnKernelAntiAction(ker, f), h) = ker;
true
gap> h * f * g = g;
true
gap> ker := FlatKernelOfTransformation(g, DegreeOfTransformation(f) + 2);
112234556789 ]
gap> h := INV_KER_TRANS(ker, f);
Transformation( [ 776649101085 ] )
gap> OnKernelAntiAction(OnKernelAntiAction(ker, f), h) = ker;
true
gap> h * f * g = g;
true
gap> f := AsTransformation((1,2,3));;
gap> h := INV_KER_TRANS([1 .. 65537], f);
Transformation( [ 312 ] )
gap> OnKernelAntiAction(OnKernelAntiAction([1 .. 65537], f), h) = [1 .. 65537];
true
gap> h * f * IdentityTransformation = IdentityTransformation;
true
gap> f := Transformation([95351031967]) ^ (165537);;
gap> g := RightOne(f) * (2,4)(3,6,5);;
gap> ker := FlatKernelOfTransformation(g, DegreeOfTransformation(f));;
gap> h := INV_KER_TRANS(ker, f);
<transformation on 65537 pts with rank 65534>
gap> OnKernelAntiAction(OnKernelAntiAction(ker, f), h) = ker;
true
gap> h * f * g = g;
true
gap> ker := FlatKernelOfTransformation(g, DegreeOfTransformation(f) + 2);;
gap> h := INV_KER_TRANS(ker, f);
<transformation on 65537 pts with rank 65534>
gap> OnKernelAntiAction(OnKernelAntiAction(ker, f), h) = ker;
true
gap> h * f * g = g;
true
gap> f := AsTransformation((1,2,65537));;
gap> h := INV_KER_TRANS([1 .. 65537], f);
<transformation on 65537 pts with rank 65537>
gap> OnKernelAntiAction(OnKernelAntiAction([1 .. 65537], f), h) = [1 .. 65537];
true
gap> h * f * IdentityTransformation = IdentityTransformation;
true
gap> f := AsTransformation((1,2)(3,65537));;
gap> h := INV_KER_TRANS([12], f);
Transformation( [ 21 ] )
gap> h := INV_KER_TRANS([12], [1]);
Error, INV_KER_TRANS: <f> must be a transformation (not a strictly-sorted plai\
n list of cyclotomics)

# IS_IDEM_TRANS
gap> IS_IDEM_TRANS(IdentityTransformation);
true
gap> IS_IDEM_TRANS(Transformation([121]));
true
gap> IS_IDEM_TRANS(Transformation([112]));
false
gap> IS_IDEM_TRANS(Transformation([65537], [1]));
true
gap> IS_IDEM_TRANS(Transformation([165537], [21]));
false
gap> IS_IDEM_TRANS(());
Error, IS_IDEM_TRANS: <f> must be a transformation (not a permutation (small))

# COMPONENT_REPS_TRANS
gap> COMPONENT_REPS_TRANS(Transformation([121]));
[ [ 3 ], [ 2 ] ]
gap> COMPONENT_REPS_TRANS(Transformation([111]));
[ [ 23 ] ]
gap> COMPONENT_REPS_TRANS(Transformation([112]));
[ [ 3 ] ]
gap> f := Transformation([2672699115]);;
gap> COMPONENT_REPS_TRANS(f);
[ [ 34810 ] ]
gap> f := Transformation([3819941051061211141315,
>                         16171819202122232425262728,
>                         313029]);;
gap> COMPONENT_REPS_TRANS(f);
[ [ 27 ], [ 1 ], [ 11 ], [ 13 ], [ 15 ], [ 16 ], [ 17 ], [ 18 ], [ 19 ], 
  [ 20 ], [ 21 ], [ 22 ], [ 23 ], [ 24 ], [ 25 ], [ 26 ], [ 27 ], [ 28 ], 
  [ 29 ], [ 30 ] ]
gap> COMPONENT_REPS_TRANS(IdentityTransformation);
[  ]
gap> f :=
> Transformation([94553154297716678869895362059,
94681706529783774485243293181355944942,
99463584527980785538970792784999733370,
776941186329423375567963899064984935100,
89713702022611399789904889858564210,
6125985539]);;
gap> COMPONENT_REPS_TRANS(f);
[ [ 116192324384450578691 ], 
  [ 51417212228303134404347515458606267
      68768283879296 ], [ 1272 ] ]
gap> Set(ComponentRepsOfTransformation(f), x ->
> Union(List(x, i -> ComponentTransformationInt(f, i))))
> = Set(ComponentsOfTransformation(f), AsSSortedList);
true
gap> f := Transformation([65537 .. 70000], 
>                        [65537 .. 70000] * 0 + 1
>         * (14918184141)(14140124);;
gap> COMPONENT_REPS_TRANS(f);;
gap> COMPONENT_REPS_TRANS("a");
Error, COMPONENT_REPS_TRANS: <f> must be a transformation (not a list (string)\
)

# NR_COMPONENTS_TRANS
gap> NR_COMPONENTS_TRANS(Transformation([121]));
2
gap> NR_COMPONENTS_TRANS(Transformation([111]));
1
gap> NR_COMPONENTS_TRANS(Transformation([112]));
1
gap> f := Transformation([2672699115]);;
gap> NR_COMPONENTS_TRANS(f);
1
gap> f := Transformation([3819941051061211141315,
>                         16171819202122232425262728,
>                         313029]);;
gap> NR_COMPONENTS_TRANS(f);
20
gap> NR_COMPONENTS_TRANS(IdentityTransformation);
0
gap> f :=
> Transformation([94553154297716678869895362059,
94681706529783774485243293181355944942,
99463584527980785538970792784999733370,
776941186329423375567963899064984935100,
89713702022611399789904889858564210,
6125985539]);;
gap> NR_COMPONENTS_TRANS(f);
3
gap> f := Transformation([65537 .. 70000], 
>                        [65537 .. 70000] * 0 + 1
>         * (14918184141)(14140124);;
gap> NR_COMPONENTS_TRANS(f);
65533
gap> NR_COMPONENTS_TRANS("a");
Error, NR_COMPONENTS_TRANS: <f> must be a transformation (not a list (string))

# COMPONENTS_TRANS
gap> COMPONENTS_TRANS(Transformation([121]));
[ [ 13 ], [ 2 ] ]
gap> COMPONENTS_TRANS(Transformation([111]));
[ [ 123 ] ]
gap> COMPONENTS_TRANS(Transformation([112]));
[ [ 123 ] ]
gap> COMPONENTS_TRANS(Transformation([2672699115]));
[ [ 12693745810 ] ]
gap> COMPONENTS_TRANS(Transformation([3819941051061211,
>                                     14131516171819202122,
>                                     232425262728313029]));;
gap> COMPONENTS_TRANS(IdentityTransformation);
[  ]
gap> COMPONENTS_TRANS(Transformation([9455315429771667886,
>                                     9895362059946817065,
>                                     2978377448524329318,
>                                     13559449429946358452,
>                                     7980785538970792784,
>                                     9997333707769411863,
>                                     29423375567963899064,
>                                     9849351008971370202,
>                                     2611399789904889858,
>                                     5642106125985539]));
[ [ 197716433552458535316594152991981
      23782437273846445057778691 ], 
  [ 4152070908948542796972574354986656
      10881113951436179418216575100392229
      322628309331344084438047515473586960
      6163626768768283879296 ], [ 129872 ] ]
gap> comps := COMPONENTS_TRANS(Transformation([65537 .. 70000], 
>                                             [65537 .. 70000] * 0 + 1
>                              * (14918184141)(14140124));;
gap> Length(comps);
65533
gap> Union(comps) = [1 .. 70000];
true
gap> COMPONENTS_TRANS("a");
Error, COMPONENTS_TRANS: <f> must be a transformation (not a list (string))

# COMPONENT_TRANS_INT
gap> COMPONENT_TRANS_INT(Transformation([121]), 1);
1 ]
gap> COMPONENT_TRANS_INT(Transformation([121]), 2);
2 ]
gap> COMPONENT_TRANS_INT(Transformation([121]), 3);
31 ]
gap> COMPONENT_TRANS_INT(Transformation([121]), 5);
5 ]
gap> COMPONENT_TRANS_INT(Transformation([111]), 1);
1 ]
gap> COMPONENT_TRANS_INT(Transformation([111]), 2);
21 ]
gap> COMPONENT_TRANS_INT(Transformation([111]), 3);
31 ]
gap> COMPONENT_TRANS_INT(Transformation([111]), 5);
5 ]
gap> COMPONENT_TRANS_INT(Transformation([112]), 1);
1 ]
gap> COMPONENT_TRANS_INT(Transformation([112]), 2);
21 ]
gap> COMPONENT_TRANS_INT(Transformation([112]), 3);
321 ]
gap> COMPONENT_TRANS_INT(Transformation([112]), 5);
5 ]
gap> COMPONENT_TRANS_INT(Transformation([2672699115]), 1);
1269 ]
gap> COMPONENT_TRANS_INT(Transformation([2672699115]), 2);
2691 ]
gap> COMPONENT_TRANS_INT(Transformation([2672699115]), 3);
379126 ]
gap> COMPONENT_TRANS_INT(Transformation([2672699115]), 4);
42691 ]
gap> COMPONENT_TRANS_INT(Transformation([2672699115]), 5);
56912 ]
gap> COMPONENT_TRANS_INT(Transformation([2672699115]), 6);
6912 ]
gap> COMPONENT_TRANS_INT(Transformation([2672699115]), 7);
79126 ]
gap> COMPONENT_TRANS_INT(Transformation([2672699115]), 8);
81269 ]
gap> COMPONENT_TRANS_INT(Transformation([2672699115]), 9);
9126 ]
gap> COMPONENT_TRANS_INT(Transformation([2672699115]), 10);
1056912 ]
gap> COMPONENT_TRANS_INT(Transformation([2672699115]), 20);
20 ]
gap> COMPONENT_TRANS_INT(Transformation([38199410510612,
>                                        111413151617181920,
>                                        212223242526272831,
>                                        3029]), 10);
10649 ]
gap> COMPONENT_TRANS_INT(Transformation([38199410510612,
>                                        111413151617181920,
>                                        212223242526272831,
>                                        3029]), 40);
40 ]
gap> COMPONENT_TRANS_INT(Transformation([38199410510612,
>                                        111413151617181920,
>                                        212223242526272831,
>                                        3029]), 1);
13 ]
gap> COMPONENT_TRANS_INT(IdentityTransformation, 10);
10 ]
gap> COMPONENT_TRANS_INT(IdentityTransformation, 0);
Error, COMPONENT_TRANS_INT: <pt> must be a positive small integer (not the int\
eger 0)
gap> COMPONENT_TRANS_INT(IdentityTransformation, "a");
Error, COMPONENT_TRANS_INT: <pt> must be a positive small integer (not a list \
(string))
gap> COMPONENT_TRANS_INT((), 1);
Error, COMPONENT_TRANS_INT: <f> must be a transformation (not a permutation (s\
mall))
gap> COMPONENT_TRANS_INT(Transformation([9455315429771667886,
>                                     9895362059946817065,
>                                     2978377448524329318,
>                                     13559449429946358452,
>                                     7980785538970792784,
>                                     9997333707769411863,
>                                     29423375567963899064,
>                                     9849351008971370202,
>                                     2611399789904889858,
>                                     5642106125985539]), 1);
19771643355 ]
gap> COMPONENT_TRANS_INT(Transformation([65537 .. 70000], 
>                                       [65537 .. 70000] * 0 + 1
>                        * (14918184141)(14140124), 1);
1 ]
gap> COMPONENT_TRANS_INT(Transformation([65537 .. 70000], 
>                                       [65537 .. 70000] * 0 + 1
>                        * (14918184141)(14140124), 14918);
14918184141 ]
gap> COMPONENT_TRANS_INT(Transformation([65537 .. 70000], 
>                                       [65537 .. 70000] * 0 + 1
>                        * (14918184141)(14140124), 69999);
699991 ]

# CYCLE_TRANS_INT
gap> CYCLE_TRANS_INT(Transformation([121]), 1);
1 ]
gap> CYCLE_TRANS_INT(Transformation([121]), 2);
2 ]
gap> CYCLE_TRANS_INT(Transformation([121]), 3);
1 ]
gap> CYCLE_TRANS_INT(Transformation([121]), 5);
5 ]
gap> CYCLE_TRANS_INT(Transformation([111]), 1);
1 ]
gap> CYCLE_TRANS_INT(Transformation([111]), 2);
1 ]
gap> CYCLE_TRANS_INT(Transformation([111]), 3);
1 ]
gap> CYCLE_TRANS_INT(Transformation([111]), 5);
5 ]
gap> CYCLE_TRANS_INT(Transformation([112]), 1);
1 ]
gap> CYCLE_TRANS_INT(Transformation([112]), 2);
1 ]
gap> CYCLE_TRANS_INT(Transformation([112]), 3);
1 ]
gap> CYCLE_TRANS_INT(Transformation([112]), 5);
5 ]
gap> CYCLE_TRANS_INT(Transformation([2672699115]), 1);
1269 ]
gap> CYCLE_TRANS_INT(Transformation([2672699115]), 2);
2691 ]
gap> CYCLE_TRANS_INT(Transformation([2672699115]), 3);
9126 ]
gap> CYCLE_TRANS_INT(Transformation([2672699115]), 4);
2691 ]
gap> CYCLE_TRANS_INT(Transformation([2672699115]), 5);
6912 ]
gap> CYCLE_TRANS_INT(Transformation([2672699115]), 6);
6912 ]
gap> CYCLE_TRANS_INT(Transformation([2672699115]), 7);
9126 ]
gap> CYCLE_TRANS_INT(Transformation([2672699115]), 8);
1269 ]
gap> CYCLE_TRANS_INT(Transformation([2672699115]), 9);
9126 ]
gap> CYCLE_TRANS_INT(Transformation([2672699115]), 10);
6912 ]
gap> CYCLE_TRANS_INT(Transformation([2672699115]), 20);
20 ]
gap> CYCLE_TRANS_INT(Transformation([38199410510612,
>                                        111413151617181920,
>                                        212223242526272831,
>                                        3029]), 10);
10649 ]
gap> CYCLE_TRANS_INT(Transformation([38199410510612,
>                                        111413151617181920,
>                                        212223242526272831,
>                                        3029]), 40);
40 ]
gap> CYCLE_TRANS_INT(Transformation([38199410510612,
>                                        111413151617181920,
>                                        212223242526272831,
>                                        3029]), 1);
13 ]
gap> CYCLE_TRANS_INT(IdentityTransformation, 10);
10 ]
gap> CYCLE_TRANS_INT(IdentityTransformation, 0);
Error, CYCLE_TRANS_INT: <pt> must be a positive small integer (not the integer\
 0)
gap> CYCLE_TRANS_INT(IdentityTransformation, "a");
Error, CYCLE_TRANS_INT: <pt> must be a positive small integer (not a list (str\
ing))
gap> CYCLE_TRANS_INT((), 1);
Error, CYCLE_TRANS_INT: <f> must be a transformation (not a permutation (small\
))
gap> CYCLE_TRANS_INT(Transformation([9455315429771667886,
>                                     9895362059946817065,
>                                     2978377448524329318,
>                                     13559449429946358452,
>                                     7980785538970792784,
>                                     9997333707769411863,
>                                     29423375567963899064,
>                                     9849351008971370202,
>                                     2611399789904889858,
>                                     5642106125985539]), 1);
3355 ]
gap> CYCLE_TRANS_INT(Transformation([65537 .. 70000], 
>                                   [65537 .. 70000] * 0 + 1
>                    * (14918184141)(14140124), 1);
1 ]
gap> CYCLE_TRANS_INT(Transformation([65537 .. 70000], 
>                                   [65537 .. 70000] * 0 + 1
>                    * (14918184141)(14140124), 14918);
14918184141 ]
gap> CYCLE_TRANS_INT(Transformation([65537 .. 70000], 
>                                   [65537 .. 70000] * 0 + 1
>                    * (14918184141)(14140124), 69999);
1 ]

# CYCLES_TRANS
gap> CYCLES_TRANS(Transformation([121]));
[ [ 1 ], [ 2 ] ]
gap> CYCLES_TRANS(Transformation([111]));
[ [ 1 ] ]
gap> CYCLES_TRANS(Transformation([112]));
[ [ 1 ] ]
gap> CYCLES_TRANS(Transformation([2672699115]));
[ [ 1269 ] ]
gap> CYCLES_TRANS(Transformation([38199410510612,
>                                        111413151617181920,
>                                        212223242526272831,
>                                        3029]));
[ [ 13 ], [ 91064 ], [ 1112 ], [ 1314 ], [ 15 ], [ 16 ], [ 17 ], 
  [ 18 ], [ 19 ], [ 20 ], [ 21 ], [ 22 ], [ 23 ], [ 24 ], [ 25 ], [ 26 ], 
  [ 27 ], [ 28 ], [ 2931 ], [ 30 ] ]
gap> CYCLES_TRANS(IdentityTransformation);
[  ]
gap> CYCLES_TRANS(Transformation([9455315429771667886,
>                                 9895362059946817065,
>                                 2978377448524329318,
>                                 13559449429946358452,
>                                 7980785538970792784,
>                                 9997333707769411863,
>                                 29423375567963899064,
>                                 9849351008971370202,
>                                 2611399789904889858,
>                                 5642106125985539]));
[ [ 3355 ], [ 70908948 ], [ 98 ] ]
gap> f := Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1)
>         * (14918184141)(14140124);;
gap> comps := CYCLES_TRANS(f);;
gap> Length(comps) = NR_COMPONENTS_TRANS(f);
true
gap> Filtered(comps, x -> Size(x) > 1);
[ [ 12414140 ], [ 14114918184 ] ]
gap> CYCLES_TRANS(0);
Error, CYCLES_TRANS: <f> must be a transformation (not the integer 0)

# CYCLES_TRANS_LIST
gap> CYCLES_TRANS_LIST(Transformation([121]), []);
[  ]
gap> CYCLES_TRANS_LIST(Transformation([121]), [13]);
[ [ 1 ] ]
gap> CYCLES_TRANS_LIST(Transformation([121]), [123]);
[ [ 1 ], [ 2 ] ]
gap> CYCLES_TRANS_LIST(Transformation([121]), [1 .. 3]);
[ [ 1 ], [ 2 ] ]
gap> CYCLES_TRANS_LIST(Transformation([121]), [1 .. 10]);
[ [ 1 ], [ 2 ], [ 4 ], [ 5 ], [ 6 ], [ 7 ], [ 8 ], [ 9 ], [ 10 ] ]
gap> CYCLES_TRANS_LIST(Transformation([111]), [1]);
[ [ 1 ] ]
gap> CYCLES_TRANS_LIST(Transformation([111]), [2]);
[ [ 1 ] ]
gap> CYCLES_TRANS_LIST(Transformation([111]), [3]);
[ [ 1 ] ]
gap> CYCLES_TRANS_LIST(Transformation([111]), [1 .. 3]);
[ [ 1 ] ]
gap> CYCLES_TRANS_LIST(Transformation([111]), [3 .. 10]);
[ [ 1 ], [ 4 ], [ 5 ], [ 6 ], [ 7 ], [ 8 ], [ 9 ], [ 10 ] ]
gap> CYCLES_TRANS_LIST(Transformation([112]), [1]);
[ [ 1 ] ]
gap> CYCLES_TRANS_LIST(Transformation([112]), [2]);
[ [ 1 ] ]
gap> CYCLES_TRANS_LIST(Transformation([112]), [3]);
[ [ 1 ] ]
gap> CYCLES_TRANS_LIST(Transformation([112]), [1 .. 3]);
[ [ 1 ] ]
gap> CYCLES_TRANS_LIST(Transformation([112]), [3 .. 10]);
[ [ 1 ], [ 4 ], [ 5 ], [ 6 ], [ 7 ], [ 8 ], [ 9 ], [ 10 ] ]
gap> CYCLES_TRANS_LIST(Transformation([2672699115]), 
>                                     [1 .. 10]);
[ [ 1269 ] ]
gap> CYCLES_TRANS_LIST(Transformation([2672699115]), 
>                                     [1 .. 3]);
[ [ 1269 ] ]
gap> CYCLES_TRANS_LIST(Transformation([2672699115]), 
>                                     [1537]);
[ [ 1269 ] ]
gap> CYCLES_TRANS_LIST(Transformation([2672699115]), 
>                                     [1537121314]);
[ [ 1269 ], [ 12 ], [ 13 ], [ 14 ] ]
gap> CYCLES_TRANS_LIST(Transformation([38199410510612,
>                                        111413151617181920,
>                                        212223242526272831,
>                                        3029]), [4 .. 100]);
[ [ 49106 ], [ 1112 ], [ 1314 ], [ 15 ], [ 16 ], [ 17 ], [ 18 ], 
  [ 19 ], [ 20 ], [ 21 ], [ 22 ], [ 23 ], [ 24 ], [ 25 ], [ 26 ], [ 27 ], 
  [ 28 ], [ 2931 ], [ 30 ], [ 32 ], [ 33 ], [ 34 ], [ 35 ], [ 36 ], [ 37 ], 
  [ 38 ], [ 39 ], [ 40 ], [ 41 ], [ 42 ], [ 43 ], [ 44 ], [ 45 ], [ 46 ], 
  [ 47 ], [ 48 ], [ 49 ], [ 50 ], [ 51 ], [ 52 ], [ 53 ], [ 54 ], [ 55 ], 
  [ 56 ], [ 57 ], [ 58 ], [ 59 ], [ 60 ], [ 61 ], [ 62 ], [ 63 ], [ 64 ], 
  [ 65 ], [ 66 ], [ 67 ], [ 68 ], [ 69 ], [ 70 ], [ 71 ], [ 72 ], [ 73 ], 
  [ 74 ], [ 75 ], [ 76 ], [ 77 ], [ 78 ], [ 79 ], [ 80 ], [ 81 ], [ 82 ], 
  [ 83 ], [ 84 ], [ 85 ], [ 86 ], [ 87 ], [ 88 ], [ 89 ], [ 90 ], [ 91 ], 
  [ 92 ], [ 93 ], [ 94 ], [ 95 ], [ 96 ], [ 97 ], [ 98 ], [ 99 ], [ 100 ] ]
gap> CYCLES_TRANS_LIST(IdentityTransformation, [1 .. 10]);
[ [ 1 ], [ 2 ], [ 3 ], [ 4 ], [ 5 ], [ 6 ], [ 7 ], [ 8 ], [ 9 ], [ 10 ] ]
gap> CYCLES_TRANS_LIST(IdentityTransformation, [100200]);
[ [ 100 ], [ 200 ] ]
gap> CYCLES_TRANS_LIST(IdentityTransformation, [512]);
[ [ 5 ], [ 1 ], [ 2 ] ]
gap> f := Transformation([65537 .. 70000], [65537 .. 70000] * 0 + 1)
>         * (14918184141)(14140124);;
gap> CYCLES_TRANS_LIST(f, [1 .. 10]);
[ [ 1 ], [ 2 ], [ 3 ], [ 4 ], [ 5 ], [ 6 ], [ 7 ], [ 8 ], [ 9 ], [ 10 ] ]
gap> CYCLES_TRANS_LIST(f, [1013]);
[ [ 10 ], [ 1 ], [ 3 ] ]
gap> CYCLES_TRANS_LIST(f, [65535 .. 70000]);
[ [ 65535 ], [ 65536 ], [ 1 ] ]
gap> CYCLES_TRANS_LIST(f, [65535 .. 70001]);
[ [ 65535 ], [ 65536 ], [ 1 ], [ 70001 ] ]
gap> CYCLES_TRANS_LIST(f, [1, , 3]);
Error, List Element: <list>[2] must have an assigned value
gap> CYCLES_TRANS_LIST(f, [-1]);
Error, CYCLES_TRANS_LIST: <list>[1] must be a positive small integer (not the \
integer -1)
gap> CYCLES_TRANS_LIST(0, [1 .. 10]);
Error, CYCLES_TRANS_LIST: <f> must be a transformation (not the integer 0)
gap> CYCLES_TRANS_LIST(IdentityTransformation, "a");
Error, CYCLES_TRANS_LIST: <list>[1] must be a positive small integer (not a ch\
aracter)
gap> CYCLES_TRANS_LIST(IdentityTransformation, ());
Error, CYCLES_TRANS_LIST: <list> must be a small list (not a permutation (smal\
l))
gap> CYCLES_TRANS_LIST(IdentityTransformation, [0, -1]);
Error, CYCLES_TRANS_LIST: <list>[1] must be a positive small integer (not the \
integer 0)

# LEFT_ONE_TRANS
gap> f := Transformation([7779539756]);;
gap> e := LEFT_ONE_TRANS(f);
Transformation( [ 111456415 ] )
gap> IsIdempotent(e);
true
gap> KernelOfTransformation(e, 10) = KernelOfTransformation(f);
true
gap> e * f = f;
true
gap> f := Transformation([169788473]);;
gap> e := LEFT_ONE_TRANS(f);
Transformation( [ 12345574 ] )
gap> IsIdempotent(e);
true
gap> KernelOfTransformation(e, 9) = KernelOfTransformation(f);
true
gap> e * f = f;
true
gap> f := Transformation([15996641076]);
Transformation( [ 15996641076 ] )
gap> e := LEFT_ONE_TRANS(f);
Transformation( [ 1233557895 ] )
gap> IsIdempotent(e);
true
gap> KernelOfTransformation(e, 10) = KernelOfTransformation(f);
true
gap> e * f = f;
true
gap> f := Transformation( [ 6335691861 ] )
>  * (65534,65535)(65537,65538)(65539,65540);
<transformation on 65540 pts with rank 65536>
gap> e := LEFT_ONE_TRANS(f);
Transformation( [ 1224167817 ] )
gap> IsIdempotent(e);
true
gap> KernelOfTransformation(e, 65540) = KernelOfTransformation(f);
true
gap> e * f = f;
true
gap> f := Transformation( [ 97828541078 ] )
> * (912,11041,3297,7593,8859)(3214,66460,7897)(70310,8320);
<transformation on 70310 pts with rank 70307>
gap> e := LEFT_ONE_TRANS(f);
Transformation( [ 1234367823 ] )
gap> IsIdempotent(e);
true
gap> KernelOfTransformation(e, 70310) = KernelOfTransformation(f);
true
gap> e * f = f;
true
gap> LEFT_ONE_TRANS("a");
Error, LEFT_ONE_TRANS: <f> must be a transformation (not a list (string))

# RIGHT_ONE_TRANS
gap> f := Transformation([7779539756]);;
gap> e := RIGHT_ONE_TRANS(f);
Transformation( [ 3333567799 ] )
gap> IsIdempotent(e);
true
gap> ImageSetOfTransformation(e, 10) = ImageSetOfTransformation(f);
true
gap> f * e = f;
true
gap> f := Transformation([169788473]);;
gap> e := RIGHT_ONE_TRANS(f);
Transformation( [ 11344 ] )
gap> IsIdempotent(e);
true
gap> ImageSetOfTransformation(e, 9) = ImageSetOfTransformation(f);
true
gap> f * e = f;
true
gap> f := Transformation([15996641076]);
Transformation( [ 15996641076 ] )
gap> e := RIGHT_ONE_TRANS(f);
Transformation( [ 11145677 ] )
gap> IsIdempotent(e);
true
gap> ImageSetOfTransformation(e, 10) = ImageSetOfTransformation(f);
true
gap> f * e = f;
true
gap> f := Transformation( [ 6335691861 ] )
>  * (65534,65535)(65537,65538)(65539,65540);
<transformation on 65540 pts with rank 65536>
gap> e := RIGHT_ONE_TRANS(f);
Transformation( [ 1133566899 ] )
gap> IsIdempotent(e);
true
gap> ImageSetOfTransformation(e, 65540) = ImageSetOfTransformation(f);
true
gap> f * e = f;
true
gap> f := Transformation( [ 97828541078 ] )
> * (912,11041,3297,7593,8859)(3214,66460,7897)(70310,8320);
<transformation on 70310 pts with rank 70307>
gap> e := RIGHT_ONE_TRANS(f);
Transformation( [ 222455 ] )
gap> IsIdempotent(e);
true
gap> ImageSetOfTransformation(e, 70310) = ImageSetOfTransformation(f);
true
gap> f * e = f;
true
gap> RIGHT_ONE_TRANS("a");
Error, RIGHT_ONE_TRANS: <f> must be a transformation (not a list (string))

# TRANS_IMG_CONJ
gap> f := Transformation([121]);;
gap> g := Transformation([3231]);;
gap> p := TRANS_IMG_CONJ(f, g);
(1,3,4)
gap> OnTuples(ImageListOfTransformation(f, 4), p);
3231 ]
gap> ImageListOfTransformation(g);
3231 ]
gap> TRANS_IMG_CONJ(g, f);
(1,4,3)
gap> g := Transformation([3231]) ^ (565537);;
gap> TRANS_IMG_CONJ(f, g);
(1,3,4)
gap> TRANS_IMG_CONJ(g, f);
(1,4,3)
gap> f := Transformation([121]) ^ (565538);;
gap> TRANS_IMG_CONJ(f, g);
(1,3,4)
gap> TRANS_IMG_CONJ(g, f);
(1,4,3)
gap> TRANS_IMG_CONJ((), 1);
Error, TRANS_IMG_CONJ: <f> must be a transformation (not a permutation (small)\
)
gap> TRANS_IMG_CONJ(f, 1);
Error, TRANS_IMG_CONJ: <g> must be a transformation (not the integer 1)
gap> f := Transformation([1191067710710974]);;
gap> TRANS_IMG_CONJ(f, LeftOne(f));
(1,6,4,12,11)(2,7,5,9)(3,8,10)
gap> TRANS_IMG_CONJ(LeftOne(f), f);
(1,11,12,4,6)(2,9,5,7)(3,10,8)
gap> f := ID_TRANS4;;
gap> IsTrans4Rep(f);
true
gap> TRANS_IMG_CONJ(Transformation([213]), f);
(1,2)
gap> TRANS_IMG_CONJ(f, Transformation([213]));
(1,2)

# One, IsOne, IdentityTransformation
gap> f := Transformation([1191067710710974]);;
gap> One(f);
IdentityTransformation
gap> IdentityTransformation;
IdentityTransformation
gap> One(f) = IdentityTransformation;
true
gap> f ^ 0;
IdentityTransformation
gap> IsOne(f ^ 0);
true
gap> IsOne(IdentityTransformation);
true
gap> IsOne(One(f));
true
gap> f := Transformation([655371], [165537]);;
gap> One(f);
IdentityTransformation
gap> IdentityTransformation;
IdentityTransformation
gap> One(f) = IdentityTransformation;
true
gap> f ^ 0;
IdentityTransformation
gap> IsOne(f ^ 0);
true
gap> IsOne(IdentityTransformation);
true
gap> IsOne(One(f));
true

# \=, equality, EQ
gap> f := Transformation([2672613991311111312]);;
gap> g := Transformation([5381211199414105106]);;
gap> f = f;
true
gap> f = g;
false
gap> g = f;
false
gap> f := Transformation([121]);
Transformation( [ 121 ] )
gap> g := Transformation([12135]);
Transformation( [ 1213 ] )
gap> f = g;
false
gap> f := Transformation([121]);
Transformation( [ 121 ] )
gap> g := Transformation([12145]);
Transformation( [ 121 ] )
gap> f = g;
true
gap> g = f;
true
gap> f := Transformation([12145]);
Transformation( [ 121 ] )
gap> g := Transformation([131]);
Transformation( [ 131 ] )
gap> f = g;
false
gap> f := Transformation([65537], [1]);;
gap> g := Transformation([1], [65537]);;
gap> f = f;
true
gap> f = g;
false
gap> g = f;
false
gap> f ^ (265537) = Transformation([11]);
true
gap> Transformation([11]) = f ^ (265537);
true
gap> f ^ (365537) = Transformation([11]);
false
gap> Transformation([11]) = f ^ (365537);
false
gap> f ^ (365537) = Transformation([1122]);
false
gap> Transformation([1122]) = f ^ (365537);
false
gap> f := Transformation([65538], [1]);;
gap> g := Transformation([1], [65537]);;
gap> f = g;
false
gap> g = f;
false
gap> f := Transformation([1], [65537]);;
gap> g := AsTransformation((65535655366553765538)(6553965540)) ^ 2;;
gap> g = f;
false
gap> f = g;
false
gap> f := AsTransformation((65535265537)(6553965540)) ^ 2;;
gap> g := AsTransformation((655356553665537));;
gap> g = f;
false
gap> f = g;
false
gap> f = f;
true
gap> f = f;
true
gap> f := Transformation([121]);;
gap> g := Transformation([123456], [1215465537]);;
gap> f = g;
false
gap> g = f;
false
gap> f := ID_TRANS4;;
gap> IsTrans4Rep(f);
true
gap> Transformation([12354]) = f * (12);
false
gap> f * (12) = Transformation([12354]);
false
gap> Transformation([21345]) = f * (12);
true
gap> f * (12) = Transformation([21345]);
true
gap> Transformation([21354]) = f * (12);
false
gap> f * (12) = Transformation([21354]);
false

# \<, less than, LT
gap> f := Transformation([8827911776319]);;
gap> g := Transformation([3734109471531]);;
gap> f < f;
false
gap> g < g;
false
gap> f < g;
false
gap> g < f;
true
gap> f := Transformation([88279117763191314]);;
gap> g := Transformation([3734109471531]);;
gap> f < g;
false
gap> g < f;
true
gap> f := Transformation([8827911776319]);;
gap> g := Transformation([37341094715311314]);;
gap> f < g;
false
gap> g < f;
true
gap> f := Transformation([8827911776319]);;
gap> g := Transformation([88279117763199]);;
gap> f < g;
false
gap> g < f;
true
gap> f := Transformation([8827911776319]);;
gap> g := Transformation([88279117763191413]);;
gap> f < g;
true
gap> g < f;
false
gap> f := Transformation([88279117763199]);;
gap> g := Transformation([8827911776319]);;
gap> f < g;
true
gap> g < f;
false
gap> f := Transformation([882791177631913]);;
gap> g := Transformation([8827911776319]);;
gap> f < g;
false
gap> g < f;
false
gap> f := Transformation([121]);;
gap> g := Transformation([1], [65537]);;
gap> f < g;
true
gap> g < f;
false
gap> f := Transformation([221]);;
gap> g := Transformation([65537], [1]);;
gap> f < g;
false
gap> g < f;
true
gap> f := Transformation([221]);;
gap> g := Transformation([12365537], [2211]);;
gap> f < g;
false
gap> g < f;
true
gap> f := Transformation([121]);
Transformation( [ 121 ] )
gap> g := Transformation([1234], [12165537]);
<transformation on 65537 pts with rank 65535>
gap> f < g;
true
gap> g < f;
false
gap> f := Transformation([121]);
Transformation( [ 121 ] )
gap> g := Transformation([1236553865537], [1216553765538]) ^ 2;
Transformation( [ 121 ] )
gap> f < g;
false
gap> g < f;
false
gap> g := Transformation([1236553865537], 
>                        [1216553765538]) ^ 2;;
gap> g < g;
false
gap> f := Transformation([1236553765538], 
>                        [1116553865539]);;
gap> f < g;
true
gap> g < f;
false
gap> f := Transformation([1236553765538], 
>                        [1216553865538]);;
gap> g := Transformation([123655376553865539], 
>                        [121655386553865537]);;
gap> f < g;
false
gap> g < f;
true
gap> g := Transformation([123655376553865539], 
>                        [121655386553865539]);;
gap> f < g;
false
gap> g < f;
false
gap> f := Transformation([1236553765538], 
>                        [1216553865538]);;
gap> g := Transformation([12365537655386553965540], 
>                        [12165538655386554065539]) ^ 2;;
gap> f < g;
false
gap> g < f;
false
gap> f := Transformation([1236553765538], 
>                        [1216553865538]);;
gap> g := Transformation([1236553765538], 
>                        [2216553865538]);;
gap> f < g;
true
gap> g < f;
false
gap> f := Transformation([1236553765538], 
>                        [1216553865538]);;
gap> g := Transformation([12365537655386553965540], 
>                        [12165538655386554065540]);;
gap> f < g;
true
gap> g < f;
false
gap> f := Transformation([12365537655386553965540], 
>                        [13165538655386554065540]);;
gap> g := Transformation([1236553765538], 
>                        [1216553865538]);;
gap> f < g;
false
gap> g < f;
true
gap> x := (2 ^ 162 ^ 16 + 1);
(65536,65537)
gap> y := AsTransformation(x);
<transformation on 65537 pts with rank 65537>
gap> IsTrans4Rep(y);
true
gap> x := y ^ 2;
IdentityTransformation
gap> IsTrans4Rep(x);
true
gap> x < Transformation([213]);
true
gap> x < Transformation([113]);
false
gap> f := ID_TRANS4;;
gap> IsTrans4Rep(f);
true
gap> Transformation([12354]) < f * (12);
true
gap> Transformation([32354]) < f * (12);
false
gap> f * (12) < Transformation([12354]);
false
gap> f * (12) < Transformation([32354]);
true
gap> f * (12) < Transformation([12354]);
false
gap> Transformation([21345]) < f * (12);
false
gap> Transformation([21445]) < f * (12);
false
gap> Transformation([21145]) < f * (12);
true
gap> f * (12) < Transformation([21345]);
false
gap> f * (12) < Transformation([21445]);
true
gap> f * (12) < Transformation([21145]);
false

# \*, product, PROD: transformation and transformation
gap> f := Transformation([88279117763191314]);;
gap> g := Transformation([3734109471531]);;
gap> f * g;
Transformation( [ 777413449331 ] )
gap> g * f;
Transformation( [ 272736778928 ] )
gap> f := Transformation([121]);;
gap> g := Transformation([1], [65537]);;
gap> f * g;
<transformation on 65537 pts with rank 65535>
gap> g * f;
<transformation on 65537 pts with rank 65536>
gap> g ^ 2;
<transformation on 65537 pts with rank 65536>
gap> f := Transformation([1], [65537]);;
gap> g := Transformation([1], [65538]);;
gap> h := f * g;
<transformation on 65537 pts with rank 65536>
gap> ForAll([1 .. 65537], i -> (i ^ f) ^ g = i ^ h);  
true
gap> h := g * h;
<transformation on 65538 pts with rank 65537>
gap> ForAll([1 .. 65538], i -> (i ^ g) ^ f = i ^ h);  
true
gap> f := Transformation([3244]);;
gap> g := Transformation([2121]);;
gap> f * g;
Transformation( [ 2111 ] )
gap> g * f;
Transformation( [ 2323 ] )
gap> f * g * f * g * f * g; 
Transformation( [ 2111 ] )
gap> f := ID_TRANS4;;
gap> IsTrans4Rep(f);
true
gap> Transformation([12354]) * (f * (12));
Transformation( [ 21354 ] )
gap> Transformation([32354]) * (f * (12));
Transformation( [ 31354 ] )
gap> (f * (12)) * Transformation([12354]);
Transformation( [ 21354 ] )
gap> (f * (12)) * Transformation([32354]);
Transformation( [ 23354 ] )
gap> (f * (12)) * Transformation([12354]);
Transformation( [ 21354 ] )
gap> Transformation([21345]) * (f * (12));
IdentityTransformation
gap> Transformation([21445]) * (f * (12));
Transformation( [ 1244 ] )
gap> Transformation([21145]) * (f * (12));
Transformation( [ 122 ] )
gap> (f * (12)) * Transformation([21345]);
IdentityTransformation
gap> (f * (12)) * Transformation([21445]);
Transformation( [ 1244 ] )
gap> (f * (12)) * Transformation([21145]);
Transformation( [ 121 ] )

# \*, PROD, product: for a transformation and a permutation
gap> Transformation([1421]) * (12);
Transformation( [ 2412 ] )
gap> Transformation([1421]) * (125);
Transformation( [ 24521 ] )
gap> Transformation([1421]) * (165537);
<transformation on 65537 pts with rank 65536>
gap> Transformation([1421]) * (125);
Transformation( [ 24521 ] )
gap> Transformation([1], [65537]) * (125);
<transformation on 65537 pts with rank 65536>
gap> Transformation([1], [65537]) * (655372);
<transformation on 65537 pts with rank 65536>
gap> Transformation([1], [65538]) * (655372);
<transformation on 65538 pts with rank 65537>
gap> Transformation([1], [65537]) * (655382);
<transformation on 65538 pts with rank 65537>
gap> f := Transformation([8197764224]);;
gap> p := (12)(79651100);;
gap> g := f * p;
<transformation on 1100 pts with rank 1097>
gap> ForAll([1 .. 10], i -> (i ^ f) ^ p = i ^ g);  
true
gap> f * (17946);
Transformation( [ 8749916226 ] )
gap> f * (1107946);
Transformation( [ 81049916226 ] )
gap> f * (1117946);
Transformation( [ 811499162267 ] )
gap> f * (11278);
Transformation( [ 11298864224117 ] )
gap> f * (1985)(2743610);
Transformation( [ 59844103773 ] )
gap> f := Transformation([55210101011211936]);;
gap> f * (123);
Transformation( [ 55310101021211916 ] )
gap> p := (14128)(216155792014111710)(313619);;
gap> g := f * p;
Transformation( [ 7716222481720131961151510,
  18314 ] )
gap> ForAll([1 .. 20], i -> (i ^ f) ^ p = i ^ g);
true
gap> p := (275103412116)(89);;
gap> f * p;
Transformation( [ 101073331116842 ] )
gap> p := (123);;
gap> f * p;
Transformation( [ 55310101021211916 ] )
gap> f := Transformation([8197764224]);;
gap> f * (1102367)(1115)(121719162018);
Transformation( [ 8109117433415171314112019,
  121618 ] )
gap> f := ID_TRANS4;;
gap> IsTrans4Rep(f);
true
gap> p := AS_PERM_TRANS(f);;
gap> IsPerm4Rep(p);
true
gap> Transformation([21445]) * p; 
Transformation( [ 2144 ] )
gap> p * Transformation([21445]); 
Transformation( [ 2144 ] )
gap> f := ID_TRANS4;;
gap> IsTrans4Rep(f);
true
gap> (f * (12)) * (123);
Transformation( [ 321 ] )
gap> (123) * (f * (12));
Transformation( [ 132 ] )

# We need a permutation which is in Perm4Rep, for testing
gap> p := (1,2) * (2^16,2^16+1) * (2^16,2^16+1);;
gap> IsPerm4Rep(p) and p = (1,2);
true
gap> p * Transformation([21445]);
Transformation( [ 1244 ] )
gap> Transformation([21445]) * p;
Transformation( [ 1244 ] )

# \*, PROD, product: for a permutation and a transformation
gap> (12) * Transformation([1421]);
Transformation( [ 4121 ] )
gap> (125) * Transformation([1421]);
Transformation( [ 45211 ] )
gap> (165537) * Transformation([1421]);
<transformation on 65537 pts with rank 65536>
gap> (125) * Transformation([1421]);
Transformation( [ 45211 ] )
gap> (123) * Transformation([1], [65537]);
<transformation on 65537 pts with rank 65536>
gap> (655372) * Transformation([1], [65537]);
<transformation on 65537 pts with rank 65536>
gap> (655372) * Transformation([1], [65538]);
<transformation on 65538 pts with rank 65537>
gap> (655382) * Transformation([1], [65537]);
<transformation on 65538 pts with rank 65537>
gap> f := Transformation([6797475494]);;
gap> p := (14910328)(57);;
gap> g := p * f;
Transformation( [ 7479574649 ] )
gap> () * f = f; 
true
gap> p ^ -1 * (p * f) = f;
true
gap> ImageSetOfTransformation(f) = ImageSetOfTransformation(g);
true
gap> ForAll([1 .. 10], i -> (i ^ p) ^ f = i ^ g);  
true
gap> p := (2105984763)(1112);;
gap> p * f = (p * (1112)) * f;
false
gap> () * f = f; 
true
gap> p ^ -1 * (p * f) = f;
true

# \^, conjugation: for a transformation and a permutation
gap> Transformation([1421]) ^ (12);
Transformation( [ 4212 ] )
gap> Transformation([1421]) ^ (125);
Transformation( [ 12524 ] )
gap> Transformation([1421]) ^ (165537);
<transformation on 65537 pts with rank 65536>
gap> Transformation([1421]) ^ (125);
Transformation( [ 12524 ] )
gap> Transformation([1], [65537]) ^ (125);
<transformation on 65537 pts with rank 65536>
gap> Transformation([1], [65537]) ^ (655372);
Transformation( [ 22 ] )
gap> Transformation([1], [65538]) ^ (655372);
<transformation on 65538 pts with rank 65537>
gap> f := Transformation([10494342169]);;
gap> p := (146)(28)(375);;
gap> f ^ p;
Transformation( [ 64710869619 ] )
gap> f ^ p = p ^ -1 * f * p;
true
gap> p := (1435)(2108)(79)(1115122013)(16191817);;
gap> f ^ p;
Transformation( [ 54387367103 ] )
gap> f ^ p = p ^ -1 * f * p;
true
gap> p := (1361171052)(489);;
gap> f ^ p;
Transformation( [ 865114478318 ] )
gap> f := Transformation([10494342169]);;
gap> p := (146)(28)(375) * (165537) * (165537);;
gap> f ^ p;
Transformation( [ 64710869619 ] )
gap> f ^ p = p ^ -1 * f * p;
true
gap> p := (1,4,3,5)(2,10,8)(7,9)(11,15,12,20,13)(16,19,18,17)*(65536,65537);;
gap> f ^ p;
Transformation( [ 54387367103 ] )
gap> f ^ p = p ^ -1 * f * p;
true
gap> Transformation([121]) ^ (123);
Transformation( [ 22 ] )
gap> f := ID_TRANS4;;
gap> IsTrans4Rep(f);
true

# We need a permutation which is in Perm4Rep, for testing
gap> p := (1,2) * (2^16,2^16+1) * (2^16,2^16+1);;
gap> IsPerm4Rep(p) and p = (1,2);
true
gap> Transformation([21]) ^ p;
Transformation( [ 21 ] )
gap> (f * (12)) ^ (12);
Transformation( [ 21 ] )

# \/, quotient, QUO: for a transformation and a permutation
gap> f := Transformation([826671082110]);;
gap> p := (11094638)(57);;
gap> f / p;
Transformation( [ 3244513281 ] )
gap> f / p = f * p ^ -1;
true
gap> f / ();
Transformation( [ 826671082110 ] )
gap> f / () = f;
true
gap> p := p * (1112);;
gap> f / p;
Transformation( [ 32445132811211 ] )
gap> p := (123);;
gap> f / p;
Transformation( [ 816671081310 ] )
gap> f / p = f * p ^ -1;
true
gap> f := Transformation([826671082110]);;
gap> p := (165537) ^ 2;;
gap> f / p;
Transformation( [ 826671082110 ] )
gap> f / p = f * p ^ -1;
true
gap> p := (110364)(27589) * (165537) ^ 2;;
gap> f / p;
Transformation( [ 5933215941 ] )
gap> f / p = f * p ^ -1;
true
gap> p := (123) * (165537) ^ 2;;
gap> f / p;
Transformation( [ 816671081310 ] )
gap> p := (123) * (1112) * (165537) ^ 2;;
gap> f / p;
Transformation( [ 8166710813101211 ] )
gap> f := Transformation([1], [65538]) / (165537);
<transformation on 65538 pts with rank 65537>
gap> MovedPoints(f);
165537 ]
gap> OnTuples(MovedPoints(f), f);
655381 ]
gap> Transformation([1], [65538]) / (165537
> = Transformation([1], [65538]) * (165537);
true
gap> Transformation([1], [65537]) / (165538
> = Transformation([1], [65537]) * (165538);
true
gap> f := Transformation([1], [65537]) / (165537);
<transformation on 65537 pts with rank 65536>
gap> MovedPoints(f);
65537 ]
gap> OnTuples(MovedPoints(f), f);
1 ]
gap> Transformation([1], [65537]) / (165537
> = Transformation([1], [65537]) * (165537);
true
gap> f := Transformation([1], [65537]) / (12);
<transformation on 65537 pts with rank 65536>
gap> MovedPoints(f);
12 ]
gap> OnTuples(MovedPoints(f), f);
655371 ]
gap> Transformation([1], [65537]) / (12
> = Transformation([1], [65537]) * (12);
true
gap> f := ID_TRANS4;;
gap> IsTrans4Rep(f);
true
gap> p := AS_PERM_TRANS(f);;
gap> IsPerm4Rep(p);
true
gap> Transformation([21]) / p;
Transformation( [ 21 ] )
gap> (f * (12)) / (123);
Transformation( [ 132 ] )

# left quotient, LQUO: for a permutation and a transformation
gap> f := Transformation([826671082110]);;
gap> p := (11094638)(57);;
gap> LQUO(p, f);
Transformation( [ 221018676108 ] )
gap> LQUO(p, f) = p ^ -1 * f;
true
gap> LQUO((), f);
Transformation( [ 826671082110 ] )
gap> LQUO((), f) = f;
true
gap> p := p * (1112);;
gap> LQUO(p, f);
Transformation( [ 2210186761081211 ] )
gap> p := (123);;
gap> LQUO(p, f);
Transformation( [ 682671082110 ] )
gap> LQUO(p, f) = p ^ -1 * f;
true
gap> f := Transformation([826671082110]);;
gap> p := (165537) ^ 2;;
gap> LQUO(p, f);
Transformation( [ 826671082110 ] )
gap> LQUO(p, f) = p ^ -1 * f;
true
gap> p := (110364)(27589) * (165537) ^ 2;;
gap> LQUO(p, f);
Transformation( [ 611010862728 ] )
gap> LQUO(p, f) = p ^ -1 * f;
true
gap> p := (123) * (165537) ^ 2;;
gap> LQUO(p, f);
Transformation( [ 682671082110 ] )
gap> p := (123) * (1112) * (165537) ^ 2;;
gap> LQUO(p, f);
Transformation( [ 6826710821101211 ] )
gap> f := LQUO((165537), Transformation([1], [65538]));
<transformation on 65538 pts with rank 65537>
gap> MovedPoints(f);
165537 ]
gap> OnTuples(MovedPoints(f), f);
6553765538 ]
gap> LQUO((165537), Transformation([1], [65538]))
> = (165537) * Transformation([1], [65538]);
true
gap> f := LQUO((165537), Transformation([1], [65537]));
<transformation on 65537 pts with rank 65536>
gap> MovedPoints(f);
1 ]
gap> OnTuples(MovedPoints(f), f);
65537 ]
gap> LQUO((165537), Transformation([1], [65537])) 
> = (165537) * Transformation([1], [65537]);
true
gap> f := LQUO((12), Transformation([1], [65537]));
<transformation on 65537 pts with rank 65536>
gap> MovedPoints(f);
12 ]
gap> OnTuples(MovedPoints(f), f);
265537 ]
gap> LQUO((12), Transformation([1], [65537]))
> = (12) * Transformation([1], [65537]);
true
gap> LQUO((165538), Transformation([1], [65537]));
<transformation on 65538 pts with rank 65537>
gap> f := Transformation([1695146112]);;
gap> p := (123);;
gap> LQUO(p, f);
Transformation( [ 9165146112 ] )
gap> LQUO(p, f) = p ^ -1 * f;
true
gap> p := (123)(1011);;
gap> LQUO(p, f) = p ^ -1 * f;
true
gap> p := (16752941038);;
gap> LQUO(p, f) = p ^ -1 * f;
true
gap> f := Transformation([731036105287]);;
gap> p := (19786102543);
(1,9,7,8,6,10,2,5,4,3)
gap> p := p * (165538) ^ 2;
(1,9,7,8,6,10,2,5,4,3)
gap> LQUO(p, f) = p ^ -1 * f;
true
gap> f := ID_TRANS4;;
gap> IsTrans4Rep(f);
true
gap> p := AS_PERM_TRANS(f);;
gap> IsPerm4Rep(p);
true
gap> LQUO(p, Transformation([21]));
Transformation( [ 21 ] )
gap> LQUO(p * (12), Transformation([21]));
IdentityTransformation
gap> LQUO((1,2,3), f * (12));
Transformation( [ 321 ] )

# ^, POW: for a positive integer and a transformation
gap> 2 ^ Transformation([11]);
1
gap> 10 ^ Transformation([11]);
10
gap> (2 ^ 60) ^ Transformation([11]);
1152921504606846976
gap> (-1) ^ Transformation([11]);
Error, Tran. Operations: <point> must be a positive small integer (not the int\
eger -1)
gap> 65535 ^ Transformation([65535], [65537]);
65537
gap> 1 ^ Transformation([65535], [65537]);
1
gap> 65538 ^ Transformation([65535], [65537]);
65538
gap> (2 ^ 60) ^ Transformation([65535], [65537]);
1152921504606846976
gap> (-1) ^ Transformation([65535], [65537]);
Error, Tran. Operations: <point> must be a positive small integer (not the int\
eger -1)

# OnSetsTrans: for a transformation
gap> OnSets([], Transformation([11]));
[  ]
gap> OnSets([12], Transformation([11]));
1 ]
gap> OnSets([1210], Transformation([11]));
110 ]
gap> OnSets([1210, (2 ^ 60)], Transformation([11]));
1101152921504606846976 ]
gap> OnSets([-112], Transformation([11]));
Error, Tran. Operations: <point> must be a positive small integer (not the int\
eger -1)
gap> OnSets([655356553665537], Transformation([65535], [65537]));
6553665537 ]
gap> OnSets([1210], Transformation([65535], [65537]));
1210 ]
gap> OnSets([16553565538], Transformation([65535], [65537]));
16553765538 ]
gap> OnSets([121065537, (2 ^ 60)], Transformation([65537], [1]));
12101152921504606846976 ]
gap> OnSets([-112], Transformation([65535], [65537]));
Error, Tran. Operations: <point> must be a positive small integer (not the int\
eger -1)
gap> OnSets([121065535, (2 ^ 60)], Transformation([65535], [5]));
125101152921504606846976 ]
gap> OnSets([1 .. 20], Transformation([107108875919]));
157891011121314151617181920 ]
gap> OnSets([12345678910111932441241231242 ^ 60],
>           Transformation([107108875919]));
1578910111932441241231241152921504606846976 ]
gap> f := Transformation([2672699115]);;
gap> OnSets([1 .. 11], f);
12567911 ]
gap> OnSets([1 .. 10], f);
125679 ]

# OnTuplesTrans: for a transformation
gap> OnTuples([], Transformation([11]));
[  ]
gap> OnTuples([12], Transformation([11]));
11 ]
gap> OnTuples([12123334], Transformation([11]));
11113334 ]
gap> OnTuples([1210], Transformation([11]));
1110 ]
gap> OnTuples([1210, (2 ^ 60)], Transformation([11]));
11101152921504606846976 ]
gap> OnTuples([-112], Transformation([11]));
Error, Tran. Operations: <point> must be a positive small integer (not the int\
eger -1)
gap> OnTuples([655356553665537], Transformation([65535], [65537]));
655376553665537 ]
gap> OnTuples([1210], Transformation([65535], [65537]));
1210 ]
gap> OnTuples([16553565538], Transformation([65535], [65537]));
16553765538 ]
gap> OnTuples([121065537, (2 ^ 60)], Transformation([65537], [1]));
121011152921504606846976 ]
gap> OnTuples([-112], Transformation([65535], [65537]));
Error, Tran. Operations: <point> must be a positive small integer (not the int\
eger -1)
gap> OnTuples([121065535, (2 ^ 60)], Transformation([65535], [5]));
121051152921504606846976 ]
gap> OnTuples([1 .. 20], Transformation([107108875919]));
10710887591911121314151617181920 ]
gap> OnTuples([12345678910111932441241231242 ^ 60],
>           Transformation([107108875919]));
10710887591911193244124123124
  1152921504606846976 ]
gap> OnTuples([1, , 3], Transformation([11]));
Error, OnTuples: <tup> must not contain holes
gap> OnTuples([1, , 3], Transformation([1], [65537]));
Error, OnTuples: <tup> must not contain holes
gap> f := Transformation([2672699115]);;
gap> OnTuples([1 .. 10], f);
2672699115 ]

# OnPosIntSetsTrans: for a transformation
gap> OnPosIntSetsTrans([], Transformation([11]), 0);
[  ]
gap> OnPosIntSetsTrans([12], Transformation([11]), 0);
1 ]
gap> OnPosIntSetsTrans([1210], Transformation([11]), 0);
110 ]
gap> OnPosIntSetsTrans([1210], Transformation([65535], [65537]), 0);
1210 ]
gap> OnPosIntSetsTrans([16553565538], Transformation([65535], [65537]), 0);
16553765538 ]
gap> OnPosIntSetsTrans([121065537], Transformation([65537], [1]), 0);
1210 ]
gap> OnPosIntSetsTrans([121065535], Transformation([65535], [5]), 0);
12510 ]
gap> OnPosIntSetsTrans([1 .. 20], 
>                      Transformation([107108875919]), 0);
157891011121314151617181920 ]
gap> OnPosIntSetsTrans([1234567891011193244124123124],
>                      Transformation([107108875919]), 0);
157891011193244124123124 ]
gap> OnPosIntSetsTrans([], Transformation([11]), 10);
[  ]
gap> OnPosIntSetsTrans([12], Transformation([11]), 10);
1 ]
gap> OnPosIntSetsTrans([1210], Transformation([11]), 10);
110 ]
gap> OnPosIntSetsTrans([1210], Transformation([65535], [65537]), 10);
1210 ]
gap> OnPosIntSetsTrans([16553565538], Transformation([65535], [65537]), 10);
16553765538 ]
gap> OnPosIntSetsTrans([121065537], Transformation([65537], [1]), 12);
1210 ]
gap> OnPosIntSetsTrans([121065535], Transformation([65535], [5]), 130);
12510 ]
gap> OnPosIntSetsTrans([1 .. 20], 
>                      Transformation([107108875919]), 10);
157891011121314151617181920 ]
gap> OnPosIntSetsTrans([1234567891011193244124123124],
>                      Transformation([107108875919]), 10);
157891011193244124123124 ]
gap> OnPosIntSetsTrans([0],
>           Transformation([107108875919]), 0);
[  ]
gap> OnPosIntSetsTrans([0],
>           Transformation([107108875919]), 10);
1578910 ]
gap> OnPosIntSetsTrans([0],
>           Transformation([107108875919]), 20);
157891011121314151617181920 ]
gap> OnPosIntSetsTrans([1], "a", 20);
Error, OnPosIntSetsTrans: <f> must be a transformation (not a list (string))
gap> OnPosIntSetsTrans([0], "a", 20);
Error, OnPosIntSetsTrans: <f> must be a transformation (not a list (string))
gap> OnPosIntSetsTrans(1, "a", 20);
Error, OnPosIntSetsTrans: <f> must be a transformation (not a list (string))

# MarkSubbags2
gap> f := Transformation([22428510104399]);;
gap> ImageSetOfTransformation(f);
23458910 ]
gap> FlatKernelOfTransformation(f);
112134552677 ]
gap> KernelOfTransformation(f);
[ [ 124 ], [ 39 ], [ 5 ], [ 6 ], [ 78 ], [ 10 ], [ 1112 ] ]
gap> g := One(f);;
gap> ImageSetOfTransformation(g);
[  ]
gap> FlatKernelOfTransformation(g);
[  ]
gap> KernelOfTransformation(g);
[  ]
gap> GASMAN("collect");
gap> ImageSetOfTransformation(f);
23458910 ]
gap> FlatKernelOfTransformation(f);
112134552677 ]
gap> KernelOfTransformation(f);
[ [ 124 ], [ 39 ], [ 5 ], [ 6 ], [ 78 ], [ 10 ], [ 1112 ] ]
gap> KernelOfTransformation(g);
[  ]
gap> FlatKernelOfTransformation(g);
[  ]
gap> ImageSetOfTransformation(g);
[  ]

# MarkTrans4SubBags
gap> f := Transformation([65535 .. 65538], [65535 .. 65538] * 0 + 1);;
gap> imglist := ImageListOfTransformation(f);;
gap> imgset := ShallowCopy(ImageSetOfTransformation(f));;
gap> ker := ShallowCopy(FlatKernelOfTransformation(f));;
gap> GASMAN("collect");
gap> ImageSetOfTransformation(f) = imgset;
true
gap> ImageListOfTransformation(f) = imglist;   
true
gap> FlatKernelOfTransformation(f) = ker;
true

# IS_TRANS
gap> IS_TRANS(IdentityTransformation);
true
gap> IS_TRANS(());
false
gap> IS_TRANS(FreeSemigroup(1).1);
false

################################################################################
# Test GAP level functions
################################################################################
#
# NumberTransformation
gap> NumberTransformation(Transformation([8561543642]));
7450432532
gap> NumberTransformation(Transformation([8561543642]), 0);
1
gap> NumberTransformation(IdentityTransformation, 0);
1
gap> NumberTransformation(IdentityTransformation, 10);
123456790
gap> List(FullTransformationMonoid(3), x -> NumberTransformation(x, 3));
123456789101112131415161718192021
  222324252627 ]
gap> NumberTransformation(Transformation([121]), 2);
Error, the second argument must be greater than or equal to the degree of the \
first argument (a transformation)

# TransformationNumber
gap> List([1 .. 27], x -> TransformationNumber(x, 3)) =
> AsSet(FullTransformationMonoid(3));
true
gap> TransformationNumber(745043253210);
Transformation( [ 8561543642 ] )
gap> TransformationNumber(10);
IdentityTransformation
gap> TransformationNumber(12345679010);
IdentityTransformation
gap> TransformationNumber(52);
Error, the first argument must be at most 4
gap> TransformationNumber(20);
Error, the first argument must be at most 1

# IsGeneratorsOfMagmaWithInverses
gap> IsGeneratorsOfMagmaWithInverses([Transformation([121])]);
false
gap> IsGeneratorsOfMagmaWithInverses([IdentityTransformation,
>                                     Transformation([121])]);
false
gap> IsGeneratorsOfMagmaWithInverses([IdentityTransformation]);
true
gap> IsGeneratorsOfMagmaWithInverses([Transformation([231])]);
true
gap> IsGeneratorsOfMagmaWithInverses([Transformation([231]), 
>                                     Transformation([2413])]);
true

# Transformation
gap> Transformation([4]);
Error, the argument does not describe a transformation
gap> Transformation([124]);
Error, the argument does not describe a transformation

# TransformationListList
gap> Transformation([-112], [11]);
Error, the argument does not describe a transformation
gap> Transformation([12], [1, -1]);
Error, the argument does not describe a transformation
gap> Transformation([12], [1]);
Error, the argument does not describe a transformation
gap> Transformation([1, , 2], [123]);
Error, the argument does not describe a transformation
gap> Transformation([122], [1, , 3]);
Error, the argument does not describe a transformation
gap> Transformation([122], [123]);
Error, the argument does not describe a transformation
gap> Transformation([321], [112]);
Transformation( [ 211 ] )

# TrimTransformation
gap> f := Transformation([1 .. 65537]);
IdentityTransformation
gap> IsTrans4Rep(f);
true
gap> TrimTransformation(f);
gap> IsTrans4Rep(f);
false

# OnKernelAntiAction
gap> OnKernelAntiAction([1, ,3], Transformation([134135]));
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 1st choice method found for `OnKernelAntiAction' on 2 arguments
gap> OnKernelAntiAction([], Transformation([134135]));
Error, the first argument does not describe the flat kernel of a transformatio\
n
gap> OnKernelAntiAction([-1], Transformation([134135]));
Error, the first argument does not describe the flat kernel of a transformatio\
n
gap> OnKernelAntiAction([1, "a"], Transformation([134135]));
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 1st choice method found for `OnKernelAntiAction' on 2 arguments
gap> OnKernelAntiAction([13], Transformation([134135]));
Error, the first argument does not describe the flat kernel of a transformatio\
n
gap> OnKernelAntiAction([1214], Transformation([134135]));
Error, the first argument does not describe the flat kernel of a transformatio\
n

# SmallestMovedPoint
gap> SmallestMovedPoint(IdentityTransformation);
infinity
gap> SmallestMovedPoint(Transformation([1 .. 5]));
infinity
gap> SmallestMovedPoint(Transformation([121]));
3

# SmallestImagePoint
gap> SmallestImageOfMovedPoint(IdentityTransformation);
infinity
gap> SmallestImageOfMovedPoint(Transformation([1 .. 5]));
infinity
gap> SmallestImageOfMovedPoint(Transformation([121]));
1
gap> SmallestImageOfMovedPoint(Transformation([333]));
3

# MovedPoints: for a transformation collection
gap> S := Semigroup(Transformation([13413]),
>                   Transformation([55113]));;
gap> MovedPoints(S);
1 .. 5 ]
gap> MovedPoints(GreensRClassOfElement(S, Transformation([13413])));
2345 ]
gap> MovedPoints(GeneratorsOfSemigroup(S));
1 .. 5 ]

# NrMovedPoints: for a transformation collection
gap> S := Semigroup(Transformation([13413]),
>                   Transformation([55113]));;
gap> NrMovedPoints(S);
5
gap> NrMovedPoints(GreensRClassOfElement(S, Transformation([13413])));
4
gap> NrMovedPoints(GeneratorsOfSemigroup(S));
5

# LargestMovedPoint: for a transformation collection
gap> S := Semigroup(Transformation([13413]),
>                   Transformation([55113]));;
gap> LargestMovedPoint(S);
5
gap> LargestMovedPoint(GreensRClassOfElement(S, Transformation([13413])));
5
gap> LargestMovedPoint(GeneratorsOfSemigroup(S));
5

# SmallestMovedPoint: for a transformation collection
gap> S := Semigroup(Transformation([13413]),
>                   Transformation([55113]));;
gap> SmallestMovedPoint(S);
1
gap> SmallestMovedPoint(GreensRClassOfElement(S, Transformation([13413])));
2
gap> SmallestMovedPoint(GeneratorsOfSemigroup(S));
1

# LargestImageOfMovedPoint: for a transformation collection
gap> S := Semigroup(Transformation([13413]),
>                   Transformation([55113]));;
gap> LargestImageOfMovedPoint(S);
5
gap> LargestImageOfMovedPoint(GreensRClassOfElement(S, 
> Transformation([13413])));
4
gap> LargestImageOfMovedPoint(GeneratorsOfSemigroup(S));
5

# SmallestImageOfMovedPoint: for a transformation collection
gap> S := Semigroup(Transformation([13413]),
>                   Transformation([55113]));;
gap> SmallestImageOfMovedPoint(S);
1
gap> SmallestImageOfMovedPoint(GreensRClassOfElement(S, 
> Transformation([13413])));
1
gap> SmallestImageOfMovedPoint(GeneratorsOfSemigroup(S));
1

# ConstantTransformation
gap> ConstantTransformation(110);
Error, the first argument (a positive integer) must be greater than or equal t\
o the second (a positive integer)
gap> ConstantTransformation(101);
Transformation( [ 1111111111 ] )

# Order 
gap> f := Transformation([312144111817229515218,
>                         17820101912]);;
gap> Order(f);
10
gap> Size(Semigroup(f));
10
gap> Size(Semigroup(f, f));
10

# KernelOfTransformation
gap> f := Transformation([26726991111125]);;
gap> KernelOfTransformation(f);
[ [ 14 ], [ 25 ], [ 3 ], [ 67 ], [ 810 ], [ 9 ], [ 11 ], [ 12 ] ]
gap> KernelOfTransformation(f, 5);
[ [ 14 ], [ 25 ], [ 3 ] ]
gap> KernelOfTransformation(f, 5, false);
[ [ 14 ], [ 25 ] ]
gap> KernelOfTransformation(f, 5, true);
[ [ 14 ], [ 25 ], [ 3 ] ]
gap> KernelOfTransformation(f, 15);
[ [ 14 ], [ 25 ], [ 3 ], [ 67 ], [ 810 ], [ 9 ], [ 11 ], [ 12 ], 
  [ 13 ], [ 14 ], [ 15 ] ]
gap> KernelOfTransformation(f, false);
[ [ 14 ], [ 25 ], [ 67 ], [ 810 ] ]

# OneMutable: for a transformation collection
gap> S := Semigroup(Transformation([13413]),
>                   Transformation([55113]));;
gap> OneMutable(S);
IdentityTransformation
gap> OneMutable(GreensRClassOfElement(S, Transformation([13413])));
IdentityTransformation
gap> OneMutable(GeneratorsOfSemigroup(S));
IdentityTransformation

# PermLeftQuoTransformation
gap> f := Transformation([26726991111125]);;
gap> PermLeftQuoTransformation(f, f);
()
gap> PermLeftQuoTransformation(f, f ^ (12)); # wrong kernel
Error, the arguments (transformations) must have equal image set and kernel
gap> PermLeftQuoTransformation(f, f * (78)); # wrong image
Error, the arguments (transformations) must have equal image set and kernel
gap> PermLeftQuoTransformation(f, f * (2,11,5,6,9));
(2,11,5,6,9)
gap> f := ID_TRANS4;;
gap> IsTrans4Rep(f);
true
gap> PermLeftQuoTransformation(Transformation([213]), f);
(1,2)
gap> PermLeftQuoTransformation(f, Transformation([213]));
(1,2)

# String
gap> String(Transformation([26726991111125]));
"Transformation( [ 26726991111125 ] )"
gap> String(IdentityTransformation);
"IdentityTransformation"

# ViewString: for fr style viewing
gap> SetUserPreference("NotationForTransformations", "fr");
gap> Transformation([1011], x -> x ^ 2);
<transformation: 1,2,3,4,5,6,7,8,9,100,121>
gap> Transformation([26726991111125]);
<transformation: 2,6,7,2,6,9,9,1,11,1,12,5>
gap> IdentityTransformation;
<identity transformation>
gap> SetUserPreference("NotationForTransformations", "input");

# RandomTransformation
gap> RandomTransformation(10);;
gap> f := RandomTransformation(103);;
gap> RankOfTransformation(f, 10);
3

# TransformationByImageAndKernel
gap> TransformationByImageAndKernel([1244], [123]);
fail
gap> TransformationByImageAndKernel([1322], [123]);
fail
gap> TransformationByImageAndKernel([1223], [123]);
fail
gap> TransformationByImageAndKernel([123], [1244]);
fail
gap> TransformationByImageAndKernel([123], [1233]);
Transformation( [ 1233 ] )
gap> TransformationByImageAndKernel([123], [1322]);
fail
gap> TransformationByImageAndKernel([213], [1233]);
Transformation( [ 2133 ] )
gap> f := TransformationByImageAndKernel([213], [1233]);
Transformation( [ 2133 ] )
gap> FlatKernelOfTransformation(f);
1233 ]
gap> ImageSetOfTransformation(f);
123 ]
gap> TransformationByImageAndKernel([213], [1322]);
fail
gap> TransformationByImageAndKernel([1 .. 2], [1232]);
fail
gap> TransformationByImageAndKernel([1 .. 4], [1232]);
fail
gap> TransformationByImageAndKernel([124], [1232]);
Transformation( [ 1242 ] )
gap> TransformationByImageAndKernel([125], [1232]);
fail
gap> TransformationByImageAndKernel([115], [1232]);
fail
gap> TransformationByImageAndKernel([11, -5], [1232]);
fail
gap> TransformationByImageAndKernel([11, -5], [12, -32]);
fail

# Idempotent 
gap> Idempotent([1244], [123]);
fail
gap> Idempotent([1322], [123]);
fail
gap> Idempotent([1223], [123]);
fail
gap> Idempotent([123], [1244]);
fail
gap> Idempotent([123], [1233]);
Transformation( [ 1233 ] )
gap> Idempotent([123], [1322]);
fail
gap> Idempotent([213], [1233]);
fail
gap> f := Idempotent([213], [1233]);
fail
gap> f := Idempotent([123], [1233]);
Transformation( [ 1233 ] )
gap> FlatKernelOfTransformation(f);
1233 ]
gap> ImageSetOfTransformation(f);
123 ]
gap> Idempotent([213], [1322]);
fail
gap> Idempotent([1 .. 2], [1232]);
fail
gap> Idempotent([1 .. 4], [1232]);
fail
gap> Idempotent([124], [1232]);
fail
gap> Idempotent([125], [1232]);
fail
gap> Idempotent([115], [1232]);
fail
gap> Idempotent([11, -5], [1232]);
fail
gap> Idempotent([11, -5], [12, -32]);
fail

# TransformationOp, TransformationOpNC
gap> f := Transformation([1023105107256]);
Transformation( [ 1023105107256 ] )
gap> TransformationOp(f, [23]);
IdentityTransformation
gap> TransformationOp(f, [123]);
fail
gap> S := SemigroupByMultiplicationTable([[111], [111], [112]]);;
gap> TransformationOp(Elements(S)[1], S, OnRight);
Transformation( [ 111 ] )
gap> TransformationOp(Elements(S)[3], S, OnRight);
Transformation( [ 112 ] )
gap> f := TransformationOp(Transformation([131]), ["b", "a", "c"],
> function(i, f) 
>   return "a";
> end);
Transformation( [ 222 ] )
gap> f := TransformationOp(Transformation([131]), ["c", "b", "a"],
> function(i, f) 
>   return "a";
> end);
Transformation( [ 333 ] )
gap> f := TransformationOp(Transformation([131]), [[12], [23], [13]],
> OnSets);
fail
gap> f := TransformationOp(Transformation([121]), [[12], [23]],
> OnSets);
Transformation( [ 11 ] )
gap> f := TransformationOp(Transformation([121]), [[23], [12], [45]],
> OnSets);
Transformation( [ 22 ] )
gap> f := Transformation([1023105107256]);
Transformation( [ 1023105107256 ] )
gap> TransformationOpNC(f, [23]);
IdentityTransformation
gap> S := SemigroupByMultiplicationTable([[111], [111], [112]]);;
gap> TransformationOpNC(Elements(S)[1], S, OnRight);
Transformation( [ 111 ] )
gap> TransformationOpNC(Elements(S)[3], S, OnRight);
Transformation( [ 112 ] )
gap> f := TransformationOpNC(Transformation([131]), ["b", "a", "c"],
> function(i, f) 
>   return "a";
> end);
Transformation( [ 222 ] )
gap> f := TransformationOpNC(Transformation([131]), ["c", "b", "a"],
> function(i, f) 
>   return "a";
> end);
Transformation( [ 333 ] )
gap> f := TransformationOpNC(Transformation([121]), [[12], [23]],
> OnSets);
Transformation( [ 11 ] )
gap> f := TransformationOpNC(Transformation([121]), [[23], [12], [45]],
> OnSets);
Transformation( [ 22 ] )

# InverseMutable
gap> InverseMutable(Transformation([22]));
fail
gap> InverseMutable(Transformation([231]));
Transformation( [ 312 ] )
gap> InverseMutable(IdentityTransformation);
IdentityTransformation

# AsBinaryRelation
gap> b := AsBinaryRelation(Transformation([105910963846]));
Binary Relation on 10 points
gap> Successors(b);
[ [ 10 ], [ 5 ], [ 9 ], [ 10 ], [ 9 ], [ 6 ], [ 3 ], [ 8 ], [ 4 ], [ 6 ] ]
gap> AsTransformation(b);
Transformation( [ 105910963846 ] )
gap> AsTransformation(b ^ -1);
Error, the argument must be a binary relation which is a mapping

#
gap> SetUserPreference("TransformationDisplayLimit", display);;
gap> SetUserPreference("NotationForTransformations", notation);;

#
gap> STOP_TEST("trans.tst");

[Dauer der Verarbeitung: 0.83 Sekunden, vorverarbeitet 2026-06-13]