Skip to content

Commit

Permalink
Update ThrowAwayFixedPoints
Browse files Browse the repository at this point in the history
Also lets ThrowAwayFixedPoints create a homomorphism if the input group
is primitive and has fixed points.

Fixes gap-packages#190.
  • Loading branch information
ssiccha committed Oct 23, 2020
1 parent 4566f20 commit 585d73d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions gap/perm.gi
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,9 @@ end;
#! @BeginChunk ThrowAwayFixedPoints
#! This method defines a homomorphism of a permutation group
#! <A>G</A> to the action on the moved points of <A>G</A> if
#! <A>G</A> does not have too many moved points. In the current setup, the
#! either <A>G</A> does not have too many moved points, or if <A>G</A> is
#! primitive and has fixed points.
#! In the current setup, the
#! homomorphism is defined if the number <M>k</M> of moved
#! points is at most <M>1/3</M> of the largest moved point of <A>G</A>,
#! or <M>k</M> is at most half of the number of points on which
Expand All @@ -361,12 +363,15 @@ end;
FindHomMethodsPerm.ThrowAwayFixedPoints :=
function( ri, G )
# Check, whether we can throw away fixed points
local gens,hom,l,n,o;
local gens,hom,l,n,largest,o;

gens := GeneratorsOfGroup(G);
l := List(gens,StoredPointsPerm);
n := NrMovedPoints(G);
if 2*n > Maximum(l) or 3*n > LargestMovedPoint(G) then # we do nothing
largest := LargestMovedPoint(G);
if (2*n > Maximum(l) or 3*n > largest)
and not (IsPrimitive(G) and largest > n)
then # we do nothing
return NeverApplicable;
fi;
o := MovedPoints(G);
Expand Down

0 comments on commit 585d73d

Please sign in to comment.