From c8f9d34ca37969a708a2a1b186586eb1e2ea67bf Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Tue, 15 Nov 2022 10:56:09 +0000 Subject: [PATCH 1/3] prop: add tests and doc for IsSelfDualSemigroup --- doc/properties.xml | 33 ++++++++++++++++++++++++++ doc/z-chap12.xml | 2 +- gap/attributes/properties.gd | 2 +- gap/attributes/properties.gi | 6 +++++ tst/standard/attributes/properties.tst | 19 +++++++++++++++ 5 files changed, 60 insertions(+), 2 deletions(-) diff --git a/doc/properties.xml b/doc/properties.xml index 73d13526b..b10f20b71 100644 --- a/doc/properties.xml +++ b/doc/properties.xml @@ -1194,3 +1194,36 @@ false]]> <#/GAPDoc> + +<#GAPDoc Label="IsSelfDualSemigroup"> + + + true or false. + + Returns true if the semigroup S is self dual and + false otherwise. +

+ + A semigroup is self dual if it is isomorphic to its dual, + that is, the semigroup T with multiplication * defined + by x*y=yx where yx denotes the product in S. + + F := FreeSemigroup("a", "b"); + +gap> AssignGeneratorVariables(F); +gap> R := [[a ^ 3, a], [b ^ 2, b], [(a * b) ^ 2, a]]; +[ [ a^3, a ], [ b^2, b ], [ (a*b)^2, a ] ] +gap> S := F / R; + +gap> IsSelfDualSemigroup(S); +false +gap> IsSelfDualSemigroup(FreeBand(3)); +true +gap> S := DualSymmetricInverseMonoid(3); + +gap> IsSelfDualSemigroup(S); +true]]> + + +<#/GAPDoc> diff --git a/doc/z-chap12.xml b/doc/z-chap12.xml index bb0f11431..b45aa9e9c 100644 --- a/doc/z-chap12.xml +++ b/doc/z-chap12.xml @@ -46,7 +46,7 @@ <#Include Label = "IsZeroRectangularBand"> <#Include Label = "IsZeroSemigroup"> <#Include Label = "IsZeroSimpleSemigroup"> - + <#Include Label = "IsSelfDualSemigroup">

