Skip to content

Commit

Permalink
semitrans.gi: fix WreathProduct second method
Browse files Browse the repository at this point in the history
  • Loading branch information
ffloresbrito committed Jun 14, 2017
1 parent f561010 commit e05def6
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions gap/semigroups/semitrans.gi
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,8 @@ 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;
local maps, newmap, gensG, gensS, next, reps, orbs, gen1, n, i, s, x, m, y,
rimage;
if not IsMonoidAsSemigroup(S) then
ErrorNoReturn("Semigroups: WreathProduct: usage,\n",
"the first argument <S> should be a monoid,");
Expand All @@ -800,9 +801,15 @@ function(G, S)
gensG := List(gensG, x -> OnTuples([1 .. m], x));
gensS := GeneratorsOfSemigroup(S);

orbs := ComponentRepsOfTransformationSemigroup(S);

orbs := List(ComponentsOfTransformationSemigroup(S), x -> Minimum(x));
n := DegreeOfTransformationCollection(S);
rimage := [1 .. n];

for x in orbs do
for y in gensS do
RemoveSet(rimage, x ^ y);
od;
od;

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

Expand All @@ -823,6 +830,15 @@ function(G, S)
Add(maps, Transformation(newmap));
od;
od;

for i in rimage 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);

Expand Down

0 comments on commit e05def6

Please sign in to comment.