Dear GAP Forum
It seems reasonable to hope that MappingByFunction can be used inside a loop to produce a list of homomorphisms. However, it appears that the definition of f(x) may depend only on x and constants, and not the loop variable or associated parameters. Is there a way round this? The following listing illustrates the problem. ---------------------------------------------------------------- gap> c6 := Group( (1,2,3,4,5,6) );; gap> c6.name := "c6";; gap> pow := 0 * [1..6];; gap> for i in [1..6] do pow[i] := MappingByFunction( c6, c6, x->x^i ); od; gap> pow; [ MappingByFunction( c6, c6, function ( x ) return x ^ i; | | (6 times --- all using "i") | end ), MappingByFunction( c6, c6, function ( x ) return x ^ i; end ) ] gap> g:=(1,2,3,4,5,6);; gap> for i in [1..6] do Print( g^pow[i],", "); od; Print("\n"); (1,2,3,4,5,6), (1,3,5)(2,4,6), (1,4)(2,5)(3,6), (1,5,3)(2,6,4), (1,6,5,4,3,2), (), gap> # Note: "i" now has value 6 gap> for j in [1..6] do Print( g^pow[j],", "); od; Print("\n"); (), (), (), (), (), (), gap> LogTo(); --------------------------------------------------------------- Chris Wensley University of Wales at Bangor Email: mas023@bangor.ac.uk