Skip to content

Commit

Permalink
Remove testMembership, use testDecomposition instead.
Browse files Browse the repository at this point in the history
Adjust documentation of `ListWreathProductElement`.

It is often sufficient to have elements in the parent
wreath product `Sym(l) \wr Sym(m)` or `GL(n,q) \wr Sym(m)`.
For this reason the `testMembership` option
is replaced by the `testDecomposition` option,
which just tests for membership in the parent wreath product.
  • Loading branch information
FriedrichRober committed Jun 14, 2021
1 parent 9f2d5cf commit bde3d1f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 34 deletions.
25 changes: 14 additions & 11 deletions lib/gprd.gd
Original file line number Diff line number Diff line change
Expand Up @@ -574,27 +574,30 @@ DeclareRepresentation("IsWreathProductElementDefaultRep",
##
## <#GAPDoc Label="ListWreathProductElement">
## <ManSection>
## <Func Name="ListWreathProductElement" Arg='G, x[, testMembership]'/>
## <Func Name="ListWreathProductElement" Arg='G, x[, testDecomposition]'/>
## <Oper Name="ListWreathProductElementNC" Arg='G, x, testDecomposition'/>
##
## <Description>
## Let <A>x</A> be an element of a wreath product <A>G</A>
## where <M>G = K \wr H</M> and <M>H</M> acts
## as a finite permutation group of degree <M>m</M>.
## We can identify the element <A>x</A> with a tuple <M>(f_1, \dots, f_m; h)</M>,
## We can identify the element <A>x</A> with a tuple <M>(f_1, \ldots, f_m; h)</M>,
## where <M>f_i \in K</M> is the <M>i</M>-th base component of <A>x</A>
## and <M>h \in H</M> is the top component of <A>x</A>.
## <P/>
## <Ref Func="ListWreathProductElement"/> returns a list <M>[f_1, \dots, f_m, h]</M>
## containing the components of <A>x</A>.
## <Ref Func="ListWreathProductElement"/> returns a list <M>[f_1, \ldots, f_m, h]</M>
## containing the components of <A>x</A> or <K>fail</K> if <A>x</A> cannot be decomposed in the wreath product.
## <P/>
## If ommited, the argument <A>testMembership</A> defaults to true.
## If ommited, the argument <A>testDecomposition</A> defaults to true.
## If <A>testDecomposition</A> is true, <Ref Func="ListWreathProductElement"/> makes additional tests to ensure
## that the computed decomposition of <A>x</A> is correct,
## i.e. it checks that <A>x</A> is an element of the parent wreath product of <A>G</A>:
## <P/>
## If <A>testMembership</A> is true, <Ref Func="ListWreathProductElement"/> returns fail
## if <A>x</A> is not an element of <A>G</A>.
## If <M>K \leq \mathop{Sym}(l)</M>, this ensures that <M>x \in \mathop{Sym}(l) \wr \mathop{Sym}(m)</M>
## where the parent wreath product is considered in the same action as <A>G</A>,
## i.e. either in imprimitive action or product action.
## <P/>
## If <A>testDecomposition</A> is true, <Ref Func="ListWreathProductElementNC"/> makes additional tests to ensure that
## the decomposition of <A>x</A> can be used for testing membership in <A>G</A>.
## If <M>K \leq \mathop{GL}(n,q)</M>, this ensures that <M>x \in \mathop{GL}(n,q) \wr \mathop{Sym}(m)</M>.
## </Description>
## </ManSection>
## <#/GAPDoc>
Expand All @@ -613,13 +616,13 @@ DeclareOperation( "ListWreathProductElementNC", [HasWreathProductInfo, IsObject,
## <Oper Name="WreathProductElementListNC" Arg='G, list'/>
##
## <Description>
## Let <A>list</A> be equal to <M>[f_1, \dots, f_m, h]</M> and <A>G</A> be a wreath product
## Let <A>list</A> be equal to <M>[f_1, \ldots, f_m, h]</M> and <A>G</A> be a wreath product
## where <M>G = K \wr H</M>, <M>H</M> acts
## as a finite permutation group of degree <M>m</M>,
## <M>f_i \in K</M> and <M>h \in H</M>.
## <P/>
## <Ref Func="WreathProductElementList"/> returns the element <M>x \in G</M>
## identified by the tuple <M>(f_1, \dots, f_m; h)</M>.
## identified by the tuple <M>(f_1, \ldots, f_m; h)</M>.
## </Description>
## </ManSection>
## <#/GAPDoc>
Expand Down
31 changes: 8 additions & 23 deletions lib/gprd.gi
Original file line number Diff line number Diff line change
Expand Up @@ -901,34 +901,19 @@ end);
#M ListWreathProductElement(<G>, <x>[, <testMembership>])
##
InstallGlobalFunction( ListWreathProductElement,
function(G, x, testMembership...)
local info, list, i;
if Length(testMembership) = 0 then
testMembership := true;
elif Length(testMembership) = 1 then
testMembership := testMembership[1];
elif Length(testMembership) > 1 then
function(G, x, testDecomposition...)
local info;
if Length(testDecomposition) = 0 then
testDecomposition := true;
elif Length(testDecomposition) = 1 then
testDecomposition := testDecomposition[1];
elif Length(testDecomposition) > 1 then
ErrorNoReturn("too many arguments");
fi;
if not HasWreathProductInfo(G) then
ErrorNoReturn("usage: <G> must be a wreath product");
fi;
info := WreathProductInfo(G);
list := ListWreathProductElementNC(G, x, testMembership);
if testMembership then
if list = fail then
return fail;
fi;
for i in [1 .. info.degI] do
if not list[i] in info.groups[1] then
return fail;
fi;
od;
if not list[info.degI + 1] in info.groups[2] then
return fail;
fi;
fi;
return list;
return ListWreathProductElementNC(G, x, testDecomposition);
end);

InstallMethod( ListWreathProductElementNC, "generic wreath product", true,
Expand Down

0 comments on commit bde3d1f

Please sign in to comment.