[GAP Forum] Why doesn't this lines work properly

Mr. Sorouhesh msorouhesh at gmail.com
Thu Nov 22 06:49:30 GMT 2012


Dear Froum,

I am working on a GAP manual and write the following common commands to
verify some facts in a self-made Semigroup:

> f:=FreeSemigroup(2);;
> a:=f.1;; b:=f.2;;
> s:=f/[[a^2,a],[b^3,b],[a*b*a,b*a]];;
> e:=Elements(s);

[ s1, s2, s1*s2, s2*s1, s2^2, s1*s2^2, s2*s1*s2, s2^2*s1, s2*s1*s2^2,
s2^2*s1*s2, s2^2*s1*s2^2 ]

Now I write:

> List([1..5],k->g[1]*g[2]=g[k]);
[ false, false, *true*, false, false ]
which works good. Now this one:

> List([1..5],k->g[1]*g[2]=g[2]*g[k]);
[ *false*, false, false, false, false ]

which shows an defect in the program when k=1. I think, in that case, it
should write "true".

Please hint me on a right way. Thanks.


More information about the Forum mailing list