-
Notifications
You must be signed in to change notification settings - Fork 166
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
FIX: wreath product with trivial group contains trivial generators #5826
Open
FriedrichRober
wants to merge
1
commit into
gap-system:master
Choose a base branch
from
FriedrichRober:fr/FixWreathProductTrivialTopGroup
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -621,16 +621,21 @@ local G,H, # factors | |
# force trivial group to act on 1 point | ||
if degG = 0 then domG := [1]; degG := 1; fi; | ||
|
||
for i in [1..degI] do | ||
components[i]:=[(i-1)*degG+1..i*degG]; | ||
shift := MappingPermListList( domG, components[i] ); | ||
Add(perms,shift); | ||
for gen in Ggens do | ||
Add( gens, gen ^ shift ); | ||
od; | ||
if i=1 then gens1:=ShallowCopy(gens);fi; | ||
od; | ||
basegens:=ShallowCopy(gens); | ||
if IsTrivial(G) then | ||
gens1 := [ One(G) ]; | ||
basegens := ShallowCopy(gens1); | ||
Comment on lines
+625
to
+626
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does taking an empty list here not work? |
||
else | ||
for i in [1..degI] do | ||
components[i]:=[(i-1)*degG+1..i*degG]; | ||
shift := MappingPermListList( domG, components[i] ); | ||
Add(perms,shift); | ||
for gen in Ggens do | ||
Add( gens, gen ^ shift ); | ||
od; | ||
if i=1 then gens1:=ShallowCopy(gens);fi; | ||
od; | ||
basegens:=ShallowCopy(gens); | ||
fi; | ||
|
||
# reduce generator number if it becomes too large -- only first base | ||
# part | ||
|
@@ -649,7 +654,9 @@ local G,H, # factors | |
od; | ||
od; | ||
shift:=PermList(shift); | ||
Add( gens, shift ); | ||
if not IsOne(shift) then | ||
Add( gens, shift ); | ||
fi; | ||
Add(hgens, shift ); | ||
od; | ||
|
||
|
@@ -1039,7 +1046,9 @@ InstallGlobalFunction( WreathProductProductAction, function( G, H ) | |
( Position( domG, domG[ q ] ^ gen ) - q ) * val ); | ||
od; | ||
q:=PermList( list + 1 ); | ||
Add(gens,q); | ||
if not IsOne(q) then | ||
Add(gens,q); | ||
fi; | ||
Add(basegens[i],q); | ||
val := Val; | ||
od; | ||
|
@@ -1060,7 +1069,9 @@ InstallGlobalFunction( WreathProductProductAction, function( G, H ) | |
Add( list, q ); | ||
od; | ||
q:=PermList( list + 1 ); | ||
Add(gens,q); | ||
if not IsOne(q) then | ||
Add(gens,q); | ||
fi; | ||
Add(hgens,q); | ||
od; | ||
W := GroupByGenerators( gens, () ); # `gens' arose from `PermList' | ||
|
53 changes: 53 additions & 0 deletions
53
tst/testbugfix/2024_10_24_WreathProductWIthTrivialGroups.tst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# | ||
gap> START_TEST("WreathProductWithTrivialGroups.tst"); | ||
gap> P := SymmetricGroup(3);; | ||
gap> IP := Group( One(P) );; | ||
gap> M := GL(6, 5);; | ||
gap> IM := Group( One(M) );; | ||
|
||
# Generators should not contain the identity element, | ||
# unless the group is trivial. | ||
gap> checkGens := function(G) | ||
> local gens; | ||
> gens := GeneratorsOfGroup(G); | ||
> return gens = [One(G)] or ForAll(gens, g -> g <> One(G)); | ||
> end;; | ||
|
||
# imprimitive perm, trivial top | ||
gap> checkGens( WreathProduct(P, IP) ); | ||
true | ||
|
||
# imprimitive perm, trivial base | ||
gap> checkGens( WreathProduct(IP, P) ); | ||
true | ||
|
||
# imprimitive perm, trivial base and top | ||
gap> checkGens( WreathProduct(IP, IP) ); | ||
true | ||
|
||
# imprimitive mat, trivial top | ||
gap> checkGens( WreathProduct(M, IP) ); | ||
true | ||
|
||
# imprimitive mat, trivial base | ||
gap> checkGens( WreathProduct(IM, P) ); | ||
true | ||
|
||
# imprimitive mat, trivial base and top | ||
gap> checkGens( WreathProduct(IM, IP) ); | ||
true | ||
|
||
# product action perm, trivial top | ||
gap> checkGens( WreathProductProductAction(P, IP) ); | ||
true | ||
|
||
# product action perm, trivial base | ||
gap> checkGens( WreathProductProductAction(IP, P) ); | ||
true | ||
|
||
# product action perm, trivial base and top | ||
gap> checkGens( WreathProductProductAction(IP, IP) ); | ||
true | ||
|
||
# | ||
gap> STOP_TEST("WreathProductWithTrivialGroups.tst"); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about just
or if one really wants a new group: