1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
|
#############################################################################
##
#W Hom.gi FGA package Christian Sievers
##
## Methods for homomorphisms of free groups
##
#Y 2003 - 2016
##
InstallMethod( PreImagesRepresentative,
"for homomorphisms of free groups",
FamRangeEqFamElm,
[ IsToFpGroupGeneralMappingByImages, IsElementOfFreeGroup ],
function( hom, x )
local w, mgi;
mgi := MappingGeneratorsImages( hom );
w := AsWordLetterRepInGenerators( x, FGA_Image( hom ));
if w = fail then
return fail;
fi;
return Product( w, i -> mgi[1][AbsInt(i)]^SignInt(i),
One(Source(hom)));
end );
InstallMethod( ImagesRepresentative,
"for homomorphisms of free groups",
FamSourceEqFamElm,
[ IsFromFpGroupGeneralMappingByImages, IsElementOfFreeGroup ],
23,
function( hom, x )
local w, mgi;
mgi := MappingGeneratorsImages( hom );
if mgi[1]=[] then return One(Range(hom)); fi;
w := AsWordLetterRepInGenerators( x, FGA_Source( hom ));
if w = fail then
return fail;
fi;
return Product( w, i -> mgi[2][AbsInt(i)]^SignInt(i),
One(Range(hom)));
end );
InstallMethod( FGA_Source,
[ IsFromFpGroupGeneralMappingByImages and HasMappingGeneratorsImages ],
hom -> SubgroupNC( Source(hom), MappingGeneratorsImages(hom)[1] )
);
InstallMethod( FGA_Image,
[ IsToFpGroupGeneralMappingByImages and HasMappingGeneratorsImages ],
hom -> SubgroupNC( Range(hom), MappingGeneratorsImages(hom)[2] )
);
InstallMethod( IsSingleValued,
"for group general mappings of free groups",
[ IsFromFpGroupGeneralMappingByImages and HasMappingGeneratorsImages ],
function( hom )
local mgi, g, imgs;
mgi := MappingGeneratorsImages( hom );
if mgi[1]=[] then return true; fi; # map on trivial group
g := SubgroupNC( Source(hom), mgi[1] );
if not IsFreeGroup( g ) then
TryNextMethod();
fi;
if Size( mgi[1] ) = RankOfFreeGroup( g ) then
return true;
fi;
# write free generators in given generators and
# compute corresponding images:
imgs := List( FreeGeneratorsOfGroup( g ), fgen ->
Product( AsWordLetterRepInGenerators( fgen, g ),
i -> mgi[2][AbsInt(i)]^SignInt(i),
One(Range(hom)) ));
# check if all given generator/image pairs agree with the
# map given by free generators and computed images:
return ForAll( [ 1 .. Size( mgi[1] ) ], n ->
mgi[2][n] =
Product(
AsWordLetterRepInFreeGenerators( mgi[1][n], g ),
i -> imgs[AbsInt(i)]^SignInt(i),
One(Range(hom)) ));
end );
#############################################################################
##
#E
|