File: rwspcsng.tst

package info (click to toggle)
gap 4r4p12-2
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 29,584 kB
  • ctags: 7,113
  • sloc: ansic: 98,786; sh: 3,299; perl: 2,263; makefile: 498; asm: 63; awk: 6
file content (1053 lines) | stat: -rw-r--r-- 47,466 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
#############################################################################
##
#W  rwspcsng.tst                GAP library                      Frank Celler
##
#H  @(#)$Id: rwspcsng.tst,v 4.15.2.3 2005/05/11 14:53:02 gap Exp $
##
#Y  Copyright (C)  1996,  Lehrstuhl D fuer Mathematik,  RWTH Aachen,  Germany
##
##  Exclude from testall.g: why?
##

gap> START_TEST("$Id: rwspcsng.tst,v 4.15.2.3 2005/05/11 14:53:02 gap Exp $");


#############################################################################

# create a free group, 8 bits
gap> f := FreeGroup(IsSyllableWordsFamily,11);;
gap> g := GeneratorsOfGroup(f){[1..11]};;

# use 'fn' as abbreviation of 'g[n]'
gap> f1 := g[1];;
gap> f2 := g[2];;
gap> f3 := g[3];;
gap> f4 := g[4];;
gap> f5 := g[5];;
gap> f6 := g[6];;
gap> f7 := g[7];;
gap> f8 := g[8];;
gap> f9 := g[9];;
gap> f10 := g[10];;
gap> f11 := g[11];;

# store the relators in <r>
gap> r := [

# power relators
> [ 1, f2*f9 ],

# commutator relators
> [ 6, 1, f9*f10*f11 ], [ 7, 1, f9*f11 ], [ 8, 1, f9*f10 ], [ 3, 2,
> f9*f11 ], [ 5, 2, f9*f10 ], [ 5, 3, f5 ], [ 7, 3, f8 ], [ 8, 3,
> f7*f8 ], [ 9, 3, f9*f11 ], [ 10, 3, f9*f10 ], [ 11, 3, f10*f11 ], [
> 6, 5, f6*f8 ], [ 7, 5, f6*f7*f8 ], [ 8, 5, f7*f8 ], [ 9, 5, f9*f10
> ], [ 10, 5, f9*f11 ], [ 11, 5, f10 ] ];;

# construct a new single collector
gap> rws := SingleCollector( g, [ 2, 2, 3, 3, 7, 2, 2, 2, 2, 2, 2 ] );
<<single collector, 8 Bits>>

# set the relators
gap> for x  in r  do
>        if 2 = Length(x)  then
>            SetPower( rws, x[1], x[2] );
>        else
>            SetCommutator( rws, x[1], x[2], x[3] );
>        fi;
>    od;

# reduce the rules and update the collector
gap> UpdatePolycyclicCollector(rws);
gap> ReduceRules(rws);
gap> UpdatePolycyclicCollector(rws);
gap> IsConfluent(rws);
true
gap> rws;
<<up-to-date single collector, 8 Bits>>

# force stack overflow
gap> rws![SCP_MAX_STACK_SIZE] := 1;;
gap> IsConfluent(rws);
true
gap> rws![SCP_MAX_STACK_SIZE] := 1;;

# construct the maximal word
gap> l := [1..11]*0;;
gap> r := RelativeOrders(rws);;
gap> w := Product( List( [1..11], x -> g[x]^(r[x]-1) ) );;
gap> Print(ExtRepOfObj(w),"\n");
[ 1, 1, 2, 1, 3, 2, 4, 2, 5, 6, 6, 1, 7, 1, 8, 1, 9, 1, 10, 1, 11, 1 ]

# start multiplying around with <w>
gap> Print(ExtRepOfObj( ReducedProduct( rws, w, w ) ),"\n");
[ 2, 1, 3, 1, 4, 1, 5, 2, 9, 1, 11, 1 ]

gap> Print(ExtRepOfObj( SingleCollector_Solution( rws, w, w^0 ) ),"\n");
[ 1, 1, 3, 1, 4, 1, 5, 2, 6, 1, 7, 1, 8, 1, 9, 1, 11, 1 ]

gap> Print(ExtRepOfObj( ReducedInverse( rws, w ) ),"\n");
[ 1, 1, 3, 1, 4, 1, 5, 2, 6, 1, 7, 1, 8, 1, 9, 1, 11, 1 ]

gap> Print(ExtRepOfObj( ReducedForm( rws, w^-1 ) ),"\n");
[ 1, 1, 3, 1, 4, 1, 5, 2, 6, 1, 7, 1, 8, 1, 9, 1, 11, 1 ]

gap> Print(ExtRepOfObj( ReducedPower( rws, w, 1000 ) ),"\n");
[ 3, 2, 4, 2, 5, 6, 9, 1, 10, 1, 11, 1 ]

gap> l := GeneratorsOfRws(rws);;
gap> p := ReducedOne(rws);;
gap> for i  in l  do 
>        p := ReducedProduct( rws, p, ReducedProduct(rws,w,i) );
>    od;
gap> Print(ExtRepOfObj(p),"\n");
[ 3, 2, 4, 2, 5, 3, 6, 1, 8, 1, 9, 1 ]

gap> l := GeneratorsOfRws(rws);;
gap> p := ReducedOne(rws);;
gap> for i  in l  do 
>        p := ReducedProduct( rws, p, ReducedProduct( rws,
>               ReducedProduct(rws,w,i), w ) );
>    od;
gap> Print(ExtRepOfObj(p),"\n");
[ 1, 1, 6, 1, 8, 1, 11, 1 ]

gap> Print(ExtRepOfObj( ReducedComm( rws, w, w ) ),"\n");
[  ]

gap> a := ReducedProduct( rws, ReducedProduct( rws, w, w ), w );;
gap> Print(ExtRepOfObj(a),"\n");
[ 1, 1, 6, 1, 7, 1, 8, 1 ]

gap> a := ReducedProduct( rws, a, a );;
gap> Print(ExtRepOfObj(a),"\n");
[ 2, 1 ]

gap> a := ReducedProduct( rws, a, a );;
gap> Print(ExtRepOfObj(a),"\n");
[  ]

gap> Print(ExtRepOfObj( ReducedLeftQuotient( rws, ReducedProduct(rws,w,w), w) ),"\n");
[ 1, 1, 3, 1, 4, 1, 5, 2, 6, 1, 7, 1, 8, 1, 9, 1, 11, 1 ]

gap> Print(ExtRepOfObj( ReducedPower( rws, w, -1 ) ),"\n");
[ 1, 1, 3, 1, 4, 1, 5, 2, 6, 1, 7, 1, 8, 1, 9, 1, 11, 1 ]

gap> Print(ExtRepOfObj( ReducedPower( rws, w, 0 ) ),"\n");
[  ]

gap> Print(ExtRepOfObj( ReducedPower( rws, w, 1 ) ),"\n");
[ 1, 1, 2, 1, 3, 2, 4, 2, 5, 6, 6, 1, 7, 1, 8, 1, 9, 1, 10, 1, 11, 1 ]

gap> Print(ExtRepOfObj( ReducedPower( rws, w, 2 ) ),"\n");
[ 2, 1, 3, 1, 4, 1, 5, 2, 9, 1, 11, 1 ]

gap> Print(ExtRepOfObj( ReducedPower( rws, w, 3 ) ),"\n");
[ 1, 1, 6, 1, 7, 1, 8, 1 ]

gap> Print(ExtRepOfObj( ReducedPower( rws, w, 4 ) ),"\n");
[ 3, 2, 4, 2, 5, 6, 9, 1, 10, 1, 11, 1 ]

gap> Print(ExtRepOfObj( ReducedPower( rws, w, 5 ) ),"\n");
[ 1, 1, 2, 1, 3, 1, 4, 1, 5, 2, 6, 1, 7, 1, 8, 1, 9, 1, 11, 1 ]

gap> Print(ExtRepOfObj( ReducedComm( rws, w, w ) ),"\n");
[  ]

gap> Print(ExtRepOfObj( ReducedComm( rws, w, l[1] ) ),"\n");
[ 9, 1 ]

gap> Print(ExtRepOfObj( ReducedLeftQuotient( rws, w, w ) ) ,"\n");
[  ]

gap> Print(ExtRepOfObj( ReducedLeftQuotient( rws, w, l[1] ) ),"\n");
[ 2, 1, 3, 1, 4, 1, 5, 2, 6, 1, 7, 1, 8, 1, 9, 1, 11, 1 ]

gap> Print(ExtRepOfObj( ReducedOne( rws ) ),"\n");
[  ]

gap> Print(ExtRepOfObj( ReducedQuotient( rws, w, w ) ),"\n");
[  ]

gap> Print(ExtRepOfObj( ReducedQuotient( rws, w, l[1] ) ),"\n");
[ 2, 1, 3, 2, 4, 2, 5, 6, 6, 1, 7, 1, 8, 1, 10, 1, 11, 1 ]

gap> rws := ShallowCopy(rws);; 
gap> Print(ExtRepOfObj( ReducedComm( rws, w, w ) ),"\n");
[  ]

gap> rws := ShallowCopy(rws);;                
gap> Print(ExtRepOfObj( ReducedConjugate( rws, w, w ) ),"\n");
[ 1, 1, 2, 1, 3, 2, 4, 2, 5, 6, 6, 1, 7, 1, 8, 1, 9, 1, 10, 1, 11, 1 ]

gap> rws := ShallowCopy(rws);;                     
gap> Print(ExtRepOfObj( ReducedForm( rws, w^-1 ) ),"\n") ;
[ 1, 1, 3, 1, 4, 1, 5, 2, 6, 1, 7, 1, 8, 1, 9, 1, 11, 1 ]

gap> rws := ShallowCopy(rws);;                
gap> Print(ExtRepOfObj( ReducedInverse( rws, w ) ),"\n");
[ 1, 1, 3, 1, 4, 1, 5, 2, 6, 1, 7, 1, 8, 1, 9, 1, 11, 1 ]

gap> rws := ShallowCopy(rws);;                
gap> Print(ExtRepOfObj( ReducedLeftQuotient( rws, w, w ) ),"\n");
[  ]

gap> rws := ShallowCopy(rws);;                        
gap> Print(ExtRepOfObj( ReducedPower( rws, w, 0 ) ),"\n");
[  ]

gap> rws := ShallowCopy(rws);;                 
gap> Print(ExtRepOfObj( ReducedPower( rws, w, 1 ) ),"\n");
[ 1, 1, 2, 1, 3, 2, 4, 2, 5, 6, 6, 1, 7, 1, 8, 1, 9, 1, 10, 1, 11, 1 ]

gap> rws := ShallowCopy(rws);;                 
gap> Print(ExtRepOfObj( ReducedPower( rws, w, 2 ) ),"\n");
[ 2, 1, 3, 1, 4, 1, 5, 2, 9, 1, 11, 1 ]

gap> rws := ShallowCopy(rws);;                    
gap> Print(ExtRepOfObj( ReducedPower( rws, w, -1 ) ),"\n");
[ 1, 1, 3, 1, 4, 1, 5, 2, 6, 1, 7, 1, 8, 1, 9, 1, 11, 1 ]

