Skip to content

Commit

Permalink
semitrans: add new WreathProduct method
Browse files Browse the repository at this point in the history
  • Loading branch information
ffloresbrito committed Jun 14, 2017
1 parent e07ab92 commit c22d5c6
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gap/semigroups/semitrans.gd
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ DeclareOperation("EndomorphismMonoid", [IsDigraph, IsHomogeneousList]);
DeclareOperation("DirectProductOp", [IsList, IsSemigroup]);

DeclareOperation("WreathProduct",
[IsTransformationSemigroup, IsPermGroup]);
[IsMultiplicativeElementCollection, IsMultiplicativeElementCollection]);
42 changes: 42 additions & 0 deletions gap/semigroups/semitrans.gi
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,48 @@ function(S, G)
return Semigroup(maps);
end);

InstallMethod(WreathProduct,
"for a transformation semigroup and a permutation group",
[IsPermGroup, IsTransformationSemigroup],
function(G, S)
local maps, newmap, gensG, gensS, next, reps, orbs, gen1, n, i, s, x, m;
if not IsMonoidAsSemigroup(S) then
ErrorNoReturn("Semigroups: WreathProduct: usage,\n",
"the first argument <S> should be a monoid,");
fi;

m := LargestMovedPoint(G);

gensG := ShallowCopy(GeneratorsOfGroup(G));
gensG := List(gensG, x -> OnTuples([1 .. m], x));
gensS := GeneratorsOfSemigroup(S);

orbs := ComponentRepsOfTransformationSemigroup(S);

n := DegreeOfTransformationCollection(S);

maps := []; # final generating set for the wreath product

# move copies of S as by the action induced by S
next := [1 .. m * n];
for s in gensS do
for i in [1 .. n] do
next{[1 .. m] + (i - 1) * m} := [1 .. m] + (i ^ s - 1) * m;
od;
Add(maps, Transformation(next));
od;

gen1 := gensS[1];
for i in orbs do
newmap := OnTuples([1 .. m * n], maps[1]);
for x in gensG do
newmap{[1 .. m] + (i - 1) * m} := x + (i ^ gen1 - 1) * m;
Add(maps, Transformation(newmap));
od;
od;
return Semigroup(maps);
end);

#############################################################################
# ?. Isomorphisms
#############################################################################
Expand Down

0 comments on commit c22d5c6

Please sign in to comment.