Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  chap4.html

  Sprache: HTML
 

 products/Sources/formale Sprachen/GAP/pkg/smallsemi/doc/chap4.html


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>GAP (Smallsemi) - Chapter 4: Functionality</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="generator" content="GAPDoc2HTML" />
<link rel="stylesheet" type="text/css" href="manual.css" />
<script src="manual.js" type="text/javascript"></script>
<script type="text/javascript">overwriteStyle();</script>
</head>
<body class="chap4"  onload="jscontent()">


<div class="chlinktop"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a>  <a href="chap1.html">1</a>  <a href="chap2.html">2</a>  <a href="chap3.html">3</a>  <a href="chap4.html">4</a>  <a href="chapBib.html">Bib</a>  <a href="chapInd.html">Ind</a>  </div>

<div class="chlinkprevnexttop"> <a href="chap0.html">[Top of Book]</a>   <a href="chap0.html#contents">[Contents]</a>    <a href="chap3.html">[Previous Chapter]</a>    <a href="chapBib.html">[Next Chapter]</a>   </div>

<p id="mathjaxlink" class="pcenter"><a href="chap4_mj.html">[MathJax on]</a></p>
<p><a id="X87F1120883F5B4D0" name="X87F1120883F5B4D0"></a></p>
<div class="ChapSects"><a href="chap4.html#X87F1120883F5B4D0">4 <span class="Heading">Functionality</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap4.html#X83F5AF81859D6CBF">4.1 <span class="Heading">Individual Semigroups</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X8538248D78185960">4.1-1 SmallSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X857428A57D3FFACB">4.1-2 IsSmallSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X7EC241FB7985775E">4.1-3 IsSmallSemigroupElt</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X793FF84E80B334D1">4.1-4 RecoverMultiplicationTable</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X813727FD851302B7">4.1-5 SemigroupByMultiplicationTableNC</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X788211A07D67C282">4.1-6 IdSmallSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X79D38A3886C7431D">4.1-7 EquivalenceSmallSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X8078FC78871FA496">4.1-8 InfoSmallsemi</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X841BB74986A73272">4.1-9 UnloadSmallsemiData</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap4.html#X78274024827F306D">4.2 <span class="Heading">Properties of Semigroups</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X86A4F95783A18702">4.2-1 Annihilators</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X7E1195927C454C8A">4.2-2 DiagonalOfMultiplicationTable</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X7DCF7C368665E94D">4.2-3 DisplaySmallSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X86B662117F4C4C7F">4.2-4 IndexPeriod</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X7C8DB14587D1B55A">4.2-5 IsBand</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X7EFDBA687DCDA6FA">4.2-6 IsBrandtSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X81DE11987BB81017">4.2-7 IsCliffordSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X843EFDA4807FDC31">4.2-8 IsCommutativeSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X7AFA23AF819FBF3D">4.2-9 IsCompletelyRegularSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X7D51FD2B7AA3E8DF">4.2-10 IsFullTransformationSemigroupCopy</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X852F29E8795FA489">4.2-11 IsGroupAsSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X835484C481CF3DDD">4.2-12 <span class="Heading">IsIdempotentGenerated</span></a>
</span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X83F1529479D56665">4.2-13 IsInverseSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X7E9261367C8C52C0">4.2-14 IsLeftZeroSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X79D46BAB7E327AD1">4.2-15 IsMonogenicSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X7E4DEECD7CD9886D">4.2-16 IsMonoidAsSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X79FF88207AFC8330">4.2-17 IsMultSemigroupOfNearRing</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X83D4ED237BB929AF">4.2-18 IsNGeneratedSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X87BF19367BA2B9ED">4.2-19 IsNIdempotentSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X780ADE31828F0848">4.2-20 <span class="Heading">IsNilpotentSemigroup</span></a>
</span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X7935C476808C8773">4.2-21 IsOrthodoxSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X7E9B674D781B072C">4.2-22 IsRectangularBand</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X7C4663827C5ACEF1">4.2-23 IsRegularSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X7CB099958658F979">4.2-24 IsRightZeroSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X846FC6247EE31607">4.2-25 IsSelfDualSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X7D3ACD8A7C0AB34C">4.2-26 IsSemigroupWithClosedIdempotents</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X82D229727C6278EC">4.2-27 IsSemigroupWithZero</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X836F4692839F4874">4.2-28 <span class="Heading">IsSimpleSemigroup</span></a>
</span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X85A3F78C864507EB">4.2-29 IsSingularSemigroupCopy</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X85F7E5CD86F0643B">4.2-30 IsZeroGroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X81A1882181B75CC9">4.2-31 IsZeroSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X8193A60F839C064E">4.2-32 IsZeroSimpleSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X81D15723804771E2">4.2-33 MinimalGeneratingSet</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X7D1C336E7B0A059C">4.2-34 NilpotencyDegree</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap4.html#X866B154E7F54AE62">4.3 <span class="Heading">Nilpotent semigroups by coclass</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X819BD88C78976AFD">4.3-1 NilpotentSemigroupsByCoclass</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap4.html#X7D6E81E37E3AAED8">4.4 <span class="Heading">Starred Green's relations</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X84EAD3BC80389059">4.4-1 IsStarRelation</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X7A8059EC848E0A77">4.4-2 RStarRelation</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X7D30CDC386C8816A">4.4-3 RStarClass</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X83E1C16B8247ECBD">4.4-4 RStarClass</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X82A391177D13A7E0">4.4-5 IsStarClass</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X83B9C0417C03A220">4.4-6 RStarClasses</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap4.html#X82F9C36C86006857">4.5 <span class="Heading">Families of Semigroups</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X81DC0FE28043C9B0">4.5-1 AllSmallSemigroups</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X831E543E83DDFDEA">4.5-2 EnumeratorOfSmallSemigroups</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X7F8EF88E7EB417A8">4.5-3 EnumeratorOfSmallSemigroupsByIds</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X7A14F5A58020DCFF">4.5-4 ArgumentsUsedToCreate</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X814BA9F778B06D47">4.5-5 IdsOfSmallSemigroups</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X7BF0DCA5853A5C22">4.5-6 IsEnumeratorOfSmallSemigroups</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X83C27CD97895698A">4.5-7 IsIdSmallSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X803366027F328BC9">4.5-8 IsIteratorOfSmallSemigroups</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X7D6BFDE17A9BEEC3">4.5-9 IteratorOfSmallSemigroups</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X867F3E967CF3AFE9">4.5-10 Nr3NilpotentSemigroups</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X8257C9207DDF2451">4.5-11 NrSmallSemigroups</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X7C71885F7DF31EC4">4.5-12 OneSmallSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X7EACCD1F7DF9DD3C">4.5-13 PositionsOfSmallSemigroupsIn</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X7FAF09BF7CC1C265">4.5-14 PositionsOfSmallSemigroups</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X79AFE7FC81C0DF37">4.5-15 PrecomputedSmallSemisInfo</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X7A63356C85E45F6F">4.5-16 RandomSmallSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X83C6631B7D53AE02">4.5-17 SizesOfSmallSemigroupsIn</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap4.html#X87C50557821D4786">4.5-18 UpToIsomorphism</a></span>
</div></div>
</div>

<h3>4 <span class="Heading">Functionality</span></h3>

<p><a id="X83F5AF81859D6CBF" name="X83F5AF81859D6CBF"></a></p>

<h4>4.1 <span class="Heading">Individual Semigroups</span></h4>

<p>The semigroups of sizes 1 to 8 are available up to isomorphism and anti-isomorphism in <strong class="pkg">Smallsemi</strong>. Every semigroup in the library is identified by its size <span class="SimpleMath">m</span> and a number <span class="SimpleMath">n</span> lying between 1 and the number of semigroups of size <span class="SimpleMath">m</span> (see Table <a href="chap1.html#X7DFB63A97E67C0A1"><span class="RefLink">1.</span></a>). We call the pair <span class="SimpleMath">(m,n)</span> the <em>ID</em> of the semigroup.</p>

<p>In this section we give details about the functions relating to individual semigroups in <strong class="pkg">Smallsemi</strong>. This includes how to access semigroups in the library and how to identify the semigroup in the library equivalent to an arbitrary semigroup (of size 1 to 8).</p>

<p>If you are interested in the properties of a semigroup in the library or would like to find all the semigroups satisfying a given set of properties please see Section <a href="chap4.html#X78274024827F306D"><span class="RefLink">4.2</span></a> or Section <a href="chap4.html#X82F9C36C86006857"><span class="RefLink">4.5</span></a> respectively.</p>

<p><a id="X8538248D78185960" name="X8538248D78185960"></a></p>