gap> rws := ShallowCopy(rws);;                  
gap> Print(ExtRepOfObj( ReducedPower( rws, w, -2 ) ),"\n");
[ 2, 1, 3, 2, 4, 2, 5, 6, 9, 1, 10, 1, 11, 1 ]

gap> rws := ShallowCopy(rws);;                   
gap> Print(ExtRepOfObj( ReducedProduct( rws, w, w ) ),"\n");
[ 2, 1, 3, 1, 4, 1, 5, 2, 9, 1, 11, 1 ]

gap> rws := ShallowCopy(rws);;                     
gap> Print(ExtRepOfObj( ReducedQuotient( rws, w, w ) ),"\n");
[  ]

gap> rws := ShallowCopy(rws);;
gap> Print(ExtRepOfObj( ReducedOne( rws ) ),"\n");
[  ]

#############################################################################

# create a free group, 16 bits
gap> f := FreeGroup(IsSyllableWordsFamily,61);;
gap> g := GeneratorsOfGroup(f){[1..61]};;

# use 'fn' as abbreviation of 'g[n]'
gap> f1 := g[1];;
gap> f2 := g[2];;
gap> f3 := g[3];;
gap> f4 := g[4];;
gap> f5 := g[5];;
gap> f6 := g[6];;
gap> f7 := g[7];;
gap> f8 := g[8];;
gap> f9 := g[9];;
gap> f10 := g[10];;
gap> f11 := g[11];;
gap> f12 := g[12];;
gap> f13 := g[13];;
gap> f14 := g[14];;
gap> f15 := g[15];;
gap> f16 := g[16];;
gap> f17 := g[17];;
gap> f18 := g[18];;
gap> f19 := g[19];;
gap> f20 := g[20];;
gap> f21 := g[21];;
gap> f22 := g[22];;
gap> f23 := g[23];;
gap> f24 := g[24];;
gap> f25 := g[25];;
gap> f26 := g[26];;
gap> f27 := g[27];;
gap> f28 := g[28];;
gap> f29 := g[29];;
gap> f30 := g[30];;
gap> f31 := g[31];;
gap> f32 := g[32];;
gap> f33 := g[33];;
gap> f34 := g[34];;
gap> f35 := g[35];;
gap> f36 := g[36];;
gap> f37 := g[37];;
gap> f38 := g[38];;
gap> f39 := g[39];;
gap> f40 := g[40];;
gap> f41 := g[41];;
gap> f42 := g[42];;
gap> f43 := g[43];;
gap> f44 := g[44];;
gap> f45 := g[45];;
gap> f46 := g[46];;
gap> f47 := g[47];;
gap> f48 := g[48];;
gap> f49 := g[49];;
gap> f50 := g[50];;
gap> f51 := g[51];;
gap> f52 := g[52];;
gap> f53 := g[53];;
gap> f54 := g[54];;
gap> f55 := g[55];;
gap> f56 := g[56];;
gap> f57 := g[57];;
gap> f58 := g[58];;
gap> f59 := g[59];;
gap> f60 := g[60];;
gap> f61 := g[61];;