diff --git a/gap/attributes/properties.gd b/gap/attributes/properties.gd index 37806612f..af321c8d6 100644 --- a/gap/attributes/properties.gd +++ b/gap/attributes/properties.gd @@ -44,7 +44,7 @@ DeclareOperation("IsNormalInverseSubsemigroup", [IsInverseSemigroup, IsInverseSemigroup]); if not IsBoundGlobal("IsSelfDualSemigroup") then - DeclareProperty("IsSelfDualSemigroup", IsSemigroup); + DeclareProperty("IsSelfDualSemigroup", IsSemigroup and CanUseFroidurePin); fi; DeclareSynonymAttr("IsRectangularGroup", diff --git a/gap/attributes/properties.gi b/gap/attributes/properties.gi index c0c8f6c8b..d5934ab49 100644 --- a/gap/attributes/properties.gi +++ b/gap/attributes/properties.gi @@ -1651,6 +1651,12 @@ InstallMethod(IsSelfDualSemigroup, [IsSemigroup and CanUseFroidurePin], function(S) local T, map; + if IsCommutativeSemigroup(S) then # TODO(later) any more? + return true; + elif NrRClasses(S) <> NrLClasses(S) then + return false; + fi; + T := AsSemigroup(IsFpSemigroup, S); map := AntiIsomorphismDualFpSemigroup(T); return SemigroupIsomorphismByImages(T, diff --git a/tst/standard/attributes/properties.tst b/tst/standard/attributes/properties.tst index 442fb94cb..5e2961276 100644 --- a/tst/standard/attributes/properties.tst +++ b/tst/standard/attributes/properties.tst @@ -2004,6 +2004,25 @@ gap> IsNormalInverseSubsemigroup(G, > InverseSemigroup(G.1, rec(acting := true))); false +# IsSelfDualSemigroup +gap> F := FreeSemigroup("a", "b"); + +gap> AssignGeneratorVariables(F); +gap> R := [[a ^ 3, a], [b ^ 2, b], [(a * b) ^ 2, a]]; +[ [ a^3, a ], [ b^2, b ], [ (a*b)^2, a ] ] +gap> S := F / R; + +gap> IsSelfDualSemigroup(S); +false +gap> IsSelfDualSemigroup(FreeBand(3)); +true +gap> S := DualSymmetricInverseMonoid(3); + +gap> IsSelfDualSemigroup(S); +true +gap> IsSelfDualSemigroup(MonogenicSemigroup(7, 8)); +true + # SEMIGROUPS_UnbindVariables gap> Unbind(D); gap> Unbind(I); From ae9cfd93d50b605f62ac0f0c3a8dc00ca8897777 Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Tue, 15 Nov 2022 10:56:27 +0000 Subject: [PATCH 2/3] semigrp: add tests for Reversed for fp semigroup elts --- tst/standard/semigroups/semifp.tst | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/tst/standard/semigroups/semifp.tst b/tst/standard/semigroups/semifp.tst index 16d40b612..f534a0a60 100644 --- a/tst/standard/semigroups/semifp.tst +++ b/tst/standard/semigroups/semifp.tst @@ -2538,6 +2538,40 @@ gap> w := Factorization(F, One(F)); gap> EvaluateWord(GeneratorsOfSemigroup(F), w) = One(F); true +# Reversed for elements of a fp semigroup/monoid +gap> F := FreeSemigroup("a", "b"); + +gap> AssignGeneratorVariables(F); +gap> R := [[a ^ 3, a], [b ^ 2, b], [(a * b) ^ 2, a]]; +[ [ a^3, a ], [ b^2, b ], [ (a*b)^2, a ] ] +gap> S := F / R; + +gap> Reversed(a * b * b); +b^2*a +gap> Reversed(a * b * b * a); +a*b^2*a +gap> Reversed(a * b * b) = b * b * a; +true +gap> Reversed(a * b * b * a) = a * b * b * a; +true +gap> F := FreeMonoid("a", "b"); + +gap> AssignGeneratorVariables(F); +gap> R := ParseRelations([a, b], "a ^ 3=a, b ^ 2= b, (ab) ^ 2= 1"); +[ [ a^3, a ], [ b^2, b ], [ (a*b)^2, ] ] +gap> S := F / R; + +gap> Reversed(a * b * b) = b * b * a; +true +gap> Reversed(a * b * b * a) = a * b * b * a; +true +gap> Reversed(a * b * b); +b^2*a +gap> Reversed(a * b * b * a); +a*b^2*a +gap> Reversed(One(S)); + + # SEMIGROUPS_UnbindVariables gap> Unbind(a); gap> Unbind(b); From b074f90b606d161da411cfe7bfc1bbfecd4fd9c1 Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Tue, 15 Nov 2022 11:24:05 +0000 Subject: [PATCH 3/3] semifp: add tests and doc for AntiIsomorphismDualFpSemigroup --- doc/semifp.xml | 36 ++++++++++++++++++++++++++++++ doc/z-chap06.xml | 1 + tst/standard/semigroups/semifp.tst | 30 +++++++++++++++++++++++++ 3 files changed, 67 insertions(+) diff --git a/doc/semifp.xml b/doc/semifp.xml index 6a5484f91..c16cffdcd 100644 --- a/doc/semifp.xml +++ b/doc/semifp.xml @@ -122,4 +122,40 @@ true]]> <#/GAPDoc> +<#GAPDoc Label="AntiIsomorphismDualFpSemigroup"> + + + + A finitely presented semigroup or monoid. + + AntiIsomorphismDualFpSemigroup returns an anti-isomorphism () from the + finitely presented semigroup S to another finitely presented + semigroup. The range finitely presented semigroup is obtained from S + by reversing the relations of S.

+ + AntiIsomorphismDualFpMonoid works analogously when S is a + finitely presented monoid, and the range of the returned anti-isomorphism + is a finitely presented monoid. + + F := FreeSemigroup("a", "b"); + +gap> AssignGeneratorVariables(F); +gap> R := [[a ^ 3, a], [b ^ 2, b], [(a * b) ^ 2, a]]; +[ [ a^3, a ], [ b^2, b ], [ (a*b)^2, a ] ] +gap> S := F / R; + +gap> map := AntiIsomorphismDualFpSemigroup(S); +MappingByFunction( , + , function( x ) ... end, function( x ) ... end ) +gap> RelationsOfFpSemigroup(Range(map)); +[ [ a^3, a ], [ b^2, b ], [ (b*a)^2, a ] ] +]]> + + +<#/GAPDoc> + diff --git a/doc/z-chap06.xml b/doc/z-chap06.xml index c63803c2a..64855e092 100644 --- a/doc/z-chap06.xml +++ b/doc/z-chap06.xml @@ -428,6 +428,7 @@ gap> AsSemigroup(IsPBRSemigroup, M); <#Include Label = "RZMSNormalization"> <#Include Label = "RMSNormalization"> <#Include Label = "IsomorphismReesZeroMatrixSemigroup"> + <#Include Label = "AntiIsomorphismDualFpSemigroup">

diff --git a/tst/standard/semigroups/semifp.tst b/tst/standard/semigroups/semifp.tst index f534a0a60..50f8856ea 100644 --- a/tst/standard/semigroups/semifp.tst +++ b/tst/standard/semigroups/semifp.tst @@ -2572,6 +2572,36 @@ a*b^2*a gap> Reversed(One(S)); +# AntiIsomorphismDualFpMonoid/Semigroup +gap> F := FreeSemigroup("a", "b"); + +gap> AssignGeneratorVariables(F); +gap> R := [[a ^ 3, a], [b ^ 2, b], [(a * b) ^ 2, a]]; +[ [ a^3, a ], [ b^2, b ], [ (a*b)^2, a ] ] +gap> S := F / R; + +gap> map := AntiIsomorphismDualFpSemigroup(S); +MappingByFunction( , , function( x ) ... end, function( x ) ... end ) +gap> RelationsOfFpSemigroup(Range(map)); +[ [ a^3, a ], [ b^2, b ], [ (b*a)^2, a ] ] +gap> F := FreeMonoid("a", "b"); + +gap> AssignGeneratorVariables(F); +gap> R := [[a ^ 3, One(F)], [b ^ 2, One(F)], [(a * b) ^ 2, One(F)]]; +[ [ a^3, ], [ b^2, ], + [ (a*b)^2, ] ] +gap> S := F / R; + +gap> map := AntiIsomorphismDualFpMonoid(S); +MappingByFunction( + , + , function( x ) ... end, function( x ) ... end ) +gap> RelationsOfFpMonoid(Range(map)); +[ [ a^3, ], [ b^2, ], + [ (b*a)^2, ] ] + # SEMIGROUPS_UnbindVariables gap> Unbind(a); gap> Unbind(b);