Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PreImagesRepresentative for IsToPcGroupHomomorphismByImages #5705

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/ghompcgs.gi
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,11 @@
function( hom, elm )
local pcgsR, exp, imgs, pre, i;

# precompute pcgs
if not elm in ImagesSource( hom ) then
return fail;

Check warning on line 515 in lib/ghompcgs.gi

View check run for this annotation

Codecov / codecov/patch

lib/ghompcgs.gi#L515

Added line #L515 was not covered by tests
fi;

# Precompute a pcgs for the *image* of 'hom'.
InversePcgs( hom );

pcgsR := hom!.rangePcgs;
Expand Down
21 changes: 21 additions & 0 deletions tst/testinstall/grppc.tst
Original file line number Diff line number Diff line change
Expand Up @@ -183,5 +183,26 @@ true
gap> IsIdenticalObj( Range( iso ), ImagesSource( iso ) );
true

#
gap> G:= AbelianGroup( IsPcGroup, [ 3, 3, 3 ] );;
gap> S:= AbelianGroup( IsPcGroup, [ 3, 3 ] );;
gap> f:= GroupHomomorphismByImages( G, S, GeneratorsOfGroup( G ),
> [ GeneratorsOfGroup( S )[1], One( S ), One( S ) ] );;
gap> x:= GeneratorsOfGroup( S )[2];;
gap> x in Range( f ) and not x in Image( f );
true
gap> PreImagesRepresentative( f, x );
fail
gap> G:= AbelianGroup( IsPcGroup, [ 3, 3 ] );;
gap> S:= AbelianGroup( IsPcGroup, [ 3 ] );;
gap> f:= GroupHomomorphismByImages( G, S, GeneratorsOfGroup( G ),
> [ One( S ), One( S ) ] );;
gap> x:= GeneratorsOfGroup( S )[1];
f1
gap> x in Range( f ) and not x in Image( f );
true
gap> PreImagesRepresentative( f, x );
fail

# that's all, folks
gap> STOP_TEST( "grppc.tst" );
Loading