# store the relators in <r>
gap> r := [

# power relators
> [ 8, f9 ], [ 15, f16 ], [ 22, f23 ], [ 29, f30 ], [ 36, f37 ], [ 43,
> f44 ], [ 50, f51 ], [ 57, f58 ],

# commutator relators
> [ 2, 1, f2 ], [ 4, 1, f5 ], [ 5, 1, f4*f5 ], [ 13, 1, f13^2*f20 ], [
> 14, 1, f14^30*f21 ], [ 15, 1, f15*f16*f22 ], [ 16, 1, f16*f23 ], [
> 17, 1, f17^4*f24 ], [ 18, 1, f18^4*f25 ], [ 19, 1, f19^4*f26 ], [
> 20, 1, f20^2*f27 ], [ 21, 1, f21^30*f28 ], [ 22, 1, f22*f23*f29 ], [
> 23, 1, f23*f30 ], [ 24, 1, f24^4*f31 ], [ 25, 1, f25^4*f32 ], [ 26,
> 1, f26^4*f33 ], [ 27, 1, f13*f27^2 ], [ 28, 1, f14*f28^30 ], [ 29,
> 1, f15*f29*f30 ], [ 30, 1, f16*f30 ], [ 31, 1, f17*f31^4 ], [ 32, 1,
> f18*f32^4 ], [ 33, 1, f19*f33^4 ], [ 41, 1, f41^2*f48 ], [ 42, 1,
> f42^30*f49 ], [ 43, 1, f43*f44*f50 ], [ 44, 1, f44*f51 ], [ 45, 1,
> f45^4*f52 ], [ 46, 1, f46^4*f53 ], [ 47, 1, f47^4*f54 ], [ 48, 1,
> f48^2*f55 ], [ 49, 1, f49^30*f56 ], [ 50, 1, f50*f51*f57 ], [ 51, 1,
> f51*f58 ], [ 52, 1, f52^4*f59 ], [ 53, 1, f53^4*f60 ], [ 54, 1,
> f54^4*f61 ], [ 55, 1, f41*f55^2 ], [ 56, 1, f42*f56^30 ], [ 57, 1,
> f43*f57*f58 ], [ 58, 1, f44*f58 ], [ 59, 1, f45*f59^4 ], [ 60, 1,
> f46*f60^4 ], [ 61, 1, f47*f61^4 ], [ 3, 2, f3*f5 ], [ 4, 2, f3*f4*f5
> ], [ 5, 2, f4*f5 ], [ 13, 2, f13^2*f20 ], [ 14, 2, f14^30*f21 ], [
> 15, 2, f15*f16*f22 ], [ 16, 2, f16*f23 ], [ 17, 2, f17^4*f24 ], [
> 18, 2, f18^4*f25 ], [ 19, 2, f19^4*f26 ], [ 20, 2, f20^2*f41 ], [
> 21, 2, f21^30*f42 ], [ 22, 2, f22*f23*f43 ], [ 23, 2, f23*f44 ], [
> 24, 2, f24^4*f45 ], [ 25, 2, f25^4*f46 ], [ 26, 2, f26^4*f47 ], [
> 27, 2, f27^2*f55 ], [ 28, 2, f28^30*f56 ], [ 29, 2, f29*f30*f57 ], [
> 30, 2, f30*f58 ], [ 31, 2, f31^4*f59 ], [ 32, 2, f32^4*f60 ], [ 33,
> 2, f33^4*f61 ], [ 34, 2, f13*f34^2 ], [ 35, 2, f14*f35^30 ], [ 36,
> 2, f15*f36*f37 ], [ 37, 2, f16*f37 ], [ 38, 2, f17*f38^4 ], [ 39, 2,
> f18*f39^4 ], [ 40, 2, f19*f40^4 ], [ 41, 2, f27*f41^2 ], [ 42, 2,
> f28*f42^30 ], [ 43, 2, f29*f43*f44 ], [ 44, 2, f30*f44 ], [ 45, 2,
> f31*f45^4 ], [ 46, 2, f32*f46^4 ], [ 47, 2, f33*f47^4 ], [ 48, 2,
> f34*f48^2 ], [ 49, 2, f35*f49^30 ], [ 50, 2, f36*f50*f51 ], [ 51, 2,
> f37*f51 ], [ 52, 2, f38*f52^4 ], [ 53, 2, f39*f53^4 ], [ 54, 2,
> f40*f54^4 ], [ 55, 2, f48*f55^2 ], [ 56, 2, f49*f56^30 ], [ 57, 2,
> f50*f57*f58 ], [ 58, 2, f51*f58 ], [ 59, 2, f52*f59^4 ], [ 60, 2,
> f53*f60^4 ], [ 61, 2, f54*f61^4 ], [ 6, 3, f6^2*f34 ], [ 7, 3,
> f7^30*f35 ], [ 8, 3, f8*f9*f36 ], [ 9, 3, f9*f37 ], [ 10, 3,
> f10^4*f38 ], [ 11, 3, f11^4*f39 ], [ 12, 3, f12^4*f40 ], [ 13, 3,
> f13^2*f41 ], [ 14, 3, f14^30*f42 ], [ 15, 3, f15*f16*f43 ], [ 16, 3,
> f16*f44 ], [ 17, 3, f17^4*f45 ], [ 18, 3, f18^4*f46 ], [ 19, 3,
> f19^4*f47 ], [ 20, 3, f20^2*f48 ], [ 21, 3, f21^30*f49 ], [ 22, 3,
> f22*f23*f50 ], [ 23, 3, f23*f51 ], [ 24, 3, f24^4*f52 ], [ 25, 3,
> f25^4*f53 ], [ 26, 3, f26^4*f54 ], [ 27, 3, f27^2*f55 ], [ 28, 3,
> f28^30*f56 ], [ 29, 3, f29*f30*f57 ], [ 30, 3, f30*f58 ], [ 31, 3,
> f31^4*f59 ], [ 32, 3, f32^4*f60 ], [ 33, 3, f33^4*f61 ], [ 34, 3,
> f6*f34^2 ], [ 35, 3, f7*f35^30 ], [ 36, 3, f8*f36*f37 ], [ 37, 3,
> f9*f37 ], [ 38, 3, f10*f38^4 ], [ 39, 3, f11*f39^4 ], [ 40, 3,
> f12*f40^4 ], [ 41, 3, f13*f41^2 ], [ 42, 3, f14*f42^30 ], [ 43, 3,
> f15*f43*f44 ], [ 44, 3, f16*f44 ], [ 45, 3, f17*f45^4 ], [ 46, 3,
> f18*f46^4 ], [ 47, 3, f19*f47^4 ], [ 48, 3, f20*f48^2 ], [ 49, 3,
> f21*f49^30 ], [ 50, 3, f22*f50*f51 ], [ 51, 3, f23*f51 ], [ 52, 3,
> f24*f52^4 ], [ 53, 3, f25*f53^4 ], [ 54, 3, f26*f54^4 ], [ 55, 3,
> f27*f55^2 ], [ 56, 3, f28*f56^30 ], [ 57, 3, f29*f57*f58 ], [ 58, 3,
> f30*f58 ], [ 59, 3, f31*f59^4 ], [ 60, 3, f32*f60^4 ], [ 61, 3,
> f33*f61^4 ], [ 6, 4, f6^2*f20 ], [ 7, 4, f7^30*f21 ], [ 8, 4,
> f8*f9*f22 ], [ 9, 4, f9*f23 ], [ 10, 4, f10^4*f24 ], [ 11, 4,
> f11^4*f25 ], [ 12, 4, f12^4*f26 ], [ 13, 4, f13^2*f27 ], [ 14, 4,
> f14^30*f28 ], [ 15, 4, f15*f16*f29 ], [ 16, 4, f16*f30 ], [ 17, 4,
> f17^4*f31 ], [ 18, 4, f18^4*f32 ], [ 19, 4, f19^4*f33 ], [ 20, 4,
> f6*f20^2 ], [ 21, 4, f7*f21^30 ], [ 22, 4, f8*f22*f23 ], [ 23, 4,
> f9*f23 ], [ 24, 4, f10*f24^4 ], [ 25, 4, f11*f25^4 ], [ 26, 4,
> f12*f26^4 ], [ 27, 4, f13*f27^2 ], [ 28, 4, f14*f28^30 ], [ 29, 4,
> f15*f29*f30 ], [ 30, 4, f16*f30 ], [ 31, 4, f17*f31^4 ], [ 32, 4,
> f18*f32^4 ], [ 33, 4, f19*f33^4 ], [ 34, 4, f34^2*f48 ], [ 35, 4,
> f35^30*f49 ], [ 36, 4, f36*f37*f50 ], [ 37, 4, f37*f51 ], [ 38, 4,
> f38^4*f52 ], [ 39, 4, f39^4*f53 ], [ 40, 4, f40^4*f54 ], [ 41, 4,
> f41^2*f55 ], [ 42, 4, f42^30*f56 ], [ 43, 4, f43*f44*f57 ], [ 44, 4,
> f44*f58 ], [ 45, 4, f45^4*f59 ], [ 46, 4, f46^4*f60 ], [ 47, 4,
> f47^4*f61 ], [ 48, 4, f34*f48^2 ], [ 49, 4, f35*f49^30 ], [ 50, 4,
> f36*f50*f51 ], [ 51, 4, f37*f51 ], [ 52, 4, f38*f52^4 ], [ 53, 4,
> f39*f53^4 ], [ 54, 4, f40*f54^4 ], [ 55, 4, f41*f55^2 ], [ 56, 4,
> f42*f56^30 ], [ 57, 4, f43*f57*f58 ], [ 58, 4, f44*f58 ], [ 59, 4,
> f45*f59^4 ], [ 60, 4, f46*f60^4 ], [ 61, 4, f47*f61^4 ], [ 6, 5,
> f6^2*f13 ], [ 7, 5, f7^30*f14 ], [ 8, 5, f8*f9*f15 ], [ 9, 5, f9*f16
> ], [ 10, 5, f10^4*f17 ], [ 11, 5, f11^4*f18 ], [ 12, 5, f12^4*f19 ],
> [ 13, 5, f6*f13^2 ], [ 14, 5, f7*f14^30 ], [ 15, 5, f8*f15*f16 ], [
> 16, 5, f9*f16 ], [ 17, 5, f10*f17^4 ], [ 18, 5, f11*f18^4 ], [ 19,
> 5, f12*f19^4 ], [ 20, 5, f20^2*f27 ], [ 21, 5, f21^30*f28 ], [ 22,
> 5, f22*f23*f29 ], [ 23, 5, f23*f30 ], [ 24, 5, f24^4*f31 ], [ 25, 5,
> f25^4*f32 ], [ 26, 5, f26^4*f33 ], [ 27, 5, f20*f27^2 ], [ 28, 5,
> f21*f28^30 ], [ 29, 5, f22*f29*f30 ], [ 30, 5, f23*f30 ], [ 31, 5,
> f24*f31^4 ], [ 32, 5, f25*f32^4 ], [ 33, 5, f26*f33^4 ], [ 34, 5,
> f34^2*f41 ], [ 35, 5, f35^30*f42 ], [ 36, 5, f36*f37*f43 ], [ 37, 5,
> f37*f44 ], [ 38, 5, f38^4*f45 ], [ 39, 5, f39^4*f46 ], [ 40, 5,
> f40^4*f47 ], [ 41, 5, f34*f41^2 ], [ 42, 5, f35*f42^30 ], [ 43, 5,
> f36*f43*f44 ], [ 44, 5, f37*f44 ], [ 45, 5, f38*f45^4 ], [ 46, 5,
> f39*f46^4 ], [ 47, 5, f40*f47^4 ], [ 48, 5, f48^2*f55 ], [ 49, 5,
> f49^30*f56 ], [ 50, 5, f50*f51*f57 ], [ 51, 5, f51*f58 ], [ 52, 5,
> f52^4*f59 ], [ 53, 5, f53^4*f60 ], [ 54, 5, f54^4*f61 ], [ 55, 5,
> f48*f55^2 ], [ 56, 5, f49*f56^30 ], [ 57, 5, f50*f57*f58 ], [ 58, 5,
> f51*f58 ], [ 59, 5, f52*f59^4 ], [ 60, 5, f53*f60^4 ], [ 61, 5,
> f54*f61^4 ], [ 7, 6, f7^4 ], [ 10, 6, f11*f12 ], [ 11, 6,
> f11^4*f12^3 ], [ 12, 6, f11^3*f12^3 ], [ 10, 7, f11^4*f12^3 ], [ 11,
> 7, f10^4*f11^4*f12^2 ], [ 12, 7, f10^2*f11^4*f12^4 ], [ 10, 8, f10
> ], [ 11, 8, f11 ], [ 12, 8, f12 ], [ 10, 9, f10^3 ], [ 11, 9, f11^3
> ], [ 12, 9, f12^3 ], [ 14, 13, f14^4 ], [ 17, 13, f18*f19 ], [ 18,
> 13, f18^4*f19^3 ], [ 19, 13, f18^3*f19^3 ], [ 17, 14, f18^4*f19^3 ],
> [ 18, 14, f17^4*f18^4*f19^2 ], [ 19, 14, f17^2*f18^4*f19^4 ], [ 17,
> 15, f17 ], [ 18, 15, f18 ], [ 19, 15, f19 ], [ 17, 16, f17^3 ], [
> 18, 16, f18^3 ], [ 19, 16, f19^3 ], [ 21, 20, f21^4 ], [ 24, 20,
> f25*f26 ], [ 25, 20, f25^4*f26^3 ], [ 26, 20, f25^3*f26^3 ], [ 24,
> 21, f25^4*f26^3 ], [ 25, 21, f24^4*f25^4*f26^2 ], [ 26, 21,
> f24^2*f25^4*f26^4 ], [ 24, 22, f24 ], [ 25, 22, f25 ], [ 26, 22, f26
> ], [ 24, 23, f24^3 ], [ 25, 23, f25^3 ], [ 26, 23, f26^3 ], [ 28,
> 27, f28^4 ], [ 31, 27, f32*f33 ], [ 32, 27, f32^4*f33^3 ], [ 33, 27,
> f32^3*f33^3 ], [ 31, 28, f32^4*f33^3 ], [ 32, 28, f31^4*f32^4*f33^2
> ], [ 33, 28, f31^2*f32^4*f33^4 ], [ 31, 29, f31 ], [ 32, 29, f32 ],
> [ 33, 29, f33 ], [ 31, 30, f31^3 ], [ 32, 30, f32^3 ], [ 33, 30,
> f33^3 ], [ 35, 34, f35^4 ], [ 38, 34, f39*f40 ], [ 39, 34,
> f39^4*f40^3 ], [ 40, 34, f39^3*f40^3 ], [ 38, 35, f39^4*f40^3 ], [
> 39, 35, f38^4*f39^4*f40^2 ], [ 40, 35, f38^2*f39^4*f40^4 ], [ 38,
> 36, f38 ], [ 39, 36, f39 ], [ 40, 36, f40 ], [ 38, 37, f38^3 ], [
> 39, 37, f39^3 ], [ 40, 37, f40^3 ], [ 42, 41, f42^4 ], [ 45, 41,
> f46*f47 ], [ 46, 41, f46^4*f47^3 ], [ 47, 41, f46^3*f47^3 ], [ 45,
> 42, f46^4*f47^3 ], [ 46, 42, f45^4*f46^4*f47^2 ], [ 47, 42,
> f45^2*f46^4*f47^4 ], [ 45, 43, f45 ], [ 46, 43, f46 ], [ 47, 43, f47
> ], [ 45, 44, f45^3 ], [ 46, 44, f46^3 ], [ 47, 44, f47^3 ], [ 49,
> 48, f49^4 ], [ 52, 48, f53*f54 ], [ 53, 48, f53^4*f54^3 ], [ 54, 48,
> f53^3*f54^3 ], [ 52, 49, f53^4*f54^3 ], [ 53, 49, f52^4*f53^4*f54^2
> ], [ 54, 49, f52^2*f53^4*f54^4 ], [ 52, 50, f52 ], [ 53, 50, f53 ],
> [ 54, 50, f54 ], [ 52, 51, f52^3 ], [ 53, 51, f53^3 ], [ 54, 51,
> f54^3 ], [ 56, 55, f56^4 ], [ 59, 55, f60*f61 ], [ 60, 55,
> f60^4*f61^3 ], [ 61, 55, f60^3*f61^3 ], [ 59, 56, f60^4*f61^3 ], [
> 60, 56, f59^4*f60^4*f61^2 ], [ 61, 56, f59^2*f60^4*f61^4 ], [ 59,
> 57, f59 ], [ 60, 57, f60 ], [ 61, 57, f61 ], [ 59, 58, f59^3 ], [
> 60, 58, f60^3 ], [ 61, 58, f61^3 ], ];;

# construct a new single collector
gap> rws := SingleCollector( g, [ 3, 7, 2, 2, 2, 3, 31, 2, 2, 5, 5, 5, 3,
>    31, 2, 2, 5, 5, 5, 3, 31, 2, 2, 5, 5, 5, 3, 31, 2, 2, 5, 5, 5, 3, 31,
>    2, 2, 5, 5, 5, 3, 31, 2, 2, 5, 5, 5, 3, 31, 2, 2, 5, 5, 5, 3, 31, 2, 2,
>    5, 5, 5 ] );
<<single collector, 16 Bits>>

# set the relators
gap> for x  in r  do
>        if 2 = Length(x)  then
>            SetPower( rws, x[1], x[2] );
>        else
>            SetCommutator( rws, x[1], x[2], x[3] );
>        fi;
>    od;

# reduce the rules and update the collector
gap> UpdatePolycyclicCollector(rws);
gap> ReduceRules(rws);
gap> UpdatePolycyclicCollector(rws);
gap> IsConfluent(rws);
true
gap> rws;
<<up-to-date single collector, 16 Bits>>
gap> Print(List( rws![SCP_INVERSES], ExtRepOfObj ),"\n");
[ [ 1, 2 ], [ 2, 6 ], [ 3, 1 ], [ 4, 1 ], [ 5, 1 ], [ 6, 2 ], [ 7, 30 ], 
  [ 8, 1, 9, 1 ], [ 9, 1 ], [ 10, 4 ], [ 11, 4 ], [ 12, 4 ], [ 13, 2 ], 
  [ 14, 30 ], [ 15, 1, 16, 1 ], [ 16, 1 ], [ 17, 4 ], [ 18, 4 ], [ 19, 4 ], 
  [ 20, 2 ], [ 21, 30 ], [ 22, 1, 23, 1 ], [ 23, 1 ], [ 24, 4 ], [ 25, 4 ], 
  [ 26, 4 ], [ 27, 2 ], [ 28, 30 ], [ 29, 1, 30, 1 ], [ 30, 1 ], [ 31, 4 ], 
  [ 32, 4 ], [ 33, 4 ], [ 34, 2 ], [ 35, 30 ], [ 36, 1, 37, 1 ], [ 37, 1 ], 
  [ 38, 4 ], [ 39, 4 ], [ 40, 4 ], [ 41, 2 ], [ 42, 30 ], [ 43, 1, 44, 1 ], 
  [ 44, 1 ], [ 45, 4 ], [ 46, 4 ], [ 47, 4 ], [ 48, 2 ], [ 49, 30 ], 
  [ 50, 1, 51, 1 ], [ 51, 1 ], [ 52, 4 ], [ 53, 4 ], [ 54, 4 ], [ 55, 2 ], 
  [ 56, 30 ], [ 57, 1, 58, 1 ], [ 58, 1 ], [ 59, 4 ], [ 60, 4 ], [ 61, 4 ] ]

