According to the documentation, PreImagesRepresentative "returns either a representative of the set of preimages of elm under map or fail, the latter if and only if elm has no preimages under map."
However, the latter case does not seem to work properly for pc-groups:
gap> G := SmallGroup(2,1);
<pc group of size 2 with 1 generators>
gap> phi := GroupHomomorphismByImages(G,G,[G.1],[One(G)]);
[ f1 ] -> [ <identity> of ... ]
gap> PreImagesRepresentative(phi,G.1);
Error, List Element: <list>[1] must have an assigned value in
DepthOfPcElement( ParentPcgs( pcgs ), elm ) at /usr/lib/gap/lib/pcgsind.gi:1285 called from
DepthOfPcElement( pa, elm ) at /usr/lib/gap/lib/pcgsind.gi:1353 called from
ExponentsOfPcElement( pcgsR, elm ) at /usr/lib/gap/lib/ghompcgs.gi:518 called from
<function "PreImagesRepresentative method for pcgs hom">( <arguments> )
For symmetric groups, a similar error can happen, or an incorrect preimage may be returned:
gap> S := SymmetricGroup(3);
Sym( [ 1 .. 3 ] )
gap> psi := GroupHomomorphismByImages(S,S,[S.1,S.2],[One(S),S.2]);
[ (1,2,3), (1,2) ] -> [ (), (1,2) ]
gap> PreImagesRepresentative(psi,(1,2,3));
(1,2)
gap> PreImagesRepresentative(psi,(1,3));
Error, List Element: <list>[3] must have an assigned value in
img := opr( img, S.transimages[bimg[1]] ); at /usr/lib/gap/lib/ghomperm.gi:110 called from
ImageSiftedBaseImage( S, OnTuples( BaseStabChain( S ), elm ), S.idimage, OnRight
) at /usr/lib/gap/lib/ghomperm.gi:1015 called from
ImagesRepresentative( RestrictedInverseGeneralMapping( hom ), elm ) at /usr/lib/gap/lib/ghomperm.gi:1108 called from
<function "PreImagesRepresentative method">( <arguments> )
According to the documentation,
PreImagesRepresentative"returns either a representative of the set of preimages of elm under map orfail, the latter if and only if elm has no preimages under map."However, the latter case does not seem to work properly for pc-groups:
For symmetric groups, a similar error can happen, or an incorrect preimage may be returned: