Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f381cc7
Add option infoLevel to RECOG.TestGroup
ssiccha Mar 29, 2022
2aed139
Fix for howtowritearecogmethod.autodoc
ssiccha Mar 29, 2022
dd14350
Make CallMethods directly write into the RecogNode
ssiccha Mar 29, 2022
47c4b28
Squash of SnAnUnknownDegree commits
FriedrichRober Mar 30, 2021
6a96a7a
SnAnUnknownDegree: rename internal functions
FriedrichRober Jun 1, 2022
2061336
SnAnUnknownDegree: Add MD file describing implementation
FriedrichRober Jun 1, 2022
229ad39
SnAnUnknownDegree: clean up tests
FriedrichRober Jun 1, 2022
e3ac7e3
SnAnUnknownDegree: remove `SnAnSmallUnknownDegree`.
FriedrichRober Jun 1, 2022
f34d735
SnAnUnknownDegree: Refactor tests.
FriedrichRober Jun 2, 2022
10af7a6
SnAnUnknownDegree: Use the same random elements for heuristic three c…
FriedrichRober Jun 2, 2022
852db78
SnAnUnknownDegree: Improve upper bound.
FriedrichRober Jun 2, 2022
f63fb5c
SnAnUnknownDegree: Use GuessDegree only if degree is too large.
FriedrichRober Jun 2, 2022
65dc977
Improvement of SnAnUnknownDegree
FriedrichRober Nov 4, 2022
af0aba4
Integrate SnAn code into library
FriedrichRober Dec 8, 2025
6539468
Remove hack from test file
FriedrichRober Dec 8, 2025
18b7a18
fixed wrong rebase
FriedrichRober Dec 8, 2025
7fb6ed2
Rename counters to better reflect what they are counting in the algor…
FriedrichRober Dec 9, 2025
6089439
Change iterator to work in small batches
FriedrichRober Dec 9, 2025
adb2fce
Update changes text
FriedrichRober Dec 9, 2025
458b1b1
Performance fixes:
FriedrichRober Dec 9, 2025
2959e1a
Merge branch 'master' into frss/AnSnRecogUnknownDegree-2
fingolfin Dec 11, 2025
01f39bf
Removing duplicate of RECOG.GuessSnAnDegree
fingolfin Dec 11, 2025
0a3e5a9
Turn RECOG_SnAn into a code comment
fingolfin Dec 11, 2025
a6d26f9
Get rid of SnAnRepeatImmediately
fingolfin Dec 11, 2025
7f2e750
trivial tweaks
fingolfin Dec 11, 2025
16bace0
restore bug fix
fingolfin Dec 11, 2025
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
7 changes: 7 additions & 0 deletions doc/recog.bib
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,13 @@ @incollection {CLG98
NOTE = {https://doi.org/10.1017/CBO9780511565830.007},
}

@article{C12,
AUTHOR = {Conder, Jonathan},
TITLE = {Algorithms for Permutation Groups},
YEAR = {2012},
NOTE = {TODO},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be filled in by someone? At which university was this thesis written; what kind of thesis was it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I talked to @aniemeyer and learned that this was a thesis in Auckland, but I didn't find something initially. But now it seems this was indeed a B.Sc. thesis there, and it was written by @jonathan-conder . I have now pinged them, and will also write an email. Perhaps we get permissions to post the thesis somewhere, or perhaps Jonathan is willing to put it on e.g. the arXiv (I am not sure if they accept such things, but it seems to contain original research, and they definitely have at least phd theses?)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jonathan replied to my email and generously gave permission to share copies of his thesis, and he also made it available at https://jonathan-conder.github.io/afpg.pdf -- this should keep working for the foreseeable future, and I also made sure archive.org has a snapshot. Still, we should probably see if we can also get this onto e.g. Zenodo or so.

Anyway, that gives us enough info to complete this bib record. I'll do so eventually (if nobody beats me to it).

}

@article {CLGO06,
AUTHOR = {Conder, M. D. E. and Leedham-Green, C. R. and O'Brien, E. A.},
TITLE = {Constructive recognition of {${\rm PSL}(2,q)$}},
Expand Down
866 changes: 723 additions & 143 deletions gap/generic/SnAnUnknownDegree.gi

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions gap/matrix.gi
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,8 @@ AddMethod(FindHomDbMatrix, FindHomMethodsMatrix.DiagonalMatrices, 1100);

AddMethod(FindHomDbMatrix, FindHomMethodsMatrix.KnownStabilizerChain, 1175);

AddMethod(FindHomDbMatrix, FindHomMethodsGeneric.SnAnUnknownDegree, 1070);;

AddMethod(FindHomDbMatrix, FindHomMethodsGeneric.FewGensAbelian, 1050);

AddMethod(FindHomDbMatrix, FindHomMethodsMatrix.ReducibleIso, 1000);
Expand Down
2 changes: 2 additions & 0 deletions gap/perm.gi
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,8 @@ AddMethod(FindHomDbPerm, FindHomMethodsPerm.Imprimitive, 70);

AddMethod(FindHomDbPerm, FindHomMethodsPerm.LargeBasePrimitive, 60);

AddMethod(FindHomDbPerm, FindHomMethodsGeneric.SnAnUnknownDegree, 58);;

AddMethod(FindHomDbPerm, FindHomMethodsPerm.StabilizerChainPerm, 55);

AddMethod(FindHomDbPerm, FindHomMethodsPerm.StabChain, 50);
Expand Down
4 changes: 4 additions & 0 deletions gap/projective.gi
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ AddMethod(FindHomDbProjective, FindHomMethodsMatrix.ReducibleIso, 1200);

AddMethod(FindHomDbProjective, FindHomMethodsProjective.NotAbsolutelyIrred, 1100);

# AddMethod(FindHomDbProjective, FindHomMethodsGeneric.SnAnSmallUnknownDegree, 1075);

Comment on lines +314 to +315
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method does not seem to exist?

Suggested change
# AddMethod(FindHomDbProjective, FindHomMethodsGeneric.SnAnSmallUnknownDegree, 1075);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, might be an artifact of some old code we wrote. You can safely delete this.

AddMethod(FindHomDbProjective, FindHomMethodsProjective.ClassicalNatural, 1050);

AddMethod(FindHomDbProjective, FindHomMethodsProjective.Subfield, 1000);
Expand All @@ -332,6 +334,8 @@ AddMethod(FindHomDbProjective, FindHomMethodsProjective.D247, 840);

AddMethod(FindHomDbProjective, FindHomMethodsProjective.AltSymBBByDegree, 810);

AddMethod(FindHomDbProjective, FindHomMethodsGeneric.SnAnUnknownDegree, 805);

AddMethod(FindHomDbProjective, FindHomMethodsProjective.TensorDecomposable, 800);

AddMethod(FindHomDbProjective, FindHomMethodsProjective.FindElmOfEvenNormal, 700);
Expand Down
95 changes: 57 additions & 38 deletions tst/working/quick/GenericSnAnUnknownDegree.tst
Original file line number Diff line number Diff line change
@@ -1,45 +1,64 @@
#@local d, sets, SdOn2Sets, ri, success, x, slp, db
#
# HACK to insert the method
gap> AddMethod(FindHomDbPerm, FindHomMethodsGeneric.SnAnUnknownDegree, 58);;
gap> AddMethod(FindHomDbMatrix, FindHomMethodsGeneric.SnAnUnknownDegree, 1070);;
gap> AddMethod(FindHomDbProjective, FindHomMethodsGeneric.SnAnUnknownDegree, 1220);;
# For each entry (d, k) we construct Sym(d)/Alt(d) acting on k-sets.
# For each entry (d, k), we must have 2 * k ^ 2 > d,
# otherwise LargeBasePrimitive recognises the group instead of SnAnUnknownDegree.
gap> dataPerm := [[5, 2], [7, 2], [8, 3], [9, 3], [10, 3], [11, 3], [12, 3], [13, 3]];;

# FindHomMethodsGeneric.SnAnUnknownDegree
# Sn
gap> for d in [11] do
> sets := Combinations([1 .. d], 2);;
> SdOn2Sets := Action(SymmetricGroup(d), sets, OnSets);;
> ri := RecogNode(SdOn2Sets);;
> success := FindHomMethodsGeneric.SnAnUnknownDegree(ri, SdOn2Sets);
> if not success or not Size(ri) = Factorial(d) then
> Print("wrong result! degree ", d, "\n");
> fi;
> od;
#
# PermGroup action on k-sets
gap> PermOnKSets := function(G, k)
> local sets;
> sets := Combinations([1 .. NrMovedPoints(G)], k);;
> return Action(G, sets, OnSets);;
> end;;
gap> AltOnKSets := function(d, k)
> return PermOnKSets(AlternatingGroup(d), k);
> end;;
gap> SymOnKSets := function(d, k)
> return PermOnKSets(SymmetricGroup(d), k);
> end;;

# An
gap> for d in [11] do
> sets := Combinations([1 .. d], 2);;
> SdOn2Sets := Action(AlternatingGroup(d), sets, OnSets);;
> ri := RecogNode(SdOn2Sets);;
> success := FindHomMethodsGeneric.SnAnUnknownDegree(ri, SdOn2Sets);
> if not success or not Size(ri) = Factorial(d)/2 then
> Print("wrong result! degree ", d, "\n");
> fi;
> od;
#
gap> altPermGroups := List(dataPerm, entry -> AltOnKSets(entry[1], entry[2]));;
gap> symPermGroups := List(dataPerm, entry -> SymOnKSets(entry[1], entry[2]));;

#
gap> dataMat := [[5, 4], [7, 3], [8, 5], [11, 7]];;

# Check Slp function
gap> ri := RecogNode(SdOn2Sets);;
gap> FindHomMethodsGeneric.SnAnUnknownDegree(ri, SdOn2Sets);
true
gap> x := PseudoRandom(Grp(ri));;
gap> slp := SLPforElement(ri, x);;
gap> x = ResultOfStraightLineProgram(slp, NiceGens(ri));
true
#
# Permutation Matrix Group
gap> PermMatGroup := function(G, q) return Group(List(
> GeneratorsOfGroup(G),
> x -> ImmutableMatrix(q, PermutationMat(x, NrMovedPoints(G), GF(q)))
> )); end;;
gap> AltMatGroup := function(n, q) return PermMatGroup(AlternatingGroup(n), q);
> end;;
gap> SymMatGroup := function(n, q) return PermMatGroup(SymmetricGroup(n), q);
> end;;

#
gap> altMatGroups := List(dataMat, entry -> AltMatGroup(entry[1], entry[2]));;
gap> symMatGroups := List(dataMat, entry -> SymMatGroup(entry[1], entry[2]));;

#
# Remove Hacky injection of our method
gap> for db in [FindHomDbPerm, FindHomDbMatrix, FindHomDbProjective] do
> Remove(db,
> PositionProperty(db, x -> Stamp(x.method) = "SnAnUnknownDegree"));;
gap> nonAltOrSymGroups := [
> PSL(3, 5),
> SL(3, 5),
> Omega(1, 4, 3),
> ];;

# Test
gap> for i in [1 .. Length(dataPerm)] do
> RECOG.TestGroup(altPermGroups[i], false, Factorial(dataPerm[i, 1])/2, rec());
> RECOG.TestGroup(symPermGroups[i], false, Factorial(dataPerm[i, 1]), rec());
> od;
gap> for i in [1 .. Length(dataMat)] do
> RECOG.TestGroup(altMatGroups[i], false, Factorial(dataMat[i, 1])/2, rec());
> RECOG.TestGroup(symMatGroups[i], false, Factorial(dataMat[i, 1]), rec());
> od;
gap> for i in [1 .. Length(nonAltOrSymGroups)] do
> ri := RecogNode(nonAltOrSymGroups[i]);
> if FindHomMethodsGeneric.SnAnUnknownDegree(ri, Grp(ri)) = Success then
> Print("ERROR: Recognised group [", i, "] wrongly as Sn/An!\n");
> fi;
> od;
103 changes: 103 additions & 0 deletions tst/working/quick/GenericSnAnUnknownDegreeHelpers.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# RECOG.IsFixedPoint
gap> ri := RecogNode(SymmetricGroup(10));;
gap> g := (1,2,3,4,5,6,7,8);;
gap> c := (1,2,3);;
gap> r := (1,2)(4,5,6);;
gap> RECOG.IsFixedPoint(ri, g,c,r);
true
gap> r := (2,3,4);;
gap> RECOG.IsFixedPoint(ri, g,c,r);
false

# RECOG.AdjustCycle
gap> ri := RecogNode(SymmetricGroup(10));;
gap> g := (1,2,3,4,5,6,7,8);;
gap> c := (1,2,3);;
gap> r := (4,5);;
gap> RECOG.AdjustCycle(ri, g, c, r, 8);
(3,5)
gap> r := (3,4,5);;
gap> RECOG.AdjustCycle(ri, g, c, r, 8);
(3,4,5)
gap> r := (2,5);;
gap> RECOG.AdjustCycle(ri, g, c, r, 8);
(3,5)
gap> r := (2,4,5);;
gap> RECOG.AdjustCycle(ri, g, c, r, 8);
(3,5,4)
gap> r := (2,3,5);;
gap> RECOG.AdjustCycle(ri, g, c, r, 8);
(3,4,5)
gap> r := (1,5);;
gap> RECOG.AdjustCycle(ri, g, c, r, 8);
(3,5)
gap> r := (1,4,5);;
gap> RECOG.AdjustCycle(ri, g, c, r, 8);
(3,5,4)
gap> r := (1,3,4,5);;
gap> RECOG.AdjustCycle(ri, g, c, r, 8);
(3,6,4,5)
gap> r := (1,2,5);;
gap> RECOG.AdjustCycle(ri, g, c, r, 8);
(3,5,4)
gap> r := (1,2,3,5);;
gap> RECOG.AdjustCycle(ri, g, c, r, 8);
(3,5,4,6)

# RECOG.BuildCycle
gap> ri := RecogNode(SymmetricGroup(10));;

# c = (u,v,w)
gap> c := (1,2,3);;

# Form 1: x = (v,a_1,...,a_alpha) * (w,b_1,....,b_beta) * (...)
# alpha - beta = 0
gap> x := (2,4,5,6)* (3,7,8,9);;
gap> RECOG.BuildCycle(ri, c, x, 10);
[ (1,2,3,4,7,5,8,6,9), 9 ]

# alpha - beta = -1
gap> x := (2,4,5,6)* (3,7,8,9,10);;
gap> RECOG.BuildCycle(ri, c, x, 10);
[ (1,2,3,4,7,5,8,6,9), 9 ]

# alpha - beta = 1
gap> x := (2,4,5,6,10)* (3,7,8,9);;
gap> RECOG.BuildCycle(ri, c, x, 10);
[ (1,2,3,4,7,5,8,6,9), 9 ]

# alpha - beta = -2
gap> x := (2,4,5) * (3,7,8,9,10);;
gap> RECOG.BuildCycle(ri, c, x, 10);
[ (1,2,3,4,7,5,8,10,9), 9 ]

# alpha - beta = 2
gap> x := (2,4,5,6,10) * (3,7,8);;
gap> RECOG.BuildCycle(ri, c, x, 10);
[ (1,2,3,4,7,5,8,6,10), 9 ]

# Form 2: x = (v,a_1,...,a_alpha,w,b_1,....,b_beta) * (...)
# alpha - beta = 0
gap> x := (2,4,5,6,3,7,8,9);;
gap> RECOG.BuildCycle(ri, c, x, 10);
[ (1,2,3,4,7,5,8,6,9), 9 ]

# alpha - beta = -1
gap> x := (2,4,5,6,3,7,8,9,10);;
gap> RECOG.BuildCycle(ri, c, x, 10);
[ (1,2,3,4,7,5,8,6,9), 9 ]

# alpha - beta = 1
gap> x := (2,4,5,6,10,3,7,8,9);;
gap> RECOG.BuildCycle(ri, c, x, 10);
[ (1,2,3,4,7,5,8,6,9), 9 ]

# alpha - beta = -2
gap> x := (2,4,5,3,7,8,9,10);;
gap> RECOG.BuildCycle(ri, c, x, 10);
[ (1,2,3,4,7,5,8,10,9), 9 ]

# alpha - beta = 2
gap> x := (2,4,5,6,10,3,7,8);;
gap> RECOG.BuildCycle(ri, c, x, 10);
[ (1,2,3,4,7,5,8,6,10), 9 ]
Loading
Loading