# force stack overflow
gap> rws![SCP_MAX_STACK_SIZE] := 1;;
gap> IsConfluent(rws);
true
gap> rws![SCP_MAX_STACK_SIZE] := 1;;

# construct the maximal word
gap> l := [1..61]*0;;
gap> r := RelativeOrders(rws);;
gap> w := Product( List( [1..61], x -> g[x]^(r[x]-1) ) );;
gap> Print(ExtRepOfObj(w),"\n");
[ 1, 2, 2, 6, 3, 1, 4, 1, 5, 1, 6, 2, 7, 30, 8, 1, 9, 1, 10, 4, 11, 4, 12, 4, 
  13, 2, 14, 30, 15, 1, 16, 1, 17, 4, 18, 4, 19, 4, 20, 2, 21, 30, 22, 1, 23, 
  1, 24, 4, 25, 4, 26, 4, 27, 2, 28, 30, 29, 1, 30, 1, 31, 4, 32, 4, 33, 4, 
  34, 2, 35, 30, 36, 1, 37, 1, 38, 4, 39, 4, 40, 4, 41, 2, 42, 30, 43, 1, 44, 
  1, 45, 4, 46, 4, 47, 4, 48, 2, 49, 30, 50, 1, 51, 1, 52, 4, 53, 4, 54, 4, 
  55, 2, 56, 30, 57, 1, 58, 1, 59, 4, 60, 4, 61, 4 ]

# start multiplying around with <w>
gap> Print(ExtRepOfObj( ReducedProduct( rws, w, w ) ),"\n");
[ 1, 1, 2, 2, 6, 1, 7, 5, 9, 1, 10, 3, 11, 3, 13, 1, 14, 5, 16, 1, 17, 3, 18, 
  3, 20, 1, 21, 5, 23, 1, 24, 3, 25, 3, 27, 1, 28, 5, 30, 1, 31, 3, 32, 3, 
  34, 1, 35, 5, 37, 1, 38, 3, 39, 3, 41, 1, 42, 5, 44, 1, 45, 3, 46, 3, 48, 
  1, 49, 5, 51, 1, 52, 3, 53, 3, 55, 1, 56, 5, 58, 1, 59, 3, 60, 3 ]

gap> Print(ExtRepOfObj( SingleCollector_Solution( rws, w, w^0 ) ),"\n");
[ 1, 1, 2, 2, 3, 1, 4, 1, 5, 1, 6, 1, 7, 5, 8, 1, 10, 4, 11, 4, 12, 2, 13, 1, 
  14, 5, 15, 1, 17, 4, 18, 4, 19, 2, 20, 1, 21, 5, 22, 1, 24, 4, 25, 4, 26, 
  2, 27, 1, 28, 5, 29, 1, 31, 4, 32, 4, 33, 2, 34, 1, 35, 5, 36, 1, 38, 4, 
  39, 4, 40, 2, 41, 1, 42, 5, 43, 1, 45, 4, 46, 4, 47, 2, 48, 1, 49, 5, 50, 
  1, 52, 4, 53, 4, 54, 2, 55, 1, 56, 5, 57, 1, 59, 4, 60, 4, 61, 2 ]

gap> Print(ExtRepOfObj( ReducedInverse( rws, w ) ),"\n");
[ 1, 1, 2, 2, 3, 1, 4, 1, 5, 1, 6, 1, 7, 5, 8, 1, 10, 4, 11, 4, 12, 2, 13, 1, 
  14, 5, 15, 1, 17, 4, 18, 4, 19, 2, 20, 1, 21, 5, 22, 1, 24, 4, 25, 4, 26, 
  2, 27, 1, 28, 5, 29, 1, 31, 4, 32, 4, 33, 2, 34, 1, 35, 5, 36, 1, 38, 4, 
  39, 4, 40, 2, 41, 1, 42, 5, 43, 1, 45, 4, 46, 4, 47, 2, 48, 1, 49, 5, 50, 
  1, 52, 4, 53, 4, 54, 2, 55, 1, 56, 5, 57, 1, 59, 4, 60, 4, 61, 2 ]

gap> Print(ExtRepOfObj( ReducedForm( rws, w^-1 ) ),"\n");
[ 1, 1, 2, 2, 3, 1, 4, 1, 5, 1, 6, 1, 7, 5, 8, 1, 10, 4, 11, 4, 12, 2, 13, 1, 
  14, 5, 15, 1, 17, 4, 18, 4, 19, 2, 20, 1, 21, 5, 22, 1, 24, 4, 25, 4, 26, 
  2, 27, 1, 28, 5, 29, 1, 31, 4, 32, 4, 33, 2, 34, 1, 35, 5, 36, 1, 38, 4, 
  39, 4, 40, 2, 41, 1, 42, 5, 43, 1, 45, 4, 46, 4, 47, 2, 48, 1, 49, 5, 50, 
  1, 52, 4, 53, 4, 54, 2, 55, 1, 56, 5, 57, 1, 59, 4, 60, 4, 61, 2 ]

gap> Print(ExtRepOfObj( ReducedPower( rws, w, 1000 ) ),"\n");
[ 1, 2, 2, 6, 6, 2, 7, 30, 10, 3, 11, 3, 12, 4, 13, 2, 14, 30, 17, 3, 18, 3, 
  19, 4, 20, 2, 21, 30, 24, 3, 25, 3, 26, 4, 27, 2, 28, 30, 31, 3, 32, 3, 33, 
  4, 34, 2, 35, 30, 38, 3, 39, 3, 40, 4, 41, 2, 42, 30, 45, 3, 46, 3, 47, 4, 
  48, 2, 49, 30, 52, 3, 53, 3, 54, 4, 55, 2, 56, 30, 59, 3, 60, 3, 61, 4 ]

gap> l := GeneratorsOfRws(rws);;
gap> p := ReducedOne(rws);;
gap> for i  in l  do 
>        p := ReducedProduct( rws, p, ReducedProduct(rws,w,i) );
>    od;
gap> Print(ExtRepOfObj(p),"\n");
[ 4, 1, 5, 1, 6, 2, 7, 5, 8, 1, 9, 1, 11, 2, 12, 2, 14, 22, 17, 3, 18, 4, 20, 
  2, 21, 4, 22, 1, 24, 1, 26, 4, 28, 26, 31, 2, 32, 3, 33, 3, 34, 2, 35, 24, 
  36, 1, 38, 1, 39, 3, 42, 30, 43, 1, 44, 1, 45, 3, 46, 3, 47, 1, 48, 2, 50, 
  1, 51, 1, 52, 3, 54, 2, 55, 1, 56, 26, 57, 1, 59, 4, 60, 2 ]

gap> l := GeneratorsOfRws(rws);;
gap> p := ReducedOne(rws);;
gap> for i  in l  do 
>        p := ReducedProduct( rws, p, ReducedProduct( rws,
>               ReducedProduct(rws,w,i), w ) );
>    od;
gap> Print(ExtRepOfObj(p),"\n");
[ 1, 2, 4, 1, 6, 2, 7, 3, 8, 1, 10, 1, 11, 2, 12, 3, 13, 1, 14, 21, 17, 4, 
  18, 4, 19, 1, 20, 2, 21, 30, 22, 1, 24, 2, 26, 1, 27, 1, 28, 5, 29, 1, 31, 
  4, 33, 2, 34, 2, 35, 19, 36, 1, 38, 1, 39, 2, 41, 1, 42, 5, 44, 1, 45, 3, 
  48, 2, 49, 6, 50, 1, 52, 3, 53, 1, 54, 4, 55, 2, 56, 19, 57, 1, 59, 2, 60, 
  2, 61, 1 ]

gap> Print(ExtRepOfObj( ReducedComm( rws, w, w ) ),"\n");
[  ]

gap> a := ReducedProduct( rws, ReducedProduct( rws, w, w ), w );;
gap> Print(ExtRepOfObj(a),"\n");
[ 3, 1, 4, 1, 5, 1, 8, 1, 12, 1, 15, 1, 19, 1, 22, 1, 26, 1, 29, 1, 33, 1, 
  36, 1, 40, 1, 43, 1, 47, 1, 50, 1, 54, 1, 57, 1, 61, 1 ]

gap> a := ReducedProduct( rws, a, a );;
gap> Print(ExtRepOfObj(a),"\n");
[ 9, 1, 12, 3, 16, 1, 19, 3, 23, 1, 26, 3, 30, 1, 33, 3, 37, 1, 40, 3, 44, 1, 
  47, 3, 51, 1, 54, 3, 58, 1, 61, 3 ]

gap> a := ReducedProduct( rws, a, a );;
gap> Print(ExtRepOfObj(a),"\n");
[  ]

gap> Print(ExtRepOfObj( ReducedLeftQuotient( rws, ReducedProduct(rws,w,w), w) ),"\n");
[ 1, 1, 2, 2, 3, 1, 4, 1, 5, 1, 6, 1, 7, 5, 8, 1, 10, 4, 11, 4, 12, 2, 13, 1, 
  14, 5, 15, 1, 17, 4, 18, 4, 19, 2, 20, 1, 21, 5, 22, 1, 24, 4, 25, 4, 26, 
  2, 27, 1, 28, 5, 29, 1, 31, 4, 32, 4, 33, 2, 34, 1, 35, 5, 36, 1, 38, 4, 
  39, 4, 40, 2, 41, 1, 42, 5, 43, 1, 45, 4, 46, 4, 47, 2, 48, 1, 49, 5, 50, 
  1, 52, 4, 53, 4, 54, 2, 55, 1, 56, 5, 57, 1, 59, 4, 60, 4, 61, 2 ]

gap> Print(ExtRepOfObj( ReducedPower( rws, w, -1 ) ),"\n");
[ 1, 1, 2, 2, 3, 1, 4, 1, 5, 1, 6, 1, 7, 5, 8, 1, 10, 4, 11, 4, 12, 2, 13, 1, 
  14, 5, 15, 1, 17, 4, 18, 4, 19, 2, 20, 1, 21, 5, 22, 1, 24, 4, 25, 4, 26, 
  2, 27, 1, 28, 5, 29, 1, 31, 4, 32, 4, 33, 2, 34, 1, 35, 5, 36, 1, 38, 4, 
  39, 4, 40, 2, 41, 1, 42, 5, 43, 1, 45, 4, 46, 4, 47, 2, 48, 1, 49, 5, 50, 
  1, 52, 4, 53, 4, 54, 2, 55, 1, 56, 5, 57, 1, 59, 4, 60, 4, 61, 2 ]

gap> Print(ExtRepOfObj( ReducedPower( rws, w, 0 ) ),"\n");
[  ]

gap> Print(ExtRepOfObj( ReducedPower( rws, w, 1 ) ),"\n");
[ 1, 2, 2, 6, 3, 1, 4, 1, 5, 1, 6, 2, 7, 30, 8, 1, 9, 1, 10, 4, 11, 4, 12, 4, 
  13, 2, 14, 30, 15, 1, 16, 1, 17, 4, 18, 4, 19, 4, 20, 2, 21, 30, 22, 1, 23, 
  1, 24, 4, 25, 4, 26, 4, 27, 2, 28, 30, 29, 1, 30, 1, 31, 4, 32, 4, 33, 4, 
  34, 2, 35, 30, 36, 1, 37, 1, 38, 4, 39, 4, 40, 4, 41, 2, 42, 30, 43, 1, 44, 
  1, 45, 4, 46, 4, 47, 4, 48, 2, 49, 30, 50, 1, 51, 1, 52, 4, 53, 4, 54, 4, 
  55, 2, 56, 30, 57, 1, 58, 1, 59, 4, 60, 4, 61, 4 ]

