Skip to content

Commit

Permalink
isorms: remove ReesZeroMatrixSemigroupCanonicalLabelling and add Cano…
Browse files Browse the repository at this point in the history
…nicalReesMatrixSemigroup
  • Loading branch information
ChristopherRussell committed Apr 29, 2020
1 parent a2ba861 commit 613f343
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 71 deletions.
50 changes: 11 additions & 39 deletions doc/isorms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -267,39 +267,6 @@ gap> ImagesElm(map, RMSElement(R, 1, (2, 8), 2));
</ManSection>
<#/GAPDoc>

<#GAPDoc Label="ReesZeroMatrixSemigroupCanonicalLabelling">
<ManSection>
<Attr Name = "ReesZeroMatrixSemigroupCanonicalLabelling"
Label = "for a Rees zero matrix semigroup" Arg = "S"/>
<Returns>
A matrix with entries from a group or 0.
</Returns>

<Description>
If <A>S</A> is a Rees zero matrix group then
<C>ReesZeroMatrixSemigroupCanonicalLabelling</C> returns a matrix <C>M</C>
with entries in <C>G</C> - the <Ref Attr="IsUnderlyingSemigroup"/>
of <A>S</A>, such that the Rees zero matrix semigroup defined by
<C>ReesZeroMatrixSemigroup(G, M)</C> is isomorphic to <A>S</A>. Furthermore
the output <C>M</C> is canonical in the sense that for any two inputs
which are isomorphic Rees zero matrix semigroups the output of this function
is the same. <P/>

<Example><![CDATA[
gap> S := ReesZeroMatrixSemigroup(SymmetricGroup(3),
> [[(), (1, 3, 2)], [(), ()]]);;
gap> ReesZeroMatrixSemigroupCanonicalLabelling(S);
[ [ (), () ], [ (), (1,2,3) ] ]
gap> T := ReesZeroMatrixSemigroup(SymmetricGroup(3),
> [[(1, 2, 3), ()], [(), ()]]);;
gap> ReesZeroMatrixSemigroupCanonicalLabelling(T);
[ [ (), () ], [ (), (1,2,3) ] ]
gap> IsIsomorphicSemigroup(S, T);
true]]></Example>
</Description>
</ManSection>
<#/GAPDoc>

<#GAPDoc Label="CanonicalReesZeroMatrixSemigroup">
<ManSection>
<Attr Name = "CanonicalReesZeroMatrixSemigroup"
Expand All @@ -310,10 +277,17 @@ true]]></Example>
</Returns>

<Description>
This returns the Rees (zero) matrix semigroup <C>T</C> which has the same
<Ref Attr="UnderlyingSemigroup"/> as <A>S</A> but the <Ref Attr="Matrix"/>
of <C>T</C> is the <Ref Filt="ReesZeroMatrixSemigroupCanonicalLabelling"/>
of <A>S</A>.
If <A>S</A> is a Rees 0-matrix semigroup then
<C>CanonicalReesZeroMatrixSemigroup</C> returns an isomorphic Rees
0-matrix semigroup <C>T</C> with the same
<Ref Attr="IsUnderlyingSemigroup"/> as <A>S</A> but the
<Ref Attr="Matrix"/> of <C>T</C> has been canonicalized. The output
<C>T</C> is canonical in the sense that for any two inputs
which are isomorphic Rees zero matrix semigroups the output of this
function is the same.<P/>
CanonicalReesMatrixSemigroup works the same but for Rees matrix
semigroups.

<Example><![CDATA[
gap> S := ReesZeroMatrixSemigroup(SymmetricGroup(3),
> [[(), (1, 3, 2)], [(), ()]]);;
Expand All @@ -322,8 +296,6 @@ gap> T := CanonicalReesZeroMatrixSemigroup(S);
gap> Matrix(S);
[ [ (), (1,3,2) ], [ (), () ] ]
gap> Matrix(T);
[ [ (), () ], [ (), (1,2,3) ] ]
gap> ReesZeroMatrixSemigroupCanonicalLabelling(S);
[ [ (), () ], [ (), (1,2,3) ] ]]]></Example>
</Description>
</ManSection>
Expand Down
1 change: 0 additions & 1 deletion doc/z-chap18.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
<#Include Label = "ELM_LIST">
<#Include Label = "CompositionMapping2">
<#Include Label = "ImagesElm">
<#Include Label = "ReesZeroMatrixSemigroupCanonicalLabelling">
<#Include Label = "CanonicalReesZeroMatrixSemigroup">

<!--********************************************************************-->
Expand Down
4 changes: 2 additions & 2 deletions gap/attributes/isorms.gd
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ DeclareAttribute("IsomorphismReesMatrixSemigroupOverPermGroup", IsSemigroup);
DeclareAttribute("IsomorphismReesZeroMatrixSemigroupOverPermGroup",
IsSemigroup);

