Sophie

Sophie

distrib > * > 2010.0 > * > by-pkgid > 0c1f9463f03451b5503f0c33beb88a98 > files > 192

gap-system-4.4.12-5mdv2010.0.x86_64.rpm

<html><head><title>[ref] 50 Monoids</title></head>
<body text="#000000" bgcolor="#ffffff">
[<a href="../index.htm">Top</a>] [<a href = "chapters.htm">Up</a>] [<a href ="CHAP049.htm">Previous</a>] [<a href ="CHAP051.htm">Next</a>] [<a href = "theindex.htm">Index</a>]
<h1>50 Monoids</h1><p>
<p>
This chapter describes functions for monoids.
Currently there are only few of them.
More general functions for magmas and semigroups can be found in
Chapters&nbsp;<a href="CHAP033.htm">Magmas</a> and <a href="CHAP049.htm">Semigroups</a>.
<p>
<a name = ""></a>
<li><code>IsMonoid( </code><var>D</var><code> ) P</code>
<p>
A <strong>monoid</strong> is a magma-with-one (see&nbsp;<a href="CHAP033.htm">Magmas</a>) with associative
multiplication.
<p>
<a name = ""></a>
<li><code>Monoid( </code><var>gen1</var><code>, </code><var>gen2</var><code> ... ) F</code>
<a name = ""></a>
<li><code>Monoid( </code><var>gens</var><code> ) F</code>
<a name = ""></a>
<li><code>Monoid( </code><var>gens</var><code>, </code><var>id</var><code> ) F</code>
<p>
In the first form, <code>Monoid</code> returns the monoid generated by the
arguments <var>gen1</var>, <var>gen2</var> ...,
that is, the closure of these elements under multiplication and taking
the 0-th power.
In the second form, <code>Monoid</code> returns the monoid generated by the
elements in the homogeneous list <var>gens</var>;
a square matrix as only argument is treated as one generator,
not as a list of generators.
In the third form, <code>Monoid</code> returns the monoid generated by the
elements in the homogeneous list <var>gens</var>, with identity <var>id</var>.
<p>
It is <strong>not</strong> checked whether the underlying multiplication is associative,
use <code>MagmaWithOne</code> (see&nbsp;<a href="CHAP033.htm#SSEC002.2">MagmaWithOne</a>) and <code>IsAssociative</code>
(see&nbsp;<a href="CHAP033.htm#SSEC004.7">IsAssociative</a>)
if you want to check whether a magma-with-one is in fact a monoid.
<p>
<a name = ""></a>
<li><code>Submonoid( </code><var>M</var><code>, </code><var>gens</var><code> ) F</code>
<a name = ""></a>
<li><code>SubmonoidNC( </code><var>M</var><code>, </code><var>gens</var><code> ) F</code>
<p>
are just synonyms of <code>SubmagmaWithOne</code> and <code>SubmagmaWithOneNC</code>,
respectively (see&nbsp;<a href="CHAP033.htm#SSEC002.8">SubmagmaWithOne</a>).
<p>
<a name = ""></a>
<li><code>MonoidByGenerators( </code><var>gens</var><code> ) O</code>
<a name = ""></a>
<li><code>MonoidByGenerators( </code><var>gens</var><code>, </code><var>one</var><code> ) O</code>
<p>
is the underlying operation of <code>Monoid</code> (see&nbsp;<a href="CHAP050.htm">Monoid</a>).
<p>
<a name = ""></a>
<li><code>AsMonoid( </code><var>C</var><code> ) A</code>
<p>
If <var>C</var> is a collection whose elements form a monoid
(see&nbsp;<a href="CHAP050.htm">IsMonoid</a>) then <code>AsMonoid</code> returns this monoid.
Otherwise <code>fail</code> is returned.
<p>
<a name = ""></a>
<li><code>AsSubmonoid( </code><var>D</var><code>, </code><var>C</var><code> ) O</code>
<p>
Let <var>D</var> be a domain and <var>C</var> a collection.
If <var>C</var> is a subset of <var>D</var> that forms a monoid then <code>AsSubmonoid</code>
returns this monoid, with parent <var>D</var>.
Otherwise <code>fail</code> is returned.
<p>
<a name = ""></a>
<li><code>GeneratorsOfMonoid( </code><var>M</var><code> ) A</code>
<p>
Monoid generators of a monoid <var>M</var> are the same as
magma-with-one generators (see&nbsp;<a href="CHAP033.htm#SSEC004.2">GeneratorsOfMagmaWithOne</a>).
<p>
<a name = ""></a>
<li><code>TrivialSubmonoid( </code><var>M</var><code> ) A</code>
<p>
is just a synonym for <code>TrivialSubmagmaWithOne</code>
(see&nbsp;<a href="CHAP033.htm#SSEC004.14">TrivialSubmagmaWithOne</a>).
<p>
<a name = ""></a>
<li><code>FreeMonoid( [</code><var>wfilt</var><code>, ]</code><var>rank</var><code> ) F</code>
<a name = ""></a>
<li><code>FreeMonoid( [</code><var>wfilt</var><code>, ]</code><var>rank</var><code>, </code><var>name</var><code> ) F</code>
<a name = ""></a>
<li><code>FreeMonoid( [</code><var>wfilt</var><code>, ]</code><var>name1</var><code>, </code><var>name2</var><code>, ... ) F</code>
<a name = ""></a>
<li><code>FreeMonoid( [</code><var>wfilt</var><code>, ]</code><var>names</var><code> ) F</code>
<a name = ""></a>
<li><code>FreeMonoid( [</code><var>wfilt</var><code>, ]infinity, </code><var>name</var><code>, </code><var>init</var><code> ) F</code>
<p>
Called in the first form, <code>FreeMonoid</code> returns a free monoid on
<var>rank</var> generators.
Called in the second form, <code>FreeMonoid</code> returns a free monoid on
<var>rank</var> generators, printed as <code></code><var>name</var><code>1</code>, <code></code><var>name</var><code>2</code> etc.,
that is, each name is the concatenation of the string <var>name</var> and an
integer from <code>1</code> to <var>range</var>.
Called in the third form, <code>FreeMonoid</code> returns a free monoid on
as many generators as arguments, printed as <var>name1</var>, <var>name2</var> etc.
Called in the fourth form, <code>FreeMonoid</code> returns a free monoid on
as many generators as the length of the list <var>names</var>, the <i>i</i>-th
generator being printed as <code></code><var>names</var><code>[<i>i</i>]</code>.
Called in the fifth form, <code>FreeMonoid</code> returns a free monoid on
infinitely many generators, where the first generators are printed
by the names in the list <var>init</var>, and the other generators by <var>name</var>
and an appended number.
<p>
If the extra argument <var>wfilt</var> is given, it must be either
<code>IsSyllableWordsFamily</code> or <code>IsLetterWordsFamily</code> or
<code>IsWLetterWordsFamily</code> or <code>IsBLetterWordsFamily</code>. The filter then
specifies the representation used for the elements of the free group
(see&nbsp;<a href="CHAP035.htm#SECT006">Representations for Associative Words</a>). If no such filter is
given, a letter representation is used.
<p>
<a name = ""></a>
<li><code>MonoidByMultiplicationTable( </code><var>A</var><code> ) F</code>
<p>
returns the monoid whose multiplication is defined by the square
matrix <var>A</var> (see&nbsp;<a href="CHAP033.htm#SSEC003.1">MagmaByMultiplicationTable</a>) if such a monoid exists.
Otherwise <code>fail</code> is returned.
<p>
<p>
[<a href="../index.htm">Top</a>] [<a href = "chapters.htm">Up</a>] [<a href ="CHAP049.htm">Previous</a>] [<a href ="CHAP051.htm">Next</a>] [<a href = "theindex.htm">Index</a>]
<P>
<font face="Gill Sans,Helvetica,Arial">GAP 4 manual<br>December 2008
</font></body></html>