Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

merge

  • Loading branch information...
commit 398d4c720bb1a45c20dd5af4bb0d1abdce8123a3 2 parents 9d18840 + ca14752
@laurentbartholdi authored
View
25 cnf/Makefile.in
@@ -11,7 +11,10 @@
##
#############################################################################
-.PHONY: all lib doc clean distribute mrproper wwwdir checkblocks tarballs
+.PHONY: all doc clean distribute mrproper checkblocks tarballs wwwdir
+
+PWDU:=$(shell dirname $(PWD))
+PWDUU:=$(shell dirname $(PWDU))
LOCALBIN=bin/@GAPARCH@
EXTERN=$(CURDIR)/bin/@GAPARCH@/extern
@@ -70,12 +73,12 @@ configure: cnf/Makefile.in cnf/configure.ac
(cd cnf; aclocal -Im4; autoconf; mv -f configure ..)
.version: PackageInfo.g
- grep '^Version :=' $< | awk -F'"' '{print $$2}' > $@
+ grep '^Version :=' $< | cut -f2 -d'"' | tr -d '\n' > $@
doc: doc/chap0.html
doc/chap0.html: doc/img.xml doc/imgbib.xml gap/helpers.gd gap/complex.gd
- echo 'LoadPackage("img"); DOC@IMG();' | @GAP_EXEC@ -r -q
+ echo 'LoadPackage("img"); DOC@IMG();' | @GAP_EXEC@ -r -q -T -l ";$(PWDUU)"
(cd doc; git add *.html manual.pdf manual.css; git commit -m 'New html files'; git push github master:gh-pages --force)
checkblocks:
@@ -85,10 +88,14 @@ checkblocks:
@rm @@-blocks @@-in
tarballs: .version doc
- mkdir -p www
- rm -rf www/img
- tar -c -f - --exclude '*~' --exclude 'config.[ls]*' --exclude 'img/Makefile*' --exclude .cvsignore --exclude autom4te.cache --exclude sandbox --exclude www --exclude bin --exclude 'extern/[a-z]*' --exclude CVS --exclude .version -C .. img | (cd www; tar -x -f -)
- tar -c -f www/img-`cat .version`.tar.gz -z -C www img
- ln -sf img-`cat .version`.tar.gz www/img.tar.gz
+ mkdir -p zips
+ tar -c -f zips/img-`cat .version`.tar.gz -z --exclude '*~' --exclude '.[a-z]*' --exclude 'config.[ls]*' --exclude 'img/Makefile*' --exclude autom4te.cache --exclude sandbox --exclude zips --exclude bin --exclude extern -C .. img
+ ln -sf img-`cat .version`.tar.gz zips/img.tar.gz
+
+wwwdir: doc/chap0.html tarballs
+ cp PackageInfo.g doc/
+ cp README doc/README.img
+ (cd doc; git add *.html manual.pdf manual.css PackageInfo.g README.img; git commit -m 'New html files'; git push github master:gh-pages --force)
+ rm doc/PackageInfo.g doc/README.img
-#E Makefile.in . . . . . . . . . . . . . . . . . . . . . . . . . . ends here
+#E Makefile.in . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here
View
1,044 tst/chapter-3.tst
@@ -1,1044 +0,0 @@
-#############################################################################
-##
-#W chapter-3.tst FR Package Laurent Bartholdi
-##
-#H @(#)$Id$
-##
-#Y Copyright (C) 2008, Laurent Bartholdi
-##
-#############################################################################
-##
-## This file tests the functions explained in chapter 3 of the manual
-##
-#############################################################################
-
-gap> START_TEST("fr:chapter 3");
-gap>
-gap> Info(InfoFR,1,"3.3 Creators for FR machines");
-#I 3.3 Creators for FR machines
-gap>
-gap> Read(Filename(DirectoriesPackageLibrary("fr","tst"),"frmachines.g"));
-gap>
-gap> Info(InfoFR,1,"3.3.1 FRMachineNC, 3.3.2 FRMachine");
-#I 3.3.1 FRMachineNC, 3.3.2 FRMachine
-gap>
-gap> # tests if all the definitions of FRMachineNC and FRMachine agree.
-gap> for list in [mg, mm, ms, mmi, msiu, msu] do
-> for machines in list do
-> if Length(machines) > 1 then
-> Print(ForAll(machines{[2..Length(machines)]}, m -> m = machines[1]), "\n");
-> fi;
-> od;
-> Print("\n");
-> od;
-true
-true
-true
-true
-true
-true
-
-true
-true
-true
-true
-true
-true
-
-true
-true
-true
-
-true
-true
-true
-true
-true
-true
-
-true
-true
-true
-true
-true
-true
-
-true
-true
-true
-
-gap>
-gap> Info(InfoFR,1,"3.3.4 AsGroupFRMachine, ...");
-#I 3.3.4 AsGroupFRMachine, ...
-gap>
-gap> # 5 loops testing AsGroupFRMachine, AsMonoidFRMachine and AsSemigroupFRMachine
-gap> for i in [1..Length(mg)] do
-> if Length(mg[i]) > 1 then
-> Print("Machine ",i,":\n");
-> for list in [mm, ms, msu] do
-> Print(ForAll(list[i], m -> AsGroupFRMachine(m) = mg[i][1]), "\n");
-> od;
-> fi;
-> od;
-Machine 1:
-true
-true
-true
-Machine 2:
-true
-true
-true
-Machine 3:
-true
-true
-true
-Machine 4:
-true
-true
-true
-Machine 5:
-true
-true
-true
-Machine 6:
-true
-true
-true
-gap> for i in [1..Length(mmi)] do
-> if Length(mmi[i]) > 1 then
-> Print("Machine ",i,":\n");
-> for list in [mg] do
-> Print(ForAll(list[i], m -> AsMonoidFRMachine(m) = mmi[i][1]), "\n");
-> od;
-> fi;
-> od;
-Machine 1:
-false
-Machine 2:
-true
-Machine 3:
-true
-Machine 4:
-true
-Machine 5:
-false
-Machine 6:
-true
-gap> # should be false for machines 1 and 5. For machine 1, the identity transformation is already in mg, and for machine 5, in mmi, the ordering of the elements is not the right one. See SubFRMachine.
-gap> for i in [1..Length(mm)] do
-> if Length(mm[i]) > 1 then
-> Print("Machine ",i,":\n");
-> for list in [ms] do
-> Print(ForAll(list[i], m -> AsMonoidFRMachine(m) = mm[i][1]), "\n");
-> od;
-> fi;
-> od;
-Machine 1:
-true
-Machine 4:
-true
-Machine 5:
-true
-Machine 7:
-true
-Machine 8:
-true
-Machine 9:
-true
-gap> for i in [1..Length(msiu)] do
-> if Length(msiu[i]) > 1 then
-> Print("Machine ",i,":\n");
-> for list in [mg, mmi] do
-> Print(ForAll(list[i], m -> AsSemigroupFRMachine(m) = msiu[i][1]), "\n");
-> od;
-> fi;
-> od; # Same problems as before : ordering of states
-Machine 1:
-false
-false
-Machine 2:
-false
-false
-Machine 3:
-false
-false
-Machine 4:
-false
-false
-Machine 5:
-false
-true
-Machine 6:
-true
-true
-gap> for i in [1..Length(msu)] do
-> if Length(msu[i]) > 1 then
-> Print("Machine ",i,":\n");
-> for list in [mm] do
-> Print(ForAll(list[i], m -> AsSemigroupFRMachine(m) = msu[i][1]), "\n");
-> od;
-> fi;
-> od; # Same problems as before : ordering of states
-Machine 7:
-false
-Machine 8:
-true
-Machine 9:
-true
-gap>
-gap> Info(InfoFR,1,"3.3.5 ChangeFRMachineBasis");
-#I 3.3.5 ChangeFRMachineBasis
-gap>
-gap> m := mg[1][1];
-<FR machine with alphabet [ 1 .. 2 ] on Group( [ f1, f2, f3, f4, f5 ] )>
-gap> f := StateSet(m);;
-gap> l := [f.3,f.2];
-[ f3, f2 ]
-gap> ChangeFRMachineBasis(m, l);
-<FR machine with alphabet [ 1 .. 2 ] on Group( [ f1, f2, f3, f4, f5 ] )>
-gap> Display(last);
- G | 1 2
-----+---------------+---------------+
- f1 | f3^-1*f1*f3,1 f2^-1*f1*f2,2
- f2 | f3^-1*f1*f2,2 f2^-1*f1*f3,1
- f3 | f3^-1*f2*f3,1 f2^-1*f4*f2,2
- f4 | f3^-1*f2*f3,1 f2^-1*f5*f2,2
- f5 | f3^-1*f1*f3,1 f2^-1*f3*f2,2
-----+---------------+---------------+
-gap>
-gap> Info(InfoFR,1,"3.4 Attributes of FRMachines");
-#I 3.4 Attributes of FRMachines
-gap>
-gap> Info(InfoFR,1,"3.4.1 StateSet, 3.4.2 GeneratorsOfFRMachine");
-#I 3.4.1 StateSet, 3.4.2 GeneratorsOfFRMachine
-gap>
-gap> for list in mg do
-> for m in list do
-> Print(RankOfFreeGroup(StateSet(m)));
-> gen := GeneratorsOfFRMachine(m);
-> Print(Length(gen));
-> od;
-> Print("\n");
-> od;
-55555555
-33333333
-33333333
-11111111
-33333333
-22222222
-
-
-
-gap>
-gap> for type in [mm, mmi] do
-> for list in type do
-> for m in list do
-> Print(Length(GeneratorsOfMonoid(StateSet(m))));
-> gen := GeneratorsOfFRMachine(m);
-> Print(Length(gen));
-> od;
-> Print("\n");
-> od;
-> od;
-5555
-
-
-1111
-3333
-
-33333333
-22222222
-22222222
-9999
-6666
-6666
-2222
-6666
-4444
-
-
-
-gap>
-gap> for type in [ms, msu, msiu] do
-> for list in type do
-> for m in list do
-> Print(Length(GeneratorsOfSemigroup(StateSet(m))));
-> gen := GeneratorsOfFRMachine(m);
-> Print(Length(gen));
-> od;
-> Print("\n");
-> od;
-> od;
-5555
-
-
-
-
-
-
-2222
-2222
-
-
-
-
-
-
-44545444
-3333
-3333
-9999
-7777
-7777
-3333
-7777
-5555
-
-
-
-gap>
-gap> Info(InfoFR,1,"3.4.3 Output");
-#I 3.4.3 Output
-gap>
-gap> for type in [mg, mm, ms, mmi, msiu, msu] do
-> for i in [1..Length(type)] do
-> Print(ForAll(type[i], m -> List(GeneratorsOfFRMachine(m), g -> Output(m, g)) = outputs[i]), "\n");
-> od;
-> Print("\n");
-> od;# get false because of empty lists or wrong number of indices
-true
-true
-true
-true
-true
-true
-true
-true
-true
-
-true
-true
-true
-true
-true
-true
-true
-true
-true
-
-true
-true
-true
-true
-true
-true
-true
-true
-true
-
-false
-false
-false
-false
-false
-false
-true
-true
-true
-
-false
-false
-false
-false
-false
-false
-true
-true
-true
-
-true
-true
-true
-true
-true
-true
-false
-false
-false
-
-gap>
-gap> Info(InfoFR,1,"3.4.4 Transition");
-#I 3.4.4 Transition
-gap>
-gap> for i in [1..6] do
-> Print(ForAll(mg[i]{[1,4]}, m -> List(GeneratorsOfFRMachine(m), s -> List(AlphabetOfFRObject(m), x -> Transition(m, s, x))) = transitions[i]), "\n");
-> od;
-true
-true
-true
-true
-true
-true
-gap> for i in [7..9] do
-> Print(ForAll(mm[i]{[1,4]}, m -> List(GeneratorsOfFRMachine(m), s -> List(AlphabetOfFRObject(m), x -> Transition(m, s, x))) = transitions[i]), "\n");
-> od;
-true
-true
-true
-gap>
-gap> m := mg[1][1];
-<FR machine with alphabet [ 1 .. 2 ] on Group( [ f1, f2, f3, f4, f5 ] )>
-gap> f := StateSet(m);
-<free group on the generators [ f1, f2, f3, f4, f5 ]>
-gap> Transition(m, f.3, ListWithIdenticalEntries(30, 2));
-f3
-gap> Transition(m, f.3, Concatenation(ListWithIdenticalEntries(31, 2), [1]));
-f2
-gap> m := mg[2][1];
-<FR machine with alphabet [ 1 .. 8 ] on Group( [ f1, f2, f3 ] )>
-gap> f := StateSet(m);
-<free group on the generators [ f1, f2, f3 ]>
-gap> Transition(m, f.3, ListWithIdenticalEntries(30, 8));
-f3
-gap> Transition(m, f.1*f.3*f.1^-1*f.3^-1, Concatenation([4], ListWithIdenticalEntries(30, 8)));
-f3
-gap>
-gap> Info(InfoFR,1,"3.4.5 WreathRecursion");
-#I 3.4.5 WreathRecursion
-gap>
-gap> m := mg[2][1];
-<FR machine with alphabet [ 1 .. 8 ] on Group( [ f1, f2, f3 ] )>
-gap> f := StateSet(m);
-<free group on the generators [ f1, f2, f3 ]>
-gap> wr := WreathRecursion(m);
-function( w ) ... end
-gap> wr(f.3);
-[ [ <identity ...>, <identity ...>, <identity ...>, <identity ...>,
- <identity ...>, <identity ...>, f1, f3 ], [ 3, 4, 1, 2, 5, 6, 7, 8 ] ]
-gap> l := wr(f.1*f.3*f.1^-1*f.3^-1);
-[ [ <identity ...>, <identity ...>, f1, f3, f1^-1, f3^-1, <identity ...>,
- <identity ...> ], [ 3, 4, 1, 2, 7, 8, 5, 6 ] ]
-gap> wr(l[1][6]);
-[ [ <identity ...>, <identity ...>, <identity ...>, <identity ...>,
- <identity ...>, <identity ...>, f1^-1, f3^-1 ],
- [ 3, 4, 1, 2, 5, 6, 7, 8 ] ]
-gap>
-gap> m := ms[9][1];
-<FR machine with alphabet [ 1 .. 3 ] on Semigroup( [ s1, s2 ] )>
-gap> f := StateSet(m);
-<free semigroup on the generators [ s1, s2 ]>
-gap> wr := WreathRecursion(m);
-function( w ) ... end
-gap> wr(f.1);
-[ [ s1^2, s2^3*s1, s2 ], [ 3, 2, 2 ] ]
-gap> wr(f.1*f.2);
-[ [ s1^4*s2^2*s1, s2^3*s1^8, s2*s1^7 ], [ 3, 1, 1 ] ]
-gap>
-gap> Info(InfoFR,1,"3.5 Operations of FRMachines");
-#I 3.5 Operations of FRMachines
-gap>
-gap> Info(InfoFR,1,"3.5.1 StructuralGroup, ...");
-#I 3.5.1 StructuralGroup, ...
-gap>
-gap> g := StructuralGroup(mg[1][1]);
-<fp group on the generators [ f1, f2, f3, f4, f5, 1, 2 ]>
-gap> m := StructuralMonoid(mm[1][1]);
-<fp monoid on the generators [ m1, m2, m3, m4, m5, 1, 2 ]>
-gap> s := StructuralSemigroup(ms[1][1]);
-<fp semigroup on the generators [ s1, s2, s3, s4, s5, 1, 2 ]>
-gap> RelatorsOfFpGroup(g);
-[ f1*1*f1^-1*1^-1, f1*2*f1^-1*2^-1, f2*2*f1^-1*1^-1, f2*1*f1^-1*2^-1,
- f3*1*f2^-1*1^-1, f3*2*f4^-1*2^-1, f4*1*f2^-1*1^-1, f4*2*f5^-1*2^-1,
- f5*1*f1^-1*1^-1, f5*2*f3^-1*2^-1 ]
-gap> RelationsOfFpMonoid(m);
-[ [ m1*1, 1*m1 ], [ m1*2, 2*m1 ], [ m2*2, 1*m1 ], [ m2*1, 2*m1 ],
- [ m3*1, 1*m2 ], [ m3*2, 2*m4 ], [ m4*1, 1*m2 ], [ m4*2, 2*m5 ],
- [ m5*1, 1*m1 ], [ m5*2, 2*m3 ] ]
-gap> RelationsOfFpSemigroup(s);
-[ [ s1*1, 1*s1 ], [ s1*2, 2*s1 ], [ s2*2, 1*s1 ], [ s2*1, 2*s1 ],
- [ s3*1, 1*s2 ], [ s3*2, 2*s4 ], [ s4*1, 1*s2 ], [ s4*2, 2*s5 ],
- [ s5*1, 1*s1 ], [ s5*2, 2*s3 ] ]
-gap>
-gap> Info(InfoFR,1,"3.5.2 \\+");
-#I 3.5.2 \+
-gap>
-gap> m := mg[1][1] + mg[3][3];;
-gap> Rank(StateSet(m)) = 8;
-true
-gap> SubFRMachine(m, mg[1][1]) <> fail;
-true
-gap> SubFRMachine(m, mg[3][3]) <> fail;
-true
-gap> Display(m);
- G | 1 2
-----+--------+--------+
- f1 | f1,1 f1,2
- f2 | f1,2 f1,1
- f3 | f2,1 f4,2
- f4 | f2,1 f5,2
- f5 | f1,1 f3,2
- a | <id>,2 <id>,1
- b1 | a,1 b2,2
- b2 | <id>,1 b1,2
-----+--------+--------+
-gap> m := mm[7][1] + mg[3][3];
-<FR machine with alphabet [ 1 .. 2 ] on Monoid( [ m1, m2, m3, a^-1, a, b1^-1, \
-b1, b2^-1, b2 ], ... )>
-gap> Size(GeneratorsOfMonoid(StateSet(m))) = 9 and IsFreeMonoid(StateSet(m));
-true
-gap> SubFRMachine(m, mm[7][1]) <> fail;
-true
-gap> SubFRMachine(m, AsMonoidFRMachine(mg[3][3])) <> fail;
-true
-gap> Display(m);
- M | 1 2
--------+--------+---------+
- m1 | m1,1 m3,1
- m2 | m2,2 <id>,1
- m3 | m2,2 m1,2
- a^-1 | <id>,2 <id>,1
- a | <id>,2 <id>,1
- b1^-1 | a^-1,1 b2^-1,2
- b1 | a,1 b2,2
- b2^-1 | <id>,1 b1^-1,2
- b2 | <id>,1 b1,2
--------+--------+---------+
-gap> m := mm[9][1] + ms[9][2];
-<FR machine with alphabet [ 1 .. 3 ] on Semigroup( [ <identity ...>, m1, m2, s\
-1, s2 ] )>
-gap> Size(GeneratorsOfSemigroup(StateSet(m))) = 5 and IsFreeSemigroup(StateSet(m));
-true
-gap> SubFRMachine(m, AsSemigroupFRMachine(mm[9][1])) <> fail;
-true
-gap> SubFRMachine(m, ms[9][2]) <> fail;
-true
-gap> Display(m);
- S | 1 2 3
-------+--------+-----------+----------------+
- <id> | <id>,1 <id>,2 <id>,3
- m1 | m1^2,3 m2^3*m1,2 m2,2
- m2 | m1,2 m1^7,1 m1^2*m2^2*m1,3
- s1 | s1^2,3 s2^3*s1,2 s2,2
- s2 | s1,2 s1^7,1 s1^2*s2^2*s1,3
-------+--------+-----------+----------------+
-gap>
-gap> Info(InfoFR,1,"3.5.3 \\*");
-#I 3.5.3 \*
-gap>
-gap> mg[1][1] + mg[3][3] = mg[1][1]*mg[3][3];
-true
-gap> mm[7][1] + mg[3][3] = mm[7][1]*mg[3][3];
-true
-gap> mm[9][1] + ms[9][2] = mm[9][1]*ms[9][2];
-true
-gap>
-gap> Info(InfoFR,1,"3.5.4 TensorSumOp");
-#I 3.5.4 TensorSumOp
-gap>
-gap> ForAll(Flat([mg, mm, ms]), m -> TensorSum(m) = m);
-true
-gap> m := TensorSum(mg[3][1],mg[3][1]);
-<FR machine with alphabet [ 1 .. 4 ] on Group( [ f1, f2, f3 ] )>
-gap> Size(AlphabetOfFRObject(m)) = 4;
-true
-gap> IsGroupFRMachine(m);
-true
-gap> Activity(m[1]) = (1,2)(3,4);
-true
-gap> Size(PermGroup(SCGroup(m), 3)) = Size(PermGroup(SCGroup(mg[3][1]),3));
-true
-gap> m := TensorSum(mm[8][1],mm[8][1]);
-<FR machine with alphabet [ 1 .. 14 ] on Monoid( [ m1, m2 ], ... )>
-gap> Size(AlphabetOfFRObject(m)) = 14;
-true
-gap> IsMonoidFRMachine(m);
-true
-gap> Activity(m[1]) = Trans(Concatenation(List([0,1], i -> ListTrans(Activity(mm[8][1][1])) + 7*i)));
-true
-gap> Size(TransMonoid(SCMonoid(m), 1)) = Size(TransMonoid(SCMonoid(mm[8][1]),1));
-true
-gap> m := TensorSum(ms[9][2],ms[9][2]);
-<FR machine with alphabet [ 1 .. 6 ] on Semigroup( [ s1, s2 ] )>
-gap> Size(AlphabetOfFRObject(m)) = 6;
-true
-gap> IsSemigroupFRMachine(m);
-true
-gap> Activity(m[1]) = Trans(Concatenation(List([0,1], i -> ListTrans(Activity(ms[9][1][1])) + 3*i)));
-true
-gap> Size(TransSemigroup(SCSemigroup(m), 4)) = Size(TransSemigroup(SCSemigroup(ms[9][1]),4));
-true
-gap>
-gap> Info(InfoFR,1,"3.5.5 TensorProductOp");
-#I 3.5.5 TensorProductOp
-gap>
-gap> ForAll(Flat([mg, mm, ms]), m -> TensorProduct(m) = m);
-true
-gap> m := TensorProduct(mg[4][1],mg[4][1]);
-<FR machine with alphabet [ 1 .. 25 ] on Group( [ f1 ] )>
-gap> Size(AlphabetOfFRObject(m)) = 25;
-true
-gap> IsGroupFRMachine(m);
-true
-gap> Activity(m[1],2) = Activity(mg[4][1][1], 4);
-true
-gap> Size(PermGroup(SCGroup(m), 1)) = Size(PermGroup(SCGroup(mg[4][1]),2));
-true
-gap> SubFRMachine(TensorProduct(mg[1][1],mg[1][1],mg[1][1]), mg[2][1]) <> fail;
-true
-gap> m := TensorProduct(mm[7][1],mm[7][1]);
-<FR machine with alphabet [ 1 .. 4 ] on Monoid( [ m1, m2, m3 ], ... )>
-gap> Size(AlphabetOfFRObject(m)) = 4;
-true
-gap> IsMonoidFRMachine(m);
-true
-gap> Activity(m[1]) = Trans([1,1,2,2]);
-true
-gap> Size(TransMonoid(SCMonoid(m), 1)) = Size(TransMonoid(SCMonoid(mm[7][1]),2));
-true
-gap> m := TensorProduct(ms[9][2],ms[9][2]);
-<FR machine with alphabet [ 1 .. 9 ] on Semigroup( [ s1, s2 ] )>
-gap> Size(AlphabetOfFRObject(m)) = 9;
-true
-gap> IsSemigroupFRMachine(m);
-true
-gap> Activity(m[1]) = Activity(ms[9][2][1], 2);
-true
-gap> Size(TransSemigroup(SCSemigroup(m), 2)) = Size(TransSemigroup(SCSemigroup(ms[9][1]),4));
-true
-gap>
-gap> Info(InfoFR,1,"3.5.6 DirectSumOp");
-#I 3.5.6 DirectSumOp
-gap>
-gap> ForAll(Flat([mg, mm, ms]), m -> DirectSum(m) = m);
-true
-gap> m := DirectSum(mg[1][1],mg[2][1]);
-<FR machine with alphabet [ 1 .. 10 ] on Group( [ f1.1, f2.1, f3.1, f4, f5, f1\
-.2, f2.2, f3.2 ] )>
-gap> Size(AlphabetOfFRObject(m)) = 10;
-true
-gap> Size(GeneratorsOfGroup(StateSet(m))) = 8;
-true
-gap> IsGroupFRMachine(m);
-true
-gap> Activity(m[2]) = Activity(mg[1][1][2]);
-true
-gap> Activity(m[6]) = PermList(Concatenation([1,2],ListPerm(Activity(mg[2][1][1]))+2));
-true
-gap> Size(PermGroup(SCGroup(m),2)) = Size(PermGroup(SCGroup(mg[1][1]),2))*Size(PermGroup(SCGroup(mg[2][1]),2));
-true
-gap> m := DirectSum(mm[4][1],mm[7][3]);
-<FR machine with alphabet [ 1 .. 7 ] on Monoid( [ m1, z, y, x ], ... )>
-gap> Size(AlphabetOfFRObject(m)) = 7;
-true
-gap> Size(GeneratorsOfMonoid(StateSet(m))) = 4;
-true
-gap> IsMonoidFRMachine(m);
-true
-gap> Activity(m[1]) = Activity(mm[4][1][1]);
-true
-gap> Activity(m[2]) = TransList(Concatenation([1,2,3,4,5],ListTrans(Activity(mm[7][1][1]))+5));
-true
-gap> Size(TransMonoid(SCMonoid(m),2)) = Size(TransMonoid(SCMonoid(mm[4][1]),2))*Size(TransMonoid(SCMonoid(mm[7][1]),2));
-true
-gap> m := DirectSum(ms[1][1],ms[9][2]);
-<FR machine with alphabet [ 1 .. 5 ] on Semigroup( [ s1.1, s2.1, s3, s4, s5, s\
-1.2, s2.2 ] )>
-gap> Size(AlphabetOfFRObject(m)) = 5;
-true
-gap> Size(GeneratorsOfSemigroup(StateSet(m))) = 7;
-true
-gap> IsSemigroupFRMachine(m);
-true
-gap> Activity(m[2]) = Activity(ms[1][1][2]);
-true
-gap> Activity(m[6]) = TransList(Concatenation([1,2],ListTrans(Activity(ms[9][1][1]))+2));
-true
-gap>
-gap> Info(InfoFR,1,"3.5.7 DirectProductOp");
-#I 3.5.7 DirectProductOp
-gap>
-gap> ForAll(Flat([mg, mm, ms]), m -> DirectProduct(m) = m);
-true
-gap> m := DirectProduct(mg[1][1],mg[2][1]);
-<FR machine with alphabet [ 1 .. 16 ] on Group( [ f1.1, f2.1, f3.1, f4, f5, f1\
-.2, f2.2, f3.2 ] )>
-gap> Size(AlphabetOfFRObject(m)) = 16;
-true
-gap> Size(GeneratorsOfGroup(StateSet(m))) = 8;
-true
-gap> IsGroupFRMachine(m);
-true
-gap> ForAll([1..5], n -> Output(m[n]) = ListX(8*(Output(mg[1][1][n])-1),[1..8],\+));
-true
-gap> ForAll([1..3], n -> Output(m[5+n]) = ListX(8*[0,1],Output(mg[2][1][n]),\+));
-true
-gap> Size(Set(WreathRecursion(m)(GeneratorsOfFRMachine(m)[3])[1]{[1..8]})) = 1;
-true
-gap> Size(Set(WreathRecursion(m)(GeneratorsOfFRMachine(m)[3])[1]{[9..16]})) = 1;
-true
-gap> Size(Set(WreathRecursion(m)(GeneratorsOfFRMachine(m)[7])[1]{[1,3..15]})) = 1;
-true
-gap> Size(Set(WreathRecursion(m)(GeneratorsOfFRMachine(m)[6])[1])) = 1;
-true
-gap> Size(PermGroup(SCGroup(m),2)) = Size(PermGroup(SCGroup(mg[1][1]),2))*Size(PermGroup(SCGroup(mg[2][1]),2));
-true
-gap> m := DirectProduct(mm[7][1],mm[1][1]);
-<FR machine with alphabet [ 1 .. 4 ] on Monoid( [ m1.1, m2.1, m3.1, m1.2, m2.2\
-, m3.2, m4, m5 ], ... )>
-gap> Size(AlphabetOfFRObject(m)) = 4;
-true
-gap> Size(GeneratorsOfMonoid(StateSet(m))) = 8;
-true
-gap> IsMonoidFRMachine(m);
-true
-gap> ForAll([1..3], n -> Output(m[n]) = ListX(2*(Output(mm[7][1][n])-1),[1..2],\+));
-true
-gap> ForAll([1..5], n -> Output(m[3+n]) = ListX(2*[0,1],Output(mm[1][1][n]),\+));
-true
-gap> Size(TransMonoid(SCMonoid(m),2)) = Size(TransMonoid(SCMonoid(mm[7][1]),2))*Size(TransMonoid(SCMonoid(mm[1][1]),2));
-true
-gap> m := DirectProduct(ms[9][1],mm[7][1]);
-<FR machine with alphabet [ 1 .. 6 ] on Semigroup( [ s1, s2, <identity ...>, m\
-1, m2, m3 ] )>
-gap> Size(AlphabetOfFRObject(m)) = 6;
-true
-gap> Size(GeneratorsOfSemigroup(StateSet(m))) = 6;
-true
-gap> IsSemigroupFRMachine(m);
-true
-gap> ForAll([1..2], n -> Output(m[n]) = ListX(2*(Output(ms[9][1][n])-1),[1..2],\+));
-true
-gap> Set(List([1..4], n -> Output(m[2+n]))) = Set(List([1..4], n -> ListX(2*[0,1,2],Output(AsSemigroupFRMachine(mm[7][1]),n),\+)));
-true
-gap> Size(TransMonoid(SCMonoid(m),2)) = Size(TransMonoid(SCMonoid(mm[7][1]),2))*Size(TransMonoid(SCMonoid(mm[9][1]),2));
-true
-gap>
-gap> Info(InfoFR,1,"3.5.8 TreeWreathProduct");
-#I 3.5.8 TreeWreathProduct
-gap>
-gap> m := TreeWreathProduct(mg[1][1],mg[3][1],2,2);
-<FR machine with alphabet [ 1 .. 4 ] on Group( [ f1, f2, f3, f4, f5, f6, f7, f\
-8, f9, f10, f11 ] )>
-gap> Size(AlphabetOfFRObject(m)) = 4;
-true
-gap> Size(GeneratorsOfGroup(StateSet(m))) = 11;
-true
-gap> Collected(Flat(List([1..11], i -> WreathRecursion(m)(GeneratorsOfGroup(StateSet(m))[i])[1]))){[1..11]}[2] = [28,1,1,1,1,1,1,1,3,2,2];
-true
-gap> m := TreeWreathProduct(mm[7][1], ms[8][2],2,5);
-<FR machine with alphabet [ 1 .. 14 ] on Semigroup( [ s1, s2, s3, s4, s5, s6, \
-s7, s8, s9 ] )>
-gap> Size(AlphabetOfFRObject(m)) = 14;
-true
-gap> Size(GeneratorsOfSemigroup(StateSet(m))) = 9;
-true
-gap> IsOne(m[9]);
-true
-gap> Collected(Flat(List([1..9], i -> WreathRecursion(m)(GeneratorsOfSemigroup(StateSet(m))[i])[1]))){[1..9]}[2] = [1,1,1,7,7,3,3,2,101];
-true
-gap>
-gap> Info(InfoFR,1,"3.5.9 SubFRMachine");
-#I 3.5.9 SubFRMachine
-gap>
-gap> SubFRMachine(mg[6][1], mg[6][3]);
-[ a, b ] -> [ f1, f2 ]
-gap> SubFRMachine(mmi[1][1], AsMonoidFRMachine(mg[1][1]));
-MappingByFunction( <free monoid on the generators
-[ m1, m2, m3, m4, m5, m6, m7, m8, m9, m10 ]>, <free monoid on the generators
-[ m1, m2, m3, m4, m5, m6, m7, m8, m9 ]>, function( w ) ... end )
-gap> SubFRMachine(AsMonoidFRMachine(mg[1][1]), mmi[1][1]);
-MappingByFunction( <free monoid on the generators
-[ m1, m2, m3, m4, m5, m6, m7, m8, m9 ]>, <free monoid on the generators
-[ m1, m2, m3, m4, m5, m6, m7, m8, m9, m10 ]>, function( w ) ... end )
-gap> SubFRMachine(mmi[5][1], AsMonoidFRMachine(mg[5][1]));
-MappingByFunction( <free monoid on the generators [ m1, m2, m3, m4, m5, m6
- ]>, <free monoid on the generators [ x, x', y, y', z, z'
- ]>, function( w ) ... end )
-gap> SubFRMachine(AsMonoidFRMachine(mg[5][2]), mmi[5][2]);
-MappingByFunction( <free monoid on the generators [ x, x', y, y', z, z'
- ]>, <free monoid on the generators [ m1, m2, m3, m4, m5, m6
- ]>, function( w ) ... end )
-gap> for i in [1, 5] do
-> Print("Machine ",i,":\n");
-> for list in [mg] do
-> Print(ForAll(list[i], m -> SubFRMachine(mmi[i][1], AsMonoidFRMachine(m)) <> fail), "\n");
-> od;
-> od;
-Machine 1:
-true
-Machine 5:
-true
-gap> for i in [1..5] do
-> Print("Machine ",i,":\n");
-> for list in [mg, mmi] do
-> Print(ForAll(list[i], m -> SubFRMachine(AsSemigroupFRMachine(m), msiu[i][1]) <> fail), "\n");
-> od;
-> od;
-Machine 1:
-true
-true
-Machine 2:
-true
-true
-Machine 3:
-true
-true
-Machine 4:
-true
-true
-Machine 5:
-true
-true
-gap> for i in [7] do
-> Print("Machine ",i,":\n");
-> for list in [mm] do
-> Print(ForAll(list[i], m -> SubFRMachine(AsSemigroupFRMachine(m), msu[i][1]) <> fail), "\n");
-> od;
-> od;
-Machine 7:
-true
-gap>
-gap> Info(InfoFR,1,"3.5.10 Minimized");
-#I 3.5.10 Minimized
-gap>
-gap> Length(GeneratorsOfGroup(StateSet(Minimized(mg[1][1])))) = 4;
-true
-gap> Length(GeneratorsOfMonoid(StateSet(Minimized(mmi[1][1])))) = 4;
-true
-gap> Length(GeneratorsOfSemigroup(StateSet(Minimized(msiu[1][1])))) = 5;
-true
-gap> Length(GeneratorsOfGroup(StateSet(Minimized(mg[2][1])))) = 3;
-true
-gap> Length(GeneratorsOfMonoid(StateSet(Minimized(mmi[2][1])))) = 3;
-true
-gap> Length(GeneratorsOfSemigroup(StateSet(Minimized(msiu[2][1])))) = 4;
-true
-gap> Length(GeneratorsOfGroup(StateSet(Minimized(mg[3][1])))) = 3;
-true
-gap> Length(GeneratorsOfMonoid(StateSet(Minimized(mmi[3][1])))) = 3;
-true
-gap> Length(GeneratorsOfSemigroup(StateSet(Minimized(msiu[3][1])))) = 4;
-true
-gap> Length(GeneratorsOfGroup(StateSet(Minimized(mg[4][1])))) = 1;
-true
-gap> Length(GeneratorsOfMonoid(StateSet(Minimized(mmi[4][1])))) = 2;
-true
-gap> Length(GeneratorsOfSemigroup(StateSet(Minimized(msiu[4][1])))) = 3;
-true
-gap> Length(GeneratorsOfGroup(StateSet(Minimized(mg[5][1])))) = 3;
-true
-gap> Length(GeneratorsOfMonoid(StateSet(Minimized(mmi[5][1])))) = 6;
-true
-gap> Length(GeneratorsOfSemigroup(StateSet(Minimized(msiu[5][1])))) = 7;
-true
-gap> Length(GeneratorsOfGroup(StateSet(Minimized(mg[6][1])))) = 2;
-true
-gap> Length(GeneratorsOfMonoid(StateSet(Minimized(mmi[6][1])))) = 4;
-true
-gap> Length(GeneratorsOfSemigroup(StateSet(Minimized(msiu[6][1])))) = 5;
-true
-gap> Length(GeneratorsOfMonoid(StateSet(Minimized(mm[7][1])))) = 3;
-true
-gap> Length(GeneratorsOfSemigroup(StateSet(Minimized(msu[7][1])))) = 4;
-true
-gap> Length(GeneratorsOfMonoid(StateSet(Minimized(AsMonoidFRMachine(msu[7][1]))))) = 3;
-true
-gap> Length(GeneratorsOfMonoid(StateSet(Minimized(mm[8][1])))) = 2;
-true
-gap> Length(GeneratorsOfSemigroup(StateSet(Minimized(ms[8][1])))) = 2;
-true
-gap> Length(GeneratorsOfSemigroup(StateSet(Minimized(msu[8][1])))) = 3;
-true
-gap> Length(GeneratorsOfMonoid(StateSet(Minimized(mm[9][1])))) = 2;
-true
-gap> Length(GeneratorsOfSemigroup(StateSet(Minimized(ms[9][1])))) = 2;
-true
-gap> Length(GeneratorsOfSemigroup(StateSet(Minimized(msu[9][1])))) = 3;
-true
-gap>
-gap> Info(InfoFR,1,"3.5.11 Correspondence");
-#I 3.5.11 Correspondence
-gap>
-gap> m := mg[1][1];
-<FR machine with alphabet [ 1 .. 2 ] on Group( [ f1, f2, f3, f4, f5 ] )>
-gap> min := Minimized(m);
-<FR machine with alphabet [ 1 .. 2 ] on Group( [ f1, f2, f3, f4 ] )>
-gap> map := Correspondence(min);
-[ f1, f2, f3, f4, f5 ] -> [ <identity ...>, f1, f2, f3, f4 ]
-gap> f := StateSet(m);
-<free group on the generators [ f1, f2, f3, f4, f5 ]>
-gap> f.1^map = One(StateSet(min));
-true
-gap>
-gap> m2 := m + m;
-<FR machine with alphabet [ 1 .. 2 ] on Group( [ f1.1, f2.1, f3.1, f4.1, f5.1,\
- f1.2, f2.2, f3.2, f4.2, f5.2 ] )>
-gap> map2 := Correspondence(m2);
-[ [ f1, f2, f3, f4, f5 ] -> [ f1.1, f2.1, f3.1, f4.1, f5.1 ],
- [ f1, f2, f3, f4, f5 ] -> [ f1.2, f2.2, f3.2, f4.2, f5.2 ] ]
-gap> min := Minimized(m2);
-<FR machine with alphabet [ 1 .. 2 ] on Group( [ f1, f2, f3, f4 ] )>
-gap> map := Correspondence(min);
-[ f1.1, f2.1, f3.1, f4.1, f5.1, f1.2, f2.2, f3.2, f4.2, f5.2 ] ->
-[ <identity ...>, f1, f2, f3, f4, <identity ...>, f1, f2, f3, f4 ]
-gap> f := StateSet(m);
-<free group on the generators [ f1, f2, f3, f4, f5 ]>
-gap> (f.1^map2[1])^map = One(StateSet(min));
-true
-gap> (f.1^map2[2])^map = One(StateSet(min));
-true
-gap>
-gap> m := AsGroupFRMachine(mm[5][1]);
-<FR machine with alphabet [ 1 .. 7 ] on Group( [ f1, f2, f3 ] )>
-gap> Correspondence(m);
-MappingByFunction( <free monoid on the generators
-[ x, y, z ]>, <free group on the generators
-[ f1, f2, f3 ]>, function( w ) ... end )
-gap>
-gap> for type in [mg, mm, mmi] do
-> for list in type do
-> for m in list do
-> m2 := AsSemigroupFRMachine(m);
-> map := Correspondence(m2);
-> Print(Length(States(FRElement(m2, One(StateSet(m))^map))) = 1, "\n");
-> od;
-> od;
-> od;
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-true
-gap>
-gap> firstel := function(list)
-> if IsEmpty(list) then
-> return [];
-> else
-> return [list[1]];
-> fi;
-> end;
-function( list ) ... end
-gap> for type in [mg, mm, ms, mmi, msiu, msu] do
-> for list in type do
-> Print(AsSet(list) = firstel(list), "\n");
-> od;
-> Print("\n");
-> od;
-true
-true
-true
-true
-true
-true
-true
-true
-true
-
-true
-true
-true
-true
-true
-true
-true
-true
-true
-
-true
-true
-true
-true
-true
-true
-true
-true
-true
-
-true
-true
-true
-true
-true
-true
-true
-true
-true
-
-true
-true
-true
-true
-true
-true
-true
-true
-true
-
-true
-true
-true
-true
-true
-true
-true
-true
-true
-
-gap>
-gap> Length(AsSet(Concatenation(mg[1],mg[3],mm[7]))) = 3;
-true
-gap>
-gap> STOP_TEST( "chapter-3.tst", 3*10^8 );
-fr:chapter 3
-GAP4stones: 150000
-
-#E chapter-3.tst . . . . . . . . . . . . . . . . . . . . . . . . . .ends here
View
673 tst/chapter-4.tst
@@ -1,673 +0,0 @@
-#############################################################################
-##
-#W chapter-4.tst FR Package Laurent Bartholdi
-##
-#H @(#)$Id$
-##
-#Y Copyright (C) 2008, Laurent Bartholdi
-##
-#############################################################################
-##
-## This file tests the functions explained in chapter 4 of the manual
-##
-#############################################################################
-
-gap> START_TEST("fr:chapter 4");
-gap>
-gap> Info(InfoFR,1,"4.1 FRElements");
-#I 4.1 FRElements
-gap>
-gap> Read(Filename(DirectoriesPackageLibrary("fr","tst"),"frelements.g"));
-gap> Read(Filename(DirectoriesPackageLibrary("fr","tst"),"frmachines.g"));
-gap>
-gap> Info(InfoFR,1,"4.1.1 FRElementNC, 4.1.2/3 FRElement");
-#I 4.1.1 FRElementNC, 4.1.2/3 FRElement
-gap>
-gap> for machine in frel do
-> Print(ForAll(machine, elts -> ForAll(elts, el -> el = machine[1][Position(elts, el)])), "\n");
-> od;
-true
-true
-true
-true
-true
-true
-true
-true
-true
-gap>
-gap> Length(AsSet(Flat(frel{[1,3,7]}))) = 10;
-true
-gap> ForAll(frel{[2, 4,5,6,7,8,9]}, list -> Length(AsSet(Flat(list))) = Length(list[1]));
-true
-gap>
-gap> Info(InfoFR,1,"4.1.4 ComposeElement");
-#I 4.1.4 ComposeElement
-gap>
-gap> e := frel[1][1][1];
-<2|f1>
-gap> a := frel[1][1][2];
-<2|f2>
-gap> b := frel[1][1][3];
-<2|f3>
-gap> c := frel[1][1][4];
-<2|f4>
-gap> d := frel[1][1][5];
-<2|f5>
-gap> ComposeElement([e,e],()) = e;
-true
-gap> ComposeElement([e,e],(1,2)) = a;
-true
-gap> ComposeElement([a,c],()) = b;
-true
-gap> ComposeElement([a,d],()) = c;
-true
-gap> ComposeElement([e,b],()) = d;
-true
-gap> ComposeElement([a*c,c*a],()) = (b*a)^2;
-true
-gap>
-gap> a := frel[2][1][1];
-<8|f1>
-gap> b := frel[2][1][2];
-<8|f2>
-gap> c := frel[2][1][3];
-<8|f3>
-gap> ComposeElement([One(b),One(b),One(b),One(b),One(b),One(b),One(b),b],Output(b)) = b;
-true
-gap> ComposeElement([One(b),One(b),One(b),One(b),One(b),One(b),a,c],Output(c)) = c;
-true
-gap> ComposeElement([One(b),One(b),One(b),One(b),One(b),One(b),a,b*c],Output(b){Output(c)}) = b*c;
-true
-gap>
-gap> a := frel[3][1][1];
-<2|f1>
-gap> b1 := frel[3][1][2];
-<2|f2>
-gap> b2 := frel[3][1][3];
-<2|f3>
-gap> ComposeElement([a,b2],()) = b1;
-true
-gap> ComposeElement([One(a),b1],()) = b2;
-true
-gap> n := 2;
-2
-gap> ComposeElement([(b1*b2*a)^(2^n),(a*b1*b2)^(2^n)],()) = (a*b1*b2)^(2^(n+1));
-true
-gap>
-gap> t := frel[4][1][1];
-<5|f1>
-gap> ComposeElement([One(t),One(t),One(t),t,t],(1,2,3,4,5)^2) = t^2;
-true
-gap> n := 2;
-2
-gap> ComposeElement([t^(5^n),t^(5^n),t^(5^n),t^(5^n),t^(5^n)],()) = t^(5^(n+1));
-true
-gap>
-gap> x := frel[5][1][1];
-<7|x>
-gap> y := frel[5][1][2];
-<7|y>
-gap> z := frel[5][1][3];
-<7|z>
-gap> ComposeElement([x,y,z,x,y,z,One(x)],(1,2,3,4,5)) = x;
-true
-gap> ComposeElement([x,y,z,One(x),z,y,x],(1,4)(2,3)) = y;
-true
-gap> ComposeElement([One(x),y,y,x,z,One(x),One(x)],(1,6,3)(2,5)) = z;
-true
-gap> ComposeElement([x,y*z,z*y,x,z^2,y^2,x^2],()) = y^2;
-true
-gap>
-gap> a := frel[6][3][1];
-<3|f1>
-gap> b := frel[6][3][2];
-<3|f2>
-gap> ComposeElement([a*b,One(a),a^2],(1,2,3)) = a;
-true
-gap> ComposeElement([b^-5,Comm(a,b),b*a^-1],(1,2)) = b;
-true
-gap>
-gap> z := frel[7][1][1];
-<2|m1>
-gap> y := frel[7][1][2];
-<2|m2>
-gap> x := frel[7][1][3];
-<2|m3>
-gap> ComposeElement([z, x],Trans([1,1])) = z;
-true
-gap> ComposeElement([y, One(x)],Trans([2,1])) = y;
-true
-gap> ComposeElement([y, One(x)],(1,2)) = y;
-true
-gap> ComposeElement([y, z],Trans([2,2])) = x;
-true
-gap>
-gap> a := frel[8][1][1];
-<7|m1>
-gap> b := frel[8][1][2];
-<7|m2>
-gap> ComposeElement([a,b,a,b,a,b,a], Trans([2,5,4,7,7,4,3])) = a;
-true
-gap> ComposeElement([b,b,a,b,a,a,b], Trans([3,1,6,7,4,7,1])) = b;
-true
-gap> ComposeElement([a*b,b*a,a*b,b^2,a*b,b^2,a^2], Trans([2,5,4,7,7,4,3])*Trans([3,1,6,7,4,7,1])) = a*b;
-true
-gap>
-gap> a1 := frel[9][1][1];
-<3|s1>
-gap> a2 := frel[9][1][2];
-<3|s2>
-gap> ComposeElement([a1^2,a2^3*a1,a2],Trans([3,2,2])) = a1;
-true
-gap> ComposeElement([a1,a1^7,a1^2*a2^2*a1],(1,2)) = a2;
-true
-gap> ComposeElement([a1,a1^7,a1^2*a2^2*a1],Trans([2,1,3])) = a2;
-true
-gap>
-gap> Info(InfoFR,1,"4.1.5 VertexElement");
-#I 4.1.5 VertexElement
-gap>
-gap> e := frel[1][1][1];
-<2|f1>
-gap> a := frel[1][1][2];
-<2|f2>
-gap> b := frel[1][1][3];
-<2|f3>
-gap> c := frel[1][1][4];
-<2|f4>
-gap> d := frel[1][1][5];
-<2|f5>
-gap> VertexElement([1], a)*VertexElement([2],d) = c;
-true
-gap> VertexElement(1, a)*VertexElement(2,d) = c;
-true
-gap> VertexElement([1], a)*VertexElement([2,1], a)*VertexElement([2,2],d) = b;
-true
-gap> AsSet(List([a,b,c,d], g -> Order(VertexElement([2,2,1,1],g)))) = [2];
-true
-gap> Comm(VertexElement([1,2],a),VertexElement([1,1],a)) = VertexElement(2,e);
-true
-gap>
-gap> a := frel[3][1][1];
-<2|f1>
-gap> b1 := frel[3][1][2];
-<2|f2>
-gap> b2 := frel[3][1][3];
-<2|f3>
-gap> VertexElement(2,b1) = b2;
-true
-gap> VertexElement(1,a)*VertexElement([2,2],b1) = b1;
-true
-gap>
-gap> t := frel[4][1][1];
-<5|f1>
-gap> Product([1..5], i -> VertexElement(i,t)) = t^5;
-true
-gap>
-gap> a := frel[6][3][1];
-<3|f1>
-gap> b := frel[6][3][2];
-<3|f2>
-gap> VertexElement(1,b^-5*Comm(a,b))*VertexElement(2,(b^-1)^a*b^-4)*VertexElement(3,b/a*b/a) = b^2;
-true
-gap>
-gap> z := frel[7][1][1];
-<2|m1>
-gap> y := frel[7][1][2];
-<2|m2>
-gap> x := frel[7][1][3];
-<2|m3>
-gap> VertexElement(1,y)*VertexElement(2,y) = y^2;
-true
-gap> VertexElement([],z) = z;
-true
-gap> VertexElement([2],x)*y = y*VertexElement([1],x);
-true
-gap>
-gap> a := frel[8][1][1];
-<7|m1>
-gap> b := frel[8][1][2];
-<7|m2>
-gap> VertexElement([5,3],a)*VertexElement([5,3],b) = VertexElement([5,3],a*b);
-true
-gap>
-gap> a1 := frel[9][1][1];
-<3|s1>
-gap> a2 := frel[9][1][2];
-<3|s2>
-gap> VertexElement([],a1) = a1;
-true
-gap> VertexElement([],a2) = a2;
-true
-gap> VertexElement([1],a1)*VertexElement([2,1],a2) = VertexElement([2,1],a2)*VertexElement([1],a1);
-true
-gap>
-gap> Info(InfoFR,1,"4.1.6 DiagonalElement");
-#I 4.1.6 DiagonalElement
-gap>
-gap> a := frel[1][1][2];
-<2|f2>
-gap> DiagonalElement(0,a) = VertexElement(1,a);
-true
-gap> DiagonalElement(1,a) = VertexElement(1,a)*VertexElement(2,a);
-true
-gap> DiagonalElement(-1,a) = VertexElement(1,a)*VertexElement(2,a);
-true
-gap> DiagonalElement(3,a) = DiagonalElement(1,a);
-true
-gap>
-gap> b := frel[2][1][2];
-<8|f2>
-gap> DiagonalElement(2,b) = VertexElement(1,b)*VertexElement(3,b);
-true
-gap>
-gap> t := frel[4][1][1];
-<5|f1>
-gap> DiagonalElement(-1,t) = t^5;
-true
-gap> DiagonalElement(3,t) = ComposeElement([t, t^-3, t^3, t^-1, t^0], ());
-true
-gap>
-gap> x := frel[5][1][1];
-<7|x>
-gap> y := frel[5][1][2];
-<7|y>
-gap> z := frel[5][1][3];
-<7|z>
-gap> DiagonalElement(6, x) = ComposeElement([x, x^-6, x^15, x^-20, x^15, x^-6, x], ());
-true
-gap> DiagonalElement(-1, y) = ComposeElement(ListWithIdenticalEntries(7, y), ());
-true
-gap> DiagonalElement(1, z) = Comm(ComposeElement(ListWithIdenticalEntries(7, One(z)),(1,2)),VertexElement(1,z));
-true
-gap> DiagonalElement(0,x*z) = VertexElement(1,x*z);
-true
-gap>
-gap> a := frel[6][3][1];
-<3|f1>
-gap> b := frel[6][3][2];
-<3|f2>
-gap> DiagonalElement(1,a) = VertexElement(1,a)*VertexElement(2,a^-1);
-true
-gap> DiagonalElement(-1,b) = VertexElement(1,b)*VertexElement(2,b)*VertexElement(3,b);
-true
-gap>
-gap> z := frel[7][1][1];
-<2|m1>
-gap> y := frel[7][1][2];
-<2|m2>
-gap> x := frel[7][1][3];
-<2|m3>
-gap> ForAll([x,y,z,x*z*y], g -> DiagonalElement(0,g) = VertexElement(1,g));
-true
-gap> ForAll([x,y,z,x*y*z], g -> DiagonalElement(-1,g) = VertexElement(1,g)*VertexElement(2,g));
-true
-gap>
-gap> a := frel[8][1][1];
-<7|m1>
-gap> b := frel[8][1][2];
-<7|m2>
-gap> ForAll([a,b,(a*b)^2], g -> DiagonalElement(0,g) = VertexElement(1,g));
-true
-gap> ForAll([a,b,a*b^2*a], g -> DiagonalElement(-1,g) = Product([1..7], i -> VertexElement(i,g)));
-true
-gap>
-gap> a1 := frel[9][1][1];
-<3|s1>
-gap> a2 := frel[9][1][2];
-<3|s2>
-gap> ForAll([a1, a2, a2*a1], g -> DiagonalElement(0,g) = VertexElement(1,g));
-true
-gap> ForAll([a1, a2, a1*a2], g -> DiagonalElement(-1,g) = Product([1..3], i -> VertexElement(i,g)));
-true
-gap>
-gap> Info(InfoFR,1,"4.1.7 AsGroupFRElement, ...");
-#I 4.1.7 AsGroupFRElement, ...
-gap>
-gap> for machine in frel{[1..6]} do
-> Print(ForAll(machine, elts -> ForAll(elts, el -> AsGroupFRElement(el) = machine[1][Position(elts, el)])), "\n");
-> od;
-true
-true
-true
-true
-true
-true
-gap> for machine in frel do
-> Print(ForAll(machine, elts -> ForAll(elts, el -> AsMonoidFRElement(el) = machine[1][Position(elts, el)])), "\n");
-> od;
-true
-true
-true
-true
-true
-true
-true
-true
-true
-gap> for machine in frel do
-> Print(ForAll(machine, elts -> ForAll(elts, el -> AsSemigroupFRElement(el) = machine[1][Position(elts, el)])), "\n");
-> od;
-true
-true
-true
-true
-true
-true
-true
-true
-true
-gap>
-gap> Info(InfoFR,1,"4.2 Operations and Attributes for FRElements");
-#I 4.2 Operations and Attributes for FRElements
-gap>
-gap> Info(InfoFR,1,"4.2.1 UnderlyingFRMachine");
-#I 4.2.1 UnderlyingFRMachine
-gap>
-gap> for i in [1..6] do
-> Print(ForAll(frel[i], type -> ForAll(type, el -> UnderlyingFRMachine(el) = mg[i][1])), "\n");
-> od;
-true
-true
-true
-true
-true
-true
-gap> for i in [7..8] do
-> Print(ForAll(frel[i], type -> ForAll(type, el -> UnderlyingFRMachine(el) = mm[i][1])), "\n");
-> od;
-true
-true
-gap> for i in [9] do
-> Print(ForAll(frel[i], type -> ForAll(type, el -> SubFRMachine(UnderlyingFRMachine(el), ms[i][1]) <> fail)), "\n");
-> od; # must be careful because of Monoid- and SemigroupFRMachines
-true
-gap>
-gap> Info(InfoFR,1,"4.2.2 Output");
-#I 4.2.2 Output
-gap>
-gap> for i in [1..9] do
-> Print(ForAll(frel[i], el_list -> List(el_list, Output) = outputs[i]), "\n");
-> od;
-true
-true
-true
-true
-true
-true
-true
-true
-true
-gap>
-gap> Info(InfoFR,1,"4.2.4 Activity");
-#I 4.2.4 Activity
-gap>
-gap> for i in [1..9] do
-> Print(ForAll(frel[i], el_list -> List(el_list, g -> Activity(g, 1)) = List(outputs[i], x -> Trans(x))), "\n");
-> od;
-true
-true
-true
-true
-true
-true
-true
-true
-true
-gap> ForAll([1..3], i -> Activity(frel[1][1][i+1], 3) = PermList(Output(frel[2][1][i])));
-true
-gap> a := frel[2][1][1];
-<8|f1>
-gap> b := frel[2][1][2];
-<8|f2>
-gap> n := 5;
-5
-gap> Activity((a*b)^(2^(n+1)), n) = ();
-true
-gap> Order(Activity(frel[4][1][1], n)) = 5^n;
-true
-gap> Activity(frel[5][1][2], 2) = (1,23,2,24,3,25,4,26,5,22)(6,27)(7,28)(8,18,11,15,13,20,10,16,12,19,9,17)(14,
-> 21)(29,34,31)(30,33)(36,39)(37,38)(43,44,45,46,47);
-true
-gap> Activity(frel[7][1][3], 2) = Trans([ 4, 3, 3, 3 ]);
-true
-gap> Activity(frel[9][1][1], 2) = Trans([ 8, 8, 8, 5, 6, 5, 5, 4, 6 ]);
-true
-gap>
-gap> Info(InfoFR,1,"4.2.5 Transition");
-#I 4.2.5 Transition
-gap>
-gap> for i in [1..9] do
-> Print(ForAll(frel[i], el_list -> ForAll(el_list, el -> ForAll([1..Size(AlphabetOfFRObject(el))], input -> Transition(el, input) in StateSet(el) and Transition(el, input) in StateSet(UnderlyingFRMachine(el))))), "\n");
-> od;
-true
-true
-true
-true
-true
-true
-true
-true
-true
-gap>
-gap> Info(InfoFR,1,"4.2.6 Portrait");
-#I 4.2.6 Portrait
-gap>
-gap> for m in frel do
-> Print(ForAll(m, list -> ForAll(list, g -> Portrait(g,1) = [Trans(Output(g)), List(AlphabetOfFRObject(g), i -> Trans(Output(State(g, i))))])), "\n");
-> od;
-true
-true
-true
-true
-true
-true
-true
-true
-true
-gap> for m in frel do
-> Print(ForAll(m, list -> ForAll(list, g -> PortraitInt(g,1) = [ActivityInt(g), List(AlphabetOfFRObject(g), i -> ActivityInt(State(g, i)))])), "\n");
-> od;
-true
-true
-true
-true
-true
-true
-true
-true
-true
-gap> Portrait(frel[9][1][1],1) = [Trans([3,2,2]),[Trans([2,2,2]),Trans([2,3,2]),Trans([2,1,3])]];
-true
-gap>
-gap> Info(InfoFR,1,"4.2.7 DecompositionOfFRElement");
-#I 4.2.7 DecompositionOfFRElement
-gap>
-gap> for i in [1..6] do
-> Print(ForAll(frel[i], el_list -> ForAll(el_list, el -> DecompositionOfFRElement(el) = [List([1..Size(AlphabetOfFRObject(el))], x -> FRElement(mg[i][1], transitions[i][Position(el_list, el)][x])),outputs[i][Position(el_list, el)]])), "\n");
-> od;
-true
-true
-true
-true
-true
-true
-gap> for i in [7..9] do
-> Print(ForAll(frel[i], el_list -> ForAll(el_list, el -> DecompositionOfFRElement(el) = [List([1..Size(AlphabetOfFRObject(el))], x -> FRElement(mm[i][1], transitions[i][Position(el_list, el)][x])),outputs[i][Position(el_list, el)]])), "\n");
-> od;
-true
-true
-true
-gap>
-gap> Info(InfoFR,1,"4.2.8 StateSet");
-#I 4.2.8 StateSet
-gap>
-gap> rk := [5,3,3,1,3,2,3,2,2];
-[ 5, 3, 3, 1, 3, 2, 3, 2, 2 ]
-gap> for i in [1..6] do
-> Print(ForAll(frel[i], el_list -> ForAll(el_list, el -> Size(GeneratorsOfGroup(StateSet(el))) = rk[i])), "\n");
-> od;
-true
-true
-true
-true
-true
-true
-gap> for i in [7..8] do
-> Print(ForAll(frel[i], el_list -> ForAll(el_list, el -> Size(GeneratorsOfMonoid(StateSet(el))) = rk[i])), "\n");
-> od;
-true
-true
-gap> for i in [9] do
-> Print(ForAll(frel[i]{[1,3]}, el_list -> ForAll(el_list, el -> Size(GeneratorsOfSemigroup(StateSet(el))) = rk[i])), "\n");
-> od;
-true
-gap> for i in [9] do
-> Print(ForAll(frel[i]{[2,4]}, el_list -> ForAll(el_list, el -> Size(GeneratorsOfSemigroup(StateSet(el))) = rk[i]+1)), "\n");
-> od;
-true
-gap>
-gap> Info(InfoFR,1,"4.2.9 State");
-#I 4.2.9 State
-gap>
-gap> ForAll(Flat(frel), el -> ForAll(Tuples(AlphabetOfFRObject(el),2), w -> State(el, w) = FRElement(UnderlyingFRMachine(el), Transition(el, w))));
-true
-gap>
-gap> Info(InfoFR,1,"4.2.10 States");
-#I 4.2.10 States
-gap>
-gap> l := [5,4,4,2,4,-1,4,2,-1];
-[ 5, 4, 4, 2, 4, -1, 4, 2, -1 ]
-gap> for i in [1,2,3,4,5, 7,8 ] do # 6 and 9 are not finite-state...
-> Print(ForAll(frel[i], list -> Length(States(list)) = l[i]), "\n");
-> od;
-true
-true
-true
-true
-true
-true
-true
-gap> AsSet(States(frel[1][1][3])) = AsSet(frel[1][1]);
-true
-gap> Length(AsSet(States(Concatenation(frel[1][1], frel[3][1], frel[7][1])))) = 10;
-true
-gap> States(frel[3][4][2]) = [frel[3][4][2], frel[3][4][1], frel[3][4][3], One(frel[3][4][1])];
-true
-gap> States(frel[4][2][1]^6) = [frel[4][2][1]^6,frel[4][2][1],frel[4][2][1]^2,One(frel[4][2][1])];
-true
-gap> AsSet(States(frel[5][3][2])) = AsSet(Concatenation(frel[5][3], [One(frel[5][3][1])]));
-true
-gap> States(frel[7][2][2]) = [frel[7][2][2], One(frel[7][2][2])];
-true
-gap> States(frel[8][4][2]) = Reversed(frel[8][4]);
-true
-gap>
-gap> Info(InfoFR,1,"4.2.11 FixedStates");
-#I 4.2.11 FixedStates
-gap>
-gap> FixedStates(frel[1][1][3]) = frel[1][1]{[2,4,5,1,3]};
-true
-gap> FixedStates(frel[1][1]) = frel[1][1]{[1,2,4,5,3]};
-true
-gap> FixedStates(frel[4][4][1]^10) = [frel[4][4][1]^2];
-true
-gap> FixedStates(frel[4][4][1]^25) = [frel[4][4][1]^5,frel[4][4][1]];
-true
-gap> FixedStates(frel[6][1]) = [frel[6][1][2]*frel[6][1][1]^-1, frel[6][1][2]^-6*frel[6][1][1]^-1];
-true
-gap> FixedStates(frel[7][2][3]*frel[7][2][1]) = [frel[7][2][2]*frel[7][2][3],frel[7][2][2]];
-true
-gap> FixedStates(frel[9][1][1]) = [frel[9][1][2]^3*frel[9][1][1]];
-true
-gap>
-gap> Info(InfoFR,1,"4.2.12 LimitStates");
-#I 4.2.12 LimitStates
-gap>
-gap> for i in [1..4] do
-> t := true;
-> t := t and LimitStates(frel[1][i][1]) = [frel[1][i][1]];
-> t := t and LimitStates(frel[1][i][2]) = [frel[1][i][1]];
-> t := t and AsSet(LimitStates(frel[1][i][3])) = AsSet(frel[1][i]);
-> t := t and AsSet(LimitStates(frel[2][i][2])) = AsSet([frel[2][i][2], One(frel[2][i][2])]);
-> t := t and AsSet(LimitStates(frel[3][i][2])) = AsSet(Concatenation(frel[3][i], [One(frel[3][i][1])]));
-> t := t and AsSet(LimitStates(frel[4][i][1])) = AsSet(Concatenation(frel[4][i], [One(frel[4][i][1])]));
-> t := t and ForAll([1..3], j -> AsSet(LimitStates(frel[5][i][j])) = AsSet(Concatenation(frel[5][i], [One(frel[5][i][1])])));
-> t := t and ForAll([1,3], j -> AsSet(LimitStates(frel[7][i][j])) = AsSet(Concatenation(frel[7][i], [One(frel[7][i][1])])));
-> t := t and AsSet(LimitStates(frel[7][i][2])) = AsSet([frel[7][i][2], One(frel[7][i][1])]);
-> t := t and ForAll([1..2], j -> AsSet(LimitStates(frel[8][i][j])) = AsSet(frel[8][i]));
-> Print(t, "\n");
-> od;
-true
-true
-true
-true
-gap>
-gap> Info(InfoFR,1,"4.2.13 InitialState");
-#I 4.2.13 InitialState
-gap>
-gap> ForAll(Flat(frel), g -> InitialState(g) = Transition(g,[]));
-true
-gap> f := StateSet(frel[9][1][1]);
-<free semigroup on the generators [ s1, s2 ]>
-gap> g := f.2^2*f.1^4*f.2*f.1*f.2;
-s2^2*s1^4*s2*s1*s2
-gap> InitialState(FRElement(UnderlyingFRMachine(frel[9][1][1]), g)) = g;
-true
-gap>
-gap> Info(InfoFR,1,"4.2.14 \\^");
-#I 4.2.14 \^
-gap>
-gap> ForAll(Flat(frel), g -> ForAll(AlphabetOfFRObject(g), i -> i^g = Output(g)[i]));
-true
-gap> n := 2;
-2
-gap> ForAll(Flat(frel), g -> ForAll(Tuples(AlphabetOfFRObject(g), n), w -> w^g = Reversed(CoefficientsQadic((List([n-1,n-2..0], i -> Size(AlphabetOfFRObject(g))^i)*(w-ListWithIdenticalEntries(n, 1))+1)^Activity(g, n) - 1, Size(AlphabetOfFRObject(g))) + ListWithIdenticalEntries(n, 1))));
-true
-gap>
-gap> Info(InfoFR,1,"4.2.15 \\*");
-#I 4.2.15 \*
-gap>
-gap> Activity(frel[7][1][1]*frel[1][1][3], 2) = Trans([2,2,1,1]);
-true
-gap>
-gap> Info(InfoFR,1,"4.2.16 \\[\\]");
-#I 4.2.16 \[\]
-gap>
-gap> for i in [1..6] do
-> Print(ForAll(mg[i], m -> ForAll([1..Size(frel[i][1])], j -> m[j] = frel[i][1][j])), "\n");
-> od;
-true
-true
-true
-true
-true
-true
-gap> for i in [7..9] do
-> Print(ForAll(mm[i], m -> ForAll([1..Size(frel[i][1])], j -> m[j] = frel[i][1][j])), "\n");
-> od;
-true
-true
-true
-gap> for i in [1..6] do
-> Print(ForAll(mg[i], m -> m{[1..Size(frel[i][1])]} = frel[i][1]), "\n");
-> od;
-true
-true
-true
-true
-true
-true
-gap> for i in [7..9] do
-> Print(ForAll(mm[i], m -> m{[1..Size(frel[i][1])]} = frel[i][1]), "\n");
-> od;
-true
-true
-true
-gap>
-gap> STOP_TEST( "chapter-4.tst", 10^10 );
-fr:chapter 4
-GAP4stones: 210000
-
-#E chapter-4.tst . . . . . . . . . . . . . . . . . . . . . . . . . .ends here
View
1,596 tst/chapter-5-a.tst
@@ -1,1596 +0,0 @@
-#############################################################################
-##
-#W chapter-5-a.tst FR Package Laurent Bartholdi
-##
-#H @(#)$Id$
-##
-#Y Copyright (C) 2008, Laurent Bartholdi
-##
-#############################################################################
-##
-## This file tests the functions explained in chapter 5 of the manual
-##
-#############################################################################
-
-gap> START_TEST("fr:chapter 5 (1/2)");
-gap>
-gap> Info(InfoFR,1,"5.1 Creators for MealyMachines and MealyElements");
-#I 5.1 Creators for MealyMachines and MealyElements
-gap>
-gap> Read(Filename(DirectoriesPackageLibrary("fr","tst"),"mealymachines.g"));
-gap> Read(Filename(DirectoriesPackageLibrary("fr","tst"),"mealyelements.g"));
-gap> Read(Filename(DirectoriesPackageLibrary("fr","tst"),"frelements.g"));
-gap> Read(Filename(DirectoriesPackageLibrary("fr","tst"),"frmachines.g"));
-gap>
-gap> # Minimization of the non-minimized elements.
-gap> for list in mealyel{[1,2,3,4,5, 7,8 ]} do
-> Apply(list[1], Minimized);
-> od;
-gap>
-gap> Info(InfoFR,1,"5.1.1-3 MealyMachine/Element(NC)");
-#I 5.1.1-3 MealyMachine/Element(NC)
-gap>
-gap> # machines
-gap>
-gap> ForAll([1..5], i -> ForAll(mg[i], m -> ForAll(mealym[i]{[1,2]}, mealy -> AsMealyMachine(m) = mealy)));
-true
-gap> ForAll([7,8], i -> ForAll(mm[i], m -> ForAll(mealym[i]{[1,2]}, mealy -> AsMealyMachine(m) = mealy)));
-true
-gap>
-gap> ForAll([1..5], i -> ForAll(mg[i], m -> ForAll(mealym[i]{[1..3]}, mealy -> AsMealyMachine(m) = AsIntMealyMachine(mealy))));
-true
-gap> ForAll([1,2,3, 5], i -> ForAll(mg[i], m -> SubFRMachine(AsMealyMachine(m), AsIntMealyMachine(mealym[i][4])) <> fail and SubFRMachine(AsIntMealyMachine(mealym[i][4]), AsMealyMachine(m)) <> fail));
-true
-gap> # machine 4 is special because we need to relabel the tree...
-gap> ForAll([7,8], i -> ForAll(mm[i], m -> ForAll(mealym[i]{[1..3]}, mealy -> AsMealyMachine(m) = AsIntMealyMachine(mealy))));
-true
-gap> ForAll([7,8], i -> ForAll(mm[i], m -> SubFRMachine(AsMealyMachine(m), AsIntMealyMachine(mealym[i][4])) <> fail and SubFRMachine(AsIntMealyMachine(mealym[i][4]), AsMealyMachine(m)) <> fail));
-true
-gap>
-gap> ForAll(mealym{[1,2,3,4,5]}, list -> ForAll(list{[1..3]}, m -> list[1] = AsIntMealyMachine(m)));
-true
-gap> ForAll(mealym{[1,2,3, 5]}, list -> SubFRMachine(AsIntMealyMachine(list[4]), list[1]) <> fail and SubFRMachine(list[1], AsIntMealyMachine(list[4])) <> fail);
-true
-gap> # machine 4 is special because we need to relabel the tree...
-gap> ForAll(mealym{[7,8]}, list -> ForAll(list{[1..3]}, m -> list[1] = AsIntMealyMachine(m)));
-true
-gap> ForAll(mealym{[7,8]}, list -> SubFRMachine(AsIntMealyMachine(list[4]), list[1]) <> fail and SubFRMachine(list[1], AsIntMealyMachine(list[4])) <> fail);
-true
-gap>
-gap> # elements
-gap>
-gap> ForAll([1], i -> ForAll(frel[i], frelts -> ForAll(mealyel[i], mealyelts -> List(frelts, AsMealyElement) = List(mealyelts, AsIntMealyElement))));
-true
-gap> ForAll([2,3, 5], i -> ForAll(frel[i], frelts -> ForAll(mealyel[i], mealyelts -> List(Concatenation(frelts, [One(frelts[1])]), AsMealyElement) = List(mealyelts, AsIntMealyElement))));
-true
-gap> ForAll([4], i -> ForAll(frel[i], frelts -> ForAll(mealyel[i]{[1,2,3, 5]}, mealyelts -> List(Concatenation(frelts, [One(frelts[1])]), AsMealyElement) = List(mealyelts, AsIntMealyElement))));
-true
-gap>
-gap> ForAll([7], i -> ForAll(frel[i], frelts -> ForAll(mealyel[i], mealyelts -> List(Concatenation(frelts, [One(frelts[1])]), AsMealyElement) = List(mealyelts, AsIntMealyElement))));
-true
-gap> ForAll([8], i -> ForAll(frel[i], frelts -> ForAll(mealyel[i], mealyelts -> List(frelts, AsMealyElement) = List(mealyelts, AsIntMealyElement))));
-true
-gap>
-gap> for machine in mealyel{[1,2,3, 5]} do
-> Print(ForAll(machine, elts -> ForAll(elts, el -> AsIntMealyElement(el) = machine[1][Position(elts, el)])), "\n");
-> od;
-true
-true
-true
-true
-gap> ForAll(mealyel[4]{[1,2,3, 5]}, elts -> ForAll(elts, el -> AsIntMealyElement(el) = mealyel[4][1][Position(elts, el)]));
-true
-gap> for machine in mealyel{[7,8]} do
-> Print(ForAll(machine, elts -> ForAll(elts, el -> AsIntMealyElement(el) = machine[1][Position(elts, el)])), "\n");
-> od;
-true
-true
-gap>
-gap> Length(AsSet(Concatenation(List(Flat(mealyel{[1,3]}), AsIntMealyElement), List(Flat(mealyel[7]), AsIntMealyElement)))) = 10;
-true
-gap> ForAll(mealyel{[2,5]}, list -> Length(AsSet(List(Flat(list), AsIntMealyElement))) = Length(list[1]));
-true
-gap> ForAll(mealyel{[4]}, list -> Length(AsSet(List(Flat(list), AsIntMealyElement))) = Length(list[1])+1); # again, the alphabet...
-true
-gap> ForAll(mealyel{[7,8]}, list -> Length(AsSet(List(Flat(list), AsIntMealyElement))) = Length(list[1]));
-true
-gap>
-gap> Info(InfoFR,1,"We now test the functions already tested on FRMachines");
-#I We now test the functions already tested on FRMachines
-gap>
-gap> Info(InfoFR,1,"3.3.3 UnderlyingFRMachine, ...");
-#I 3.3.3 UnderlyingFRMachine, ...
-gap>
-gap> ForAll([1,2,3,4,5,6], i -> ForAll([1..Size(frel[i][1])], j -> UnderlyingFRMachine(frel[i][1][j]) = mg[i][1]));
-true
-gap> ForAll([7,8,9], i -> ForAll([1..Size(frel[i][1])], j -> UnderlyingFRMachine(frel[i][1][j]) = mm[i][1]));
-true
-gap>
-gap> Info(InfoFR,1,"3.3.4 AsGroupFRMachine, ...");
-#I 3.3.4 AsGroupFRMachine, ...
-gap>
-gap> # loops testing AsGroupFRMachine, AsMonoidFRMachine and AsSemigroupFRMachine
-gap> b := Ball(GrigorchukGroup,2);;
-gap> bg := List(b,AsGroupFRElement);;
-gap> bm := List(b,AsMonoidFRElement);;
-gap> bs := List(b,AsSemigroupFRElement);;
-gap> N := [1..Length(b)];;
-gap> ForAll(N,i->ForAll(N,j->(b[i]<b[j])=(i<j)));
-true
-gap> ForAll(N,i->ForAll(N,j->(b[i]=b[j])=(i=j)));
-true
-gap> ForAll(N,i->ForAll(N,j->(b[i]<bg[j])=(i<j)));
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-#I \<: converting first argument to FR element
-true
-gap> ForAll(N,i->ForAll(N,j->(b[i]=bg[j])=(i=j)));
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-#I \=: converting first argument to FR element
-true
-gap> ForAll(N,i->ForAll(N,j->(bg[i]<b[j])=(i<j)));
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element
-#I \<: converting second argument to FR element