gap> Print(ExtRepOfObj( ReducedPower( rws, w, 2 ) ),"\n");
[ 1, 1, 2, 2, 6, 1, 7, 5, 9, 1, 10, 3, 11, 3, 13, 1, 14, 5, 16, 1, 17, 3, 18, 
  3, 20, 1, 21, 5, 23, 1, 24, 3, 25, 3, 27, 1, 28, 5, 30, 1, 31, 3, 32, 3, 
  34, 1, 35, 5, 37, 1, 38, 3, 39, 3, 41, 1, 42, 5, 44, 1, 45, 3, 46, 3, 48, 
  1, 49, 5, 51, 1, 52, 3, 53, 3, 55, 1, 56, 5, 58, 1, 59, 3, 60, 3 ]

gap> Print(ExtRepOfObj( ReducedPower( rws, w, 3 ) ),"\n");
[ 3, 1, 4, 1, 5, 1, 8, 1, 12, 1, 15, 1, 19, 1, 22, 1, 26, 1, 29, 1, 33, 1, 
  36, 1, 40, 1, 43, 1, 47, 1, 50, 1, 54, 1, 57, 1, 61, 1 ]

gap> Print(ExtRepOfObj( ReducedPower( rws, w, 4 ) ),"\n");
[ 1, 2, 2, 6, 6, 2, 7, 30, 10, 3, 11, 3, 12, 4, 13, 2, 14, 30, 17, 3, 18, 3, 
  19, 4, 20, 2, 21, 30, 24, 3, 25, 3, 26, 4, 27, 2, 28, 30, 31, 3, 32, 3, 33, 
  4, 34, 2, 35, 30, 38, 3, 39, 3, 40, 4, 41, 2, 42, 30, 45, 3, 46, 3, 47, 4, 
  48, 2, 49, 30, 52, 3, 53, 3, 54, 4, 55, 2, 56, 30, 59, 3, 60, 3, 61, 4 ]

gap> Print(ExtRepOfObj( ReducedPower( rws, w, 5 ) ),"\n");
[ 1, 1, 2, 2, 3, 1, 4, 1, 5, 1, 6, 1, 7, 5, 8, 1, 9, 1, 10, 1, 11, 1, 12, 1, 
  13, 1, 14, 5, 15, 1, 16, 1, 17, 1, 18, 1, 19, 1, 20, 1, 21, 5, 22, 1, 23, 
  1, 24, 1, 25, 1, 26, 1, 27, 1, 28, 5, 29, 1, 30, 1, 31, 1, 32, 1, 33, 1, 
  34, 1, 35, 5, 36, 1, 37, 1, 38, 1, 39, 1, 40, 1, 41, 1, 42, 5, 43, 1, 44, 
  1, 45, 1, 46, 1, 47, 1, 48, 1, 49, 5, 50, 1, 51, 1, 52, 1, 53, 1, 54, 1, 
  55, 1, 56, 5, 57, 1, 58, 1, 59, 1, 60, 1, 61, 1 ]

gap> Print(ExtRepOfObj( ReducedComm( rws, w, w ) ),"\n");
[  ]

gap> Print(ExtRepOfObj( ReducedComm( rws, w, l[1] ) ),"\n");
[ 2, 6, 3, 1, 4, 1 ]

gap> Print(ExtRepOfObj( ReducedLeftQuotient( rws, w, w ) ),"\n");
[  ]

gap> Print(ExtRepOfObj( ReducedLeftQuotient( rws, w, l[1] ) ),"\n");
[ 1, 2, 2, 4, 3, 1, 5, 1, 6, 1, 7, 5, 8, 1, 10, 4, 11, 4, 12, 2, 13, 1, 14, 
  5, 15, 1, 17, 4, 18, 4, 19, 2, 20, 1, 21, 5, 22, 1, 24, 4, 25, 4, 26, 2, 
  27, 1, 28, 5, 29, 1, 31, 4, 32, 4, 33, 2, 34, 1, 35, 5, 36, 1, 38, 4, 39, 
  4, 40, 2, 41, 1, 42, 5, 43, 1, 45, 4, 46, 4, 47, 2, 48, 1, 49, 5, 50, 1, 
  52, 4, 53, 4, 54, 2, 55, 1, 56, 5, 57, 1, 59, 4, 60, 4, 61, 2 ]

gap> Print(ExtRepOfObj( ReducedOne( rws ) ),"\n");
[  ]

gap> Print(ExtRepOfObj( ReducedQuotient( rws, w, w ) ),"\n");
[  ]

gap> Print(ExtRepOfObj( ReducedQuotient( rws, w, l[1] ) ),"\n");
[ 1, 1, 2, 3, 3, 1, 4, 1, 6, 2, 7, 30, 8, 1, 9, 1, 10, 4, 11, 4, 12, 4, 13, 
  2, 14, 30, 15, 1, 16, 1, 17, 4, 18, 4, 19, 4, 20, 2, 21, 30, 22, 1, 23, 1, 
  24, 4, 25, 4, 26, 4, 27, 2, 28, 30, 29, 1, 30, 1, 31, 4, 32, 4, 33, 4, 34, 
  2, 35, 30, 36, 1, 37, 1, 38, 4, 39, 4, 40, 4, 41, 2, 42, 30, 43, 1, 44, 1, 
  45, 4, 46, 4, 47, 4, 48, 2, 49, 30, 50, 1, 51, 1, 52, 4, 53, 4, 54, 4, 55, 
  2, 56, 30, 57, 1, 58, 1, 59, 4, 60, 4, 61, 4 ]


#############################################################################

# create a free group, 32 bits
gap> f := FreeGroup(IsSyllableWordsFamily,1200);;
gap> g := GeneratorsOfGroup(f){[1..61]};;

# use 'fn' as abbreviation of 'g[n]'
gap> f1 := g[1];;
gap> f2 := g[2];;
gap> f3 := g[3];;
gap> f4 := g[4];;
gap> f5 := g[5];;
gap> f6 := g[6];;
gap> f7 := g[7];;
gap> f8 := g[8];;
gap> f9 := g[9];;
gap> f10 := g[10];;
gap> f11 := g[11];;
gap> f12 := g[12];;
gap> f13 := g[13];;
gap> f14 := g[14];;
gap> f15 := g[15];;
gap> f16 := g[16];;
gap> f17 := g[17];;
gap> f18 := g[18];;
gap> f19 := g[19];;
gap> f20 := g[20];;
gap> f21 := g[21];;
gap> f22 := g[22];;
gap> f23 := g[23];;
gap> f24 := g[24];;
gap> f25 := g[25];;
gap> f26 := g[26];;
gap> f27 := g[27];;
gap> f28 := g[28];;
gap> f29 := g[29];;
gap> f30 := g[30];;
gap> f31 := g[31];;
gap> f32 := g[32];;
gap> f33 := g[33];;
gap> f34 := g[34];;
gap> f35 := g[35];;
gap> f36 := g[36];;
gap> f37 := g[37];;
gap> f38 := g[38];;
gap> f39 := g[39];;
gap> f40 := g[40];;
gap> f41 := g[41];;
gap> f42 := g[42];;
gap> f43 := g[43];;
gap> f44 := g[44];;
gap> f45 := g[45];;
gap> f46 := g[46];;
gap> f47 := g[47];;
gap> f48 := g[48];;
gap> f49 := g[49];;
gap> f50 := g[50];;
gap> f51 := g[51];;
gap> f52 := g[52];;
gap> f53 := g[53];;
gap> f54 := g[54];;
gap> f55 := g[55];;
gap> f56 := g[56];;
gap> f57 := g[57];;
gap> f58 := g[58];;
gap> f59 := g[59];;
gap> f60 := g[60];;
gap> f61 := g[61];;

