PowerMapping( map, n )
PowerMapping returns the n-th power of the mapping map. map must
be a mapping whose range is a subset of its source. n must be a
nonnegative integer. map may be a multi valued mapping.
gap> g := Group( (1,2,3,4), (2,4), (5,6,7) );; g.name := "g";;
gap> p4 := MappingByFunction( g, g, x -> x^4 );
MappingByFunction( g, g, function ( x )
return x ^ 4;
end )
gap> p16 := p4 ^ 2;
CompositionMapping( CompositionMapping( IdentityMapping( g ), MappingB\
yFunction( g, g, function ( x )
return x ^ 4;
end ) ), CompositionMapping( IdentityMapping( g ), MappingByFunction( \
g, g, function ( x )
return x ^ 4;
end ) ) )
gap> p16 = MappingByFunction( g, g, x -> x^16 );
true
PowerMapping calls map.operations.PowerMapping( map, n ) and
returns this value.
The default function called this way is MappingOps.PowerMapping, which
computes the power using a binary powering algorithm, IdentityMapping,
and CompositionMapping. This function is seldom overlaid, because
CompositionMapping does the interesting work.
GAP 3.4.4