Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backports for stable-4.12 #5042

Merged
merged 8 commits into from
Sep 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
26 changes: 0 additions & 26 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 <support@gap-system.org> if you need further information.


Wishing you fun and success using GAP,

The GAP Group
11 changes: 11 additions & 0 deletions dev/gaptest.expect
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 5 additions & 4 deletions doc/ref/mloop.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1296,8 +1296,7 @@ and read in the edited file automatically.
<Index Key="vim"><C>vim</C></Index>
<Index Key="emacs"><C>emacs</C></Index>
In the <F>etc</F> subdirectory of the &GAP; installation
we provide some setup files for the editors <C>vim</C> and
<C>emacs</C>/<C>xemacs</C>.
we provide some setup files for the editor <C>vim</C>.
<P/>
<C>vim</C> is a powerful editor that understands the basic <C>vi</C> commands
but provides much more functionality. You can find more information about it
Expand Down Expand Up @@ -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 <Email>support@gap-system.org</Email>.
Setup files for <C>emacs</C>/<C>xemacs</C> are contained in the
<F>etc/emacs</F> subdirectory.
<P/>
Users of <C>emacs</C>/<C>xemacs</C> may wish to take a look at the
<URL Text="major-mode for editing GAP files">https://melpa.org/#/gap-mode</URL>
by Ivan Andrus.

</Section>

Expand Down
4 changes: 3 additions & 1 deletion lib/cmdledit.g
Original file line number Diff line number Diff line change
Expand Up @@ -990,8 +990,10 @@ GAPInfo.CommandLineEditFunctions.Functions.Completion := function(l)
# the first two <TAB> 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());
Expand Down
4 changes: 2 additions & 2 deletions lib/grp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,16 @@ 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
if IsGroup(G) and (not IsCyclic(G)) and HasGeneratorsOfGroup(G)
and Length(GeneratorsOfGroup(G)) = 2 then
return GeneratorsOfGroup(G);
fi;
TryNextMethod();
fi;
TryNextMethod();
end);

#############################################################################
Expand Down
12 changes: 8 additions & 4 deletions lib/grplatt.gi
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
34 changes: 6 additions & 28 deletions lib/grppcatr.gi
Original file line number Diff line number Diff line change
Expand Up @@ -717,37 +717,15 @@ end);
#F NextStepCentralizer( <gens>, <cent>, <pcgsF>, <field> )
##
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;

Expand Down
2 changes: 1 addition & 1 deletion lib/matrix.gi
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 5 additions & 2 deletions lib/morpheus.gi
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
32 changes: 18 additions & 14 deletions lib/teaching.g
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@ DeclareGlobalFunction("CosetDecomposition");
## <A>H</A>-conjugacy.
## <Example><![CDATA[
## gap> 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) ] ]
## ]]></Example>
## </Description>
## </ManSection>
Expand Down Expand Up @@ -227,16 +227,16 @@ DeclareGlobalFunction("AllHomomorphismClasses");
## <Ref Func="AllAutomorphisms"/> returns all bijective endomorphisms.
## <Example><![CDATA[
## gap> 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) ] ]
## ]]></Example>
## </Description>
## </ManSection>
Expand Down Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions tst/testbugfix/2022-09-06-ConjugacyClassesSubgroups.tst
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions tst/testbugfix/2022-09-07-Centre.tst
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions tst/testbugfix/2022-09-09-MinimalGeneratingSet.tst
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions tst/teststandard/permgrp.tst
Original file line number Diff line number Diff line change
Expand Up @@ -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);