Skip to content

Commit

Permalink
Minor changes in code
Browse files Browse the repository at this point in the history
- Add test for Perm Wreath Product in Product Action,
since `Projection` now returns fail instead of an error.
- Change local variables.
  • Loading branch information
FriedrichRober committed Apr 20, 2021
1 parent 5b00582 commit 55a552a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
12 changes: 6 additions & 6 deletions lib/gprdperm.gi
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ end);
InstallMethod( ListWreathProductElementNC, "perm wreath product", true,
[ IsPermGroup and HasWreathProductInfo, IsObject, IsBool ], 0,
function(G, x, testDecomposition)
local info, list, h, f, degK, i, constPoints, imageComponents, comp, restPerm;
local info, list, h, f, degK, i, j, constPoints, imageComponents, comp, restPerm;

info := WreathProductInfo(G);
# The top group element
Expand All @@ -881,8 +881,8 @@ function(G, x, testDecomposition)
elif IsBound(info.productType) and info.productType then
degK := NrMovedPoints(info.groups[1]);
# constPoints correspond to [1, 1, 1, ...], [2, 2, 2, ...], ...
constPoints := List([0 .. degK - 1], x -> Sum([0 .. info.degI - 1],
y -> x * degK ^ y)) + 1;
constPoints := List([0 .. degK - 1], i -> Sum([0 .. info.degI - 1],
j -> i * degK ^ j)) + 1;
# imageComponents = [ [1^f_1, 1^f_2, 1^f_3, ...],
# [2^f_1, 2^f_2, 2^f_3, ...], ... ]
imageComponents := List(OnTuples(constPoints, f) - 1,
Expand All @@ -894,9 +894,9 @@ function(G, x, testDecomposition)
comp := imageComponents[i];
Append(comp, ListWithIdenticalEntries(info.degI - Length(comp), 1));
od;
for i in [1 .. info.degI] do
list[i] := PermList(List([1 .. degK], x -> imageComponents[x,i]));
if list[i] = fail then
for j in [1 .. info.degI] do
list[j] := PermList(List([1 .. degK], i -> imageComponents[i,j]));
if list[j] = fail then
return fail;
fi;
od;
Expand Down
9 changes: 4 additions & 5 deletions tst/testinstall/opers/ListWreathProductElement.tst
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,10 @@ gap> x := WreathProductElementList(G, list);;
gap> list = ListWreathProductElement(G, x);
true

# Currently nor working for Product Action
##
#gap> x := (1,2,3,4,5);;
#gap> ListWreathProductElement(G, x);
#fail
#
gap> x := (1,2,3,4,5);;
gap> ListWreathProductElement(G, x);
fail

#
gap> x :=
Expand Down

0 comments on commit 55a552a

Please sign in to comment.