42.14 CompositionMapping

CompositionMapping( map1.. )

CompositionMapping returns the composition of the mappings map1, map2, etc. where the range of each mapping must be a subset of the source of the previous mapping. The mappings need not be single valued mappings, i.e., multi valued mappings are allowed.

The composition of map1 and map2 is the mapping map that maps each element elm of the source of map2 to Images( map1, Images( map2, elm ) ). If map1 and map2 are single valued mappings this can also be expressed as map2 * map1 (see Operations for Mappings). Note the reversed operands.

    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> p5 := MappingByFunction( g, g, x -> x^5 );
    MappingByFunction( g, g, function ( x )
        return x ^ 5;
    end )
    gap> p20 := CompositionMapping( p4, p5 );
    CompositionMapping( MappingByFunction( g, g, function ( x )
        return x ^ 4;
    end ), MappingByFunction( g, g, function ( x )
        return x ^ 5;
    end ) )
    gap> (2,4)(5,6,7) ^ p20;
    (5,7,6) 

CompositionMapping calls
map2.operations.CompositionMapping( map1, map2 ) and returns this value.

The default function called this way is MappingOps.CompositionMapping, which constructs a new mapping com. This new mapping remembers map1 and map2 as its factors in com.map1 and com.map2 and delegates everything to them. For example to compute Images( com, elm ), com.operations.ImagesElm calls Images( com.map1, Images( com.map2, elm ) ). Look in the index under CompositionMapping to see for which mappings this function is overlaid.

Previous Up Top Next
Index

GAP 3.4.4
April 1997