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

Correct bug in DirectFactorsOfGroup #566

Merged
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
4 changes: 2 additions & 2 deletions lib/grpnames.gi
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ InstallMethod(DirectFactorsOfGroup, "if normal subgroups are computed", true,
GGd := CommutatorFactorGroup(G);
# if GGd is not cyclic of prime power size then there are at least two
# maximal subgroups
if IsTrivial(GGd) or (IsCyclic(GGd) and IsPrimePowerInt(Size(GGd)))
if (IsTrivial(GGd) or (IsCyclic(GGd) and IsPrimePowerInt(Size(GGd))))
and Length(MaximalNormalSubgroups(G))= 1 then
# size of MaximalNormalSubgroups is an upper bound to the number of
# components
Expand Down Expand Up @@ -437,7 +437,7 @@ InstallMethod(DirectFactorsOfGroup, "generic method", true,
GGd := CommutatorFactorGroup(G);
# if GGd is not cyclic of prime power size then there are at least two
# maximal subgroups
if IsTrivial(GGd) or (IsCyclic(GGd) and IsPrimePowerInt(Size(GGd)))
if (IsTrivial(GGd) or (IsCyclic(GGd) and IsPrimePowerInt(Size(GGd))))
and Length(MaximalNormalSubgroups(G))= 1 then
# size of MaximalNormalSubgroups is an upper bound to the number of
# components
Expand Down
7 changes: 5 additions & 2 deletions tst/testinstall/direct_factors.tst
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,14 @@ gap> DirectFactorsOfGroup(SymmetricGroup(4));
[ Sym( [ 1 .. 4 ] ) ]
gap> DirectFactorsOfGroup(SymmetricGroup(5));
[ Sym( [ 1 .. 5 ] ) ]
gap> G := Group([ (4,8)(6,10), (4,6,10,8,12), (2,4,12)(6,10,8), (3,9)(4,6,10,8,12)(7,11), (3,5)(4,6,10,8,12)(9,11), (1,3,11,9,5)(4,6,10,8,12) ]);;
gap> G := Group([ (6,7,8,9,10), (8,9,10), (1,2)(6,7), (1,2,3,4,5)(6,7,8,9,10) ]);;
gap> DirectFactorsOfGroup(G)=[G];
true
gap> G := Group([ (4,8)(6,10), (4,6,10,8,12), (2,4,12)(6,10,8), (3,9)(4,6,10,8,12)(7,11), (3,5)(4,6,10,8,12)(9,11), (1,3,11,9,5)(4,6,10,8,12) ]);;
gap> G := Group([ (6,7,8,9,10), (8,9,10), (1,2)(6,7), (1,2,3,4,5)(6,7,8,9,10) ]);;
gap> NormalSubgroups(G);;
gap> DirectFactorsOfGroup(G)=[G];
true
gap> G := Group([ (4,8)(6,10), (4,6,10,8,12), (2,4,12)(6,10,8), (3,9)(4,6,10,8,12)(7,11), (3,5)(4,6,10,8,12)(9,11), (1,3,11,9,5)(4,6,10,8,12) ]);;
gap> DirectFactorsOfGroup(G)=[ Group([ (4,8)(6,10), (4,6)(10,12), (2,12,8)(4,6,10) ]), Group([ (1,7,9)(3,5,11), (3,9)(7,11), (3,11)(5,7) ]) ];
true
gap> STOP_TEST("direct_factors.tst", 10000);