Consider this example (originally due to @laurentbartholdi, see also http://tracker.gap-system.org/issues/391):
gap> g := SymmetricGroup(3);;
gap> f := GroupHomomorphismByImages(Group((1,2)),Group((2,3)),[(1,2)],[(2,3)]);
[ (1,2) ] -> [ (2,3) ]
gap> PreImages(f,Group((2,3)));
Group([ (1,2) ])
gap> PreImages(f,Group((2,4)));
Error, usage: PreImages(<map>), PreImages(<map>,<img>), PreImages(<map>,<coll>)
The error message is not very helpful. It would be much more helpful if we said something like "the set/object/list you provided is not contained in the range of the map" or so.
Without thinking too much about it, couldn't we achieve this by modifying e.g. the test
if FamRangeEqFamElm( FamilyObj( map ), FamilyObj( img ) )
and img in Range( map ) then
return PreImagesElm( map, img );
to this:
if FamRangeEqFamElm( FamilyObj( map ), FamilyObj( img ) ) then
if not img in Range( map ) then
Error("the provided element is not contained in the range of the map"):
fi;
return PreImagesElm( map, img );
and so on?
Consider this example (originally due to @laurentbartholdi, see also http://tracker.gap-system.org/issues/391):
The error message is not very helpful. It would be much more helpful if we said something like "the set/object/list you provided is not contained in the range of the map" or so.
Without thinking too much about it, couldn't we achieve this by modifying e.g. the test
to this:
and so on?