Skip to content

Commit

Permalink
Fix Comm for group automorphisms
Browse files Browse the repository at this point in the history
This used to run into a coset enumeration.

We increase the rank of certain methods for composite maps
to resolve the issue and possibly others.
  • Loading branch information
fingolfin committed Jan 20, 2025
1 parent abb8103 commit a27f569
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/mapprep.gi
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ InstallMethod( CompositionMapping2,
InstallMethod( IsInjective,
"for a composition mapping",
true,
[ IsCompositionMappingRep ], 0,
[ IsCompositionMappingRep ], SUM_FLAGS,
function( com )
if IsInjective( com!.map1 ) and IsInjective( com!.map2 ) then
return true;
Expand All @@ -176,7 +176,7 @@ InstallMethod( IsInjective,
InstallMethod( IsSingleValued,
"for a composition mapping",
true,
[ IsCompositionMappingRep ], 0,
[ IsCompositionMappingRep ], SUM_FLAGS,
function( com )
if IsSingleValued( com!.map1 ) and IsSingleValued( com!.map2 ) then
return true;
Expand All @@ -199,7 +199,7 @@ InstallMethod( IsSingleValued,
InstallMethod( IsSurjective,
"for a composition mapping",
true,
[ IsCompositionMappingRep ], 0,
[ IsCompositionMappingRep ], SUM_FLAGS,
function( com )
if not IsSurjective( com!.map2 ) then
return false;
Expand All @@ -218,7 +218,7 @@ InstallMethod( IsSurjective,
InstallMethod( IsTotal,
"for a composition mapping",
true,
[ IsCompositionMappingRep ], 0,
[ IsCompositionMappingRep ], SUM_FLAGS,
function( com )
if not IsTotal( com!.map1 ) then
return false;
Expand Down
17 changes: 17 additions & 0 deletions tst/testbugfix/2025-01-16-Comm-for-group-automorphisms.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#@local F,x1,x2,x3,x4,A,u,v,hom
# The 'Comm' call below used to trigger a coset enumeration.
# See issue https://github.com/gap-system/gap/issues/3898
gap> F:=FreeGroup("x1","x2","x3","x4");;
gap> x1:=F.1;;x2:=F.2;;x3:=F.3;;x4:=F.4;;
gap> A:=GroupHomomorphismByImages(F,F,[x1,x2,x3,x4],[x1,x2,x2*x3^-1*x2,x4]);;
gap> u:=(A*A)^A;;
gap> v:=(A*A)^A;;
gap> IsBijective(u*v); # used to hang
true
gap> (u*v)(x1); # verify that computing images works
x1
gap> hom:=Comm(u,v);; # used to hang
gap> IsGroupHomomorphism(hom);
true
gap> hom(x1); # verify that computing images works
x1

0 comments on commit a27f569

Please sign in to comment.