# store the relators in <r>
gap> r := [

# power relators
> [ 8, f9 ], [ 15, f16 ], [ 22, f23 ], [ 29, f30 ], [ 36, f37 ], [ 43,
> f44 ], [ 50, f51 ], [ 57, f58 ],

# commutator relators
> [ 2, 1, f2 ], [ 4, 1, f5 ], [ 5, 1, f4*f5 ], [ 13, 1, f13^2*f20 ], [
> 14, 1, f14^30*f21 ], [ 15, 1, f15*f16*f22 ], [ 16, 1, f16*f23 ], [
> 17, 1, f17^4*f24 ], [ 18, 1, f18^4*f25 ], [ 19, 1, f19^4*f26 ], [
> 20, 1, f20^2*f27 ], [ 21, 1, f21^30*f28 ], [ 22, 1, f22*f23*f29 ], [
> 23, 1, f23*f30 ], [ 24, 1, f24^4*f31 ], [ 25, 1, f25^4*f32 ], [ 26,
> 1, f26^4*f33 ], [ 27, 1, f13*f27^2 ], [ 28, 1, f14*f28^30 ], [ 29,
> 1, f15*f29*f30 ], [ 30, 1, f16*f30 ], [ 31, 1, f17*f31^4 ], [ 32, 1,
> f18*f32^4 ], [ 33, 1, f19*f33^4 ], [ 41, 1, f41^2*f48 ], [ 42, 1,
> f42^30*f49 ], [ 43, 1, f43*f44*f50 ], [ 44, 1, f44*f51 ], [ 45, 1,
> f45^4*f52 ], [ 46, 1, f46^4*f53 ], [ 47, 1, f47^4*f54 ], [ 48, 1,
> f48^2*f55 ], [ 49, 1, f49^30*f56 ], [ 50, 1, f50*f51*f57 ], [ 51, 1,
> f51*f58 ], [ 52, 1, f52^4*f59 ], [ 53, 1, f53^4*f60 ], [ 54, 1,
> f54^4*f61 ], [ 55, 1, f41*f55^2 ], [ 56, 1, f42*f56^30 ], [ 57, 1,
> f43*f57*f58 ], [ 58, 1, f44*f58 ], [ 59, 1, f45*f59^4 ], [ 60, 1,
> f46*f60^4 ], [ 61, 1, f47*f61^4 ], [ 3, 2, f3*f5 ], [ 4, 2, f3*f4*f5
> ], [ 5, 2, f4*f5 ], [ 13, 2, f13^2*f20 ], [ 14, 2, f14^30*f21 ], [
> 15, 2, f15*f16*f22 ], [ 16, 2, f16*f23 ], [ 17, 2, f17^4*f24 ], [
> 18, 2, f18^4*f25 ], [ 19, 2, f19^4*f26 ], [ 20, 2, f20^2*f41 ], [
> 21, 2, f21^30*f42 ], [ 22, 2, f22*f23*f43 ], [ 23, 2, f23*f44 ], [
> 24, 2, f24^4*f45 ], [ 25, 2, f25^4*f46 ], [ 26, 2, f26^4*f47 ], [
> 27, 2, f27^2*f55 ], [ 28, 2, f28^30*f56 ], [ 29, 2, f29*f30*f57 ], [
> 30, 2, f30*f58 ], [ 31, 2, f31^4*f59 ], [ 32, 2, f32^4*f60 ], [ 33,
> 2, f33^4*f61 ], [ 34, 2, f13*f34^2 ], [ 35, 2, f14*f35^30 ], [ 36,
> 2, f15*f36*f37 ], [ 37, 2, f16*f37 ], [ 38, 2, f17*f38^4 ], [ 39, 2,
> f18*f39^4 ], [ 40, 2, f19*f40^4 ], [ 41, 2, f27*f41^2 ], [ 42, 2,
> f28*f42^30 ], [ 43, 2, f29*f43*f44 ], [ 44, 2, f30*f44 ], [ 45, 2,
> f31*f45^4 ], [ 46, 2, f32*f46^4 ], [ 47, 2, f33*f47^4 ], [ 48, 2,
> f34*f48^2 ], [ 49, 2, f35*f49^30 ], [ 50, 2, f36*f50*f51 ], [ 51, 2,
> f37*f51 ], [ 52, 2, f38*f52^4 ], [ 53, 2, f39*f53^4 ], [ 54, 2,
> f40*f54^4 ], [ 55, 2, f48*f55^2 ], [ 56, 2, f49*f56^30 ], [ 57, 2,
> f50*f57*f58 ], [ 58, 2, f51*f58 ], [ 59, 2, f52*f59^4 ], [ 60, 2,
> f53*f60^4 ], [ 61, 2, f54*f61^4 ], [ 6, 3, f6^2*f34 ], [ 7, 3,
> f7^30*f35 ], [ 8, 3, f8*f9*f36 ], [ 9, 3, f9*f37 ], [ 10, 3,
> f10^4*f38 ], [ 11, 3, f11^4*f39 ], [ 12, 3, f12^4*f40 ], [ 13, 3,
> f13^2*f41 ], [ 14, 3, f14^30*f42 ], [ 15, 3, f15*f16*f43 ], [ 16, 3,
> f16*f44 ], [ 17, 3, f17^4*f45 ], [ 18, 3, f18^4*f46 ], [ 19, 3,
> f19^4*f47 ], [ 20, 3, f20^2*f48 ], [ 21, 3, f21^30*f49 ], [ 22, 3,
> f22*f23*f50 ], [ 23, 3, f23*f51 ], [ 24, 3, f24^4*f52 ], [ 25, 3,
> f25^4*f53 ], [ 26, 3, f26^4*f54 ], [ 27, 3, f27^2*f55 ], [ 28, 3,
> f28^30*f56 ], [ 29, 3, f29*f30*f57 ], [ 30, 3, f30*f58 ], [ 31, 3,
> f31^4*f59 ], [ 32, 3, f32^4*f60 ], [ 33, 3, f33^4*f61 ], [ 34, 3,
> f6*f34^2 ], [ 35, 3, f7*f35^30 ], [ 36, 3, f8*f36*f37 ], [ 37, 3,
> f9*f37 ], [ 38, 3, f10*f38^4 ], [ 39, 3, f11*f39^4 ], [ 40, 3,
> f12*f40^4 ], [ 41, 3, f13*f41^2 ], [ 42, 3, f14*f42^30 ], [ 43, 3,
> f15*f43*f44 ], [ 44, 3, f16*f44 ], [ 45, 3, f17*f45^4 ], [ 46, 3,
> f18*f46^4 ], [ 47, 3, f19*f47^4 ], [ 48, 3, f20*f48^2 ], [ 49, 3,
> f21*f49^30 ], [ 50, 3, f22*f50*f51 ], [ 51, 3, f23*f51 ], [ 52, 3,
> f24*f52^4 ], [ 53, 3, f25*f53^4 ], [ 54, 3, f26*f54^4 ], [ 55, 3,
> f27*f55^2 ], [ 56, 3, f28*f56^30 ], [ 57, 3, f29*f57*f58 ], [ 58, 3,
> f30*f58 ], [ 59, 3, f31*f59^4 ], [ 60, 3, f32*f60^4 ], [ 61, 3,
> f33*f61^4 ], [ 6, 4, f6^2*f20 ], [ 7, 4, f7^30*f21 ], [ 8, 4,
> f8*f9*f22 ], [ 9, 4, f9*f23 ], [ 10, 4, f10^4*f24 ], [ 11, 4,
> f11^4*f25 ], [ 12, 4, f12^4*f26 ], [ 13, 4, f13^2*f27 ], [ 14, 4,
> f14^30*f28 ], [ 15, 4, f15*f16*f29 ], [ 16, 4, f16*f30 ], [ 17, 4,
> f17^4*f31 ], [ 18, 4, f18^4*f32 ], [ 19, 4, f19^4*f33 ], [ 20, 4,
> f6*f20^2 ], [ 21, 4, f7*f21^30 ], [ 22, 4, f8*f22*f23 ], [ 23, 4,
> f9*f23 ], [ 24, 4, f10*f24^4 ], [ 25, 4, f11*f25^4 ], [ 26, 4,
> f12*f26^4 ], [ 27, 4, f13*f27^2 ], [ 28, 4, f14*f28^30 ], [ 29, 4,
> f15*f29*f30 ], [ 30, 4, f16*f30 ], [ 31, 4, f17*f31^4 ], [ 32, 4,
> f18*f32^4 ], [ 33, 4, f19*f33^4 ], [ 34, 4, f34^2*f48 ], [ 35, 4,
> f35^30*f49 ], [ 36, 4, f36*f37*f50 ], [ 37, 4, f37*f51 ], [ 38, 4,
> f38^4*f52 ], [ 39, 4, f39^4*f53 ], [ 40, 4, f40^4*f54 ], [ 41, 4,
> f41^2*f55 ], [ 42, 4, f42^30*f56 ], [ 43, 4, f43*f44*f57 ], [ 44, 4,
> f44*f58 ], [ 45, 4, f45^4*f59 ], [ 46, 4, f46^4*f60 ], [ 47, 4,
> f47^4*f61 ], [ 48, 4, f34*f48^2 ], [ 49, 4, f35*f49^30 ], [ 50, 4,
> f36*f50*f51 ], [ 51, 4, f37*f51 ], [ 52, 4, f38*f52^4 ], [ 53, 4,
> f39*f53^4 ], [ 54, 4, f40*f54^4 ], [ 55, 4, f41*f55^2 ], [ 56, 4,
> f42*f56^30 ], [ 57, 4, f43*f57*f58 ], [ 58, 4, f44*f58 ], [ 59, 4,
> f45*f59^4 ], [ 60, 4, f46*f60^4 ], [ 61, 4, f47*f61^4 ], [ 6, 5,
> f6^2*f13 ], [ 7, 5, f7^30*f14 ], [ 8, 5, f8*f9*f15 ], [ 9, 5, f9*f16
> ], [ 10, 5, f10^4*f17 ], [ 11, 5, f11^4*f18 ], [ 12, 5, f12^4*f19 ],
> [ 13, 5, f6*f13^2 ], [ 14, 5, f7*f14^30 ], [ 15, 5, f8*f15*f16 ], [
> 16, 5, f9*f16 ], [ 17, 5, f10*f17^4 ], [ 18, 5, f11*f18^4 ], [ 19,
> 5, f12*f19^4 ], [ 20, 5, f20^2*f27 ], [ 21, 5, f21^30*f28 ], [ 22,
> 5, f22*f23*f29 ], [ 23, 5, f23*f30 ], [ 24, 5, f24^4*f31 ], [ 25, 5,
> f25^4*f32 ], [ 26, 5, f26^4*f33 ], [ 27, 5, f20*f27^2 ], [ 28, 5,
> f21*f28^30 ], [ 29, 5, f22*f29*f30 ], [ 30, 5, f23*f30 ], [ 31, 5,
> f24*f31^4 ], [ 32, 5, f25*f32^4 ], [ 33, 5, f26*f33^4 ], [ 34, 5,
> f34^2*f41 ], [ 35, 5, f35^30*f42 ], [ 36, 5, f36*f37*f43 ], [ 37, 5,
> f37*f44 ], [ 38, 5, f38^4*f45 ], [ 39, 5, f39^4*f46 ], [ 40, 5,
> f40^4*f47 ], [ 41, 5, f34*f41^2 ], [ 42, 5, f35*f42^30 ], [ 43, 5,
> f36*f43*f44 ], [ 44, 5, f37*f44 ], [ 45, 5, f38*f45^4 ], [ 46, 5,
> f39*f46^4 ], [ 47, 5, f40*f47^4 ], [ 48, 5, f48^2*f55 ], [ 49, 5,
> f49^30*f56 ], [ 50, 5, f50*f51*f57 ], [ 51, 5, f51*f58 ], [ 52, 5,
> f52^4*f59 ], [ 53, 5, f53^4*f60 ], [ 54, 5, f54^4*f61 ], [ 55, 5,
> f48*f55^2 ], [ 56, 5, f49*f56^30 ], [ 57, 5, f50*f57*f58 ], [ 58, 5,
> f51*f58 ], [ 59, 5, f52*f59^4 ], [ 60, 5, f53*f60^4 ], [ 61, 5,
> f54*f61^4 ], [ 7, 6, f7^4 ], [ 10, 6, f11*f12 ], [ 11, 6,
> f11^4*f12^3 ], [ 12, 6, f11^3*f12^3 ], [ 10, 7, f11^4*f12^3 ], [ 11,
> 7, f10^4*f11^4*f12^2 ], [ 12, 7, f10^2*f11^4*f12^4 ], [ 10, 8, f10
> ], [ 11, 8, f11 ], [ 12, 8, f12 ], [ 10, 9, f10^3 ], [ 11, 9, f11^3
> ], [ 12, 9, f12^3 ], [ 14, 13, f14^4 ], [ 17, 13, f18*f19 ], [ 18,
> 13, f18^4*f19^3 ], [ 19, 13, f18^3*f19^3 ], [ 17, 14, f18^4*f19^3 ],
> [ 18, 14, f17^4*f18^4*f19^2 ], [ 19, 14, f17^2*f18^4*f19^4 ], [ 17,
> 15, f17 ], [ 18, 15, f18 ], [ 19, 15, f19 ], [ 17, 16, f17^3 ], [
> 18, 16, f18^3 ], [ 19, 16, f19^3 ], [ 21, 20, f21^4 ], [ 24, 20,
> f25*f26 ], [ 25, 20, f25^4*f26^3 ], [ 26, 20, f25^3*f26^3 ], [ 24,
> 21, f25^4*f26^3 ], [ 25, 21, f24^4*f25^4*f26^2 ], [ 26, 21,
> f24^2*f25^4*f26^4 ], [ 24, 22, f24 ], [ 25, 22, f25 ], [ 26, 22, f26
> ], [ 24, 23, f24^3 ], [ 25, 23, f25^3 ], [ 26, 23, f26^3 ], [ 28,
> 27, f28^4 ], [ 31, 27, f32*f33 ], [ 32, 27, f32^4*f33^3 ], [ 33, 27,
> f32^3*f33^3 ], [ 31, 28, f32^4*f33^3 ], [ 32, 28, f31^4*f32^4*f33^2
> ], [ 33, 28, f31^2*f32^4*f33^4 ], [ 31, 29, f31 ], [ 32, 29, f32 ],
> [ 33, 29, f33 ], [ 31, 30, f31^3 ], [ 32, 30, f32^3 ], [ 33, 30,
> f33^3 ], [ 35, 34, f35^4 ], [ 38, 34, f39*f40 ], [ 39, 34,
> f39^4*f40^3 ], [ 40, 34, f39^3*f40^3 ], [ 38, 35, f39^4*f40^3 ], [
> 39, 35, f38^4*f39^4*f40^2 ], [ 40, 35, f38^2*f39^4*f40^4 ], [ 38,
> 36, f38 ], [ 39, 36, f39 ], [ 40, 36, f40 ], [ 38, 37, f38^3 ], [
> 39, 37, f39^3 ], [ 40, 37, f40^3 ], [ 42, 41, f42^4 ], [ 45, 41,
> f46*f47 ], [ 46, 41, f46^4*f47^3 ], [ 47, 41, f46^3*f47^3 ], [ 45,
> 42, f46^4*f47^3 ], [ 46, 42, f45^4*f46^4*f47^2 ], [ 47, 42,
> f45^2*f46^4*f47^4 ], [ 45, 43, f45 ], [ 46, 43, f46 ], [ 47, 43, f47
> ], [ 45, 44, f45^3 ], [ 46, 44, f46^3 ], [ 47, 44, f47^3 ], [ 49,
> 48, f49^4 ], [ 52, 48, f53*f54 ], [ 53, 48, f53^4*f54^3 ], [ 54, 48,
> f53^3*f54^3 ], [ 52, 49, f53^4*f54^3 ], [ 53, 49, f52^4*f53^4*f54^2
> ], [ 54, 49, f52^2*f53^4*f54^4 ], [ 52, 50, f52 ], [ 53, 50, f53 ],
> [ 54, 50, f54 ], [ 52, 51, f52^3 ], [ 53, 51, f53^3 ], [ 54, 51,
> f54^3 ], [ 56, 55, f56^4 ], [ 59, 55, f60*f61 ], [ 60, 55,
> f60^4*f61^3 ], [ 61, 55, f60^3*f61^3 ], [ 59, 56, f60^4*f61^3 ], [
> 60, 56, f59^4*f60^4*f61^2 ], [ 61, 56, f59^2*f60^4*f61^4 ], [ 59,
> 57, f59 ], [ 60, 57, f60 ], [ 61, 57, f61 ], [ 59, 58, f59^3 ], [
> 60, 58, f60^3 ], [ 61, 58, f61^3 ], ];;

