From 27e703bd9c3959b0155fe670b58f132a1f7e65d5 Mon Sep 17 00:00:00 2001 From: Sergio Siccha Date: Fri, 23 Oct 2020 17:17:46 +0200 Subject: [PATCH] Update ThrowAwayFixedPoints Now ThrowAwayFixedPoints also prunes fixed points if the input group knows that it is primitive and has fixed points. If the input group does not know whether it is primitive yet but has fixed points, then ThrowAwayFixedPoints now returns NotEnoughInformation. Adds a comment in LargeBasePrimitive which explains how this fixes #190. That is this commit lets recog handle primitive groups which can be recognized by LargeBasePrimitive, except for the fact that they have fixed points. Also changes the tests in PermLargeBasePrimitive.tst to make them run a bit faster. Fixes #190. --- gap/perm.gi | 35 ++++++++++++++------ gap/perm/largebase.gi | 9 +++++ tst/working/quick/PermLargeBasePrimitive.tst | 24 +++++++++++--- 3 files changed, 54 insertions(+), 14 deletions(-) diff --git a/gap/perm.gi b/gap/perm.gi index d92017998..60e6dae00 100644 --- a/gap/perm.gi +++ b/gap/perm.gi @@ -347,24 +347,39 @@ end; #! @BeginChunk ThrowAwayFixedPoints #! This method defines a homomorphism of a permutation group #! G to the action on the moved points of G if -#! G does not have too many moved points. In the current setup, the -#! homomorphism is defined if the number k of moved +#! either G has a lot of fixed points, or if G knows that it is +#! primitive and has fixed points. If G does not know whether it is +#! primitive and has fixed points, then it returns NotEnoughInformation +#! so that it may be called again at a later time. +#! In all other cases, it returns NeverApplicable. +#!

+#! +#! In the current setup, the +#! homomorphism is defined if the number n of moved #! points is at most 1/3 of the largest moved point of G, -#! or k is at most half of the number of points on which -#! G is stored internally by &GAP;. The method returns -#! NeverApplicable if it does not define a homomorphism indicating that it will -#! never succeed. +#! or n is at most half of the number of points on which +#! G is stored internally by &GAP;. #! @EndChunk FindHomMethodsPerm.ThrowAwayFixedPoints := function( ri, G ) # Check, whether we can throw away fixed points - local gens,hom,l,n,o; + local gens,nrStoredPoints,n,largest,isApplicable,o,hom; gens := GeneratorsOfGroup(G); - l := List(gens,StoredPointsPerm); + nrStoredPoints := Maximum(List(gens,StoredPointsPerm)); n := NrMovedPoints(G); - if 2*n > Maximum(l) or 3*n > LargestMovedPoint(G) then # we do nothing - return NeverApplicable; + largest := LargestMovedPoint(G); + # If isApplicable is true, we definitely are applicable. + isApplicable := 3*n <= largest or 2*n <= nrStoredPoints + or (HasIsPrimitive(G) and IsPrimitive(G) and n < largest); + # If isApplicable is false, we might become applicable if G figures out + # that it is primitive. + if not isApplicable then + if not HasIsPrimitive(G) and n < largest then + return NotEnoughInformation; + else + return NeverApplicable; + fi; fi; o := MovedPoints(G); hom := ActionHomomorphism(G,o); diff --git a/gap/perm/largebase.gi b/gap/perm/largebase.gi index cf854f525..2d690320f 100644 --- a/gap/perm/largebase.gi +++ b/gap/perm/largebase.gi @@ -507,6 +507,14 @@ end; #! r \cdot k > 1 #! and 2 \cdot r \cdot k^2 \le n. #! +#! A large primitive group Hof the above type which does have fixed +#! points is handled as follows. After a call of LargeBasePrimitive, +#! the group H knows that it is primitive. Thus, after +#! LargeBasePrimitive returns NeverApplicable, the function +#! will prune away the fixed points and set +#! up a homomorphism. LargeBasePrimitive is then applicable to the image +#! of that homomorphism. +#! #! If G is imprimitive then the output is #! NeverApplicable. If G is primitive then #! the output is either a homomorphism into the @@ -526,6 +534,7 @@ FindHomMethodsPerm.LargeBasePrimitive := fi; RECOG.SetPseudoRandomStamp(grp,"Jellyfish"); res := RECOG.AllJellyfish(grp); + RECOG.SetPseudoRandomStamp(grp,"PseudoRandom"); if res = NeverApplicable or res = TemporaryFailure then return res; fi; diff --git a/tst/working/quick/PermLargeBasePrimitive.tst b/tst/working/quick/PermLargeBasePrimitive.tst index fed7adf6c..ccf299528 100644 --- a/tst/working/quick/PermLargeBasePrimitive.tst +++ b/tst/working/quick/PermLargeBasePrimitive.tst @@ -1,13 +1,29 @@ -#@local S19OnSets, jellyGroup, n, random, jellyGroupConj, ri +#@local S17OnSets, jellyGroup, n, random, jellyGroupConj, ri +#@local addFixedPointsPerm, jellyGroupWithFixedPoints, riWithFixed # Test for LargeBasePrimitive -gap> S19OnSets := Action(SymmetricGroup(19), Combinations([1 .. 19], 2), OnSets);; -gap> jellyGroup := WreathProductProductAction(S19OnSets, Group((1,2)));; +gap> S17OnSets := Action(SymmetricGroup(17), Combinations([1 .. 17], 2), OnSets);; +gap> jellyGroup := WreathProductProductAction(S17OnSets, Group((1,2)));; gap> n := NrMovedPoints(jellyGroup);; gap> # Take a random conjugate gap> random := Random(SymmetricGroup(n));; gap> jellyGroupConj := jellyGroup ^ random;; -gap> RECOG.TestGroup(jellyGroupConj, +gap> ri := RECOG.TestGroup(jellyGroupConj, > false, > Size(jellyGroup), > rec(tryNonGroupElements := true));; +gap> ri!.fhmethsel.successMethod; +"LargeBasePrimitive" + +# Test that groups with fixed points are handled together by +# ThrowAwayFixedPoints and LargeBasePrimitive. +gap> addFixedPointsPerm := Random(SymmetricGroup(5 * QuoInt(n,2)));; +gap> jellyGroupWithFixedPoints := jellyGroup ^ addFixedPointsPerm;; +gap> riWithFixed := RECOG.TestGroup(jellyGroupWithFixedPoints, +> false, +> Size(jellyGroup), +> rec(tryNonGroupElements := true));; +gap> riWithFixed!.fhmethsel.successMethod; +"ThrowAwayFixedPoints" +gap> RIFac(riWithFixed)!.fhmethsel.successMethod; +"LargeBasePrimitive"