Skip to content

Commit

Permalink
ENHANCE: Use anupq for p-group isom. (#5537)
Browse files Browse the repository at this point in the history
  • Loading branch information
hulpke authored Dec 8, 2023
1 parent a80c280 commit c6d3db2
Show file tree
Hide file tree
Showing 2 changed files with 201 additions and 5 deletions.
73 changes: 70 additions & 3 deletions lib/morpheus.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2818,6 +2818,65 @@ local d,iso,a,b,c,o,s,two,rt,r,z,e,y,re,m,gens,cnt,lim,p,
end);


BindGlobal("IsomorphismPGroups",function(G,H)
local s,p,eG,eH,fG,fH,pc,imgs,pre,post;
s:=Size(G);
if Size(H)<>s then return fail;fi;
p:=Collected(Factors(s));
if Length(p)>1 then TryNextMethod();fi;
p:=p[1][1];
if IsFpGroup(G) then
pre:=fail;
else
pre:=IsomorphismFpGroup(G);
G:=Image(pre,G);
fi;

if IsFpGroup(H) then
post:=fail;
else
post:=IsomorphismFpGroup(H);
H:=Image(post,H);
fi;


eG:=CallFuncList(ValueGlobal("EpimorphismPqStandardPresentation"),[G]:
Prime:=p);
eH:=CallFuncList(ValueGlobal("EpimorphismPqStandardPresentation"),[H]:
Prime:=p);

# check presentations
fG:=Range(eG);
fH:=Range(eH);
if List(RelatorsOfFpGroup(fG),
x->MappedWord(x,FreeGeneratorsOfFpGroup(fG),FreeGeneratorsOfFpGroup(fH)))
<>RelatorsOfFpGroup(fH) then
return fail;
fi;

# move to pc pres
pc:=PcGroupFpGroup(fG);

# new maps to pc
imgs:=List(MappingGeneratorsImages(eG)[2],
x->MappedWord(UnderlyingElement(x),
FreeGeneratorsOfFpGroup(fG),GeneratorsOfGroup(pc)));

eG:=GroupHomomorphismByImages(G,pc,MappingGeneratorsImages(eG)[1],imgs);

imgs:=List(MappingGeneratorsImages(eH)[2],
x->MappedWord(UnderlyingElement(x),
FreeGeneratorsOfFpGroup(fH),GeneratorsOfGroup(pc)));
eH:=GroupHomomorphismByImages(H,pc,MappingGeneratorsImages(eH)[1],imgs);

s:=eG*InverseGeneralMapping(eH);
if pre<>fail then s:=pre*s;fi;
if post<>fail then s:=s*InverseGeneralMapping(post);fi;
s:=AsGroupGeneralMappingByImages(s);

return s;
end);

#############################################################################
##
#F IsomorphismGroups(<G>,<H>) . . . . . . . . . . isomorphism from G onto H
Expand Down Expand Up @@ -2853,12 +2912,22 @@ local m;
fi;
fi;

if Size(G)<>Size(H) then
return fail;
fi;

if IsSimpleGroup(G) then
m:=IsomorphismSimpleGroups(G,H);
if m=false then return fail;fi;
if m<>fail then return m;fi;
fi;

# 2000 is the limit for using the small groups code
if Size(G)>2000 and IsPGroup(G) and
IsPackageMarkedForLoading("anupq","")=true then
return IsomorphismPGroups(G,H);
fi;

if Size(SolvableRadical(G))>1 and CanComputeFittingFree(G)
and not (IsSolvableGroup(G) and Size(G)<=2000
and ID_AVAILABLE(Size(G))<>fail)
Expand All @@ -2874,9 +2943,7 @@ local m;
return PatheticIsomorphism(G,H);
fi;