# construct a new single collector
gap> rws := SingleCollector( g, [ 3, 7, 2, 2, 2, 3, 31, 2, 2, 5, 5, 5, 3,
>    31, 2, 2, 5, 5, 5, 3, 31, 2, 2, 5, 5, 5, 3, 31, 2, 2, 5, 5, 5, 3, 31,
>    2, 2, 5, 5, 5, 3, 31, 2, 2, 5, 5, 5, 3, 31, 2, 2, 5, 5, 5, 3, 31, 2, 2,
>    5, 5, 5 ] );
<<single collector, 32 Bits>>

# set the relators
gap> for x  in r  do
>        if 2 = Length(x)  then
>            SetPower( rws, x[1], x[2] );
>        else
>            SetCommutator( rws, x[1], x[2], x[3] );
>        fi;
>    od;

# reduce the rules and update the collector
gap> UpdatePolycyclicCollector(rws);
gap> ReduceRules(rws);
gap> UpdatePolycyclicCollector(rws);
gap> IsConfluent(rws);
true
gap> rws;
<<up-to-date single collector, 32 Bits>>
gap> Print(List( rws![SCP_INVERSES], ExtRepOfObj ),"\n");
[ [ 1, 2 ], [ 2, 6 ], [ 3, 1 ], [ 4, 1 ], [ 5, 1 ], [ 6, 2 ], [ 7, 30 ], 
  [ 8, 1, 9, 1 ], [ 9, 1 ], [ 10, 4 ], [ 11, 4 ], [ 12, 4 ], [ 13, 2 ], 
  [ 14, 30 ], [ 15, 1, 16, 1 ], [ 16, 1 ], [ 17, 4 ], [ 18, 4 ], [ 19, 4 ], 
  [ 20, 2 ], [ 21, 30 ], [ 22, 1, 23, 1 ], [ 23, 1 ], [ 24, 4 ], [ 25, 4 ], 
  [ 26, 4 ], [ 27, 2 ], [ 28, 30 ], [ 29, 1, 30, 1 ], [ 30, 1 ], [ 31, 4 ], 
  [ 32, 4 ], [ 33, 4 ], [ 34, 2 ], [ 35, 30 ], [ 36, 1, 37, 1 ], [ 37, 1 ], 
  [ 38, 4 ], [ 39, 4 ], [ 40, 4 ], [ 41, 2 ], [ 42, 30 ], [ 43, 1, 44, 1 ], 
  [ 44, 1 ], [ 45, 4 ], [ 46, 4 ], [ 47, 4 ], [ 48, 2 ], [ 49, 30 ], 
  [ 50, 1, 51, 1 ], [ 51, 1 ], [ 52, 4 ], [ 53, 4 ], [ 54, 4 ], [ 55, 2 ], 
  [ 56, 30 ], [ 57, 1, 58, 1 ], [ 58, 1 ], [ 59, 4 ], [ 60, 4 ], [ 61, 4 ] ]

# force stack overflow
gap> rws![SCP_MAX_STACK_SIZE] := 1;;
gap> IsConfluent(rws);
true
gap> rws![SCP_MAX_STACK_SIZE] := 1;;

# construct the maximal word
gap> l := [1..61]*0;;
gap> r := RelativeOrders(rws);;
gap> w := Product( List( [1..61], x -> g[x]^(r[x]-1) ) );;
gap> Print(ExtRepOfObj(w),"\n");
[ 1, 2, 2, 6, 3, 1, 4, 1, 5, 1, 6, 2, 7, 30, 8, 1, 9, 1, 10, 4, 11, 4, 12, 4, 
  13, 2, 14, 30, 15, 1, 16, 1, 17, 4, 18, 4, 19, 4, 20, 2, 21, 30, 22, 1, 23, 
  1, 24, 4, 25, 4, 26, 4, 27, 2, 28, 30, 29, 1, 30, 1, 31, 4, 32, 4, 33, 4, 
  34, 2, 35, 30, 36, 1, 37, 1, 38, 4, 39, 4, 40, 4, 41, 2, 42, 30, 43, 1, 44, 
  1, 45, 4, 46, 4, 47, 4, 48, 2, 49, 30, 50, 1, 51, 1, 52, 4, 53, 4, 54, 4, 
  55, 2, 56, 30, 57, 1, 58, 1, 59, 4, 60, 4, 61, 4 ]

# start multiplying around with <w>
gap> Print(ExtRepOfObj( ReducedProduct( rws, w, w ) ),"\n");
[ 1, 1, 2, 2, 6, 1, 7, 5, 9, 1, 10, 3, 11, 3, 13, 1, 14, 5, 16, 1, 17, 3, 18, 
  3, 20, 1, 21, 5, 23, 1, 24, 3, 25, 3, 27, 1, 28, 5, 30, 1, 31, 3, 32, 3, 
  34, 1, 35, 5, 37, 1, 38, 3, 39, 3, 41, 1, 42, 5, 44, 1, 45, 3, 46, 3, 48, 
  1, 49, 5, 51, 1, 52, 3, 53, 3, 55, 1, 56, 5, 58, 1, 59, 3, 60, 3 ]

gap> Print(ExtRepOfObj( SingleCollector_Solution( rws, w, w^0 ) ),"\n");
[ 1, 1, 2, 2, 3, 1, 4, 1, 5, 1, 6, 1, 7, 5, 8, 1, 10, 4, 11, 4, 12, 2, 13, 1, 
  14, 5, 15, 1, 17, 4, 18, 4, 19, 2, 20, 1, 21, 5, 22, 1, 24, 4, 25, 4, 26, 
  2, 27, 1, 28, 5, 29, 1, 31, 4, 32, 4, 33, 2, 34, 1, 35, 5, 36, 1, 38, 4, 
  39, 4, 40, 2, 41, 1, 42, 5, 43, 1, 45, 4, 46, 4, 47, 2, 48, 1, 49, 5, 50, 
  1, 52, 4, 53, 4, 54, 2, 55, 1, 56, 5, 57, 1, 59, 4, 60, 4, 61, 2 ]

gap> Print(ExtRepOfObj( ReducedInverse( rws, w ) ),"\n");
[ 1, 1, 2, 2, 3, 1, 4, 1, 5, 1, 6, 1, 7, 5, 8, 1, 10, 4, 11, 4, 12, 2, 13, 1, 
  14, 5, 15, 1, 17, 4, 18, 4, 19, 2, 20, 1, 21, 5, 22, 1, 24, 4, 25, 4, 26, 
  2, 27, 1, 28, 5, 29, 1, 31, 4, 32, 4, 33, 2, 34, 1, 35, 5, 36, 1, 38, 4, 
  39, 4, 40, 2, 41, 1, 42, 5, 43, 1, 45, 4, 46, 4, 47, 2, 48, 1, 49, 5, 50, 
  1, 52, 4, 53, 4, 54, 2, 55, 1, 56, 5, 57, 1, 59, 4, 60, 4, 61, 2 ]

gap> Print(ExtRepOfObj( ReducedForm( rws, w^-1 ) ),"\n");
[ 1, 1, 2, 2, 3, 1, 4, 1, 5, 1, 6, 1, 7, 5, 8, 1, 10, 4, 11, 4, 12, 2, 13, 1, 
  14, 5, 15, 1, 17, 4, 18, 4, 19, 2, 20, 1, 21, 5, 22, 1, 24, 4, 25, 4, 26, 
  2, 27, 1, 28, 5, 29, 1, 31, 4, 32, 4, 33, 2, 34, 1, 35, 5, 36, 1, 38, 4, 
  39, 4, 40, 2, 41, 1, 42, 5, 43, 1, 45, 4, 46, 4, 47, 2, 48, 1, 49, 5, 50, 
  1, 52, 4, 53, 4, 54, 2, 55, 1, 56, 5, 57, 1, 59, 4, 60, 4, 61, 2 ]

gap> Print(ExtRepOfObj( ReducedPower( rws, w, 1000 ) ),"\n");
[ 1, 2, 2, 6, 6, 2, 7, 30, 10, 3, 11, 3, 12, 4, 13, 2, 14, 30, 17, 3, 18, 3, 
  19, 4, 20, 2, 21, 30, 24, 3, 25, 3, 26, 4, 27, 2, 28, 30, 31, 3, 32, 3, 33, 
  4, 34, 2, 35, 30, 38, 3, 39, 3, 40, 4, 41, 2, 42, 30, 45, 3, 46, 3, 47, 4, 
  48, 2, 49, 30, 52, 3, 53, 3, 54, 4, 55, 2, 56, 30, 59, 3, 60, 3, 61, 4 ]

