Skip to content

Commit

Permalink
semifp: add tests and doc for AntiIsomorphismDualFpSemigroup
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-mitchell committed Nov 15, 2022
1 parent 0eb4ea2 commit ca6f460
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
36 changes: 36 additions & 0 deletions doc/semifp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,40 @@ true]]></Example>
</ManSection>
<#/GAPDoc>

<#GAPDoc Label="AntiIsomorphismDualFpSemigroup">
<ManSection>
<Attr Name="AntiIsomorphismDualFpSemigroup" Arg="S"/>
<Attr Name="AntiIsomorphismDualFpMonoid" Arg="S"/>
<Returns>A finitely presented semigroup or monoid.</Returns>
<Description>
<C>AntiIsomorphismDualFpSemigroup</C> returns an anti-isomorphism (<Ref
Func="MappingByFunction" BookName="ref"/>) from the
finitely presented semigroup <A>S</A> to another finitely presented
semigroup. The range finitely presented semigroup is obtained from <A>S</A>
by reversing the relations of <A>S</A>.<P/>

<C>AntiIsomorphismDualFpMonoid</C> works analogously when <A>S</A> is a
finitely presented monoid, and the range of the returned anti-isomorphism
is a finitely presented monoid.

<Example><![CDATA[
gap> F := FreeSemigroup("a", "b");
<free semigroup on the generators [ 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;
<fp semigroup with 2 generators and 3 relations of length 14>
gap> map := AntiIsomorphismDualFpSemigroup(S);
MappingByFunction( <fp semigroup with 2 generators and
3 relations of length 14>, <fp semigroup with 2 generators and
3 relations of length 14>
, function( x ) ... end, function( x ) ... end )
gap> RelationsOfFpSemigroup(Range(map));
[ [ a^3, a ], [ b^2, b ], [ (b*a)^2, a ] ]
]]></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 @@ -428,6 +428,7 @@ gap> AsSemigroup(IsPBRSemigroup, M);
<#Include Label = "RZMSNormalization">
<#Include Label = "RMSNormalization">
<#Include Label = "IsomorphismReesZeroMatrixSemigroup">
<#Include Label = "AntiIsomorphismDualFpSemigroup">

</Section>

Expand Down
30 changes: 30 additions & 0 deletions tst/standard/semigroups/semifp.tst
Original file line number Diff line number Diff line change
Expand Up @@ -2572,6 +2572,36 @@ a*b^2*a
gap> Reversed(One(S));
<identity ...>
# AntiIsomorphismDualFpMonoid/Semigroup
gap> F := FreeSemigroup("a", "b");
<free semigroup on the generators [ 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;
<fp semigroup with 2 generators and 3 relations of length 14>
gap> map := AntiIsomorphismDualFpSemigroup(S);
MappingByFunction( <fp semigroup with 2 generators and
3 relations of length 14>, <fp semigroup with 2 generators and
3 relations of length 14>, 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");
<free monoid on the generators [ a, b ]>
gap> AssignGeneratorVariables(F);
gap> R := [[a ^ 3, One(F)], [b ^ 2, One(F)], [(a * b) ^ 2, One(F)]];
[ [ a^3, <identity ...> ], [ b^2, <identity ...> ],
[ (a*b)^2, <identity ...> ] ]
gap> S := F / R;
<fp monoid with 2 generators and 3 relations of length 11>
gap> map := AntiIsomorphismDualFpMonoid(S);
MappingByFunction( <fp monoid with 2 generators and 3 relations of length 11>
, <fp monoid with 2 generators and 3 relations of length 11>
, function( x ) ... end, function( x ) ... end )
gap> RelationsOfFpMonoid(Range(map));
[ [ a^3, <identity ...> ], [ b^2, <identity ...> ],
[ (b*a)^2, <identity ...> ] ]
# SEMIGROUPS_UnbindVariables
gap> Unbind(a);
gap> Unbind(b);
Expand Down

0 comments on commit ca6f460

Please sign in to comment.