Skip to content

Commit

Permalink
ENHANCE: Special redispatch for Nat.Hom.ByNS if group is found out to…
Browse files Browse the repository at this point in the history
… be finite

This is needed, as for matrix groups the earlier `NiceMonomorphism` dispatch does not hold.
Test is only done before expesive action search is started, so negligible cost.

Also added redispatches in case the NiceMonomorphism approach is ever removed.

This fixes #3070

Added testfile
  • Loading branch information
hulpke authored and ChrisJefferson committed Dec 2, 2018
1 parent 3696035 commit 8b1ff24
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/factgrp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1151,6 +1151,9 @@ function(G,N)
return GenericFindActionKernel(G,N);
end);

RedispatchOnCondition(FindActionKernel,IsIdenticalObj,[IsGroup,IsGroup],
[IsGroup and IsFinite,IsGroup],0);

InstallMethod(FindActionKernel,"general case: can't do",IsIdenticalObj,
[IsGroup,IsGroup],0,
function(G,N)
Expand Down Expand Up @@ -1400,6 +1403,12 @@ local h;
fi;
if h=fail then
# now we try to find a suitable operation

# redispatch upon finiteness test, as following will fail in infinite case
if not HasIsFinite(G) and IsFinite(G) then
return NaturalHomomorphismByNormalSubgroupOp(G,N);
fi;

h:=FindActionKernel(G,N);
if h<>fail then
Info(InfoFactor,1,"Action of degree ",
Expand All @@ -1415,6 +1424,15 @@ local h;
return h;
end);

RedispatchOnCondition(NaturalHomomorphismByNormalSubgroupNCOrig,IsIdenticalObj,
[IsGroup,IsGroup],[IsGroup and IsFinite,IsGroup],0);

RedispatchOnCondition(NaturalHomomorphismByNormalSubgroupInParent,true,
[IsGroup],[IsGroup and IsFinite],0);

RedispatchOnCondition(FactorGroupNC,IsIdenticalObj,
[IsGroup,IsGroup],[IsGroup and IsFinite,IsGroup],0);

#############################################################################
##
#M NaturalHomomorphismByNormalSubgroup( <G>, <N> ) . . for solvable factors
Expand Down
5 changes: 5 additions & 0 deletions tst/testbugfix/2018-12-01-Nathom.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Reported in github PR 3070
# Degenerate example where the subgroup can be formed without finiteness test (as the group
# is cyclic).
gap> G := Group([[[E(3),0,0],[0,E(3),0],[0,0,E(3)]],[[1,0,0],[0,0,1],[0,1,0]]]);;
gap> FactorGroup(G,Center(G));;

0 comments on commit 8b1ff24

Please sign in to comment.