gap> l := GeneratorsOfRws(rws);;
gap> p := ReducedOne(rws);;
gap> for i  in l  do 
>        p := ReducedProduct( rws, p, ReducedProduct(rws,w,i) );
>    od;
gap> Print(ExtRepOfObj(p),"\n");
[ 4, 1, 5, 1, 6, 2, 7, 5, 8, 1, 9, 1, 11, 2, 12, 2, 14, 22, 17, 3, 18, 4, 20, 
  2, 21, 4, 22, 1, 24, 1, 26, 4, 28, 26, 31, 2, 32, 3, 33, 3, 34, 2, 35, 24, 
  36, 1, 38, 1, 39, 3, 42, 30, 43, 1, 44, 1, 45, 3, 46, 3, 47, 1, 48, 2, 50, 
  1, 51, 1, 52, 3, 54, 2, 55, 1, 56, 26, 57, 1, 59, 4, 60, 2 ]

gap> l := GeneratorsOfRws(rws);;
gap> p := ReducedOne(rws);;
gap> for i  in l  do 
>        p := ReducedProduct( rws, p, ReducedProduct( rws,
>               ReducedProduct(rws,w,i), w ) );
>    od;
gap> Print(ExtRepOfObj(p),"\n");
[ 1, 2, 4, 1, 6, 2, 7, 3, 8, 1, 10, 1, 11, 2, 12, 3, 13, 1, 14, 21, 17, 4, 
  18, 4, 19, 1, 20, 2, 21, 30, 22, 1, 24, 2, 26, 1, 27, 1, 28, 5, 29, 1, 31, 
  4, 33, 2, 34, 2, 35, 19, 36, 1, 38, 1, 39, 2, 41, 1, 42, 5, 44, 1, 45, 3, 
  48, 2, 49, 6, 50, 1, 52, 3, 53, 1, 54, 4, 55, 2, 56, 19, 57, 1, 59, 2, 60, 
  2, 61, 1 ]

gap> Print(ExtRepOfObj( ReducedComm( rws, w, w ) ),"\n");
[  ]

gap> a := ReducedProduct( rws, ReducedProduct( rws, w, w ), w );;
gap> Print(ExtRepOfObj(a),"\n");
[ 3, 1, 4, 1, 5, 1, 8, 1, 12, 1, 15, 1, 19, 1, 22, 1, 26, 1, 29, 1, 33, 1, 
  36, 1, 40, 1, 43, 1, 47, 1, 50, 1, 54, 1, 57, 1, 61, 1 ]

gap> a := ReducedProduct( rws, a, a );;
gap> Print(ExtRepOfObj(a),"\n");
[ 9, 1, 12, 3, 16, 1, 19, 3, 23, 1, 26, 3, 30, 1, 33, 3, 37, 1, 40, 3, 44, 1, 
  47, 3, 51, 1, 54, 3, 58, 1, 61, 3 ]

gap> a := ReducedProduct( rws, a, a );;
gap> Print(ExtRepOfObj(a),"\n");
[  ]

gap> Print(ExtRepOfObj( ReducedLeftQuotient( rws, ReducedProduct(rws,w,w), w) ),"\n");
[ 1, 1, 2, 2, 3, 1, 4, 1, 5, 1, 6, 1, 7, 5, 8, 1, 10, 4, 11, 4, 12, 2, 13, 1, 
  14, 5, 15, 1, 17, 4, 18, 4, 19, 2, 20, 1, 21, 5, 22, 1, 24, 4, 25, 4, 26, 
  2, 27, 1, 28, 5, 29, 1, 31, 4, 32, 4, 33, 2, 34, 1, 35, 5, 36, 1, 38, 4, 
  39, 4, 40, 2, 41, 1, 42, 5, 43, 1, 45, 4, 46, 4, 47, 2, 48, 1, 49, 5, 50, 
  1, 52, 4, 53, 4, 54, 2, 55, 1, 56, 5, 57, 1, 59, 4, 60, 4, 61, 2 ]

gap> Print(ExtRepOfObj( ReducedPower( rws, w, -1 ) ),"\n");
[ 1, 1, 2, 2, 3, 1, 4, 1, 5, 1, 6, 1, 7, 5, 8, 1, 10, 4, 11, 4, 12, 2, 13, 1, 
  14, 5, 15, 1, 17, 4, 18, 4, 19, 2, 20, 1, 21, 5, 22, 1, 24, 4, 25, 4, 26, 
  2, 27, 1, 28, 5, 29, 1, 31, 4, 32, 4, 33, 2, 34, 1, 35, 5, 36, 1, 38, 4, 
  39, 4, 40, 2, 41, 1, 42, 5, 43, 1, 45, 4, 46, 4, 47, 2, 48, 1, 49, 5, 50, 
  1, 52, 4, 53, 4, 54, 2, 55, 1, 56, 5, 57, 1, 59, 4, 60, 4, 61, 2 ]

gap> Print(ExtRepOfObj( ReducedPower( rws, w, 0 ) ),"\n");
[  ]

gap> Print(ExtRepOfObj( ReducedPower( rws, w, 1 ) ),"\n");
[ 1, 2, 2, 6, 3, 1, 4, 1, 5, 1, 6, 2, 7, 30, 8, 1, 9, 1, 10, 4, 11, 4, 12, 4, 
  13, 2, 14, 30, 15, 1, 16, 1, 17, 4, 18, 4, 19, 4, 20, 2, 21, 30, 22, 1, 23, 
  1, 24, 4, 25, 4, 26, 4, 27, 2, 28, 30, 29, 1, 30, 1, 31, 4, 32, 4, 33, 4, 
  34, 2, 35, 30, 36, 1, 37, 1, 38, 4, 39, 4, 40, 4, 41, 2, 42, 30, 43, 1, 44, 
  1, 45, 4, 46, 4, 47, 4, 48, 2, 49, 30, 50, 1, 51, 1, 52, 4, 53, 4, 54, 4, 
  55, 2, 56, 30, 57, 1, 58, 1, 59, 4, 60, 4, 61, 4 ]

gap> Print(ExtRepOfObj( ReducedPower( rws, w, 2 ) ),"\n");
[ 1, 1, 2, 2, 6, 1, 7, 5, 9, 1, 10, 3, 11, 3, 13, 1, 14, 5, 16, 1, 17, 3, 18, 
  3, 20, 1, 21, 5, 23, 1, 24, 3, 25, 3, 27, 1, 28, 5, 30, 1, 31, 3, 32, 3, 
  34, 1, 35, 5, 37, 1, 38, 3, 39, 3, 41, 1, 42, 5, 44, 1, 45, 3, 46, 3, 48, 
  1, 49, 5, 51, 1, 52, 3, 53, 3, 55, 1, 56, 5, 58, 1, 59, 3, 60, 3 ]

gap> Print(ExtRepOfObj( ReducedPower( rws, w, 3 ) ),"\n");
[ 3, 1, 4, 1, 5, 1, 8, 1, 12, 1, 15, 1, 19, 1, 22, 1, 26, 1, 29, 1, 33, 1, 
  36, 1, 40, 1, 43, 1, 47, 1, 50, 1, 54, 1, 57, 1, 61, 1 ]

gap> Print(ExtRepOfObj( ReducedPower( rws, w, 4 ) ),"\n");
[ 1, 2, 2, 6, 6, 2, 7, 30, 10, 3, 11, 3, 12, 4, 13, 2, 14, 30, 17, 3, 18, 3, 
  19, 4, 20, 2, 21, 30, 24, 3, 25, 3, 26, 4, 27, 2, 28, 30, 31, 3, 32, 3, 33, 
  4, 34, 2, 35, 30, 38, 3, 39, 3, 40, 4, 41, 2, 42, 30, 45, 3, 46, 3, 47, 4, 
  48, 2, 49, 30, 52, 3, 53, 3, 54, 4, 55, 2, 56, 30, 59, 3, 60, 3, 61, 4 ]

gap> Print(ExtRepOfObj( ReducedPower( rws, w, 5 ) ),"\n");
[ 1, 1, 2, 2, 3, 1, 4, 1, 5, 1, 6, 1, 7, 5, 8, 1, 9, 1, 10, 1, 11, 1, 12, 1, 
  13, 1, 14, 5, 15, 1, 16, 1, 17, 1, 18, 1, 19, 1, 20, 1, 21, 5, 22, 1, 23, 
  1, 24, 1, 25, 1, 26, 1, 27, 1, 28, 5, 29, 1, 30, 1, 31, 1, 32, 1, 33, 1, 
  34, 1, 35, 5, 36, 1, 37, 1, 38, 1, 39, 1, 40, 1, 41, 1, 42, 5, 43, 1, 44, 
  1, 45, 1, 46, 1, 47, 1, 48, 1, 49, 5, 50, 1, 51, 1, 52, 1, 53, 1, 54, 1, 
  55, 1, 56, 5, 57, 1, 58, 1, 59, 1, 60, 1, 61, 1 ]

gap> Print(ExtRepOfObj( ReducedComm( rws, w, w ) ),"\n");
[  ]

gap> Print(ExtRepOfObj( ReducedComm( rws, w, l[1] ) ),"\n");
[ 2, 6, 3, 1, 4, 1 ]

gap> Print(ExtRepOfObj( ReducedLeftQuotient( rws, w, w ) ) ,"\n");
[  ]

gap> Print(ExtRepOfObj( ReducedLeftQuotient( rws, w, l[1] ) ),"\n");
[ 1, 2, 2, 4, 3, 1, 5, 1, 6, 1, 7, 5, 8, 1, 10, 4, 11, 4, 12, 2, 13, 1, 14, 
  5, 15, 1, 17, 4, 18, 4, 19, 2, 20, 1, 21, 5, 22, 1, 24, 4, 25, 4, 26, 2, 
  27, 1, 28, 5, 29, 1, 31, 4, 32, 4, 33, 2, 34, 1, 35, 5, 36, 1, 38, 4, 39, 
  4, 40, 2, 41, 1, 42, 5, 43, 1, 45, 4, 46, 4, 47, 2, 48, 1, 49, 5, 50, 1, 
  52, 4, 53, 4, 54, 2, 55, 1, 56, 5, 57, 1, 59, 4, 60, 4, 61, 2 ]

gap> Print(ExtRepOfObj( ReducedOne( rws ) ),"\n");
[  ]

gap> Print(ExtRepOfObj( ReducedQuotient( rws, w, w ) ),"\n");
[  ]

gap> Print(ExtRepOfObj( ReducedQuotient( rws, w, l[1] ) ),"\n");
[ 1, 1, 2, 3, 3, 1, 4, 1, 6, 2, 7, 30, 8, 1, 9, 1, 10, 4, 11, 4, 12, 4, 13, 
  2, 14, 30, 15, 1, 16, 1, 17, 4, 18, 4, 19, 4, 20, 2, 21, 30, 22, 1, 23, 1, 
  24, 4, 25, 4, 26, 4, 27, 2, 28, 30, 29, 1, 30, 1, 31, 4, 32, 4, 33, 4, 34, 
  2, 35, 30, 36, 1, 37, 1, 38, 4, 39, 4, 40, 4, 41, 2, 42, 30, 43, 1, 44, 1, 
  45, 4, 46, 4, 47, 4, 48, 2, 49, 30, 50, 1, 51, 1, 52, 4, 53, 4, 54, 4, 55, 
  2, 56, 30, 57, 1, 58, 1, 59, 4, 60, 4, 61, 4 ]


#############################################################################

gap> STOP_TEST( "rwspcsng.tst", 337100000 );


#############################################################################
##
#E