if Size(G)<>Size(H) then
return fail;
elif ID_AVAILABLE(Size(G)) <> fail
if ID_AVAILABLE(Size(G)) <> fail
and ValueOption(NO_PRECOMPUTED_DATA_OPTION)<>true then
Info(InfoPerformance,2,"Using Small Groups Library");
if IdGroup(G)<>IdGroup(H) then
Expand Down
133 changes: 131 additions & 2 deletions tst/testextra/grpauto.tst
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,138 @@ gap> gp2:=Group([(1,6,3)(2,5,4)(7,23,25)(8,24,26)(9,19,31)
gap> IsomorphismGroups(gp1,gp2)<>fail;
true

# MEssy p-groups, forum by D.Robinson, 4/5/23
# Messy p-groups, forum by D.Robinson, 4/5/23
gap> g1:=Image(IsomorphismPcGroup(AutomorphismGroup(SmallGroup(64,112))));;
gap> g2:=SmallGroup(512,10493360);;
gap> IsomorphismGroups(g1,g2)<>fail;
true
gap> STOP_TEST( "grpauto.tst", 1);

# Two larger p groups
gap> gp1:=Group((1,2,5,11,21)(3,6,12,22,36)(4,7,13,23,37)
> (8,14,24,38,54)(9,15,25,39,55)(10,16,26,40,56)
> (17,27,41,57,73)(18,28,42,58,74)(19,29,43,59,75)
> (20,30,44,60,76)(31,45,61,77,91)(32,46,62,78,92)
> (33,47,63,79,93)(34,48,64,80,94)(35,49,65,81,95)
> (50,66,82,96,106)(51,67,83,97,107)(52,68,84,98,108)
> (53,69,85,99,109)(70,86,100,110,116)(71,87,101,111,117)
> (72,88,102,112,118)(89,103,113,119,122)(90,104,114,120,123)
> (105,115,121,124,125)(126,127,130,136,146)(128,131,137,147,161)
> (129,132,138,148,162)(133,139,149,163,179)(134,140,150,164,180)
> (135,141,151,165,181)(142,152,166,182,198)(143,153,167,183,199)
> (144,154,168,184,200)(145,155,169,185,201)(156,170,186,202,216)
> (157,171,187,203,217)(158,172,188,204,218)(159,173,189,205,219)
> (160,174,190,206,220)(175,191,207,221,231)(176,192,208,222,232)
> (177,193,209,223,233)(178,194,210,224,234)(195,211,225,235,241)
> (196,212,226,236,242)(197,213,227,237,243)(214,228,238,244,247)
> (215,229,239,245,248)(230,240,246,249,250),
> (1,3,8,17,31)(2,6,14,27,45)(4,9,18,32,50)
> (5,12,24,41,61)(7,15,28,46,66)(10,19,33,51,70)
> (11,22,38,57,77)(13,25,42,62,82)(16,29,47,67,86)
> (20,34,52,71,89)(21,36,54,73,91)(23,39,58,78,96)
> (26,43,63,83,100)(30,48,68,87,103)(35,53,72,90,105)
> (37,55,74,92,106)(40,59,79,97,110)(44,64,84,101,113)
> (49,69,88,104,115)(56,75,93,107,116)(60,80,98,111,119)
> (65,85,102,114,121)(76,94,108,117,122)(81,99,112,120,124)
> (95,109,118,123,125)(126,128,133,142,156)(127,131,139,152,170)
> (129,134,143,157,175)(130,137,149,166,186)(132,140,153,171,191)
> (135,144,158,176,195)(136,147,163,182,202)(138,150,167,187,207)
> (141,154,172,192,211)(145,159,177,196,214)(146,161,179,198,216)
> (148,164,183,203,221)(151,168,188,208,225)(155,173,193,212,228)
> (160,178,197,215,230)(162,180,199,217,231)(165,184,204,222,235)
> (169,189,209,226,238)(174,194,213,229,240)(181,200,218,232,241)
> (185,205,223,236,244)(190,210,227,239,246)(201,219,233,242,247)
> (206,224,237,245,249)(220,234,243,248,250),
> (1,3,8,17,31)(2,15,47,87,115)(4,9,18,32,50)
> (5,43,102,62,113)(6,28,67,103,49)(7,29,68,104,45)
> (10,19,33,51,70)(11,80,58,120,110)(12,63,114,82,44)
> (13,64,24,83,121)(14,46,86,30,69)(16,48,88,27,66)
> (20,34,52,71,89)(21,109,108,107,106)(22,98,78,124,40)
> (23,99,79,57,119)(25,84,41,100,65)(26,85,42,101,61)
> (35,53,72,90,105)(36,118,117,116,37)(38,111,96,81,59)
> (39,112,97,77,60)(54,123,122,56,55)(73,125,76,75,74)
> (91,95,94,93,92)(128,144,178,134,159)(131,154,194,140,173)
> (133,197,177,158,143)(137,168,210,150,189)(139,213,193,172,153)
> (142,157,176,196,215)(147,184,224,164,205)(149,227,209,188,167)
> (152,171,192,212,229)(156,214,175,230,195)(161,200,234,180,219)
> (163,237,223,204,183)(166,187,208,226,239)(170,228,191,240,211)
> (179,243,233,218,199)(182,203,222,236,245)(186,238,207,246,225)
> (198,217,232,242,248)(202,244,221,249,235)(216,247,231,250,241),
> (1,27,43,96,93)(2,41,59,106,33)(3,115,24,60,117)
> (4,46,64,110,108)(5,57,75,50,47)(6,121,38,76,71)
> (7,62,80,116,52)(8,30,101,22,125)(9,45,42,81,123)
> (10,67,85,119,118)(11,73,19,66,63)(12,124,54,20,87)
> (13,78,94,70,68)(14,44,111,36,105)(15,61,58,95,90)
> (16,83,99,122,72)(17,29,82,79,21)(18,49,114,39,91)
> (23,92,34,86,84)(25,77,74,35,104)(26,97,109,89,88)
> (28,65,120,55,31)(32,48,100,98,37)(40,107,53,103,102)
> (51,69,113,112,56)(127,132,141,155,174)(130,151,190,138,169)
> (131,140,154,173,194)(136,185,148,206,165)(137,168,210,150,189)
> (139,153,172,193,213)(146,220,201,181,162)(147,205,164,224,184)
> (149,188,227,167,209)(152,171,192,212,229)(161,234,219,200,180)
> (163,223,183,237,204)(166,208,239,187,226)(170,191,211,228,240)
> (179,243,233,218,199)(182,236,203,245,222)(186,225,246,207,238)
> (198,248,242,232,217)(202,244,221,249,235)(216,250,247,241,231));;
gap> gp2:=Group((3,19,53,9,34)(6,29,69,15,48)(8,72,52,33,18)
> (12,43,85,25,64)(14,88,68,47,28)(17,32,51,71,90)
> (22,59,99,39,80)(24,102,84,63,42)(27,46,67,87,104)
> (31,89,50,105,70)(36,75,109,55,94)(38,112,98,79,58)
> (41,62,83,101,114)(45,103,66,115,86)(54,118,108,93,74)
> (57,78,97,111,120)(61,113,82,121,100)(73,92,107,117,123)
> (77,119,96,124,110)(91,122,106,125,116)(127,174,155,141,132)
> (130,169,138,190,151)(131,194,173,154,140)(136,165,206,148,185)
> (137,189,150,210,168)(139,213,193,172,153)(146,162,181,201,220)
> (147,184,224,164,205)(149,209,167,227,188)(152,229,212,192,171)
> (161,180,200,219,234)(163,204,237,183,223)(166,226,187,239,208)
> (170,240,228,211,191)(179,199,218,233,243)(182,222,245,203,236)
> (186,238,207,246,225)(198,217,232,242,248)(202,235,249,221,244)
> (216,231,241,247,250),(2,49,30,16,7)(5,44,13,65,26)
> (6,69,48,29,15)(11,40,81,23,60)(12,64,25,85,43)
> (14,88,68,47,28)(21,37,56,76,95)(22,59,99,39,80)
> (24,84,42,102,63)(27,104,87,67,46)(36,55,75,94,109)
> (38,79,112,58,98)(41,101,62,114,83)(45,115,103,86,66)
> (54,74,93,108,118)(57,97,120,78,111)(61,113,82,121,100)
> (73,92,107,117,123)(77,110,124,96,119)(91,106,116,122,125)
> (128,134,144,159,178)(131,140,154,173,194)(133,158,197,143,177)
> (137,150,168,189,210)(139,172,213,153,193)(142,196,157,215,176)
> (147,164,184,205,224)(149,188,227,167,209)(152,212,171,229,192)
> (156,230,214,195,175)(161,180,200,219,234)(163,204,237,183,223)
> (166,226,187,239,208)(170,240,228,211,191)(179,218,243,199,233)
> (182,236,203,245,222)(186,246,238,225,207)(198,242,217,248,232)
> (202,249,244,235,221)(216,250,247,241,231),
> (1,22,68,123,113)(2,36,84,90,119)(3,98,104,122,5)
> (4,39,88,73,121)(6,108,114,89,11)(7,55,102,17,124)
> (8,78,45,56,43)(9,112,27,125,13)(10,59,14,92,61)
> (12,52,120,103,21)(15,118,41,105,23)(16,75,24,32,77)
> (18,97,66,76,64)(19,38,46,91,26)(20,80,28,107,82)
> (25,72,57,115,37)(29,54,62,31,40)(30,94,42,51,96)
> (33,111,86,95,85)(34,58,67,106,44)(35,99,47,117,100)
> (48,74,83,50,60)(49,109,63,71,110)(53,79,87,116,65)
> (69,93,101,70,81)(126,147,193,248,238)(127,180,149,176,235)
> (128,163,212,250,169)(129,164,213,198,246)(130,144,204,152,231)
> (131,199,166,195,165)(132,200,167,196,244)(133,182,228,220,189)
> (134,183,229,216,190)(135,184,139,217,186)(136,173,243,226,156)
> (137,158,222,170,162)(138,159,223,171,241)(140,218,187,214,185)
> (141,219,188,215,249)(142,202,155,234,209)(143,203,240,146,210)
> (145,205,153,232,207)(148,194,179,239,175)(150,177,236,191,181)
> (151,178,237,192,247)(154,233,208,230,206)(157,221,174,161,227)
> (160,224,172,242,225)(168,197,245,211,201),
> (1,36,112,83,115)(2,9,74,57,113)(3,54,120,100,49)
> (4,55,38,101,45)(5,29,52,117,110)(6,18,92,77,44)
> (7,19,93,78,121)(8,73,124,26,69)(10,75,58,114,66)
> (11,64,14,32,106)(12,47,71,122,40)(13,48,72,123,119)
> (15,33,107,96,65)(16,34,108,97,61)(17,91,81,43,88)
> (20,94,79,41,86)(21,99,63,104,31)(22,84,27,50,37)
> (23,85,28,51,116)(24,67,89,76,59)(25,68,90,125,60)
> (30,53,118,111,82)(35,109,98,62,103)(39,102,46,70,56)
> (42,87,105,95,80)(126,161,237,208,240)(127,128,243,222,246)
> (129,180,163,226,170)(130,131,197,232,249)(132,134,179,236,186)
> (133,242,202,138,140)(135,200,183,239,191)(136,137,213,176,250)
> (139,196,216,148,150)(141,144,199,245,207)(142,241,185,189,172)
> (143,248,221,151,154)(145,219,204,166,211)(146,147,227,192,230)
> (149,212,156,162,164)(152,195,201,205,188)(153,215,231,165,168)
> (155,159,218,182,225)(157,247,206,210,193)(158,198,235,169,173)
> (160,234,223,187,228)(167,229,175,181,184)(171,214,220,224,209)
> (174,178,233,203,238)(177,217,244,190,194));;
gap> IsomorphismGroups(gp1,gp2)=fail;
false
gap>STOP_TEST("grpauto.tst",1);

0 comments on commit c6d3db2

Please sign in to comment.