DeclareAttribute("ReesZeroMatrixSemigroupCanonicalLabelling",
IsReesZeroMatrixSemigroup);
DeclareAttribute("CanonicalReesZeroMatrixSemigroup",
IsReesZeroMatrixSemigroup);
DeclareAttribute("CanonicalReesMatrixSemigroup",
IsReesMatrixSemigroup);
27 changes: 14 additions & 13 deletions gap/attributes/isorms.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1276,8 +1276,8 @@ function(S)
end);
end);

InstallMethod(ReesZeroMatrixSemigroupCanonicalLabelling,
"for a Rees zero matrix semigroup and a perm",
InstallMethod(CanonicalReesZeroMatrixSemigroup,
"for a Rees zero matrix semigroup",
[IsReesZeroMatrixSemigroup],
function(S)
local Flatten3DPoint, Unflatten3DPoint, SetToZeroGroupMatrix,
Expand Down Expand Up @@ -1409,7 +1409,7 @@ function(S)
M := Matrix(S);
G := UnderlyingSemigroup(S);
if not IsGroup(UnderlyingSemigroup(S)) then
ErrorNoReturn("Semigroups: ReesZeroMatrixSemigroupCanonicalLabelling: ",
ErrorNoReturn("Semigroups: CanonicalReesZeroMatrixSemigroup: ",
"usage,\n",
"the argument must be a Rees zero matrix semigroup with ",
"underlying semigroup which is a group,");
Expand All @@ -1418,21 +1418,22 @@ function(S)
n := Length(M[1]);
setM := ZeroGroupMatrixToSet(M, m, n, G);
GG := RZMSMatrixIsomorphismGroup(m, n, G);
return Matrix(ReesZeroMatrixSemigroup(G, SetToZeroGroupMatrix(
CanonicalImage(GG, setM, OnSets), m, n, G)));
return ReesZeroMatrixSemigroup(G, SetToZeroGroupMatrix(
CanonicalImage(GG, setM, OnSets), m, n, G));
end);

InstallMethod(CanonicalReesZeroMatrixSemigroup,
InstallMethod(CanonicalReesMatrixSemigroup,
"for a Rees zero matrix semigroup",
[IsReesZeroMatrixSemigroup],
[IsReesMatrixSemigroup],
function(S)
local G;
G := UnderlyingSemigroup(S);
local G, mat;
G := UnderlyingSemigroup(S);
if not IsGroup(G) then
ErrorNoReturn("Semigroups: CanonicalReesZeroMatrixSemigroup: usage,\n",
"the argument must be a Rees zero matrix semigroup with ",
ErrorNoReturn("Semigroups: CanonicalReesMatrixSemigroup: usage,\n",
"the argument must be a Rees matrix semigroup with ",
"underlying semigroup which is a group,");
fi;
return ReesZeroMatrixSemigroup(G,
ReesZeroMatrixSemigroupCanonicalLabelling(S));
mat := Matrix(CanonicalReesZeroMatrixSemigroup(
ReesZeroMatrixSemigroup(G, Matrix(S))));
return ReesMatrixSemigroup(G, mat);
end);
35 changes: 19 additions & 16 deletions tst/standard/isorms.tst
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ true
gap> BruteForceInverseCheck(iso);
true

# ReesZeroMatrixSemigroupCanonicalLabelling and CanonicalReesZeroMatrixSemigroup
# CanonicalReesZeroMatrixSemigroup
gap> S := ReesZeroMatrixSemigroup(SymmetricGroup([1 .. 4]),
> [[(), (2, 3), (2, 3, 4)], [(1, 2)(3, 4), (), (1, 2, 4, 3)],
> [(1, 4, 2), (1, 3)(2, 4), ()]]);;
Expand All @@ -975,9 +975,9 @@ gap> T := ReesZeroMatrixSemigroup(SymmetricGroup([1 .. 4]),
> [(), (1, 3)(2, 4), (1, 3, 4, 2)]]);;
gap> mat := [[(), (), ()], [(1, 4), (), (2, 4)],
> [(), (1, 3), (1, 4, 3, 2)]];;
gap> ReesZeroMatrixSemigroupCanonicalLabelling(S) = mat;
gap> Matrix(CanonicalReesZeroMatrixSemigroup(S)) = mat;
true
gap> ReesZeroMatrixSemigroupCanonicalLabelling(T) = mat;
gap> Matrix(CanonicalReesZeroMatrixSemigroup(T)) = mat;
true
gap> S := ReesZeroMatrixSemigroup(Group(
> [(1, 2, 3), (4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
Expand Down Expand Up @@ -1029,7 +1029,7 @@ gap> mat := [[0, (), (), ()],
> 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40,
> 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21,
> 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5)]];;
gap> ReesZeroMatrixSemigroupCanonicalLabelling(S) = mat;
gap> Matrix(CanonicalReesZeroMatrixSemigroup(S)) = mat;
true
gap> S := ReesZeroMatrixSemigroup(Group([(1, 2, 3, 4)]), [[(), (1, 2, 3, 4),
> (1, 2, 3, 4), (1, 3)(2, 4), 0], [0, (), (1, 2, 3, 4), (), ()], [0, (), (), (1,
Expand All @@ -1038,7 +1038,7 @@ gap> S := ReesZeroMatrixSemigroup(Group([(1, 2, 3, 4)]), [[(), (1, 2, 3, 4),
gap> mat := [[(), 0, 0, (), ()], [0, (), (), (1, 4, 3, 2), (1, 2, 3, 4)],
> [(), (), (1, 2, 3, 4), (), 0], [(1, 3)(2, 4), 0, (), (), ()],
> [(), 0, (1, 3)(2, 4), (1, 2, 3, 4), (1, 4, 3, 2)]];;
gap> ReesZeroMatrixSemigroupCanonicalLabelling(S) = mat;
gap> Matrix(CanonicalReesZeroMatrixSemigroup(S)) = mat;
true
gap> T := CanonicalReesZeroMatrixSemigroup(S);;
gap> mat = Matrix(T);
Expand All @@ -1048,33 +1048,35 @@ true
gap> S := ReesZeroMatrixSemigroup(AlternatingGroup([1 .. 5]),
> [[(), 0], [(1, 3, 4), (2, 4, 5)], [(1, 5, 2), (1, 5, 2, 4, 3)]]);;
gap> mat := [[0, ()], [(), ()], [(), (1, 5, 4)]];;
gap> ReesZeroMatrixSemigroupCanonicalLabelling(S) = mat;
gap> Matrix(CanonicalReesZeroMatrixSemigroup(S)) = mat;
true
gap> T := CanonicalReesZeroMatrixSemigroup(S);;
gap> mat = Matrix(T);
true
gap> UnderlyingSemigroup(S) = UnderlyingSemigroup(T);
true
gap> S := ReesZeroMatrixSemigroup(Group([(1, 2), (3, 4)]),

# CanonicalReesMatrixSemigroup
gap> S := ReesMatrixSemigroup(Group([(1, 2), (3, 4)]),
> [[(), (), (3, 4), (), ()], [(), (3, 4), (), (3, 4), (1, 2)], [(), (1, 2), (3,
> 4), (), ()], [(1, 2)(3, 4), (3, 4), (), (), ()], [(), (1, 2), (1, 2)(3, 4),
> (), ()]]);;
gap> mat := [[(), (), (), (), ()], [(), (), (), (), (1, 2)],
> [(), (), (), (1, 2), ()], [(), (3, 4), (1, 2)(3, 4), (), (1, 2)],
> [(), (), (3, 4), (1, 2)(3, 4), (3, 4)]];;
gap> mat = Matrix(CanonicalReesZeroMatrixSemigroup(S));
gap> mat = Matrix(CanonicalReesMatrixSemigroup(S));
true
gap> mat = ReesZeroMatrixSemigroupCanonicalLabelling(S);
gap> mat = Matrix(CanonicalReesMatrixSemigroup(S));
true
gap> S := ReesZeroMatrixSemigroup(AlternatingGroup([1 .. 5]),
gap> S := ReesMatrixSemigroup(AlternatingGroup([1 .. 5]),
> [[(), (), (1, 5, 4, 2, 3)], [(1, 5, 4), (1, 3, 2, 5, 4), ()], [(), (), (1, 2,
> 3, 4, 5)], [(), (), ()]]);;
gap> mat :=
> [[(), (), ()], [(), (), (1, 4)(2, 5)], [(), (), (1, 3, 5, 4, 2)],
> [(), (1, 3, 4), (1, 3, 5)]];;
gap> mat = Matrix(CanonicalReesZeroMatrixSemigroup(S));
gap> mat = Matrix(CanonicalReesMatrixSemigroup(S));
true
gap> mat = ReesZeroMatrixSemigroupCanonicalLabelling(S);
gap> mat = Matrix(CanonicalReesMatrixSemigroup(S));
true

# CanonicalX error messages
Expand All @@ -1083,14 +1085,15 @@ gap> mat := [[IdentityTransformation, IdentityTransformation,
> IdentityTransformation], [IdentityTransformation, IdentityTransformation,
> Transformation([2, 1])]];;
gap> S := ReesZeroMatrixSemigroup(G, mat);;
gap> ReesZeroMatrixSemigroupCanonicalLabelling(S);
Error, Semigroups: ReesZeroMatrixSemigroupCanonicalLabelling: usage,
the argument must be a Rees zero matrix semigroup with underlying semigroup wh\
ich is a group,
gap> CanonicalReesZeroMatrixSemigroup(S);
Error, Semigroups: CanonicalReesZeroMatrixSemigroup: usage,
the argument must be a Rees zero matrix semigroup with underlying semigroup wh\
ich is a group,
gap> S := ReesMatrixSemigroup(G, mat);;
gap> CanonicalReesMatrixSemigroup(S);
Error, Semigroups: CanonicalReesMatrixSemigroup: usage,
the argument must be a Rees zero matrix semigroup with underlying semigroup wh\
ich is a group,

# SEMIGROUPS_UnbindVariables
gap> Unbind(A);
Expand Down

0 comments on commit 613f343

Please sign in to comment.