Skip to content
Draft
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
8 changes: 0 additions & 8 deletions gap/LINS.gd
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,3 @@ DeclareGlobalFunction( "LINS_FindPModules" );
DeclareGlobalFunction( "LINS_MustCheckP" );

DeclareGlobalFunction( "LINS_FindIntersections" );


#############################################################################
## helper function
#############################################################################

DeclareGlobalFunction( "LINS_IsSubgroupFp" );
DeclareGlobalFunction( "LINS_SetParent" );
1 change: 1 addition & 0 deletions gap/LINS.gi
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ function(gr)
fi;
end);


#############################################################################
####=====================================================================####
##
Expand Down
11 changes: 8 additions & 3 deletions gap/addGroup.gi
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
## We need coset tables of both `H` and `G` in the parent `P`.
#############################################################################

InstallGlobalFunction(LINS_IsSubgroupFp, function(G, H)
BindGlobal("LINS_IsSubgroupFp", function(G, H)
local word;

for word in AugmentedCosetTableInWholeGroup(H).primaryGeneratorWords do
Expand All @@ -44,7 +44,7 @@ end);
## Sets parent and attributes for normal subgroup `H` of `G`.
#############################################################################

InstallGlobalFunction(LINS_SetParent,
BindGlobal("LINS_SetParent",
function(H, G)
SetParent(H, G);
SetIsNormalInParent(H, true);
Expand Down Expand Up @@ -135,8 +135,8 @@ InstallGlobalFunction(LINS_AddGroup, function(gr, H, Supers, test, opts)
local
G, # group: located in the root node
# of LINS graph `gr`.
rH, # LINS node: containing `H`
n, # pos-int: index bound of LINS graph `gr`.
rH, # LINS node: containing `H`
allSupergroups, # [LINS node]: supergroups of `rH`
allSubgroups, # [LINS node]: subgroups of `rH`
pos, # pos-int: position of level at index $[G : H]$
Expand All @@ -146,6 +146,11 @@ InstallGlobalFunction(LINS_AddGroup, function(gr, H, Supers, test, opts)
K; # group: located in node `rK`

G := Grp(LinsRoot(gr));

if opts.DoSetParent then
LINS_SetParent(H, G);
fi;

rH := LinsNode(H, Index(G, H));

# Search for correct level
Expand Down
82 changes: 28 additions & 54 deletions gap/findTQuotients.gi
Original file line number Diff line number Diff line change
Expand Up @@ -13,50 +13,6 @@
#############################################################################


BindGlobal("Terminate", MakeImmutable("Terminate"));

# Terminate, if we found sufficient enough groups
# true, if K is a new group
# false, if K was already found beforehand
BindGlobal("LINS_AddGroup_Caller",
function(gr, rH, K, opts, infoText)
local
G, # group: located in the root node of the LINS graph `gr`.
n, # pos-int: index bound of LINS graph `gr`.
data, # tuple: [`rK`, `isNew`]
rK, # LINS node: containing group `K`
isNew; # boolean: whether the group `K` is new in `gr`

G := Grp(LinsRoot(gr));
n := IndexBound(gr);

if opts.DoSetParent then
LINS_SetParent(K, G);
fi;

if Index(G, K) <= n then
data := LINS_AddGroup(gr, K, [rH], true, opts);
rK := data[1];
isNew := data[2];

if isNew then
Info(InfoLINS, 3, LINS_tab3, infoText,
"Found new normal subgroup ", LINS_red, "K = ", K, LINS_reset,
" of index ", LINS_red, Index(G, K), LINS_reset, ".");

if opts.DoTerminate(gr, rH, rK) then
gr!.TerminatedUnder := rH;
gr!.TerminatedAt := rK;
return Terminate;
else
return true;
fi;
fi;
fi;

return false;
end);

#############################################################################
## LINS_FindTQuotients
#############################################################################
Expand Down Expand Up @@ -149,8 +105,10 @@ InstallGlobalFunction( LINS_FindTQuotients, function(gr, opts)
homs, # [hom]: list of homomorphisms into `Q`
hom, # hom: loop var, homomorphism in `L` from `H` into `Q`
K, # group: normal subgroup of `G` (with Q-quotient)
data, # state: bool or Terminate
nrFound; # pos-int: number of newly found normal subgroups
rK, # LINS node: containing `K`
isNew, # boolean: whether the group `K` is new in `gr`
nrFound, # pos-int: number of newly found normal subgroups
data; # tuple: [`rK`, `isNew`]

# Initialize data from input.
rG := LinsRoot(gr);
Expand Down Expand Up @@ -189,11 +147,19 @@ InstallGlobalFunction( LINS_FindTQuotients, function(gr, opts)
for L in LL do
if Position(I, Index(G, L)) <> fail then
K := Core(G, L);
data := LINS_AddGroup_Caller(gr, rG, K, opts, "");
if data = true then
data := LINS_AddGroup(gr, K, [rG], true, opts);
rK := data[1];
isNew := data[2];
if isNew then
nrFound := nrFound + 1;
elif data = Terminate then
return [true, nrFound + 1];
Info(InfoLINS, 3, LINS_tab3,
"Found new normal subgroup ", LINS_red, "K = ", K, LINS_reset,
" of index ", LINS_red, Index(G, K), LINS_reset, ".");
fi;
if isNew and opts.DoTerminate(gr, rG, rK) then
gr!.TerminatedUnder := rG;
gr!.TerminatedAt := rK;
return [true, nrFound];
fi;
fi;
od;
Expand All @@ -203,11 +169,19 @@ InstallGlobalFunction( LINS_FindTQuotients, function(gr, opts)
homs := GQuotients(H, Q);
for hom in homs do
K := Image(iso, Kernel(hom));
data := LINS_AddGroup_Caller(gr, rG, K, opts, "");
if data = true then
data := LINS_AddGroup(gr, K, [rG], true, opts);
rK := data[1];
isNew := data[2];
if isNew then
nrFound := nrFound + 1;
elif data = Terminate then
return [true, nrFound + 1];
Info(InfoLINS, 3, LINS_tab3,
"Found new normal subgroup ", LINS_red, "K = ", K, LINS_reset,
" of index ", LINS_red, Index(G, K), LINS_reset, ".");
fi;
if isNew and opts.DoTerminate(gr, rG, rK) then
gr!.TerminatedUnder := rG;
gr!.TerminatedAt := rK;
return [true, nrFound];
fi;
od;
od;
Expand Down