From 613f34333edc1339ca1bc1b2f5bf0cd41979c2e7 Mon Sep 17 00:00:00 2001 From: ChristopherRussell Date: Wed, 29 Apr 2020 17:53:11 +0100 Subject: [PATCH] isorms: remove ReesZeroMatrixSemigroupCanonicalLabelling and add CanonicalReesMatrixSemigroup --- doc/isorms.xml | 50 +++++++++------------------------------- doc/z-chap18.xml | 1 - gap/attributes/isorms.gd | 4 ++-- gap/attributes/isorms.gi | 27 +++++++++++----------- tst/standard/isorms.tst | 35 +++++++++++++++------------- 5 files changed, 46 insertions(+), 71 deletions(-) diff --git a/doc/isorms.xml b/doc/isorms.xml index 687577bbbe..4b6fd7babc 100644 --- a/doc/isorms.xml +++ b/doc/isorms.xml @@ -267,39 +267,6 @@ gap> ImagesElm(map, RMSElement(R, 1, (2, 8), 2)); <#/GAPDoc> -<#GAPDoc Label="ReesZeroMatrixSemigroupCanonicalLabelling"> - - - - A matrix with entries from a group or 0. - - - - If S is a Rees zero matrix group then - ReesZeroMatrixSemigroupCanonicalLabelling returns a matrix M - with entries in G - the - of S, such that the Rees zero matrix semigroup defined by - ReesZeroMatrixSemigroup(G, M) is isomorphic to S. Furthermore - the output M 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.

- - 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]]> - - -<#/GAPDoc> - <#GAPDoc Label="CanonicalReesZeroMatrixSemigroup"> - This returns the Rees (zero) matrix semigroup T which has the same - as S but the - of T is the - of S. + If S is a Rees 0-matrix semigroup then + CanonicalReesZeroMatrixSemigroup returns an isomorphic Rees + 0-matrix semigroup T with the same + as S but the + of T has been canonicalized. The output + T 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.

+ CanonicalReesMatrixSemigroup works the same but for Rees matrix + semigroups. + S := ReesZeroMatrixSemigroup(SymmetricGroup(3), > [[(), (1, 3, 2)], [(), ()]]);; @@ -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) ] ]]]> diff --git a/doc/z-chap18.xml b/doc/z-chap18.xml index b65a0cb42e..35f7fe2803 100644 --- a/doc/z-chap18.xml +++ b/doc/z-chap18.xml @@ -49,7 +49,6 @@ <#Include Label = "ELM_LIST"> <#Include Label = "CompositionMapping2"> <#Include Label = "ImagesElm"> - <#Include Label = "ReesZeroMatrixSemigroupCanonicalLabelling"> <#Include Label = "CanonicalReesZeroMatrixSemigroup"> diff --git a/gap/attributes/isorms.gd b/gap/attributes/isorms.gd index 4f3fc45f40..2bf1aefe94 100644 --- a/gap/attributes/isorms.gd +++ b/gap/attributes/isorms.gd @@ -40,7 +40,7 @@ DeclareAttribute("IsomorphismReesMatrixSemigroupOverPermGroup", IsSemigroup); DeclareAttribute("IsomorphismReesZeroMatrixSemigroupOverPermGroup", IsSemigroup); -DeclareAttribute("ReesZeroMatrixSemigroupCanonicalLabelling", - IsReesZeroMatrixSemigroup); DeclareAttribute("CanonicalReesZeroMatrixSemigroup", IsReesZeroMatrixSemigroup); +DeclareAttribute("CanonicalReesMatrixSemigroup", + IsReesMatrixSemigroup); diff --git a/gap/attributes/isorms.gi b/gap/attributes/isorms.gi index a92577061e..e8ee804424 100644 --- a/gap/attributes/isorms.gi +++ b/gap/attributes/isorms.gi @@ -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, @@ -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,"); @@ -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); diff --git a/tst/standard/isorms.tst b/tst/standard/isorms.tst index 7d809efe8d..16cea86191 100644 --- a/tst/standard/isorms.tst +++ b/tst/standard/isorms.tst @@ -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), ()]]);; @@ -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, @@ -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, @@ -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); @@ -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 @@ -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);