Skip to content

Commit

Permalink
Wreath product (#262)
Browse files Browse the repository at this point in the history
* semitrans: add WreathProduct method

* semitrans: add tests and documentation for Wreath product

* semitrans: change tests and documentation for wreath product

* semitrans.gi : change method specification

* semitrans.gi: delete whitespace

* z-chap15.xml: add section on wreath product

* semitrans.xml: linting

* semitrans: add new WreathProduct method

* semitrans.gi: fix WreathProduct second method

* semitrans: linting

* semitrans: linting

* semitrans.tst: add test for new WreathProduct method

* semitrans.xml: fix WreathProduct documentation

* semitrans.gi: fix error message on WreathProduct

* semitrans: merge WreathProduct methods and fix documentation

* semitrans.gi: fix WreathProduct, use monoid instead of semigroup

* semitrans.gi: change label on WreathProduct main method

* semitrans: fix according to James's comments

* semitrans: emphasize embedding in documentation and add tests for WreathProduct

* semitrans.xml: fix documentation

* semitrans.xml: fix documentation of WP

* z-chap06/13: move documentation to the correct file

* semitrans.gi: integrate Michael's suggestions

* semitrans.gi: linting

* semitrans.gi: make mutable list
  • Loading branch information
ffloresbrito authored and mtorpey committed Jul 19, 2017
1 parent 3dfd970 commit 3e93ef1
Show file tree
Hide file tree
Showing 7 changed files with 143 additions and 2 deletions.
27 changes: 27 additions & 0 deletions doc/semitrans.xml
Original file line number Diff line number Diff line change
Expand Up @@ -384,3 +384,30 @@ gap> FixedPointsOfTransformationSemigroup(S);
</Description>
</ManSection>
<#/GAPDoc>

<#GAPDoc Label="WreathProduct">
<ManSection>
<Oper Name = "WreathProduct" Arg = "M, S"/>
<Returns>A transformation semigroup.</Returns>
<Description>
If <A>M</A> is a transformation monoid (or a permutation group) of degree
<C>m</C>, and <A>S</A> is a transformation semigroup (or permutation
group) of degree <C>s</C>, the operation
<C>WreathProduct(<A>M</A>, <A>S</A>)</C> returns the wreath product of
<A>M</A> and <A>S</A>, in terms of an embedding in the full
transformation monoid of degree <C>m * s</C>.

<Example><![CDATA[
gap> T := FullTransformationMonoid(3);;
gap> C := Group((1, 3));;
gap> W := WreathProduct(T, C);;
gap> Size(W);
39366
gap> WW := WreathProduct(C, T);;
gap> Size(WW);
216
]]></Example>

</Description>
</ManSection>
<#/GAPDoc>
1 change: 1 addition & 0 deletions doc/z-chap06.xml
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ true]]></Log>
<#Include Label = "SubsemigroupByProperty">
<#Include Label = "InverseSubsemigroupByProperty">
<#Include Label = "DirectProduct">
<#Include Label = "WreathProduct">
</Section>

<Section Label = "Changing the representation of a semigroup">
Expand Down
2 changes: 1 addition & 1 deletion doc/z-chap13.xml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
<#Include Label = "Normalizer">

</Section>

<!--**********************************************************************-->
<!--**********************************************************************-->

Expand Down
1 change: 0 additions & 1 deletion doc/z-chap15.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
<!--**********************************************************************-->

<Section>

<Heading>
Properties of inverse semigroups
</Heading>
Expand Down
4 changes: 4 additions & 0 deletions gap/semigroups/semitrans.gd
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ DeclareAttribute("EndomorphismMonoid", IsDigraph);
DeclareOperation("EndomorphismMonoid", [IsDigraph, IsHomogeneousList]);

DeclareOperation("DirectProductOp", [IsList, IsSemigroup]);

DeclareOperation("WreathProduct",
[IsMultiplicativeElementCollection,
IsMultiplicativeElementCollection]);
71 changes: 71 additions & 0 deletions gap/semigroups/semitrans.gi
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,77 @@ function(S)
return t;
end);

InstallMethod(WreathProduct,
"for a transformation monoid and a permutation group",
[IsTransformationMonoid, IsPermGroup],
function(M, G)
return WreathProduct(M, AsMonoid(IsTransformationMonoid, G));
end);

InstallMethod(WreathProduct,
"for a permutation group and a transformation semigroup",
[IsPermGroup, IsTransformationSemigroup],
function(G, S)
return WreathProduct(AsMonoid(IsTransformationMonoid, G), S);
end);

InstallMethod(WreathProduct,
"for a transformation monoid and a transformation semigroup",
[IsTransformationMonoid, IsTransformationSemigroup],
function(M, S)
local maps, newmap, gensM, gensS, next, reps, orbs, gen1, n, i, s, x, m, y,
rimage;
if not IsMonoidAsSemigroup(S) then
ErrorNoReturn("Semigroups: WreathProduct: usage,\n",
"the second argument <S> should be a monoid (as semigroup),");
fi;

m := DegreeOfTransformationCollection(M);

gensM := List(GeneratorsOfMonoid(M), x -> ImageListOfTransformation(x, m));
gensS := GeneratorsOfSemigroup(S);

orbs := List(ComponentsOfTransformationSemigroup(S), Minimum);
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

# move copies of M 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 := ShallowCopy(ImageListOfTransformation(maps[1], m * n));
for x in gensM do
newmap{[1 .. m] + (i - 1) * m} := x + (i ^ gen1 - 1) * m;
Add(maps, Transformation(newmap));
od;
od;

for i in rimage do
newmap := OnTuples([1 .. m * n], maps[1]);
for x in gensM 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
39 changes: 39 additions & 0 deletions tst/standard/semitrans.tst
Original file line number Diff line number Diff line change
Expand Up @@ -2813,6 +2813,45 @@ gap> Unbind(rels);
gap> Unbind(x);
gap> Unbind(y);
#T# Tests wreath product of transf. semgp. and perm. group
gap> T := FullTransformationMonoid(3);;
gap> C := Group((1, 3));;
gap> TC := WreathProduct(T, C);;
gap> Size(TC) = 39366;
true
gap> CC := AsMonoid(IsTransformationMonoid, C);;
gap> DP := DirectProduct(T, CC);;
gap> IsSubsemigroup(TC, DP);
true
gap> C := Group((1, 2));;
gap> TC := WreathProduct(T, C);;
gap> Size(TC) = 1458;
true
gap> CC := AsMonoid(IsTransformationMonoid, C);;
gap> DP := DirectProduct(T, CC);;
gap> IsSubsemigroup(TC, DP);
true
#T# Test wreath product of perm. group and transf. semgp.
gap> W := WreathProduct(Group((1, 2)), FullTransformationMonoid(3));;
gap> Size(W);
216
gap> Transformation([5, 6, 1, 2, 3, 4]) in W;
true
gap> Transformation([5, 5, 1, 2, 3, 4]) in W;
false
#T# Tests wreath product of a monoid not satisfying IsTransformationMonoid
gap> S := Semigroup(Transformation([1, 2, 3, 3, 3]));;
gap> C := Group((1, 2));;
gap> WW := WreathProduct(C, S);;
gap> Size(WW);
32
gap> Transformation([2, 1, 4, 3, 6, 5, 6, 5, 6, 5]) in WW;
true
gap> Transformation([2, 1, 4, 3, 6, 5, 6, 5, 7, 8]) in WW;
false
#E#
gap> SEMIGROUPS.StopTest();
gap> STOP_TEST("Semigroups package: standard/semitrans.tst");

0 comments on commit 3e93ef1

Please sign in to comment.