Semigroups and Monoids

This chapter describes functions for creating semigroups and monoids and determining information about them.

Semigroups
<#Include Label="IsSemigroup"> <#Include Label="Semigroup"> <#Include Label="Subsemigroup">

true
or false.
This operation returns true if the semigroup T is a subsemigroup of the semigroup S and false if it is not. gap> f:=Transformation( [ 5, 6, 7, 1, 4, 3, 2, 7 ] ); Transformation( [ 5, 6, 7, 1, 4, 3, 2, 7 ] ) gap> T:=Semigroup(f);; gap> IsSubsemigroup(FullTransformationSemigroup(4), T); false gap> S:=Semigroup(f);; T:=Semigroup(f^2);; gap> IsSubsemigroup(S, T); true
<#Include Label="SemigroupByGenerators"> <#Include Label="AsSemigroup"> <#Include Label="AsSubsemigroup"> <#Include Label="GeneratorsOfSemigroup"> <#Include Label="IsGeneratorsOfSemigroup"> <#Include Label="FreeSemigroup"> <#Include Label="SemigroupByMultiplicationTable">

Monoids
<#Include Label="IsMonoid"> <#Include Label="Monoid"> <#Include Label="Submonoid"> <#Include Label="MonoidByGenerators"> <#Include Label="AsMonoid"> <#Include Label="AsSubmonoid"> <#Include Label="GeneratorsOfMonoid"> <#Include Label="TrivialSubmonoid"> <#Include Label="FreeMonoid"> <#Include Label="MonoidByMultiplicationTable">

<#Include SYSTEM "invsgp.xml">

Properties of Semigroups

The following functions determine information about semigroups.

<#Include Label="IsRegularSemigroup"> <#Include Label="IsRegularSemigroupElement">

The inverses of an element of a semigroup.
InversesOfSemigroupElement
returns a list of the inverses of the element x in the semigroup S.

An element y in S is an inverse of x if x*y*x=x and y*x*y=y. The element x has an inverse if and only if x is a regular element of S. gap> S:=Semigroup([ Transformation( [ 3, 1, 4, 2, 5, 2, 1, 6, 1 ] ), > Transformation( [ 5, 7, 8, 8, 7, 5, 9, 1, 9 ] ), > Transformation( [ 7, 6, 2, 8, 4, 7, 5, 8, 3 ] ) ]);; gap> x:=Transformation( [ 3, 1, 4, 2, 5, 2, 1, 6, 1 ] );; gap> InversesOfSemigroupElement(S, x); [ ] gap> IsRegularSemigroupElement(S, x); false gap> x:=Transformation( [ 1, 9, 7, 5, 5, 1, 9, 5, 1 ] );; gap> Set(InversesOfSemigroupElement(S, x)); [ Transformation( [ 1, 2, 3, 5, 5, 1, 3, 5, 2 ] ), Transformation( [ 1, 5, 1, 1, 5, 1, 3, 1, 2 ] ), Transformation( [ 1, 5, 1, 2, 5, 1, 3, 2, 2 ] ) ] gap> IsRegularSemigroupElement(S, x); true gap> S:=ReesZeroMatrixSemigroup(Group((1,2,3)), > [ [ (), () ], [ (), 0 ], [ (), (1,2,3) ] ]);; gap> x:=ReesZeroMatrixSemigroupElement(S, 2, (1,2,3), 3);; gap> InversesOfSemigroupElement(S, x); [ (1,(1,2,3),3), (1,(1,3,2),1), (2,(),3), (2,(1,2,3),1) ]
<#Include Label="IsSimpleSemigroup"> <#Include Label="IsZeroSimpleSemigroup"> <#Include Label="IsZeroGroup"> <#Include Label="IsReesCongruenceSemigroup">

true
or false.
A semigroup is an inverse semigroup if every element x has a unique semigroup inverse, that is, a unique element y such that x*y*x=x and y*x*y=y.

A monoid that happens to be an inverse semigroup is called an inverse monoid. gap> S:=Semigroup( Transformation( [ 1, 2, 4, 5, 6, 3, 7, 8 ] ), > Transformation( [ 3, 3, 4, 5, 6, 2, 7, 8 ] ), > Transformation( [ 1, 2, 5, 3, 6, 8, 4, 4 ] ) );; gap> IsInverseSemigroup(S); true
Ideals of semigroups

Ideals of semigroups are the same as ideals of the semigroup when considered as a magma. For documentation on ideals for magmas, see .

<#Include Label="SemigroupIdealByGenerators"> <#Include Label="ReesCongruenceOfSemigroupIdeal"> <#Include Label="IsLeftSemigroupIdeal">
Congruences for semigroups

An equivalence or a congruence on a semigroup is the equivalence or congruence on the semigroup considered as a magma. So, to deal with equivalences and congruences on semigroups, magma functions are used. For documentation on equivalences and congruences for magmas, see .

<#Include Label="IsSemigroupCongruence"> <#Include Label="IsReesCongruence">

Quotients

Given a semigroup and a congruence on the semigroup, one can construct a new semigroup: the quotient semigroup. The following functions deal with quotient semigroups in &GAP;.

<#Include Label="[1]{semiquo}"> <#Include Label="IsQuotientSemigroup"> <#Include Label="HomomorphismQuotientSemigroup"> <#Include Label="QuotientSemigroupPreimage">

Green's Relations
<#Include Label="[1]{semirel}"> <#Include Label="GreensRRelation"> <#Include Label="IsGreensRelation"> <#Include Label="IsGreensClass"> <#Include Label="IsGreensLessThanOrEqual"> <#Include Label="RClassOfHClass"> <#Include Label="EggBoxOfDClass"> <#Include Label="DisplayEggBoxOfDClass"> <#Include Label="GreensRClassOfElement"> <#Include Label="GreensRClasses"> <#Include Label="GroupHClassOfGreensDClass"> <#Include Label="IsGroupHClass"> <#Include Label="IsRegularDClass">

<#Include SYSTEM "reesmat.xml">