From f092bf06da0af695d337b17a0c76f055cfc6579b Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 3 Sep 2022 04:15:45 +0200 Subject: [PATCH 1/8] Fix tab completion on non-record component objects --- dev/gaptest.expect | 11 +++++++++++ lib/cmdledit.g | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/dev/gaptest.expect b/dev/gaptest.expect index f5a3bb5d79..9012a4c2a5 100644 --- a/dev/gaptest.expect +++ b/dev/gaptest.expect @@ -40,5 +40,16 @@ expect "data1 data2" send -- "1);\r" expect "true" +# test tab completion for a non-record component object +expect "gap> " +send -- "g:=SmallGroup(6,1);;\r" +expect "gap> " +send -- "g.\t" +send -- "1;;\r" +expect "gap> " +send -- "g!.S\t" +expect "ize" +send -- ";;\r" +expect "gap> " exit diff --git a/lib/cmdledit.g b/lib/cmdledit.g index 97b1fb5253..7e59a1483d 100644 --- a/lib/cmdledit.g +++ b/lib/cmdledit.g @@ -990,8 +990,10 @@ GAPInfo.CommandLineEditFunctions.Functions.Completion := function(l) # the first two hits try existing component names only first if cf.tabbang then searchlist := ShallowCopy(NamesOfComponents(cf.tabrec)); - else + elif IsRecord(cf.tabrec) then searchlist := ShallowCopy(RecNames(cf.tabrec)); + else + searchlist := []; fi; if cf.tabcount > 2 then Append(searchlist, ALL_RNAMES()); From e16ed60ac23417d279f41c834fcd0cffc9b799ac Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 2 Sep 2022 02:28:04 +0200 Subject: [PATCH 2/8] Fix claims about emacs support in the reference manual We stopped shipping this some time ago, as it was (a) outdated and (b) the FSF asked us to. So don't claim we ship them, instead point to a better alternative. --- doc/ref/mloop.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/ref/mloop.xml b/doc/ref/mloop.xml index f2a5edfc9d..f60fb44874 100644 --- a/doc/ref/mloop.xml +++ b/doc/ref/mloop.xml @@ -1296,8 +1296,7 @@ and read in the edited file automatically. vim emacs In the etc subdirectory of the ⪆ installation -we provide some setup files for the editors vim and -emacs/xemacs. +we provide some setup files for the editor vim.

vim is a powerful editor that understands the basic vi commands but provides much more functionality. You can find more information about it @@ -1335,8 +1334,10 @@ augroup END See the headers of the two mentioned files for additional comments and adjust details according to your personal taste. Send comments and suggestions to support@gap-system.org. -Setup files for emacs/xemacs are contained in the -etc/emacs subdirectory. +

