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

Add DirectProductOfPermGroupsWithMovedPoints helper #4326

Merged
merged 2 commits into from
Mar 25, 2021
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
42 changes: 27 additions & 15 deletions lib/gprdperm.gi
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,13 @@

#############################################################################
##
#M DirectProductOp( <grps>, <G> ) . . . . . . direct product of perm groups
#F DirectProductOfPermGroupsWithMovedPoints( <grps>, <pnts> )
##
InstallMethod( DirectProductOp,
"for a list of permutation groups, and a permutation group",
IsCollsElms,
[ IsList and IsPermCollColl, IsPermGroup ], 0,
function( grps, G )
local oldgrps, olds, news, perms, gens,
BindGlobal("DirectProductOfPermGroupsWithMovedPoints",
function( grps, pnts )
local i, oldgrps, olds, news, perms, gens,
deg, grp, old, new, perm, gen, D, info;

# Check the arguments.
if not ForAll( grps, IsGroup ) then
TryNextMethod();
fi;

oldgrps := [ ];
olds := [ ];
news := [ ];
Expand All @@ -35,11 +27,12 @@ InstallMethod( DirectProductOp,
deg := 0;

# loop over the groups
for grp in grps do
for i in [1..Length(grps)] do

# find old domain, new domain, and conjugating permutation
old := MovedPoints( grp );
new := [deg+1..deg+Length(old)];
grp := grps[i];
old := Immutable(pnts[i]);
new := MakeImmutable([deg+1..deg+Length(old)]);
perm := MappingPermListList( old, new );
deg := deg + Length(old);
Add( oldgrps, grp );
Expand All @@ -66,6 +59,25 @@ InstallMethod( DirectProductOp,
end );


#############################################################################
##
#M DirectProductOp( <grps>, <G> ) . . . . . . direct product of perm groups
##
InstallMethod( DirectProductOp,
"for a list of permutation groups, and a permutation group",
IsCollsElms,
[ IsList and IsPermCollColl, IsPermGroup ], 0,
function( grps, G )

# Check the arguments.
if not ForAll( grps, IsGroup ) then
TryNextMethod();
fi;

return DirectProductOfPermGroupsWithMovedPoints(grps, List(grps, MovedPoints));
end );


#############################################################################
##
#M Size( <D> ) . . . . . . . . . . . . . . . . . . . . . . of direct product
Expand Down
7 changes: 7 additions & 0 deletions tst/testinstall/gprd.tst
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,12 @@ gap> d4 := DirectProduct(g1, g2, g3);;
gap> HasIsFinite(d4) and not IsFinite(d4);
true

#
gap> d1 := DirectProductOfPermGroupsWithMovedPoints([g1, g1, g1], [[1..4], [1..4], [1..4]]);;
gap> MovedPoints(d1);
[ 1, 2, 3, 5, 6, 7, 9, 10, 11 ]
gap> HasIsFinite(d1) and IsFinite(d1);
true

#
gap> STOP_TEST("gprd.tst");