I have had some trouble comparing automorphisms of SemidirectProducts of
some small permutation groups. Eventually it appeared that the problem
arose due to the use of Copy. I have not very familiar with the use of
Copy, but this particular problem does nor arise with permutation groups
as far as I can see.
Any assistance would be appreciated. A log file follows.
( By the way: should I be using "Copy" anyway? :-
( If I define a function and wish to attach a local variable to the
( parameter as an extra field, the following appear to work:
( test := function( x )
( local y;
( ...; y:=...;
( x.test := y; OR: x.test := Copy( y );
( return y;
( end;
( I "feel" that I ought to use Copy, in case the next call of the
( function overwrites the value of y. What is good practice here?
Chris Wensley (mas023@bangor.ac.uk)
==================================================================
gap> # No problem with permutation groups:
gap> G := Group( (1,2), (2,3) );; G.name:="G";;
gap> eG := Elements(G);
[ (), (2,3), (1,2), (1,2,3), (1,3,2), (1,3) ]
gap> H := Copy(G);; eH := Elements(H);;
gap> G=H;
true
gap> eH[3] in eG;
true
gap> # construct a SemidirectProduct:
gap> c2 := Subgroup( G, [(1,2)]);; c2.name := "c2";;
gap> c3 := Subgroup( G, [(1,2,3)]);; c3.name := "c3";;
gap> id := IdentityMapping(c2);;
gap> S := SemidirectProduct( c2, id, c3 ); S.name:="S";;
Group( SemidirectProductElement( (1,2), (1,2), () ),
SemidirectProductElement( (), (), (1,2,3) ) )
gap> T := Copy( S );; T.name := "T";;
gap> eS := Elements( S );
[ SemidirectProductElement( (), (), () ),
SemidirectProductElement( (), (), (1,2,3) ),
SemidirectProductElement( (), (), (1,3,2) ),
SemidirectProductElement( (1,2), (1,2), () ),
SemidirectProductElement( (1,2), (1,2), (1,2,3) ),
SemidirectProductElement( (1,2), (1,2), (1,3,2) ) ]
gap> eT := Elements(T);;
gap> # Now try some comparisons:
gap> S=T;
Error, sorry, cannot compare the infinite domains <D> and <E> in
<rec1> = <rec2> called from
<rec1> = <rec2> called from
<rec1> = <rec2> called from
main loop
brk> D;
GroupElements
brk> E;
GroupElements
brk> quit;
gap> eS[4] in eT;
Error, sorry, cannot compare the infinite domains <D> and <E> in
<rec1> = <rec2> called from
<rec1> = <rec2> called from
main loop
brk> quit;