+Users of emacs/xemacs may wish to take a look at the +https://melpa.org/#/gap-mode +by Ivan Andrus. From bbe9d8e2a919668a4e340e1d25832a515dacfd32 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 6 Sep 2022 09:34:25 +0200 Subject: [PATCH 3/8] INSTALL.md: remove "Expert Windows Installation" This section was partially outdated (reference to spaces in paths is hopefully obsolete?) and in general seems of little use these days, seeing as it mostly just recommends to use the .exe installer, which we recommend anyway... Also removing some trailing bits at the end of `INSTALL.md` which may or may not be supposed to be part of the remove section, but which seem out of place in any case. --- INSTALL.md | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 5949d41da8..b562fc5023 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -14,7 +14,6 @@ GAP INSTALLATION INSTRUCTIONS 11. Known Problems of the Configure Process 12. Optimisation and Compiler Options 13. GAP for macOS -14. Expert Windows Installation These are the installation instructions for the GAP source distribution on Unix (which covers Linux and macOS), and for the GAP binary distribution @@ -702,28 +701,3 @@ For further information on how to use GNU readline, refer to section 5 above. Now simply follow the Unix installation instructions to compile and start GAP and then it will run in this Terminal window. - - -14 Expert Windows Installation -============================== - -If you need to install GAP in a non-standard directory under Windows, we advise -to use the Windows `.exe` installers which will adjust all paths in batch files -during the installation. Whenever you use a Windows installer or install GAP -from a source archive, you should avoid paths with spaces, e.g. do not use -`C:\My Programs\gap-4.X.Y`. If you need to install GAP on another logical drive, -say `E:`, the easiest way would be just to use `E:\gap-4.X.Y`. - -If you need to edit a `*.bat` file to specify the path to your GAP installation -manually, you will have to replace substrings `/c/gap-4.X.Y/` by the actual path -to the GAP root directory in the Unix format, and substrings `C:\gap-4.X.Y\` by -the actual path to the GAP root directory in the Windows format. Please avoid -introducing new line breaks when editing (i.e. do not use a text editor which -automatically wraps long lines). - -Please contact if you need further information. - - -Wishing you fun and success using GAP, - -The GAP Group From 06a8c0794f4c9eeb58050e6baef439289eb4ddc9 Mon Sep 17 00:00:00 2001 From: Alexander Hulpke Date: Wed, 27 Jul 2022 21:01:17 +0200 Subject: [PATCH 4/8] Fix unexpected error in `ConjugacyClassesSubgroups` This disables an attempt to use cyclic extension instead of lifting for lattices of smallish groups. The issue is that CE returns data in a slightly different format than required. This resulted in some commands, e.g. `ConjugacyClassesSubgroups(SmallGroup(1344,11293))`, to enter a break loop. If tomlib is loded it's a mote issue, and thus does not merit further investigation. This resolves #4854 --- lib/grplatt.gi | 12 ++++++++---- .../2022-09-06-ConjugacyClassesSubgroups.tst | 5 +++++ 2 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 tst/testbugfix/2022-09-06-ConjugacyClassesSubgroups.tst diff --git a/lib/grplatt.gi b/lib/grplatt.gi index 2d42330b11..092d3b4cf5 100644 --- a/lib/grplatt.gi +++ b/lib/grplatt.gi @@ -845,11 +845,15 @@ InstallGlobalFunction(LatticeViaRadical,function(arg) makesubgroupclasses,cefastersize; #group order below which cyclic extension is usually faster - if IsPackageMarkedForLoading("tomlib","")=true then + # WORKAROUND: there is a disparity between the data format returned + # by CE and what this code expects. This could be resolved properly, + # but since most people will have tomlib loaded anyway, this doesn't + # seem worth the effort. + #if IsPackageMarkedForLoading("tomlib","")=true then cefastersize:=1; - else - cefastersize:=40000; - fi; + #else + # cefastersize:=40000; + #fi; makesubgroupclasses:=function(g,l) local i,m,c; diff --git a/tst/testbugfix/2022-09-06-ConjugacyClassesSubgroups.tst b/tst/testbugfix/2022-09-06-ConjugacyClassesSubgroups.tst new file mode 100644 index 0000000000..0e1eb65a53 --- /dev/null +++ b/tst/testbugfix/2022-09-06-ConjugacyClassesSubgroups.tst @@ -0,0 +1,5 @@ +# The following used to work in GAP 4.10, but was broken in GAP +# 4.11.x and also 4.12.0. +# See https://github.com/gap-system/gap/issues/4854 +gap> Length(ConjugacyClassesSubgroups(SmallGroup(1344,11293))); +83 From 524d9993793ac2e22a36dacb086940997d7f898c Mon Sep 17 00:00:00 2001 From: Alexander Hulpke Date: Fri, 2 Sep 2022 19:54:13 -0600 Subject: [PATCH 5/8] ENHANCE: MinimalGeneratingSet in morphism search Since this is costly, it is worth to force a minimal generating set for solvable groups. This resolves problems the yangbaxter package has had. Close #5024 --- lib/morpheus.gi | 7 +++++-- lib/teaching.g | 32 ++++++++++++++++++-------------- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/lib/morpheus.gi b/lib/morpheus.gi index d99e25d810..b779448e56 100644 --- a/lib/morpheus.gi +++ b/lib/morpheus.gi @@ -1746,8 +1746,11 @@ InstallGlobalFunction(Morphium,function(G,H,DoAuto) local len,combi,Gr,Gcl,Ggc,Hr,Hcl,bg,bpri,x,dat, gens,i,c,hom,free,elms,price,result,rels,inns,bcl,vsu; - IsSolvableGroup(G); # force knowledge - gens:=SmallGeneratingSet(G); + if IsSolvableGroup(G) then + gens:=MinimalGeneratingSet(G); + else + gens:=SmallGeneratingSet(G); + fi; len:=Length(gens); Gr:=MorRatClasses(G); Gcl:=MorMaxFusClasses(Gr); diff --git a/lib/teaching.g b/lib/teaching.g index e7fefe9cff..330f00c741 100644 --- a/lib/teaching.g +++ b/lib/teaching.g @@ -197,9 +197,9 @@ DeclareGlobalFunction("CosetDecomposition"); ## H-conjugacy. ## AllHomomorphismClasses(SymmetricGroup(4),SymmetricGroup(3)); -## [ [ (1,3,4,2), (1,3,4) ] -> [ (), () ], -## [ (1,3,4,2), (1,3,4) ] -> [ (1,2), () ], -## [ (1,3,4,2), (1,3,4) ] -> [ (2,3), (1,2,3) ] ] +## [ [ (2,4,3), (1,4,2,3) ] -> [ (), () ], +## [ (2,4,3), (1,4,2,3) ] -> [ (), (1,2) ], +## [ (2,4,3), (1,4,2,3) ] -> [ (1,2,3), (1,2) ] ] ## ]]> ## ## @@ -227,16 +227,16 @@ DeclareGlobalFunction("AllHomomorphismClasses"); ## returns all bijective endomorphisms. ## AllHomomorphisms(SymmetricGroup(3),SymmetricGroup(3)); -## [ [ (1,2,3), (1,2) ] -> [ (), () ], -## [ (1,2,3), (1,2) ] -> [ (), (1,2) ], -## [ (1,2,3), (1,2) ] -> [ (), (2,3) ], -## [ (1,2,3), (1,2) ] -> [ (), (1,3) ], -## [ (1,2,3), (1,2) ] -> [ (1,2,3), (1,2) ], -## [ (1,2,3), (1,2) ] -> [ (1,2,3), (2,3) ], -## [ (1,2,3), (1,2) ] -> [ (1,3,2), (1,2) ], -## [ (1,2,3), (1,2) ] -> [ (1,2,3), (1,3) ], -## [ (1,2,3), (1,2) ] -> [ (1,3,2), (1,3) ], -## [ (1,2,3), (1,2) ] -> [ (1,3,2), (2,3) ] ] +## [ [ (2,3), (1,2,3) ] -> [ (), () ], +## [ (2,3), (1,2,3) ] -> [ (1,2), () ], +## [ (2,3), (1,2,3) ] -> [ (2,3), () ], +## [ (2,3), (1,2,3) ] -> [ (1,3), () ], +## [ (2,3), (1,2,3) ] -> [ (2,3), (1,2,3) ], +## [ (2,3), (1,2,3) ] -> [ (1,3), (1,2,3) ], +## [ (2,3), (1,2,3) ] -> [ (1,3), (1,3,2) ], +## [ (2,3), (1,2,3) ] -> [ (1,2), (1,2,3) ], +## [ (2,3), (1,2,3) ] -> [ (2,3), (1,3,2) ], +## [ (2,3), (1,2,3) ] -> [ (1,2), (1,3,2) ] ] ## ]]> ## ## @@ -954,7 +954,11 @@ local cl,cnt,bg,bw,bo,bi,k,gens,go,imgs,params,emb,clg,sg,vsu,c,i; repeat if cnt=0 then # first the small gen syst. - gens:=SmallGeneratingSet(H); + if IsSolvableGroup(H) then + gens:=MinimalGeneratingSet(H); + else + gens:=SmallGeneratingSet(H); + fi; sg:=Length(gens); else # then something random From a563e12eda6fa4c59827833317356fd62d7df648 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 7 Sep 2022 22:22:34 +0200 Subject: [PATCH 6/8] Fix `Centre` for pc groups giving wrong results --- lib/grppcatr.gi | 34 +++++----------------------- tst/testbugfix/2022-09-07-Centre.tst | 6 +++++ 2 files changed, 12 insertions(+), 28 deletions(-) create mode 100644 tst/testbugfix/2022-09-07-Centre.tst diff --git a/lib/grppcatr.gi b/lib/grppcatr.gi index a7cf5f8285..44905038b2 100644 --- a/lib/grppcatr.gi +++ b/lib/grppcatr.gi @@ -717,37 +717,15 @@ end); #F NextStepCentralizer( , , , ) ## NextStepCentralizer := function( gens, cent, pcgsF, field ) - local g, newgens, matlist, notcentral, h, comm, null, j, elm; - + local g, matlist, null; + for g in gens do if Length( cent ) = 0 then return []; fi; - - newgens := []; - matlist := []; - notcentral := []; - for h in cent do - comm := ExponentsOfPcElement( pcgsF, Comm( h, g ) ) * One(field); - if comm = Zero( field ) * comm then - Add( newgens, h ); - else - Add( notcentral, h ); - Add( matlist, comm ); - fi; - od; - - if Length( matlist ) > 0 then - - # get nullspace - null := TriangulizedNullspaceMat( matlist ); - - # calculate elements corresponding to null - for j in [1..Length(null)] do - elm := PcElementByExponentsNC( pcgsF, notcentral, null[j] ); - Add( newgens, elm ); - od; - fi; - cent := newgens; + matlist := List( cent, x -> ExponentsOfPcElement(pcgsF, Comm(x,g))); + null := TriangulizedNullspaceMat(matlist*One(field)); + cent := List( null, x -> PcElementByExponentsNC(pcgsF, cent, x)); od; + return cent; end; diff --git a/tst/testbugfix/2022-09-07-Centre.tst b/tst/testbugfix/2022-09-07-Centre.tst new file mode 100644 index 0000000000..6794c8dab1 --- /dev/null +++ b/tst/testbugfix/2022-09-07-Centre.tst @@ -0,0 +1,6 @@ +# Centre for PcGroups sometimes returned wrong results. +# See https://github.com/gap-system/gap/issues/3940 +# +gap> G:=SmallGroup(2^9,261648);; +gap> Size(Center(G)); # This used to return 4 +8 From b86225062e2c0867a06d814fae7dd1da390092a0 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 9 Sep 2022 13:19:09 +0200 Subject: [PATCH 7/8] Fix unexpected error in `MinimalGeneratingSet` for solvable non-pc groups It could end up returning nothing and not invoking TryNextMethod(). This caused a failure in the hap test suite. This is a recent regression in 4.12.0. --- lib/grp.gi | 4 ++-- tst/testbugfix/2022-09-09-MinimalGeneratingSet.tst | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 tst/testbugfix/2022-09-09-MinimalGeneratingSet.tst diff --git a/lib/grp.gi b/lib/grp.gi index 656f6bff1c..1ae704ad62 100644 --- a/lib/grp.gi +++ b/lib/grp.gi @@ -112,7 +112,7 @@ InstallMethod(MinimalGeneratingSet,"test solvable and 2-generator noncyclic", function(G) local i; if not HasIsSolvableGroup(G) and IsSolvableGroup(G) and - CanEasilyComputePcgs(G) then + CanEasilyComputePcgs(G) then # discovered solvable -- redo return MinimalGeneratingSet(G); elif not IsSolvableGroup(G) then @@ -120,8 +120,8 @@ local i; and Length(GeneratorsOfGroup(G)) = 2 then return GeneratorsOfGroup(G); fi; - TryNextMethod(); fi; + TryNextMethod(); end); ############################################################################# diff --git a/tst/testbugfix/2022-09-09-MinimalGeneratingSet.tst b/tst/testbugfix/2022-09-09-MinimalGeneratingSet.tst new file mode 100644 index 0000000000..98d0d13389 --- /dev/null +++ b/tst/testbugfix/2022-09-09-MinimalGeneratingSet.tst @@ -0,0 +1,5 @@ +gap> G:=Group((1,2),(2,3),(3,4));; +gap> H:=Image(IsomorphismFpGroup(G));; +gap> MinimalGeneratingSet(H); +Error, no method found! For debugging hints type ?Recovery from NoMethodFound +Error, no 4th choice method found for `MinimalGeneratingSet' on 1 arguments From 5865fb9877356a60fed1cb198dc3cb4eb656912c Mon Sep 17 00:00:00 2001 From: Alexander Hulpke Date: Tue, 9 Aug 2022 09:07:00 +0200 Subject: [PATCH 8/8] FIX: DirectSumMat builds field extensions if needed --- lib/matrix.gi | 2 +- tst/teststandard/permgrp.tst | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/matrix.gi b/lib/matrix.gi index 1ea6e36015..862cc43ba9 100644 --- a/lib/matrix.gi +++ b/lib/matrix.gi @@ -4052,7 +4052,7 @@ InstallGlobalFunction( DirectSumMat, function (arg) if IsSubset(c,F) then F:=c; else - Error("build field/ring"); + F:=Field(Concatenation(GeneratorsOfField(F),GeneratorsOfField(c))); fi; fi; od; diff --git a/tst/teststandard/permgrp.tst b/tst/teststandard/permgrp.tst index 63139b2188..1031360c1e 100644 --- a/tst/teststandard/permgrp.tst +++ b/tst/teststandard/permgrp.tst @@ -136,5 +136,9 @@ false gap> IsConjugatorAutomorphism(hom); true +# classes over larger field extension +gap> Length(ConjugacyClasses(PSL(2,64))); +65 + # gap> STOP_TEST( "permgrp.tst", 1);