<h5>4.1-1 SmallSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SmallSemigroup</code>( <var class="Arg">m</var>, <var class="Arg">n</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SmallSemigroupNC</code>( <var class="Arg">m</var>, <var class="Arg">n</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>returns the semigroup with ID <span class="SimpleMath">(<var class="Arg">m,n</var>)</span> from the library, that is the <var class="Arg">n</var>th semigroup with <var class="Arg">m</var> elements.</p>

<p>In <code class="code">SmallSemigroupNC</code> no check is performed to verify that <var class="Arg">m</var> and <var class="Arg">n</var> are valid arguments.</p>

<p>In <code class="code">SmallSemigroup</code> an error is signalled if the semigroups of size <var class="Arg">m</var> are not classified or if <var class="Arg">n</var> is greater than the number of semigroups with <var class="Arg">m</var> elements.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">SmallSemigroup(8, 1353452);</span>
<small semigroup of size 8>
<span class="GAPprompt">gap></span> <span class="GAPinput">SmallSemigroupNC(5, 1);</span>
<small semigroup of size 5>
<span class="GAPprompt">gap></span> <span class="GAPinput">SmallSemigroupNC(5, 1) = SmallSemigroup(5, 1);</span>
true
</pre></div>

<p><a id="X857428A57D3FFACB" name="X857428A57D3FFACB"></a></p>

<h5>4.1-2 IsSmallSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsSmallSemigroup</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( filter )</td></tr></table></div>
<p>returns <code class="code">true</code> if <var class="Arg">sgrp</var> is a semigroup from the library, that is if it was created using <code class="func">SmallSemigroup</code> (<a href="chap4.html#X8538248D78185960"><span class="RefLink">4.1-1</span></a>). Otherwise <code class="code">false</code> is returned.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">sgrp := RandomSmallSemigroup(5);</span>
<small semigroup of size 5>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsSmallSemigroup(sgrp);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">sgrp := Semigroup(Transformation([1]));;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsSmallSemigroup(sgrp);</span>
false
</pre></div>

<p><a id="X7EC241FB7985775E" name="X7EC241FB7985775E"></a></p>

<h5>4.1-3 IsSmallSemigroupElt</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsSmallSemigroupElt</code>( <var class="Arg">x</var> )</td><td class="tdright">( filter )</td></tr></table></div>
<p>returns <code class="code">true</code> if <var class="Arg">x</var> is an element of a semigroup from the library, and <code class="code">false</code> otherwise.</p>

<p><var class="Arg">IsSmallSemigroupElt</var> is a representation satisfying <var class="Arg">IsPositionalObjectRep</var> and <code class="func">IsMultiplicativeElement</code> (<a href="../../../doc/ref/chap31_mj.html#X797D3B2A7A2B2F53"><span class="RefLink">Reference: IsMultiplicativeElement</span></a>) and <var class="Arg">IsAttributeStoringRep</var>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsSmallSemigroupElt(Transformation([1]));</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">sgrp := RandomSmallSemigroup(5);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsSmallSemigroupElt(Random(sgrp));</span>
true
</pre></div>

<p><a id="X793FF84E80B334D1" name="X793FF84E80B334D1"></a></p>

<h5>4.1-4 RecoverMultiplicationTable</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RecoverMultiplicationTable</code>( <var class="Arg">m</var>, <var class="Arg">n</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RecoverMultiplicationTableNC</code>( <var class="Arg">m</var>, <var class="Arg">n</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>return the multiplication table of the <var class="Arg">n</var>-th semigroup with <var class="Arg">m</var> elements from the library.</p>

<p>If <var class="Arg">m</var> is greater than 8 or <var class="Arg">n</var> greater than the number of semigroups of size <var class="Arg">m</var>, then <code class="code">fail</code> is returned. The NC version does not perform any tests on the input and will most likely run into an error in such a case.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">RecoverMultiplicationTable(10, 2);</span>
fail
<span class="GAPprompt">gap></span> <span class="GAPinput">RecoverMultiplicationTable(1, 2);</span>
fail
<span class="GAPprompt">gap></span> <span class="GAPinput">RecoverMultiplicationTable(2, 1);</span>
[ [ 1, 1 ], [ 1, 1 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">RecoverMultiplicationTable(8, 11111111);</span>
[ [ 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 3 ],
  [ 3, 3, 3, 3, 3, 3, 3, 3 ], [ 1, 1, 1, 4, 4, 4, 4, 1 ],
  [ 1, 2, 3, 4, 5, 6, 7, 1 ], [ 1, 2, 3, 4, 5, 6, 7, 1 ],
  [ 1, 2, 3, 4, 5, 6, 7, 1 ], [ 8, 8, 8, 8, 8, 8, 8, 8 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">RecoverMultiplicationTable(2, 11111111);</span>
fail
</pre></div>

<p>Note that no semigroup is created calling this function but just the table is created. This makes it useful if one wants to perform very simple (i.e. quick in <strong class="pkg">GAP</strong>) tests on a large number of semigroups which can be performed on the multiplication table.</p>

<p>To create a semigroup with the multiplication table obtained by <code class="code">RecoverMultiplicationTable(<var class="Arg">m,n</var>)</code> use the function <code class="func">SmallSemigroup</code> (<a href="chap4.html#X8538248D78185960"><span class="RefLink">4.1-1</span></a>) with arguments <var class="Arg">m,n</var>.</p>

<p><a id="X813727FD851302B7" name="X813727FD851302B7"></a></p>

<h5>4.1-5 SemigroupByMultiplicationTableNC</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SemigroupByMultiplicationTableNC</code>( <var class="Arg">table</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>returns an object with <code class="func">IsSemigroup</code> (<a href="../../../doc/ref/chap51_mj.html#X7B412E5B8543E9B7"><span class="RefLink">Reference: IsSemigroup</span></a>) and multiplication table <var class="Arg">table</var> without checking if the multiplication defined by the table is associative.</p>

<p>If <var class="Arg">table</var> is not associative, this can lead to errors and wrong results or might even crash <strong class="pkg">GAP</strong>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SemigroupByMultiplicationTableNC([[1, 2], [2, 1]]);</span>
<semigroup of size 2, with 2 generators>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsSmallSemigroup(s);</span>
false
</pre></div>

<p>Note that this function is <em>not</em> used to create semigroups when <code class="func">SmallSemigroup</code> (<a href="chap4.html#X8538248D78185960"><span class="RefLink">4.1-1</span></a>) is called. It can be useful in combination with <code class="func">RecoverMultiplicationTable</code> (<a href="chap4.html#X793FF84E80B334D1"><span class="RefLink">4.1-4</span></a>) if one wants to avoid that a semigroup knows it comes from the library.</p>

<p><a id="X788211A07D67C282" name="X788211A07D67C282"></a></p>

<h5>4.1-6 IdSmallSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IdSmallSemigroup</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>returns a pair <code class="code">[m, n]</code> such that <span class="SimpleMath">(m,n)</span> is the ID of a semigroup in <strong class="pkg">Smallsemi</strong> equivalent to <var class="Arg">sgrp</var>. The argument <var class="Arg">sgrp</var> has to be a semigroup of size 8 or less, otherwise an error is signalled.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">sgrp := Semigroup(Transformation([1, 2, 2]),</span>
<span class="GAPprompt">></span> <span class="GAPinput">                     Transformation([1, 2, 3]));;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IdSmallSemigroup(sgrp);</span>
[ 2, 3 ]
</pre></div>

<p><a id="X79D38A3886C7431D" name="X79D38A3886C7431D"></a></p>

<h5>4.1-7 EquivalenceSmallSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ EquivalenceSmallSemigroup</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>returns a mapping <code class="code">map</code> from <var class="Arg">sgrp</var> to the semigroup in <strong class="pkg">Smallsemi</strong> equivalent to <var class="Arg">sgrp</var>. The mapping is an isomorphism if such exists and an anti-isomorphism otherwise. The argument <var class="Arg">sgrp</var> has to be a semigroup of size 8 or less, otherwise an error is signalled.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">sgrp := Semigroup(Transformation([1, 2, 2]),</span>
<span class="GAPprompt">></span> <span class="GAPinput">                     Transformation([1, 2, 3]));;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">EquivalenceSmallSemigroup(sgrp);</span>
SemigroupHomomorphismByImages ( Monoid( [ Transformation( [ 1, 2, 2 ] )
 ] )-><small semigroup of size 2>)
</pre></div>

<p><a id="X8078FC78871FA496" name="X8078FC78871FA496"></a></p>

<h5>4.1-8 InfoSmallsemi</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ InfoSmallsemi</code></td><td class="tdright">( info class )</td></tr></table></div>
<p>is the info class (see <a href="../../../doc/ref/chap7_mj.html#X7A9C902479CB6F7C"><span class="RefLink">Reference: Info Functions</span></a>) of <strong class="pkg">Smallsemi</strong>. The info level is initially set to 1 which triggers a message whenever data is loaded into <strong class="pkg">GAP</strong>.</p>

<p><a id="X841BB74986A73272" name="X841BB74986A73272"></a></p>

<h5>4.1-9 UnloadSmallsemiData</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ UnloadSmallsemiData</code>( <var class="Arg">use_later</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>deletes most or all of the data from the <strong class="pkg">GAP</strong> workspace that was loaded by <strong class="pkg">Smallsemi</strong>.</p>

<p>If the boolean <var class="Arg">use_later</var> is <code class="code">false</code> all data loaded by <strong class="pkg">Smallsemi</strong> is deleted from the workspace, in which case <strong class="pkg">Smallsemi</strong> is not guaranteed to work properly without restarting your <strong class="pkg">GAP</strong> session.</p>

<p>If the boolean <var class="Arg">use_later</var> is <code class="code">true</code> only the recoverable data is deleted. This leaves roughly 10 MB of data in the workspace.</p>

<p><a id="X78274024827F306D" name="X78274024827F306D"></a></p>

<h4>4.2 <span class="Heading">Properties of Semigroups</span></h4>

<p>In this section we detail the <strong class="pkg">GAP</strong> functions that can be used to determine whether a small semigroup satisfies a certain property. Let <var class="Arg">S</var> be a semigroup. Then</p>


<ul>
<li><p><var class="Arg">S</var> is a <em>left zero semigroup</em> if <var class="Arg">xy=x</var> for all <var class="Arg">x,y</var> in <var class="Arg">S</var>.</p>

</li>
<li><p><var class="Arg">S</var> is a <em>right zero semigroup</em> if <var class="Arg">xy=y</var> for all <var class="Arg">x,y</var> in <var class="Arg">S</var>.</p>

</li>
<li><p><var class="Arg">S</var> is <em>commutative</em> if <var class="Arg">xy=yx</var> for all <var class="Arg">x,y</var> in <var class="Arg">S</var>.</p>

</li>
<li><p><var class="Arg">S</var> is <em>simple</em> if it has no proper two-sided ideals.</p>

</li>
<li><p><var class="Arg">S</var> is <em>zero simple</em> if the only 2-sided ideals are <var class="Arg">{0}</var> and <var class="Arg">S</var>.</p>

</li>
<li><p><var class="Arg">S</var> is <em>regular</em> if for all <var class="Arg">x</var> in <var class="Arg">S</var> there exists <var class="Arg">y</var> in <var class="Arg">S</var> such that <var class="Arg">xyx=x</var>.</p>

</li>
<li><p><var class="Arg">S</var> is <em>completely regular</em> if every element of <var class="Arg">S</var> lies in a subgroup.</p>

</li>
<li><p><var class="Arg">S</var> is an <em>inverse semigroup</em> if every element <var class="Arg">x</varin <var class="Arg">S</var> has a unique semigroup inverse, that is, a unique element <var class="Arg">y</var> such that <var class="Arg">xyx=x</var> and <var class="Arg">yxy=y</var>.</p>

</li>
<li><p><var class="Arg">S</var> is a <em>Clifford semigroup</em> if it is a regular semigroup whose idempotents are central, that is, for all <var class="Arg">e,x</var> in <var class="Arg">S</var> where <var class="Arg">e^2=e</var> we have that <var class="Arg">ex=xe</var>.</p>

</li>
<li><p><var class="Arg">S</var> is a <em>band</em> if every element is an idempotent, that is, <var class="Arg">x^2=x</var> for all <var class="Arg">x</var> in <var class="Arg">S</var>.</p>

</li>
<li><p><var class="Arg">S</var> is a <em>Brandt semigroup</em> if it is inverse and zero simple.</p>

</li>
<li><p><var class="Arg">S</var> is a <em>rectangular band</em> if for all <var class="Arg">x,y,z</var> in <var class="Arg">S</var> we have that <var class="Arg">x^2=x</var> and <var class="Arg">xyz=xz</var>.</p>

</li>
<li><p><var class="Arg">S</var> is a <em>semiband</em> if it is generated by its idempotent elements, that is, elements satisfying <var class="Arg">x^2=x</var>.</p>

</li>
<li><p><var class="Arg">S</var> is an <em>orthodox semigroup</em> if it is regular and its idempotents (elements satisfying <var class="Arg">x^2=x</var>) form a subsemigroup.</p>

</li>
<li><p><var class="Arg">S</var> is a <em>zero semigroup</em> if there exists an element <var class="Arg">0</var> in <var class="Arg">S</var> such that <var class="Arg">xy=0</var> for all <var class="Arg">x,y</var> in <var class="Arg">S</var>.</p>

</li>
<li><p><var class="Arg">S</var> is a <em>zero group</em> if there exists an element <var class="Arg">0</varin <var class="Arg">S</var> such that <var class="Arg">S</var> without <var class="Arg">0</var> is a group and for all <var class="Arg">x</var> in <var class="Arg">S</var> we have that <var class="Arg">x0=0x=0</var>.</p>

</li>
</ul>
<p>The <strong class="pkg">MONOID</strong> package was used to determined which semigroups in the library satisfy the properties above. All of the resulting information is stored in the library.</p>

<p><a id="X86A4F95783A18702" name="X86A4F95783A18702"></a></p>

<h5>4.2-1 Annihilators</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Annihilators</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>returns the set of annihilators of <var class="Arg">sgrp</var> if <var class="Arg">sgrp</var> contains a zero element and <code class="code">fail</code> otherwise.</p>

<p>An element <span class="SimpleMath">x</span> in a semigroup with zero <span class="SimpleMath">z</span> is an <em>annihilator</em> if <span class="SimpleMath">xy=yx=z</span> for every element <span class="SimpleMath">y</span> in the semigroup.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(5, 6);</span>
<small semigroup of size 5>
<span class="GAPprompt">gap></span> <span class="GAPinput">Annihilators(s);</span>
[ s1, s2 ]
</pre></div>

<p><a id="X7E1195927C454C8A" name="X7E1195927C454C8A"></a></p>

<h5>4.2-2 DiagonalOfMultiplicationTable</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DiagonalOfMultiplicationTable</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>returns the diagonal of the multiplication table of the semigroup <var class="Arg">sgrp</var>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(8, 10101);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">DiagonalOfMultiplicationTable(s);</span>
[ 1, 1, 1, 1, 1, 1, 1, 1 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(7, 10101);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">DiagonalOfMultiplicationTable(s);</span>
[ 1, 1, 1, 1, 1, 1, 1 ]
</pre></div>

<p><a id="X7DCF7C368665E94D" name="X7DCF7C368665E94D"></a></p>

<h5>4.2-3 DisplaySmallSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DisplaySmallSemigroup</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>displays all the information about the small semigroup <var class="Arg">sgrp</var> that is stored in the library and its Green's classes and idempotents.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(6, 3838);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">DisplaySmallSemigroup(s);</span>
IsBand:                              false
IsBrandtSemigroup:                   false
IsCommutative:                       false
IsCompletelyRegularSemigroup:        false
IsFullTransformationSemigroupCopy:   false
IsGroupAsSemigroup:                  false
IsIdempotentGenerated:               false
IsInverseSemigroup:                  false
IsMonogenicSemigroup:                false
IsMonoidAsSemigroup:                 false
IsMultSemigroupOfNearRing:           false
IsOrthodoxSemigroup:                 false
IsRectangularBand:                   false
IsRegularSemigroup:                  false
IsSelfDualSemigroup:                 false
IsSemigroupWithClosedIdempotents:    true
IsSimpleSemigroup:                   false
IsSingularSemigroupCopy:             false
IsZeroSemigroup:                     false
IsZeroSimpleSemigroup:               false
MinimalGeneratingSet:                [ s3, s4, s5, s6 ]
Idempotents:                         [ s1, s5, s6 ]
GreensRClasses:                      [ {s1}, {s2}, {s3}, {s4}, {s5}, {s6} ]
GreensLClasses:                      [ {s1}, {s2}, {s3}, {s4}, {s6} ]
GreensHClasses:                      [ {s1}, {s2}, {s3}, {s4}, {s5}, {s6} ]
GreensDClasses:                      [ {s1}, {s2}, {s3}, {s4}, {s6} ]
</pre></div>

<p><a id="X86B662117F4C4C7F" name="X86B662117F4C4C7F"></a></p>

<h5>4.2-4 IndexPeriod</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IndexPeriod</code>( <var class="Arg">x</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>returns the minimum numbers <var class="Arg">m, r</var> such that <var class="Arg">x^{m+r}=x^m</var>; known as the index and period of the small semigroup element <var class="Arg">x</var>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(5, 116);</span>
<small semigroup of size 5>
<span class="GAPprompt">gap></span> <span class="GAPinput">x := Elements(s)[3];</span>
s3
<span class="GAPprompt">gap></span> <span class="GAPinput">IndexPeriod(x);</span>
[ 2, 1 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">x ^ 3 = x ^ 2;</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">x ^ 2 = x ^ 1;</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">x ^ 3 = x ^ 1;</span>
false
</pre></div>

<p><a id="X7C8DB14587D1B55A" name="X7C8DB14587D1B55A"></a></p>

<h5>4.2-5 IsBand</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsBand</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>returns <code class="keyw">true</code> if the small semigroup <var class="Arg">sgrp</var> is a band and <code class="keyw">false</code> otherwise.</p>

<p>A semigroup <var class="Arg">sgrp</var> is a <em>band</em> if every element is an idempotent, that is, <var class="Arg">x^2=x</var> for all <var class="Arg">x</var> in <var class="Arg">sgrp</var>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(5, 519);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsBand(s);</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">s := OneSmallSemigroup(5, IsBand, true);</span>
<small semigroup of size 5>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsBand(s);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IdSmallSemigroup(s);</span>
[ 5, 1010 ]
</pre></div>

<p><a id="X7EFDBA687DCDA6FA" name="X7EFDBA687DCDA6FA"></a></p>

<h5>4.2-6 IsBrandtSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsBrandtSemigroup</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>returns <code class="keyw">true</code> if the small semigroup <var class="Arg">sgrp</var> is a Brandt semigroup and <code class="keyw">false</code> otherwise.</p>

<p>A finite semigroup <var class="Arg">sgrp</var> is a <em>Brandt semigroup</em> if it is inverse and zero simple.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(5, 519);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsBrandtSemigroup(s);</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">s := OneSmallSemigroup(5, IsBrandtSemigroup, true);</span>
<small semigroup of size 5>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsBrandtSemigroup(s);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IdSmallSemigroup(s);</span>
[ 5, 149 ]
</pre></div>

<p><a id="X81DE11987BB81017" name="X81DE11987BB81017"></a></p>

<h5>4.2-7 IsCliffordSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsCliffordSemigroup</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>returns <code class="keyw">true</code> if the small semigroup <var class="Arg">sgrp</var> is a Clifford semigroup and <code class="keyw">false</code> otherwise.</p>

<p>A semigroup <var class="Arg">sgrp</var> is a <em>Clifford semigroup</em> if it is a regular semigroup whose idempotents are central, that is, for all <var class="Arg">e,x</var> in <var class="Arg">sgrp</var> where <var class="Arg">e^2=e</var> we have that <var class="Arg">ex=xe</var>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(5, 519);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsBand(s);</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">s := OneSmallSemigroup(5, IsBand, true);</span>
<small semigroup of size 5>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsBand(s);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IdSmallSemigroup(s);</span>
[ 5, 1010 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(5, 519);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsCliffordSemigroup(s);</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">s := OneSmallSemigroup(5, IsCliffordSemigroup, true);</span>
<small semigroup of size 5>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsCliffordSemigroup(s);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IdSmallSemigroup(s);</span>
[ 5, 148 ]
</pre></div>

<p><a id="X843EFDA4807FDC31" name="X843EFDA4807FDC31"></a></p>

<h5>4.2-8 IsCommutativeSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsCommutativeSemigroup</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsCommutative</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>return <code class="keyw">true</code> if the small semigroup <var class="Arg">sgrp</var> is commutative and <code class="keyw">false</code> otherwise.</p>

<p>A semigroup <var class="Arg">sgrp</var> is <em>commutative</em> if <var class="Arg">xy=yx</var> for all <var class="Arg">x,y</var> in <var class="Arg">sgrp</var>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(6, 871);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsCommutativeSemigroup(s);</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">s := OneSmallSemigroup(5, IsCommutative, true);</span>
<small semigroup of size 5>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsCommutativeSemigroup(s);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IsCommutative(s);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IdSmallSemigroup(s);</span>
[ 5, 1 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">s := OneSmallSemigroup(5, IsCommutativeSemigroup, true);</span>
<small semigroup of size 5>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsCommutativeSemigroup(s);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IsCommutative(s);</span>
true
</pre></div>

<p><a id="X7AFA23AF819FBF3D" name="X7AFA23AF819FBF3D"></a></p>

<h5>4.2-9 IsCompletelyRegularSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsCompletelyRegularSemigroup</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>returns <code class="keyw">true</code> if the semigroup <var class="Arg">sgrp</var> is completely regular and <code class="keyw">false</code> otherwise.</p>

<p>A semigroup is <em>completely regular</em> if every element is contained in a subgroup.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(6, 13131);</span>
<small semigroup of size 6>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsCompletelyRegularSemigroup(s);</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">s := OneSmallSemigroup(6, IsCompletelyRegularSemigroup, true);</span>
<small semigroup of size 6>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsCompletelyRegularSemigroup(s);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IdSmallSemigroup(s);</span>
[ 6, 3164 ]
</pre></div>

<p><a id="X7D51FD2B7AA3E8DF" name="X7D51FD2B7AA3E8DF"></a></p>

<h5>4.2-10 IsFullTransformationSemigroupCopy</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsFullTransformationSemigroupCopy</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>returns <code class="keyw">true</code> if the semigroup <var class="Arg">sgrp</var> is isomorphic to a full transformation semigroup and <code class="keyw">false</code> otherwise.</p>

<p>The size of the full transformation semigroup on an <var class="Arg">n</var> element set is <span class="SimpleMath">n^n</span> and so there are only two semigroup in the library that have this property.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(1, 1);</span>
<small semigroup of size 1>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsFullTransformationSemigroupCopy(s);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">s := OneSmallSemigroup(4, IsFullTransformationSemigroupCopy, true);</span>
<small semigroup of size 4>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsFullTransformationSemigroupCopy(s);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IdSmallSemigroup(s);</span>
[ 4, 96 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">s := OneSmallSemigroup(6, IsFullTransformationSemigroupCopy, true);</span>
fail
</pre></div>

<p><a id="X852F29E8795FA489" name="X852F29E8795FA489"></a></p>

<h5>4.2-11 IsGroupAsSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsGroupAsSemigroup</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>returns <code class="keyw">true</code> if the small semigroup <var class="Arg">sgrp</var> is mathematically a group, and returns <code class="keyw">false</code> otherwise. Note that no small semigroup can lie in the category <code class="func">IsGroup</code> (<a href="../../../doc/ref/chap39_mj.html#X7939B3177BBD61E4"><span class="RefLink">Reference: IsGroup</span></a>).</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(7, 7);</span>
<small semigroup of size 7>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsGroupAsSemigroup(s);</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(4, 37);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsGroupAsSemigroup(s);</span>
true
</pre></div>

<p><a id="X835484C481CF3DDD" name="X835484C481CF3DDD"></a></p>

<h5>4.2-12 <span class="Heading">IsIdempotentGenerated</span></h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsIdempotentGenerated</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsSemiband</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>returns <code class="keyw">true</code> if the semigroup <var class="Arg">sgrp</var> is a semiband and <code class="keyw">false</code> otherwise.</p>

<p>A semigroup <var class="Arg">sgrp</var> is <em>idempotent generated</em> or equivalently a <em>semiband</em> if it is generated by its idempotent elements, i.e elements satisfying <var class="Arg">x^2=x</var>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(3, 13);</span>
<small semigroup of size 3>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsIdempotentGenerated(s);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">s := OneSmallSemigroup(3, IsIdempotentGenerated, false);</span>
<small semigroup of size 3>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsIdempotentGenerated(s);</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">IdSmallSemigroup(s);</span>
[ 3, 1 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">s := OneSmallSemigroup(4, IsIdempotentGenerated, true,</span>
<span class="GAPprompt">></span> <span class="GAPinput">IsSingularSemigroupCopy, true);</span>
fail
<span class="GAPprompt">gap></span> <span class="GAPinput">s := OneSmallSemigroup(2, IsIdempotentGenerated, true,</span>
<span class="GAPprompt">></span> <span class="GAPinput">IsSingularSemigroupCopy, true);</span>
<small semigroup of size 2>
</pre></div>

<p><a id="X83F1529479D56665" name="X83F1529479D56665"></a></p>

<h5>4.2-13 IsInverseSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsInverseSemigroup</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>returns <code class="keyw">true</code> if the semigroup <var class="Arg">sgrp</var> is an inverse semigroup and <code class="keyw">false</code> otherwise.</p>

<p>A semigroup <var class="Arg">sgrp</var> is an <em>inverse semigroup</em> if every element <var class="Arg">x</var> in <var class="Arg">sgrp</var> has a unique semigroup inverse, that is, a unique element <var class="Arg">y</var> such that <var class="Arg">xyx=x</var> and <var class="Arg">yxy=y</var>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := OneSmallSemigroup(7, IsInverseSemigroup, true);</span>
<small semigroup of size 7>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsInverseSemigroup(s);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(7, 101324);</span>
<small semigroup of size 7>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsInverseSemigroup(s);</span>
false
</pre></div>

<p><a id="X7E9261367C8C52C0" name="X7E9261367C8C52C0"></a></p>

<h5>4.2-14 IsLeftZeroSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsLeftZeroSemigroup</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>returns <code class="keyw">true</code> if the semigroup <var class="Arg">sgrp</var> is a left zero semigroup and <code class="keyw">false</code> otherwise.</p>

<p>A semigroup <var class="Arg">sgrp</var> is a <em>left zero semigroup</em> if <var class="Arg">xy=x</var> for all <var class="Arg">x,y</var> in <var class="Arg">sgrp</var>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(5, 438);</span>
<small semigroup of size 5>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsLeftZeroSemigroup(s);</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(5, 1141);</span>
<small semigroup of size 5>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsLeftZeroSemigroup(s);</span>
true
</pre></div>

<p><a id="X79D46BAB7E327AD1" name="X79D46BAB7E327AD1"></a></p>

<h5>4.2-15 IsMonogenicSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsMonogenicSemigroup</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>returns <code class="keyw">true</code> if the small semigroup <var class="Arg">sgrp</var> is generated by a single element and <code class="keyw">false</code> otherwise.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := RandomSmallSemigroup(7);</span>
<small semigroup of size 7>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsMonogenicSemigroup(s);</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">s := OneSmallSemigroup(7, IsMonogenicSemigroup, true);</span>
<small semigroup of size 7>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsMonogenicSemigroup(s);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">MinimalGeneratingSet(s);</span>
[ s7 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(7, 406945);</span>
<small semigroup of size 7>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsMonogenicSemigroup(s);</span>
false
</pre></div>

<p><a id="X7E4DEECD7CD9886D" name="X7E4DEECD7CD9886D"></a></p>

<h5>4.2-16 IsMonoidAsSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsMonoidAsSemigroup</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>returns <code class="keyw">true</code> if the semigroup <var class="Arg">sgrp</var> is a monoid (i.e. has an identity element) and <code class="keyw">false</code> otherwise.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(4, 126);</span>
<small semigroup of size 4>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsMonoidAsSemigroup(s);</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">s := OneSmallSemigroup(4, IsMonoidAsSemigroup, true);</span>
<small semigroup of size 4>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsMonoidAsSemigroup(s);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">One(s);</span>
s1
<span class="GAPprompt">gap></span> <span class="GAPinput">IdSmallSemigroup(s);</span>
[ 4, 7 ]
</pre></div>

<p><a id="X79FF88207AFC8330" name="X79FF88207AFC8330"></a></p>

<h5>4.2-17 IsMultSemigroupOfNearRing</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsMultSemigroupOfNearRing</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>returns <code class="keyw">true</code> if <var class="Arg">sgrp</var> is isomorphic (or anti-isomorphic?) to the multiplicative semigroup of a near-ring and <code class="keyw">false</code> otherwise.</p>

<p>Those semigroups in the library that have this property were identified using the <strong class="pkg">Sonata</strong> package.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := OneSmallSemigroup(7, IsMultSemigroupOfNearRing, true);</span>
<small semigroup of size 7>
<span class="GAPprompt">gap></span> <span class="GAPinput">IdSmallSemigroup(s);</span>
[ 7, 1 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">IsMultSemigroupOfNearRing(s);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(2, 2);</span>
<small semigroup of size 2>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsMultSemigroupOfNearRing(s);</span>
false
</pre></div>

<p><a id="X83D4ED237BB929AF" name="X83D4ED237BB929AF"></a></p>

<h5>4.2-18 IsNGeneratedSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsNGeneratedSemigroup</code>( <var class="Arg">sgrp</var>, <var class="Arg">n</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>returns <code class="keyw">true</code> if the least size of a generating set for the small semigroup <var class="Arg">sgrp</var> is <var class="Arg">n</var> and <code class="keyw">false</code> otherwise.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(7, 760041);</span>
<small semigroup of size 7>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsNGeneratedSemigroup(s, 4);</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">IsNGeneratedSemigroup(s, 3);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">MinimalGeneratingSet(s);</span>
[ s3, s5, s7 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">s := OneSmallSemigroup(4, x -> Length(MinimalGeneratingSet(x)), 4);</span>
<small semigroup of size 4>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsNGeneratedSemigroup(s, 4);</span>
true
</pre></div>

<p><a id="X87BF19367BA2B9ED" name="X87BF19367BA2B9ED"></a></p>

<h5>4.2-19 IsNIdempotentSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsNIdempotentSemigroup</code>( <var class="Arg">sgrp</var>, <var class="Arg">n</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>returns <code class="keyw">true</code> if the small semigroup <var class="Arg">sgrp</var> has <var class="Arg">n</var> idempotents and <code class="keyw">false</code> otherwise.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(4, 75);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsNIdempotentSemigroup(s, 1);</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">IsNIdempotentSemigroup(s, 2);</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">IsNIdempotentSemigroup(s, 3);</span>
true
</pre></div>

<p><a id="X780ADE31828F0848" name="X780ADE31828F0848"></a></p>

<h5>4.2-20 <span class="Heading">IsNilpotentSemigroup</span></h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsNilpotentSemigroup</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsNilpotent</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>returns <code class="keyw">true</code> if the small semigroup <var class="Arg">sgrp</var> is nilpotent and <code class="keyw">false</code> otherwise.</p>

<p>A semigroup is <em>nilpotent</em> if it has a zero element and every element to some power equals this zero.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(5, 116);</span>
<small semigroup of size 5>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsNilpotentSemigroup(s);</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(7, 673768);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsNilpotentSemigroup(s);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(7, 657867);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsNilpotent(s);</span>
true
</pre></div>

<p><a id="X7935C476808C8773" name="X7935C476808C8773"></a></p>

<h5>4.2-21 IsOrthodoxSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsOrthodoxSemigroup</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>returns <code class="keyw">true</code> if the semigroup <var class="Arg">sgrp</var> is orthodox and <code class="keyw">false</code> otherwise.</p>

<p>A semigroup is <em>orthodox</em> if it is regular and its idempotents form a subsemigroup.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(6, 15858);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsSemigroupWithClosedIdempotents(s);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IsRegularSemigroup(s);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IsOrthodoxSemigroup(s);</span>
true
</pre></div>

<p><a id="X7E9B674D781B072C" name="X7E9B674D781B072C"></a></p>

<h5>4.2-22 IsRectangularBand</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsRectangularBand</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>returns <code class="keyw">true</code> if the small semigroup <var class="Arg">sgrp</var> is a rectangular band and <code class="keyw">false</code> otherwise.</p>

<p>A semigroup <var class="Arg">sgrp</var> is a <em>rectangular band</em> if for all <var class="Arg">x,y,z</var> in <var class="Arg">sgrp</var> we have that <var class="Arg">x^2=x</var> and <var class="Arg">xyz=xz</var>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(5, 216);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsRectangularBand(s);</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(6, 15854);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsRectangularBand(s);</span>
true
</pre></div>

<p><a id="X7C4663827C5ACEF1" name="X7C4663827C5ACEF1"></a></p>

<h5>4.2-23 IsRegularSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsRegularSemigroup</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>returns <code class="keyw">true</code> if the small semigroup <var class="Arg">sgrp</var> is a regular semigroup and <code class="keyw">false</code> otherwise.</p>

<p>A semigroup <var class="Arg">sgrp</var> is <em>regular</em> if for all <var class="Arg">x</var> in <var class="Arg">sgrp</var> there exists <var class="Arg">y</var> in <var class="Arg">sgrp</var> such that <var class="Arg">xyx=x</var>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(3, 10);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsRegularSemigroup(s);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(3, 1);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsRegularSemigroup(s);</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">s := OneSmallSemigroup(4, IsFullTransformationSemigroupCopy, true);</span>
<small semigroup of size 4>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsRegularSemigroup(s);</span>
true
</pre></div>

<p><a id="X7CB099958658F979" name="X7CB099958658F979"></a></p>

<h5>4.2-24 IsRightZeroSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsRightZeroSemigroup</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>returns <code class="keyw">false</code> for any small semigroup <var class="Arg">sgrp</var> since the library contains only left zero semigroups.</p>

<p>A semigroup <var class="Arg">sgrp</var> is a <em>right zero semigroup</em> if <var class="Arg">xy=y</var> for all <var class="Arg">x,y</var> in <var class="Arg">sgrp</var>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(5, 438);</span>
<small semigroup of size 5>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsRightZeroSemigroup(s);</span>
false
</pre></div>

<p><a id="X846FC6247EE31607" name="X846FC6247EE31607"></a></p>

<h5>4.2-25 IsSelfDualSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsSelfDualSemigroup</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>returns <code class="keyw">true</code> if the semigroup <var class="Arg">sgrp</var> is self dual and <code class="keyw">false</code> otherwise.</p>

<p>A semigroup is <em>self dual</em> if it is isomorphic to its dual, that is, the semigroup <var class="Arg">t</var> with multiplication <var class="Arg">*</var> defined by <var class="Arg">x*y=yx</var> where <var class="Arg">yx</var> denotes the product in <var class="Arg">sgrp</var>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(5, 116);</span>
<small semigroup of size 5>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsSelfDualSemigroup(s);</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">s := RandomSmallSemigroup(5, IsSelfDualSemigroup, true);</span>
<small semigroup of size 5>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsSelfDualSemigroup(s);</span>
true
</pre></div>

<p><a id="X7D3ACD8A7C0AB34C" name="X7D3ACD8A7C0AB34C"></a></p>

<h5>4.2-26 IsSemigroupWithClosedIdempotents</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsSemigroupWithClosedIdempotents</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>returns <code class="keyw">true</code> if the idempotent elements of the semigroup <var class="Arg">sgrp</varform a subsemigroup and <code class="keyw">false</code> otherwise.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(5, 677);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsSemigroupWithClosedIdempotents(s);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(5, 659);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsSemigroupWithClosedIdempotents(s);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(5, 327);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsSemigroupWithClosedIdempotents(s);</span>
false
</pre></div>

<p><a id="X82D229727C6278EC" name="X82D229727C6278EC"></a></p>

<h5>4.2-27 IsSemigroupWithZero</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsSemigroupWithZero</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>returns <code class="keyw">true</code> if the semigroup <var class="Arg">sgrp</var> has a zero element and false otherwise.</p>

<p>An element <span class="SimpleMath">z</span> is a <em>zero</em> if <span class="SimpleMath">z*x=x*z=z</span> for all <span class="SimpleMath">x</span> in the semigroup.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(5, 1);</span>
<small semigroup of size 5>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsSemigroupWithZero(s);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(4, 26);</span>
<small semigroup of size 4>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsSemigroupWithZero(s);</span>
false
</pre></div>

<p><a id="X836F4692839F4874" name="X836F4692839F4874"></a></p>

<h5>4.2-28 <span class="Heading">IsSimpleSemigroup</span></h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsSimpleSemigroup</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsCompletelySimpleSemigroup</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>return <code class="keyw">true</code> if the semigroup <var class="Arg">sgrp</var> is simple or completely simple and <code class="keyw">false</code> otherwise.</p>

<p>A semigroup is <em>simple</em> if it has no proper 2-sided ideals. A semigroup is <em>completely simple</em> if it is simple and possesses minimal left and right ideals.</p>

<p>A finite semigroup is simple if and only if it is completely simple.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(7, 835080);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsSimpleSemigroup(s);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IsCompletelySimpleSemigroup(s);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(7, 208242);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsSimpleSemigroup(s);</span>
false
</pre></div>

<p><a id="X85A3F78C864507EB" name="X85A3F78C864507EB"></a></p>

<h5>4.2-29 IsSingularSemigroupCopy</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsSingularSemigroupCopy</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>returns <code class="keyw">true</code> if the semigroup <var class="Arg">sgrp</var> is isomorphic to a semigroup of singular (i.e. non-invertible) mappings on a finite set and <code class="keyw">false</code> otherwise.</p>

<p>The size of this semigroup on an <span class="SimpleMath">n</span> element set is <span class="SimpleMath">n^n-n!</span> and so there is only one semigroup in the library that has this property.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(1, 1);</span>
<small semigroup of size 1>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsSingularSemigroupCopy(s);</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">s := OneSmallSemigroup(2, IsSingularSemigroupCopy, true);</span>
<small semigroup of size 2>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsSingularSemigroupCopy(s);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IdSmallSemigroup(s);</span>
[ 2, 4 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">s := OneSmallSemigroup(4, IsSingularSemigroupCopy, true);</span>
fail
</pre></div>

<p><a id="X85F7E5CD86F0643B" name="X85F7E5CD86F0643B"></a></p>

<h5>4.2-30 IsZeroGroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsZeroGroup</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>returns <code class="keyw">true</code> if the semigroup <var class="Arg">sgrp</var> is a zero group and <code class="keyw">false</code> otherwise.</p>

<p>The semigroup <var class="Arg">sgrp</var> is a <em>zero group</em> if there exists an element <span class="SimpleMath">z</span> in <var class="Arg">sgrp</var> such that <var class="Arg">sgrp</var> without <span class="SimpleMath">z</span> is a group and for all <span class="SimpleMath">x</span> in <span class="SimpleMath">sgrp</span> we have that <span class="SimpleMath">xz=zx=z</span>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">g := Group((1, 2), (3, 4));</span>
Group([ (1,2), (3,4) ])
<span class="GAPprompt">gap></span> <span class="GAPinput">IdSmallSemigroup(g);</span>
[ 4, 7 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">s := Range(InjectionZeroMagma(g));</span>
<Group([ (1,2), (3,4) ]) with 0 adjoined>
<span class="GAPprompt">gap></span> <span class="GAPinput">IdSmallSemigroup(s);</span>
[ 5, 149 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">IsZeroGroup(s);</span>
true
</pre></div>

<p><a id="X81A1882181B75CC9" name="X81A1882181B75CC9"></a></p>

<h5>4.2-31 IsZeroSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsZeroSemigroup</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>returns <code class="keyw">true</code> if the semigroup <var class="Arg">sgrp</var> is a zero semigroup and <code class="keyw">false</code> otherwise.</p>

<p>The semigroup <var class="Arg">sgrp</var> is a <em>zero semigroup</em> if there exists an element <span class="SimpleMath">z</span> in <var class="Arg">sgrp</var> such that <span class="SimpleMath">xy=z</span> for all <span class="SimpleMath">x,y</span> in <var class="Arg">sgrp</var>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := OneSmallSemigroup(5, IsZeroSemigroup, true);</span>
<small semigroup of size 5>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsZeroSemigroup(s);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IdSmallSemigroup(s);</span>
[ 5, 1 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">s := OneSmallSemigroup(5, IsZeroSemigroup, false);</span>
<small semigroup of size 5>
<span class="GAPprompt">gap></span> <span class="GAPinput">IdSmallSemigroup(s);</span>
[ 5, 2 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">IsZeroSemigroup(s);</span>
false
</pre></div>

<p>Note that for each size the unique zero semigroup is always the first semigroup of this size in the library.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsZeroSemigroup(SmallSemigroup(6, 1));</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IsZeroSemigroup(SmallSemigroup(7, 1));</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IsZeroSemigroup(SmallSemigroup(8, 1));</span>
true
</pre></div>

<p><a id="X8193A60F839C064E" name="X8193A60F839C064E"></a></p>

<h5>4.2-32 IsZeroSimpleSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsZeroSimpleSemigroup</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>return <code class="keyw">true</code> if the semigroup <var class="Arg">sgrp</var> is zero simple and <code class="keyw">false</code> otherwise.</p>

<p>A semigroup <var class="Arg">sgrp</var> is <em>zero simple</em> if the only 2-sided ideals are the zero <var class="Arg">{0}</var> and <var class="Arg">sgrp</var>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(7, 519799);</span>
<small semigroup of size 7>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsZeroSimpleSemigroup(s);</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">s := RandomSmallSemigroup(7, IsZeroSimpleSemigroup, true);</span>
<small semigroup of size 7>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsZeroSimpleSemigroup(s);</span>
true
</pre></div>

<p><a id="X81D15723804771E2" name="X81D15723804771E2"></a></p>

<h5>4.2-33 MinimalGeneratingSet</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ MinimalGeneratingSet</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>returns a set of generators for <var class="Arg">sgrp</var> with minimal size.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(8, 1478885610);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">MinimalGeneratingSet(s);</span>
[ s4, s5, s6, s7, s8 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(7, 673768);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">MinimalGeneratingSet(s);</span>
[ s4, s5, s6, s7 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(4, 4);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">MinimalGeneratingSet(s);</span>
[ s2, s3, s4 ]
</pre></div>

<p><a id="X7D1C336E7B0A059C" name="X7D1C336E7B0A059C"></a></p>

<h5>4.2-34 NilpotencyDegree</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ NilpotencyDegree</code>( <var class="Arg">sgrp</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>returns the least <span class="SimpleMath">n</span> such that every product of <span class="SimpleMath">n</span> elements in the nilpotent semigroup <var class="Arg">sgrp</var> equals the zero element and returns <code class="code">fail</code> if the semigroup <var class="Arg">sgrp</var> is not nilpotent.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(5, 1121);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">NilpotencyDegree(s);</span>
fail
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(7, 393450);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">NilpotencyDegree(s);</span>
3
</pre></div>

<p>Note that for size 8 a semigroup in the library with ID <span class="SimpleMath">(8,n)</span> is nilpotent of degree 3 if and only if <span class="SimpleMath">n</span> is greater than 11433106.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(8, 11433106 + 1231);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">NilpotencyDegree(s);</span>
3
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(8, NrSmallSemigroups(8));;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">NilpotencyDegree(s);</span>
3
</pre></div>

<p><a id="X866B154E7F54AE62" name="X866B154E7F54AE62"></a></p>

<h4>4.3 <span class="Heading">Nilpotent semigroups by coclass</span></h4>

<p>A useful parameter in the classification of nilpotent semigroups is their coclass. For a finite nilpotent semigroup of order <span class="SimpleMath">n</span> and nilpotency degree <span class="SimpleMath">d</span> the coclass is defined as <span class="SimpleMath">n-d</span>. In <a href="chapBib.html#biBDis14">[Dis14]</a> lists up to (anti-)isomorphism are provided for nilpotent semigroups of coclass 0, 1, and 2. The semigroups in the lists are given by finite presentations. In this section we describe a function that allows to access such lists in <strong class="pkg">GAP</strong>.</p>

<p>A further invariant of a nilpotent semigroup <span class="SimpleMath">S</span> is the size of its unique minimal generating set <span class="SimpleMath">Sbackslash S^2</span>. The possible sizes for a particular coclass are restricted. Monogenic nilpotent semigroups are precisely those of coclass 0. For coclass <span class="SimpleMath">d ≥ 1</span> the size of the minimal generating set is at least 2 and at most <span class="SimpleMath">d+1</span>.</p>

<p><a id="X819BD88C78976AFD" name="X819BD88C78976AFD"></a></p>

<h5>4.3-1 NilpotentSemigroupsByCoclass</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ NilpotentSemigroupsByCoclass</code>( <var class="Arg">n</var>, <var class="Arg">d</var>[, <var class="Arg">r</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>returns for a positive integer <var class="Arg">n</var> and an integer <var class="Arg">d</var> with value 0, 1, or 2 a list of nilpotent semigroups of order <var class="Arg">n</var> and coclass <var class="Arg">d</var> up to (anti-)isomorphism. If the optional third argument <var class="Arg">r</varis given then only semigroups of rank <var class="Arg">r</var> are returned. The semigroups in the list are given by finite presentations.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">NilpotentSemigroupsByCoclass(5, 1);</span>
[ <fp semigroup on the generators [ s1, s2 ]>,
  <fp semigroup on the generators [ s1, s2 ]>,
  <fp semigroup on the generators [ s1, s2 ]>,
  <fp semigroup on the generators [ s1, s2 ]>,
  <fp semigroup on the generators [ s1, s2 ]>,
  <fp semigroup on the generators [ s1, s2 ]>,
  <fp semigroup on the generators [ s1, s2 ]> ]
<span class="GAPprompt">gap></span> <span class="GAPinput">NilpotentSemigroupsByCoclass(7, 0);</span>
[ <fp semigroup on the generators [ s1 ]> ]
<span class="GAPprompt">gap></span> <span class="GAPinput">NilpotentSemigroupsByCoclass(4, 2, 3);</span>
[ <fp semigroup on the generators [ s1, s2, s3 ]> ]
</pre></div>

<p><a id="X7D6E81E37E3AAED8" name="X7D6E81E37E3AAED8"></a></p>

<h4>4.4 <span class="Heading">Starred Green's relations</span></h4>

<p>In this section functionality around the starred Green's relations is described. The five starred Green's relations are <span class="SimpleMath">R^*</span>, <span class="SimpleMath">L^*</span>, <span class="SimpleMath">J^*</span>, <span class="SimpleMath">H^*</span>, and <span class="SimpleMath">D^*</span>; two elements <span class="SimpleMath">a</span>, <span class="SimpleMath">b</span> from a semigroup <span class="SimpleMath">S</span> are <span class="SimpleMath">R^*</span>-related if for all <span class="SimpleMath">x, y ∈ S^1: xa=ya</span> if and only if <span class="SimpleMath">xb = yb</span>; and <span class="SimpleMath">a</span> and <span class="SimpleMath">b</spanare <span class="SimpleMath">L^*</span>-related if for all <span class="SimpleMath">x, y ∈ S^1: ax=ay</span> if and only if <span class="SimpleMath">bx = by</span>. In parallel to the classical Green's relations <a href="../../../doc/ref/chap51_mj.html#X80C6C718801855E9"><span class="RefLink">Reference: Green's Relations</span></a> <span class="SimpleMath">H^*=R^* ∧ L^*</span> and <span class="SimpleMath">D^*= R^* ∨ L^*</span> (but <span class="SimpleMath">R^* ∘ L^* = L^* ∘ R^*</span> does <em>not</em> hold in general). To describe <span class="SimpleMath">J^*</span> is a bit more technical. For <span class="SimpleMath">a,b ∈ S</span> one can show that <span class="SimpleMath">b</span> lies in <span class="SimpleMath">J^*(a)</span>, the principal *-ideal of <span class="SimpleMath">a</span>, if and only if there exist <span class="SimpleMath">c_0,c_1...,c_n∈ S</span> and <span class="SimpleMath">x_1,...,x_n,y_1,..., y_n∈ S^1</span> such that <span class="SimpleMath">a=c_0, b=c_n</span> and <span class="SimpleMath">c_iD^*x_ic_i-1y_i</span> for <span class="SimpleMath">1≤ i≤ n</span>. Then <span class="SimpleMath">aJ^*b</span> if and only if both <span class="SimpleMath">a∈ J^*(b)</span> and <span class="SimpleMath">b∈ J^*(a)</span></p>

<p>Note that even for finite semigroups <span class="SimpleMath">J^*</span> does not always equal <span class="SimpleMath">D^*</span> (in contrast to the situation for classical Green's relations). Using <strong class="pkg">Smallsemi</strong> it was shown that there exist semigroups of order 8 with <span class="SimpleMath">J^*≠ D^*</span> <a href="chapBib.html#biBDMU13">[DMU13]</a>.</p>

<p><a id="X84EAD3BC80389059" name="X84EAD3BC80389059"></a></p>

<h5>4.4-1 IsStarRelation</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsStarRelation</code>( <var class="Arg">bin-relation</var> )</td><td class="tdright">( property )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsRStarRelation</code>( <var class="Arg">equiv-relation</var> )</td><td class="tdright">( property )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsLStarRelation</code>( <var class="Arg">equiv-relation</var> )</td><td class="tdright">( property )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsJStarRelation</code>( <var class="Arg">equiv-relation</var> )</td><td class="tdright">( property )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsHStarRelation</code>( <var class="Arg">equiv-relation</var> )</td><td class="tdright">( property )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsDStarRelation</code>( <var class="Arg">equiv-relation</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>These functions return <code class="code">true</code> if the argument is the respective type of relation and <code class="code">false</code> otherwise.</p>

<p><a id="X7A8059EC848E0A77" name="X7A8059EC848E0A77"></a></p>

<h5>4.4-2 RStarRelation</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RStarRelation</code>( <var class="Arg">semigroup</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ LStarRelation</code>( <var class="Arg">semigroup</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ JStarRelation</code>( <var class="Arg">semigroup</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DStarRelation</code>( <var class="Arg">semigroup</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ HStarRelation</code>( <var class="Arg">semigroup</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>The starred Green's relations (which are equivalence relations) are attributes of the semigroup <var class="Arg">semigroup</var>.</p>

<p><a id="X7D30CDC386C8816A" name="X7D30CDC386C8816A"></a></p>

<h5>4.4-3 RStarClass</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RStarClass</code>( <var class="Arg">S</var>, <var class="Arg">a</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ LStarClass</code>( <var class="Arg">S</var>, <var class="Arg">a</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DStarClass</code>( <var class="Arg">S</var>, <var class="Arg">a</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ JStarClass</code>( <var class="Arg">S</var>, <var class="Arg">a</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ HStarClass</code>( <var class="Arg">S</var>, <var class="Arg">a</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Creates the <span class="SimpleMath">X*</span>-class of the element <var class="Arg">a</var> in the semigroup <var class="Arg">S</var> where <span class="SimpleMath">X</span> is one of <span class="SimpleMath">L</span>, <span class="SimpleMath">R</span>, <span class="SimpleMath">D</span>, <span class="SimpleMath">J</span>, or <span class="SimpleMath">H</span>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(7, 280142);</span>
<small semigroup of size 7>
<span class="GAPprompt">gap></span> <span class="GAPinput">elm := AsList(s)[5];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">jclass := JStarClass(s, elm);</span>
{s5}
<span class="GAPprompt">gap></span> <span class="GAPinput">AsList(jclass);</span>
[ s2, s3, s4, s5 ]
</pre></div>

<p><a id="X83E1C16B8247ECBD" name="X83E1C16B8247ECBD"></a></p>

<h5>4.4-4 RStarClass</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RStarClass</code>( <var class="Arg">C</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ LStarClass</code>( <var class="Arg">C</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DStarClass</code>( <var class="Arg">C</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ JStarClass</code>( <var class="Arg">C</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>are attributes reflecting the natural ordering over the various starred Green's classes. They return the respective class in which the given class <span class="SimpleMath">C</span> is contained, where <span class="SimpleMath">C</span> must be a class from a strictly finer relation.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(7, 280142);</span>
<small semigroup of size 7>
<span class="GAPprompt">gap></span> <span class="GAPinput">elm := AsList(s)[5];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">hclass := HStarClass(s, elm);</span>
{s5}
<span class="GAPprompt">gap></span> <span class="GAPinput">AsList(LStarClass(hclass));</span>
[ s5 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">AsList(RStarClass(hclass));</span>
[ s2, s5 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">AsList(DStarClass(hclass));</span>
[ s2, s3, s4, s5 ]
</pre></div>

<p><a id="X82A391177D13A7E0" name="X82A391177D13A7E0"></a></p>

<h5>4.4-5 IsStarClass</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsStarClass</code>( <var class="Arg">equiv-class</var> )</td><td class="tdright">( property )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsRStarClass</code>( <var class="Arg">equiv-class</var> )</td><td class="tdright">( property )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsLStarClass</code>( <var class="Arg">equiv-class</var> )</td><td class="tdright">( property )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsJStarClass</code>( <var class="Arg">equiv-class</var> )</td><td class="tdright">( property )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsHStarClass</code>( <var class="Arg">equiv-class</var> )</td><td class="tdright">( property )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsDStarClass</code>( <var class="Arg">equiv-class</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>return <code class="keyw">true</code> if the equivalence class <var class="Arg">equiv-class</var> is a starred Green's class of any type, or of <span class="SimpleMath">R</span>, <span class="SimpleMath">L</span>, <span class="SimpleMath">J</span>, <span class="SimpleMath">H</span>, <span class="SimpleMath">D</span> type, respectively, or <code class="keyw">false</code> otherwise.</p>

<p><a id="X83B9C0417C03A220" name="X83B9C0417C03A220"></a></p>

<h5>4.4-6 RStarClasses</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RStarClasses</code>( <var class="Arg">semigroup</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ LStarClasses</code>( <var class="Arg">semigroup</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ JStarClasses</code>( <var class="Arg">semigroup</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DStarClasses</code>( <var class="Arg">semigroup</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ HStarClasses</code>( <var class="Arg">semigroup</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>return the <span class="SimpleMath">R</span>, <span class="SimpleMath">L</span>, <span class="SimpleMath">J</span>, <span class="SimpleMath">H</span>, or <span class="SimpleMath">D</span> starred Green's classes, respectively for semigroup <var class="Arg">semigroup</var>. <code class="code">EquivalenceClasses</code> for a Green's relation lead to one of these functions.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s := SmallSemigroup(6, 54);</span>
<small semigroup of size 6>
<span class="GAPprompt">gap></span> <span class="GAPinput">JStarClasses(s);</span>
[ {s1}, {s2}, {s4}, {s5}, {s6} ]
</pre></div>

<p><a id="X82F9C36C86006857" name="X82F9C36C86006857"></a></p>

<h4>4.5 <span class="Heading">Families of Semigroups</span></h4>

<p>In this section we describe how to find semigroups in the library satisfying a given set of parameters.</p>

<p>The following functions have the same usage but may return different values: <code class="func">EnumeratorOfSmallSemigroups</code> (<a href="chap4.html#X831E543E83DDFDEA"><span class="RefLink">4.5-2</span></a>), <code class="func">AllSmallSemigroups</code> (<a href="chap4.html#X81DC0FE28043C9B0"><span class="RefLink">4.5-1</span></a>), <code class="func">IdsOfSmallSemigroups</code> (<a href="chap4.html#X814BA9F778B06D47"><span class="RefLink">4.5-5</span></a>), <code class="func">IteratorOfSmallSemigroups</code> (<a href="chap4.html#X7D6BFDE17A9BEEC3"><span class="RefLink">4.5-9</span></a>), <code class="func">NrSmallSemigroups</code> (<a href="chap4.html#X8257C9207DDF2451"><span class="RefLink">4.5-11</span></a>), <code class="func">OneSmallSemigroup</code> (<a href="chap4.html#X7C71885F7DF31EC4"><span class="RefLink">4.5-12</span></a>), <code class="func">PositionsOfSmallSemigroups</code> (<a href="chap4.html#X7FAF09BF7CC1C265"><span class="RefLink">4.5-14</span></a>), <code class="func">RandomSmallSemigroup</code> (<a href="chap4.html#X7A63356C85E45F6F"><span class="RefLink">4.5-16</span></a>).</p>

<p>The number of arguments should be odd:</p>


<ul>
<li><p>the first argument <code class="code">arg[1]</code> should be a positive integer, a list of positive integers, or an enumerator or iterator of small semigroups satisfying <code class="func">IsEnumeratorOfSmallSemigroups</code> (<a href="chap4.html#X7BF0DCA5853A5C22"><span class="RefLink">4.5-6</span></a>) or <code class="func">IsIteratorOfSmallSemigroups</code> (<a href="chap4.html#X803366027F328BC9"><span class="RefLink">4.5-8</span></a>)</p>

</li>
<li><p>the even arguments <code class="code">arg[2i]</code>, if present, should be a function</p>

</li>
<li><p>the odd arguments <code class="code">arg[2i+1]</code> argument should be a possible value that can be returned by the function <code class="code">arg[2i]</code>.</p>

</li>
</ul>
<p>In the case that the function is <code class="func">AllSmallSemigroups</code> (<a href="chap4.html#X81DC0FE28043C9B0"><span class="RefLink">4.5-1</span></a>) and <code class="code">arg[1]</code> is a positive integer, then the returned value is a list of all semigroups <span class="SimpleMath">S</span> with <code class="code">arg[1]</code> elements such that <code class="code">arg[2i](S)=arg[2i+1]</code>.</p>

<p>For example, to obtain all the commutative semigroups with <var class="Arg">3</var> idempotents of sizes <var class="Arg">2</var> to <var class="Arg">5</var> use one of <code class="func">EnumeratorOfSmallSemigroups</code> (<a href="chap4.html#X831E543E83DDFDEA"><span class="RefLink">4.5-2</span></a>), <code class="func">AllSmallSemigroups</code> (<a href="chap4.html#X81DC0FE28043C9B0"><span class="RefLink">4.5-1</span></a>), <code class="func">IteratorOfSmallSemigroups</code> (<a href="chap4.html#X7D6BFDE17A9BEEC3"><span class="RefLink">4.5-9</span></a>) with argument</p>


<div class="example"><pre>
[2 .. 5], IsCommutative, true, Is3IdempotentGenerated, true
 </pre></div>

<p><code class="func">AllSmallSemigroups</code> (<a href="chap4.html#X81DC0FE28043C9B0"><span class="RefLink">4.5-1</span></a>) returns a list of all such semigroups, <code class="func">EnumeratorOfSmallSemigroups</code> (<a href="chap4.html#X831E543E83DDFDEA"><span class="RefLink">4.5-2</span></a>), and <code class="func">IteratorOfSmallSemigroups</code> (<a href="chap4.html#X7D6BFDE17A9BEEC3"><span class="RefLink">4.5-9</span></a>) return an enumerator and an iterator of all such semigroups, respectively. For more information on enumerators and iterators see <code class="func">Enumerator</code> (<a href="../../../doc/ref/chap30_mj.html#X7EF8910F82B45EC7"><span class="RefLink">Reference: Enumerator</span></a>), or <code class="func">Iterator</code> (<a href="../../../doc/ref/chap30_mj.html#X83ADF8287ED0668E"><span class="RefLink">Reference: Iterator</span></a>). The following are rules of thumb regarding the different situations when these functions should be used in order of slowest to fastest and greatest memory use to least:</p>


<ul>
<li><p><code class="func">AllSmallSemigroups</code> (<a href="chap4.html#X81DC0FE28043C9B0"><span class="RefLink">4.5-1</span></a>) should be used if the number of semigroups is not too large and you want to keep the created semigroups in a list.</p>

</li>
<li><p><code class="func">EnumeratorOfSmallSemigroups</code> (<a href="chap4.html#X831E543E83DDFDEA"><span class="RefLink">4.5-2</span></a>) should be used when the functions in even indexed positions are those stored in the library (see <code class="func">PrecomputedSmallSemisInfo</code> (<a href="chap4.html#X79AFE7FC81C0DF37"><span class="RefLink">4.5-15</span></a>)) or you want to repeatedly search the same set of semigroups and there are too many to store in a list. Note that the enumerator stores the id numbers of its elements but not the semigroups themselves. Hence every time an element of the enumerator is required it must be recreated from the multiplicatiotable data.</p>

</li>
<li><p><code class="func">IteratorOfSmallSemigroups</code> (<a href="chap4.html#X7D6BFDE17A9BEEC3"><span class="RefLink">4.5-9</span></a>) should be used if the functions in even indexed positions are not stored in the library (see <code class="func">PrecomputedSmallSemisInfo</code> (<a href="chap4.html#X79AFE7FC81C0DF37"><span class="RefLink">4.5-15</span></a>)) or if you just want to run through all the semigroups satisfying the specified parameters once only. Note that each new call of <code class="func">IteratorOfSmallSemigroups</code> (<a href="chap4.html#X7D6BFDE17A9BEEC3"><span class="RefLink">4.5-9</span></a>) requires <strong class="pkg">GAP</strongto recompute its elements which may be slow if the functions are user-defined or not stored in the library.</p>

</li>
</ul>
<p>Further information on the relative virtues of these different commands can be found in Chapter <a href="chap3.html#X7CDC63A27F7790AA"><span class="RefLink">3</span></a>.</p>

<p>As a further example, if we want to obtain a single non-simple semigroup with <span class="SimpleMath">7</span> elements and trivial automorphism group, then we would use one of the functions <code class="func">OneSmallSemigroup</code> (<a href="chap4.html#X7C71885F7DF31EC4"><span class="RefLink">4.5-12</span></a>) or <code class="func">RandomSmallSemigroup</code> (<a href="chap4.html#X7A63356C85E45F6F"><span class="RefLink">4.5-16</span></a>) with argument</p>


<div class="example"><pre>
7, IsSimpleSemigroup, false, x -> IsTrivial(AutomorphismGroup(x)), true
 </pre></div>

<p><code class="func">OneSmallSemigroup</code> (<a href="chap4.html#X7C71885F7DF31EC4"><span class="RefLink">4.5-12</span></a>) should return an answer more quickly than <code class="func">RandomSmallSemigroup</code> (<a href="chap4.html#X7A63356C85E45F6F"><span class="RefLink">4.5-16</span></a>). Also note that <code class="func">OneSmallSemigroup</code> (<a href="chap4.html#X7C71885F7DF31EC4"><span class="RefLink">4.5-12</span></a>) will always return the same semigroup, i.e. the first semigroup in the library with the given parameters.</p>

<p><a id="X81DC0FE28043C9B0" name="X81DC0FE28043C9B0"></a></p>

<h5>4.5-1 AllSmallSemigroups</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ AllSmallSemigroups</code>( <var class="Arg">arg</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>the number of argument of this function should be odd. The first argument <code class="code">arg[1]</code> should be a positive integer, an enumerator of small semigroups with <code class="func">IsEnumeratorOfSmallSemigroups</code> (<a href="chap4.html#X7BF0DCA5853A5C22"><span class="RefLink">4.5-6</span></a>), or an iterator of small semigroup with <code class="func">IsIteratorOfSmallSemigroups</code> (<a href="chap4.html#X803366027F328BC9"><span class="RefLink">4.5-8</span></a>).</p>

<p>The even arguments <code class="code">arg[2i]</code>, if present, should be functions, and the odd arguments <code class="code">arg[2i+1]</code> should be a value that the preceding function can have. For example, a typical input might be <code class="code">3, IsRegularSemigroup, true</code>. The functions <code class="code">arg[2i]</code> can be user defined or existing <strong class="pkg">GAP</strong> functions.</p>

<p>Please see Section <a href="chap4.html#X82F9C36C86006857"><span class="RefLink">4.5</span></a> or Chapter <a href="chap3.html#X7CDC63A27F7790AA"><span class="RefLink">3</span></a> for more details.</p>

<p>If <code class="code">arg[1]</code> is a positive integer, then <code class="code">AllSmallSemigroups</code> returns a list of all the small semigroups <code class="code">S</code> in the library with <code class="code">Size(S)=arg[1]</code> and <code class="code">arg[2i](S)=arg[2i+1]</code> for all <code class="code">i</code>.</p>

<p>If <code class="code">arg[1]</code> is a list of positive integers, then <code class="code">AllSmallSemigroups</code> returns a list of all the small semigroups <code class="code">S</code> in the library with <code class="code">Size(S) in arg[1]</code> and <code class="code">arg[2i](S)=arg[2i+1]</code> for all <code class="code">i</code>.</p>

<p>If <code class="code">arg[1]</code> is an enumerator or iterator of small semigroups, then <code class="code">AllSmallSemigroups</code> returns a list of all the small semigroups <code class="code">S</code> in the library with <code class="code">S in arg[1]</code> and <code class="code">arg[2i](S)=arg[2i+1]</code> for all <code class="code">i</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">AllSmallSemigroups(2);</span>
[ <small semigroup of size 2>, <small semigroup of size 2>,
  <small semigroup of size 2>, <small semigroup of size 2> ]
<span class="GAPprompt">gap></span> <span class="GAPinput">AllSmallSemigroups([2, 3], IsRegularSemigroup, true,</span>
<span class="GAPprompt">></span> <span class="GAPinput">x -> Length(GreensRClasses(x)), 1);</span>
[ <small semigroup of size 2>, <small semigroup of size 3> ]
<span class="GAPprompt">gap></span> <span class="GAPinput">enum := EnumeratorOfSmallSemigroups(8, IsInverseSemigroup, true,</span>
<span class="GAPprompt">></span> <span class="GAPinput">IsCommutativeSemigroup, true);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">AllSmallSemigroups(enum, x -> Length(GreensRClasses(x)), 1);</span>
[ <small semigroup of size 8>, <small semigroup of size 8>,
  <small semigroup of size 8> ]
<span class="GAPprompt">gap></span> <span class="GAPinput">iter := IteratorOfSmallSemigroups(7, x -> Length(GreensRClasses(x)), 1);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">AllSmallSemigroups(iter, IsCommutative, true,</span>
<span class="GAPprompt">></span> <span class="GAPinput">IsSimpleSemigroup, true);</span>
[ <small semigroup of size 7> ]
</pre></div>

<p><a id="X831E543E83DDFDEA" name="X831E543E83DDFDEA"></a></p>

<h5>4.5-2 EnumeratorOfSmallSemigroups</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ EnumeratorOfSmallSemigroups</code>( <var class="Arg">arg</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>the number of argument of this function should be odd. The first argument <code class="code">arg[1]</code> should be a positive integer, an enumerator of small semigroups with <code class="func">IsEnumeratorOfSmallSemigroups</code> (<a href="chap4.html#X7BF0DCA5853A5C22"><span class="RefLink">4.5-6</span></a>), or an iterator of small semigroup with <code class="func">IsIteratorOfSmallSemigroups</code> (<a href="chap4.html#X803366027F328BC9"><span class="RefLink">4.5-8</span></a>).</p>

<p>The even arguments <code class="code">arg[2i]</code>, if present, should be functions, and the odd arguments <code class="code">arg[2i+1]</code> should be a value that the preceding function can have. For example, a typical input might be <code class="code">3, IsRegularSemigroup, true</code>. The functions <code class="code">arg[2i]</code> can be user defined or existing <strong class="pkg">GAP</strong> functions.</p>

<p>Please see Section <a href="chap4.html#X82F9C36C86006857"><span class="RefLink">4.5</span></a> or Chapter <a href="chap3.html#X7CDC63A27F7790AA"><span class="RefLink">3</span></a> for more details.</p>

<p>If <code class="code">arg[1]</code> is a positive integer, then <code class="code">EnumeratorOfSmallSemigroups</code> returns an enumerator of all the small semigroups <code class="code">S</code> in the library with <code class="code">Size(S)=arg[1]</code> and <code class="code">arg[2i](S)=arg[2i+1]</code> for all <code class="code">i</code>.</p>

<p>If <code class="code">arg[1]</code> is a list of positive integers, then <code class="code">EnumeratorOfSmallSemigroups</code> returns an enumerator of all the small semigroups <code class="code">S</code> in the library with <code class="code">Size(S) in arg[1]</code> and <code class="code">arg[2i](S)=arg[2i+1]</code> for all <code class="code">i</code>.</p>

<p>If <code class="code">arg[1]</code> is an enumerator or iterator of small semigroups, then <code class="code">EnumeratorOfSmallSemigroups</code> returns an enumerator of all the small semigroups <code class="code">S</code> in the library with <code class="code">S in arg[1]</code> and <code class="code">arg[2i](S)=arg[2i+1]</code> for all <code class="code">i</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">enum := EnumeratorOfSmallSemigroups(7);</span>
<enumerator of semigroups of size 7>
<span class="GAPprompt">gap></span> <span class="GAPinput">EnumeratorOfSmallSemigroups([2, 3], IsRegularSemigroup, true);</span>
<enumerator of semigroups of sizes [ 2, 3 ]>
<span class="GAPprompt">gap></span> <span class="GAPinput">enum := EnumeratorOfSmallSemigroups(8, IsInverseSemigroup, true,</span>
<span class="GAPprompt">></span> <span class="GAPinput">IsCommutativeSemigroup, true);</span>
<enumerator of semigroups of size 8>
<span class="GAPprompt">gap></span> <span class="GAPinput">EnumeratorOfSmallSemigroups(enum, IsCommutativeSemigroup, true,</span>
<span class="GAPprompt">></span> <span class="GAPinput">IsSimpleSemigroup, false);</span>
<enumerator of semigroups of size 8>
<span class="GAPprompt">gap></span> <span class="GAPinput">iter := IteratorOfSmallSemigroups(8);</span>
<iterator of semigroups of size 8>
<span class="GAPprompt">gap></span> <span class="GAPinput">EnumeratorOfSmallSemigroups(iter, IsCommutativeSemigroup, true,</span>
<span class="GAPprompt">></span> <span class="GAPinput">IsSimpleSemigroup, false);</span>
<enumerator of semigroups of size 8>
</pre></div>

<p><a id="X7F8EF88E7EB417A8" name="X7F8EF88E7EB417A8"></a></p>

<h5>4.5-3 EnumeratorOfSmallSemigroupsByIds</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ EnumeratorOfSmallSemigroupsByIds</code>( <var class="Arg">arg</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ EnumeratorOfSmallSemigroupsByIdsNC</code>( <var class="Arg">arg</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>the argument of this function should be one of the following:</p>


<ul>
<li><p>a positive integer <var class="Arg">arg[1]</var> and a set of positive integers less than <code class="func">NrSmallSemigroups</code> (<a href="chap4.html#X8257C9207DDF2451"><span class="RefLink">4.5-11</span></a>) with argument <var class="Arg">arg[1]</var>. For example, the argument <var class="Arg">3, [1..10]</var> yields the first 10 semigroups with 3 elements.</p>

</li>
<li><p>a set of positive integers <var class="Arg">arg[1]</var> and a list of sets of positive integers <var class="Arg">arg[2]</var> such that <var class="Arg">x</var> is at most <code class="func">NrSmallSemigroups</code> (<a href="chap4.html#X8257C9207DDF2451"><span class="RefLink">4.5-11</span></a>) with argument <var class="Arg">arg[1][i]</var> for all <var class="Arg">x</var> in <var class="Arg">arg[2][i]</var>. For example, <var class="Arg">[2,3], [[1..2],[1..10]]</var> yields the first 2 semigroups of size 2, and the first 10 semigroups of size 3.</p>

</li>
<li><p>a list of id numbers, for example, <var class="Arg">[[7,1], [6,1], [5,1]]</var>.</p>

</li>
</ul>
<p>The no check version does not check that the arguments are valid and may return unpredictable results.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">enum := EnumeratorOfSmallSemigroupsByIds([[7, 1], [6, 1], [5, 1]]);</span>
<enumerator of semigroups of sizes [ 5, 6, 7 ]>
<span class="GAPprompt">gap></span> <span class="GAPinput">enum := EnumeratorOfSmallSemigroupsByIds(7, [1 .. 1000]);</span>
<enumerator of semigroups of size 7>
<span class="GAPprompt">gap></span> <span class="GAPinput">enum := EnumeratorOfSmallSemigroupsByIds([2, 3], [[1 .. 2], [1 .. 10]]);</span>
<enumerator of semigroups of sizes [ 2, 3 ]>
</pre></div>

<p><a id="X7A14F5A58020DCFF" name="X7A14F5A58020DCFF"></a></p>

<h5>4.5-4 ArgumentsUsedToCreate</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ArgumentsUsedToCreate</code>( <var class="Arg">enum</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>returns a list of the functions and their values that were used to create the enumerator of small semigroups <var class="Arg">enum</var>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">enum := EnumeratorOfSmallSemigroups([2 .. 4], IsSimpleSemigroup, false,</span>
<span class="GAPprompt">></span> <span class="GAPinput">IsRegularSemigroup, true);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">ArgumentsUsedToCreate(enum);</span>
[ <Property "IsRegularSemigroup">, true, <Property "IsSimpleSemigroup">,
  false ]
</pre></div>

<p><a id="X814BA9F778B06D47" name="X814BA9F778B06D47"></a></p>

<h5>4.5-5 IdsOfSmallSemigroups</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IdsOfSmallSemigroups</code>( <var class="Arg">arg</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>the number of argument of this function should be odd. The first argument <code class="code">arg[1]</code> should be a positive integer, an enumerator of small semigroups with <code class="func">IsEnumeratorOfSmallSemigroups</code> (<a href="chap4.html#X7BF0DCA5853A5C22"><span class="RefLink">4.5-6</span></a>), or an iterator of small semigroup with <code class="func">IsIteratorOfSmallSemigroups</code> (<a href="chap4.html#X803366027F328BC9"><span class="RefLink">4.5-8</span></a>).</p>

<p>The even arguments <code class="code">arg[2i]</code>, if present, should be functions, and the odd arguments <code class="code">arg[2i+1]</code> should be a value that the preceding function can have. For example, a typical input might be <code class="code">3, IsRegularSemigroup, true</code>. The functions <code class="code">arg[2i]</code> can be user defined or existing <strong class="pkg">GAP</strong> functions.</p>

<p>Please see Section <a href="chap4.html#X82F9C36C86006857"><span class="RefLink">4.5</span></a> or Chapter <a href="chap3.html#X7CDC63A27F7790AA"><span class="RefLink">3</span></a> for more details.</p>

<p>If <code class="code">arg[1]</code> is a positive integer, then <code class="code">IdsOfSmallSemigroups</code> returns a list of the id numbers of all the small semigroups <code class="code">S</code> in the library with <code class="code">Size(S)=arg[1]</code> and <code class="code">arg[2i](S)=arg[2i+1]</code> for all <code class="code">i</code>.</p>

<p>If <code class="code">arg[1]</code> is a list of positive integers, then <code class="code">IdsOfSmallSemigroups</code> returns a list of the id numbers of all the small semigroups <code class="code">S</code> in the library with <code class="code">Size(S) in arg[1]</code> and <code class="code">arg[2i](S)=arg[2i+1]</code> for all <code class="code">i</code>.</p>

<p>If <code class="code">arg[1]</code> is an enumerator or iterator of small semigroups, then <code class="code">IdsOfSmallSemigroups</code> returns a list of the id numbers of all the small semigroups <code class="code">S</code> in the library with <code class="code">S in arg[1]</code> and <code class="code">arg[2i](S)=arg[2i+1]</code> for all <code class="code">i</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">enum := EnumeratorOfSmallSemigroups(5,</span>
<span class="GAPprompt">></span> <span class="GAPinput">x -> Length(GreensRClasses(x)), 1);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IdsOfSmallSemigroups(enum, IsCommutativeSemigroup, true,</span>
<span class="GAPprompt">></span> <span class="GAPinput">IsSimpleSemigroup, false);</span>
[  ]
<span class="GAPprompt">gap></span> <span class="GAPinput">IdsOfSmallSemigroups([2, 3], IsRegularSemigroup, true);</span>
[ [ 2, 2 ], [ 2, 3 ], [ 2, 4 ], [ 3, 10 ], [ 3, 11 ], [ 3, 12 ], [ 3, 13 ],
  [ 3, 14 ], [ 3, 15 ], [ 3, 16 ], [ 3, 17 ], [ 3, 18 ] ]
</pre></div>

<p><a id="X7BF0DCA5853A5C22" name="X7BF0DCA5853A5C22"></a></p>

<h5>4.5-6 IsEnumeratorOfSmallSemigroups</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsEnumeratorOfSmallSemigroups</code>( <var class="Arg">enum</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>returns <code class="code">true</code> if <var class="Arg">enum</var> is an enumerator of small semigroups created using <code class="func">EnumeratorOfSmallSemigroups</code> (<a href="chap4.html#X831E543E83DDFDEA"><span class="RefLink">4.5-2</span></a>), <code class="func">EnumeratorOfSmallSemigroupsByIds</code> (<a href="chap4.html#X7F8EF88E7EB417A8"><span class="RefLink">4.5-3</span></a>).</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">enum := EnumeratorOfSmallSemigroupsByIds([[2, 1], [3, 1], [4, 1]]);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsEnumeratorOfSmallSemigroups(enum);</span>
true
</pre></div>

<p><a id="X83C27CD97895698A" name="X83C27CD97895698A"></a></p>

<h5>4.5-7 IsIdSmallSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsIdSmallSemigroup</code>( <var class="Arg">arg</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>return <code class="code">true</code> if the <var class="Arg">arg</var> is the id of a small semigroup or <var class="Arg">[arg[1], arg[2]]</var> is the id of a small semigroup.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsIdSmallSemigroup(8, 1);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IsIdSmallSemigroup([1, 2]);</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">IsIdSmallSemigroup([3, 18]);</span>
true
</pre></div>

<p><a id="X803366027F328BC9" name="X803366027F328BC9"></a></p>

<h5>4.5-8 IsIteratorOfSmallSemigroups</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsIteratorOfSmallSemigroups</code>( <var class="Arg">iter</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>returns <code class="code">true</code> if <var class="Arg">iter</var> is an iterator of small semigroups created using <code class="func">IteratorOfSmallSemigroups</code> (<a href="chap4.html#X7D6BFDE17A9BEEC3"><span class="RefLink">4.5-9</span></a>).</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">iter := IteratorOfSmallSemigroups(8);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsIteratorOfSmallSemigroups(iter);</span>
true
</pre></div>

<p><a id="X7D6BFDE17A9BEEC3" name="X7D6BFDE17A9BEEC3"></a></p>

<h5>4.5-9 IteratorOfSmallSemigroups</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IteratorOfSmallSemigroups</code>( <var class="Arg">arg</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>the number of argument of this function should be odd. The first argument <code class="code">arg[1]</code> should be a positive integer, an enumerator of small semigroups with <code class="func">IsEnumeratorOfSmallSemigroups</code> (<a href="chap4.html#X7BF0DCA5853A5C22"><span class="RefLink">4.5-6</span></a>), or an iterator of small semigroup with <code class="func">IsIteratorOfSmallSemigroups</code> (<a href="chap4.html#X803366027F328BC9"><span class="RefLink">4.5-8</span></a>).</p>

<p>The even arguments <code class="code">arg[2i]</code>, if present, should be functions, and the odd arguments <code class="code">arg[2i+1]</code> should be a value that the preceding function can have. For example, a typical input might be <code class="code">3, IsRegularSemigroup, true</code>. The functions <code class="code">arg[2i]</code> can be user defined or existing <strong class="pkg">GAP</strong> functions.</p>

<p>Please see Section <a href="chap4.html#X82F9C36C86006857"><span class="RefLink">4.5</span></a> or Chapter <a href="chap3.html#X7CDC63A27F7790AA"><span class="RefLink">3</span></a> for more details.</p>

<p>If <code class="code">arg[1]</code> is a positive integer, then <code class="code">IteratorOfSmallSemigroups</code> returns an iterator of all the small semigroups <code class="code">S</codein the library with <code class="code">Size(S)=arg[1]</code> and <code class="code">arg[2i](S)=arg[2i+1]</code> for all <code class="code">i</code>.</p>

<p>If <code class="code">arg[1]</code> is a list of positive integers, then <code class="code">IteratorOfSmallSemigroups</code> returns an iterator of all the small semigroups <code class="code">S</code> in the library with <code class="code">Size(S) in arg[1]</code> and <code class="code">arg[2i](S)=arg[2i+1]</code> for all <code class="code">i</code>.</p>

<p>If <code class="code">arg[1]</code> is an enumerator or iterator of small semigroups, then <code class="code">IteratorOfSmallSemigroups</code> returns an iterator of all the small semigroups <code class="code">S</code> in the library with <code class="code">S in arg[1]</code> and <code class="code">arg[2i](S)=arg[2i+1]</code> for all <code class="code">i</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">iter := IteratorOfSmallSemigroups(8);</span>
<iterator of semigroups of size 8>
<span class="GAPprompt">gap></span> <span class="GAPinput">NextIterator(iter);</span>
<small semigroup of size 8>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsDoneIterator(iter);</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">iter := IteratorOfSmallSemigroups([2, 3], IsRegularSemigroup, true,</span>
<span class="GAPprompt">></span> <span class="GAPinput">x -> Length(Idempotents(x)) = 1, true);</span>
<iterator of semigroups of sizes [ 2, 3 ]>
<span class="GAPprompt">gap></span> <span class="GAPinput">NextIterator(iter);</span>
<small semigroup of size 2>
<span class="GAPprompt">gap></span> <span class="GAPinput">NextIterator(iter);</span>
<small semigroup of size 3>
<span class="GAPprompt">gap></span> <span class="GAPinput">NextIterator(iter);</span>
fail
<span class="GAPprompt">gap></span> <span class="GAPinput">enum := EnumeratorOfSmallSemigroups(5, x -> Length(Idempotents(x)) = 1,</span>
<span class="GAPprompt">></span> <span class="GAPinput">true);</span>
<enumerator of semigroups of size 5>
<span class="GAPprompt">gap></span> <span class="GAPinput">iter := IteratorOfSmallSemigroups(enum,</span>
<span class="GAPprompt">></span> <span class="GAPinput">x -> Length(GreensRClasses(x)) = 2, true);</span>
<iterator of semigroups of size 5>
</pre></div>

<p><a id="X867F3E967CF3AFE9" name="X867F3E967CF3AFE9"></a></p>

<h5>4.5-10 Nr3NilpotentSemigroups</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Nr3NilpotentSemigroups</code>( <var class="Arg">n</var>[, <var class="Arg">type</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>returns the number of 3-nilpotent semigroups on a set with <var class="Arg">n</var> elements. If the optional argument <var class="Arg">type</var> is given it must be one of <code class="code">"UpToEquivalence""UpToIsomorphism""SelfDual""Commutative""Labelled""Labelled-Commutative"</code>. The number will be returned for the respective type of semigroup. By default <var class="Arg">type</var> is <code class="code">"UpToEquivalence"</code>.</p>

<p>The function implements the formulae calculating the number of 3-nilpotent semigroups developed in <a href="chapBib.html#biBDis10">[Dis10]</a></p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">Nr3NilpotentSemigroups(4);</span>
8
<span class="GAPprompt">gap></span> <span class="GAPinput">Nr3NilpotentSemigroups(9, "UpToIsomorphism");</span>
105931872028455
<span class="GAPprompt">gap></span> <span class="GAPinput">Nr3NilpotentSemigroups(9, "Labelled");</span>
38430603831264883632
<span class="GAPprompt">gap></span> <span class="GAPinput">Nr3NilpotentSemigroups(16, "SelfDual");</span>
4975000837941847814744710290469890455985530
<span class="GAPprompt">gap></span> <span class="GAPinput">Nr3NilpotentSemigroups(19, "Commutative");</span>
12094270656160403920767935604624748908993169949317454767617795
</pre></div>

<p><a id="X8257C9207DDF2451" name="X8257C9207DDF2451"></a></p>

<h5>4.5-11 NrSmallSemigroups</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ NrSmallSemigroups</code>( <var class="Arg">arg</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>the number of argument of this function should be odd. The first argument <code class="code">arg[1]</code> should be a positive integer, an enumerator of small semigroups with <code class="func">IsEnumeratorOfSmallSemigroups</code> (<a href="chap4.html#X7BF0DCA5853A5C22"><span class="RefLink">4.5-6</span></a>), or an iterator of small semigroup with <code class="func">IsIteratorOfSmallSemigroups</code> (<a href="chap4.html#X803366027F328BC9"><span class="RefLink">4.5-8</span></a>).</p>

<p>The even arguments <code class="code">arg[2i]</code>, if present, should be functions, and the odd arguments <code class="code">arg[2i+1]</code> should be a value that the preceding function can have. For example, a typical input might be <code class="code">3, IsRegularSemigroup, true</code>. The functions <code class="code">arg[2i]</code> can be user defined or existing <strong class="pkg">GAP</strong> functions.</p>

<p>Please see Section <a href="chap4.html#X82F9C36C86006857"><span class="RefLink">4.5</span></a> or Chapter <a href="chap3.html#X7CDC63A27F7790AA"><span class="RefLink">3</span></a> for more details.</p>

<p>If <code class="code">arg[1]</code> is a positive integer, then <code class="code">NrSmallSemigroups</code> returns the number of small semigroups <code class="code">S</code> in the library with <code class="code">Size(S)=arg[1]</code> and <code class="code">arg[2i](S)=arg[2i+1]</code> for all <code class="code">i</code>.</p>

<p>If <code class="code">arg[1]</code> is a list of positive integers, then <code class="code">NrSmallSemigroups</code> returns the number of small semigroups <code class="code">S</code> in the library with <code class="code">Size(S) in arg[1]</code> and <code class="code">arg[2i](S)=arg[2i+1]</code> for all <code class="code">i</code>.</p>

<p>If <code class="code">arg[1]</code> is an enumerator or iterator of small semigroups, then <code class="code">NrSmallSemigroups</code> returns the number of small semigroups <code class="code">S</code> in the library with <code class="code">S in arg[1]</code> and <code class="code">arg[2i](S)=arg[2i+1]</code> for all <code class="code">i</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">List([1 .. 8], NrSmallSemigroups);</span>
[ 1, 4, 18, 126, 1160, 15973, 836021, 1843120128 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">NrSmallSemigroups(8, IsCommutative, true, IsInverseSemigroup, true);</span>
4443
<span class="GAPprompt">gap></span> <span class="GAPinput">NrSmallSemigroups([1 .. 8], IsCliffordSemigroup, true);</span>
5610
<span class="GAPprompt">gap></span> <span class="GAPinput">NrSmallSemigroups(8, IsRegularSemigroup, true,</span>
<span class="GAPprompt">></span> <span class="GAPinput">IsCompletelyRegularSemigroup, false);</span>
1164
<span class="GAPprompt">gap></span> <span class="GAPinput">NrSmallSemigroups(5, NilpotencyDegree, 3);</span>
84
</pre></div>

<p><a id="X7C71885F7DF31EC4" name="X7C71885F7DF31EC4"></a></p>

<h5>4.5-12 OneSmallSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ OneSmallSemigroup</code>( <var class="Arg">arg</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>the number of argument of this function should be odd. The first argument <code class="code">arg[1]</code> should be a positive integer, an enumerator of small semigroups with <code class="func">IsEnumeratorOfSmallSemigroups</code> (<a href="chap4.html#X7BF0DCA5853A5C22"><span class="RefLink">4.5-6</span></a>), or an iterator of small semigroup with <code class="func">IsIteratorOfSmallSemigroups</code> (<a href="chap4.html#X803366027F328BC9"><span class="RefLink">4.5-8</span></a>).</p>

<p>The even arguments <code class="code">arg[2i]</code>, if present, should be functions, and the odd arguments <code class="code">arg[2i+1]</code> should be a value that the preceding function can have. For example, a typical input might be <code class="code">3, IsRegularSemigroup, true</code>. The functions <code class="code">arg[2i]</code> can be user defined or existing <strong class="pkg">GAP</strong> functions.</p>

<p>Please see Section <a href="chap4.html#X82F9C36C86006857"><span class="RefLink">4.5</span></a> or Chapter <a href="chap3.html#X7CDC63A27F7790AA"><span class="RefLink">3</span></a> for more details.</p>

<p>If <code class="code">arg[1]</code> is a positive integer, then <code class="code">OneSmallSemigroup</code> returns the first small semigroup <code class="code">S</code> in the library with <code class="code">Size(S)=arg[1]</code> and <code class="code">arg[2i](S)=arg[2i+1]</code> for all <code class="code">i</code>.</p>

<p>If <code class="code">arg[1]</code> is a list of positive integers, then <code class="code">OneSmallSemigroup</code> returns the first small semigroup <code class="code">S</code> in the library with <code class="code">Size(S) in arg[1]</code> and <code class="code">arg[2i](S)=arg[2i+1]</code> for all <code class="code">i</code>.</p>

<p>If <code class="code">arg[1]</code> is an enumerator or iterator of small semigroups, then <code class="code">OneSmallSemigroup</code> returns the first small semigroup <code class="code">S</code> in the library with <code class="code">S in arg[1]</code> and <code class="code">arg[2i](S)=arg[2i+1]</code> for all <code class="code">i</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">OneSmallSemigroup(8, IsCommutative, true, IsInverseSemigroup, true);</span>
<small semigroup of size 8>
<span class="GAPprompt">gap></span> <span class="GAPinput">OneSmallSemigroup([1 .. 8], IsCliffordSemigroup, true);</span>
<small semigroup of size 1>
<span class="GAPprompt">gap></span> <span class="GAPinput">iter := IteratorOfSmallSemigroups(8, IsCommutative, false);</span>
<iterator of semigroups of size 8>
<span class="GAPprompt">gap></span> <span class="GAPinput">OneSmallSemigroup(iter);</span>
<small semigroup of size 8>
</pre></div>

<p><a id="X7EACCD1F7DF9DD3C" name="X7EACCD1F7DF9DD3C"></a></p>

<h5>4.5-13 PositionsOfSmallSemigroupsIn</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PositionsOfSmallSemigroupsIn</code>( <var class="Arg">enum</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>returns the second components of the id numbers of the small semigroups in the enumerator of small semigroups <var class="Arg">enum</var> in a list partitioned according the size of the semigroup. The same value is returned by using <code class="func">PositionsOfSmallSemigroups</code> (<a href="chap4.html#X7FAF09BF7CC1C265"><span class="RefLink">4.5-14</span></a>).</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">enum := EnumeratorOfSmallSemigroups([2 .. 4], IsSimpleSemigroup, true);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PositionsOfSmallSemigroupsIn</span>
<span class="GAPprompt">></span> <span class="GAPinput">(enum);</span>
[ [ 2, 4 ], [ 17, 18 ], [ 7, 37, 52, 122, 123 ] ]
</pre></div>

<p><a id="X7FAF09BF7CC1C265" name="X7FAF09BF7CC1C265"></a></p>

<h5>4.5-14 PositionsOfSmallSemigroups</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PositionsOfSmallSemigroups</code>( <var class="Arg">arg</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>the number of argument of this function should be odd. The first argument <code class="code">arg[1]</code> should be a positive integer or an enumerator with <code class="func">IsEnumeratorOfSmallSemigroups</code> (<a href="chap4.html#X7BF0DCA5853A5C22"><span class="RefLink">4.5-6</span></a>), the even arguments <code class="code">arg[2i]</code>, if present, should be functions, and the odd arguments <code class="code">arg[2i+1]</code> should be a value that the preceding function can have. For example, a typical input might be <code class="code">3, IsRegularSemigroup, true</code>. The functions <code class="code">arg[2i]</code> can be user defined or existing <strong class="pkg">GAP</strong> functions. The argument can be a list <code class="code">arg</code> with the same components as given above.</p>

<p>The function returns a list of the second components of the <code class="func">IdSmallSemigroup</code> (<a href="chap4.html#X788211A07D67C282"><span class="RefLink">4.1-6</span></a>) of all the small semigroups <code class="code">S</code> in the library satisfying <code class="code">Size(S)</code> in <code class="code">arg[1]</code> or <code class="code">Size(S)</code> in <code class="code">SizesOfSmallSemigroupsIn(arg[1])</code> and <code class="code">arg[2i](S)=arg[2i+1]</code> for all <code class="code">i</code> partitioned by size of the semigroups.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PositionsOfSmallSemigroups(3);</span>
[ [ 1 .. 18 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">PositionsOfSmallSemigroups(3, IsRegularSemigroup, false);</span>
[ [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">enum := EnumeratorOfSmallSemigroups(3, IsRegularSemigroup, false);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PositionsOfSmallSemigroups(enum);</span>
[ [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">PositionsOfSmallSemigroups([1 .. 4], IsBand, true);</span>
[ [ 1 ], [ 3, 4 ], [ 12 .. 17 ], [ 98 .. 123 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">PositionsOfSmallSemigroups(enum, Is1IdempotentSemigroup, true,</span>
<span class="GAPprompt">></span> <span class="GAPinput">Is2GeneratedSemigroup, true, IsCliffordSemigroup, false);</span>
[ [ 1, 2 ] ]
</pre></div>

<p><a id="X79AFE7FC81C0DF37" name="X79AFE7FC81C0DF37"></a></p>

<h5>4.5-15 PrecomputedSmallSemisInfo</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PrecomputedSmallSemisInfo</code></td><td class="tdright">( global variable )</td></tr></table></div>
<p>the global variable <code class="code">PrecomputedSmallSemisInfo</code> contains a list of all the names of precomputed properties stored in the library. The <code class="code">i</code>th element of the list contains the list of properties that have been precomputed for all semigroups in the library of order <code class="code">i</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrecomputedSmallSemisInfo[3];</span>
"Is2GeneratedSemigroup""Is3GeneratedSemigroup""Is4GeneratedSemigroup",
  "Is5GeneratedSemigroup""Is6GeneratedSemigroup""Is7GeneratedSemigroup",
  "Is8GeneratedSemigroup""IsBand""IsCommutative",
  "IsCompletelyRegularSemigroup""IsFullTransformationSemigroupCopy",
  "IsGroupAsSemigroup""IsIdempotentGenerated""IsInverseSemigroup",
  "IsMonogenicSemigroup""IsMonoidAsSemigroup""IsMultSemigroupOfNearRing",
  "IsMunnSemigroup""IsRegularSemigroup""IsSelfDualSemigroup",
  "IsSemigroupWithoutClosedIdempotents""IsSimpleSemigroup",
  "IsSingularSemigroupCopy""IsZeroSemigroup""IsZeroSimpleSemigroup" ]
</pre></div>

<p><a id="X7A63356C85E45F6F" name="X7A63356C85E45F6F"></a></p>

<h5>4.5-16 RandomSmallSemigroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RandomSmallSemigroup</code>( <var class="Arg">arg</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>the number of argument of this function should be odd. The first argument <code class="code">arg[1]</code> should be a positive integer, an enumerator of small semigroups with <code class="func">IsEnumeratorOfSmallSemigroups</code> (<a href="chap4.html#X7BF0DCA5853A5C22"><span class="RefLink">4.5-6</span></a>), or an iterator of small semigroup with <code class="func">IsIteratorOfSmallSemigroups</code> (<a href="chap4.html#X803366027F328BC9"><span class="RefLink">4.5-8</span></a>).</p>

<p>The even arguments <code class="code">arg[2i]</code>, if present, should be functions, and the odd arguments <code class="code">arg[2i+1]</code> should be a value that the preceding function can have. For example, a typical input might be <code class="code">3, IsRegularSemigroup, true</code>. The functions <code class="code">arg[2i]</code> can be user defined or existing <strong class="pkg">GAP</strong> functions.</p>

<p>Please see Section <a href="chap4.html#X82F9C36C86006857"><span class="RefLink">4.5</span></a> or Chapter <a href="chap3.html#X7CDC63A27F7790AA"><span class="RefLink">3</span></a> for more details.</p>

<p>If <code class="code">arg[1]</code> is a positive integer, then <code class="code">RandomSmallSemigroup</code> returns a random small semigroup <code class="code">S</code> in the library with <code class="code">Size(S)=arg[1]</code> and <code class="code">arg[2i](S)=arg[2i+1]</code> for all <code class="code">i</code>.</p>

<p>If <code class="code">arg[1]</code> is a list of positive integers, then <code class="code">RandomSmallSemigroup</code> returns the a random small semigroup <code class="code">S</code> in the library with <code class="code">Size(S) in arg[1]</code> and <code class="code">arg[2i](S)=arg[2i+1]</code> for all <code class="code">i</code>.</p>

<p>If <code class="code">arg[1]</code> is an enumerator or iterator of small semigroups, then <code class="code">RandomSmallSemigroup</code> returns the a random small semigroup <code class="code">S</code> in the library with <code class="code">S in arg[1]</code> and <code class="code">arg[2i](S)=arg[2i+1]</code> for all <code class="code">i</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">RandomSmallSemigroup(8, IsCommutative, true,</span>
<span class="GAPprompt">></span> <span class="GAPinput">IsInverseSemigroup, true);</span>
<small semigroup of size 8>
<span class="GAPprompt">gap></span> <span class="GAPinput">RandomSmallSemigroup([1 .. 8], IsCliffordSemigroup, true);</span>
<small semigroup of size 8>
<span class="GAPprompt">gap></span> <span class="GAPinput">iter := IteratorOfSmallSemigroups([1 .. 7]);</span>
<iterator of semigroups of sizes [ 1 .. 7 ]>
<span class="GAPprompt">gap></span> <span class="GAPinput">RandomSmallSemigroup(iter);</span>
<small semigroup of size 7>
</pre></div>

<p><a id="X83C6631B7D53AE02" name="X83C6631B7D53AE02"></a></p>

<h5>4.5-17 SizesOfSmallSemigroupsIn</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SizesOfSmallSemigroupsIn</code>( <var class="Arg">enum</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>returns the sizes of the semigroups in the enumerator of small semigroups <var class="Arg">enum</var>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">enum := EnumeratorOfSmallSemigroups([2 .. 4], IsSimpleSemigroup, false);</span>
<enumerator of semigroups of sizes [ 2, 3, 4 ]>
<span class="GAPprompt">gap></span> <span class="GAPinput">SizesOfSmallSemigroupsIn(enum);</span>
[ 2, 3, 4 ]
</pre></div>

<p><a id="X87C50557821D4786" name="X87C50557821D4786"></a></p>

<h5>4.5-18 UpToIsomorphism</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ UpToIsomorphism</code>( <var class="Arg">sgrps</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>takes a list <var class="Arg">sgrps</var> of non-equivalent semigroups from the library as input and returns a list of non-isomorphic semigroups containing an isomorphic semigroup and an anti-isomorphic semigroup for every semigroup in <var class="Arg">sgrps</var>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">UpToIsomorphism([SmallSemigroup(5, 126), SmallSemigroup(6, 2)]);</span>
[ <small semigroup of size 5>, <small semigroup of size 6> ]
<span class="GAPprompt">gap></span> <span class="GAPinput">UpToIsomorphism([SmallSemigroup(5, 126), SmallSemigroup(5, 3)]);</span>
[ <small semigroup of size 5>, <small semigroup of size 5>,
  <semigroup of size 5, with 5 generators> ]
</pre></div>


<div class="chlinkprevnextbot"> <a href="chap0.html">[Top of Book]</a>   <a href="chap0.html#contents">[Contents]</a>    <a href="chap3.html">[Previous Chapter]</a>    <a href="chapBib.html">[Next Chapter]</a>   </div>


<div class="chlinkbot"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a>  <a href="chap1.html">1</a>  <a href="chap2.html">2</a>  <a href="chap3.html">3</a>  <a href="chap4.html">4</a>  <a href="chapBib.html">Bib</a>  <a href="chapInd.html">Ind</a>  </div>

<hr />
<p class="foot">generated by <a href="http://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc">GAPDoc2HTML</a></p>
</body>
</html>

Messung V0.5 in Prozent
C=100 H=100 G=100

¤ Dauer der Verarbeitung: 0.42 Sekunden  (vorverarbeitet am  2026-04-26) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge