|
|
|
|
Quelle chap37.html
Sprache: HTML
|
|
| products/sources/formale Sprachen/GAP/doc/ref/chap37.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 (ref) - Chapter 37: Associative Words</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="chap37" 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="chap5.html">5</a> <a href="chap6.html">6</a> <a href="chap7.html">7</a> <a href="chap8.html">8</a> <a href="chap9.html">9</a> <a href="chap10.html">10</a> <a href="chap11.html">11</a> <a href="chap12.html">12</a> <a href="chap13.html">13</a> <a href="chap14.html">14</a> <a href="chap15.html">15</a> <a href="chap16.html">16</a> <a href="chap17.html">17</a> <a href="chap18.html">18</a> <a href="chap19.html">19</a> <a href="chap20.html">20</a> <a href="chap21.html">21</a> <a href="chap22.html">22</a> <a href="chap23.html">23</a> <a href="chap24.html">24</a> <a href="chap25.html">25</a> <a href="chap26.html">26</a> <a href="chap27.html">27</a> <a href="chap28.html">28</a> <a href="chap29.html">29</a> <a href="chap30.html">30</a> <a href="chap31.html">31</a> <a href="chap32.html">32</a> <a href="chap33.html">33</a> <a href="chap34.html">34</a> <a href="chap35.html">35</a> <a href="chap36.html">36</a> <a href="chap37.html">37</a> <a href="chap38.html">38</a> <a href="chap39.html">39</a> <a href="chap40.html">40</a> <a href="chap41.html">41</a> <a href="chap42.html">42</a> <a href="chap43.html">43</a> <a href="chap44.html">44</a> <a href="chap45.html">45</a> <a href="chap46.html">46</a> <a href="chap47.html">47</a> <a href="chap48.html">48</a> <a href="chap49.html">49</a> <a href="chap50.html">50</a> <a href="chap51.html">51</a> <a href="chap52.html">52</a> <a href="chap53.html">53</a> <a href="chap54.html">54</a> <a href="chap55.html">55</a> <a href="chap56.html">56</a> <a href="chap57.html">57</a> <a href="chap58.html">58</a> <a href="chap59.html">59</a> <a href="chap60.html">60</a> <a href="chap61.html">61</a> <a href="chap62.html">62</a> <a href="chap63.html">63</a> <a href="chap64.html">64</a> <a href="chap65.html">65</a> <a href="chap66.html">66</a> <a href="chap67.html">67</a> <a href="chap68.html">68</a> <a href="chap69.html">69</a> <a href="chap70.html">70</a> <a href="chap71.html">71</a> <a href="chap72.html">72</a> <a href="chap73.html">73</a> <a href="chap74.html">74</a> <a href="chap75.html">75</a> <a href="chap76.html">76</a> <a href="chap77.html">77</a> <a href="chap78.html">78</a> <a href="chap79.html">79</a> <a href="chap80.html">80</a> <a href="chap81.html">81</a> <a href="chap82.html">82</a> <a href="chap83.html">83</a> <a href="chap84.html">84</a> <a href="chap85.html">85</a> <a href="chap86.html">86</a> <a href="chap87.html">87</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="chap36.html">[Previous Chapter]</a> <a href="chap38.html">[Next Chapter]</a> </div>
<p id="mathjaxlink" class="pcenter"><a href="chap37_mj.html">[MathJax on]</a></p>
<p><a id="X78C56A0A87CE380E" name="X78C56A0A87CE380E"></a></p>
<div class="ChapSects"><a href="chap37.html#X78C56A0A87CE380E">37 <span class="Heading">Associative Words</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap37.html#X7AB546CB7B929253">37.1 <span class="Heading">Categories of Associative Words</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X7FA8DA728773BA89">37.1-1 IsAssocWord</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap37.html#X82E7EA7F7FD31EC3">37.2 <span class="Heading">Free Groups, Monoids and Semigroups</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X8215999E835290F0">37.2-1 <span class="Heading">FreeGroup</span></a>
</span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X8601654A7C4AF1E7">37.2-2 IsFreeGroup</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X814203E281F3272E">37.2-3 AssignGeneratorVariables</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap37.html#X8405BECB7AC4EB61">37.3 <span class="Heading">Comparison of Associative Words</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X8206153078E97B90"><code>37.3-1 \=</code></a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X7BB12B9D7F990899"><code>37.3-2 \<</code></a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X805C519682B0A7ED">37.3-3 IsShortLexLessThanOrEqual</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X84875E08847B39E1">37.3-4 IsBasicWreathLessThanOrEqual</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap37.html#X79AF6C757A3547BD">37.4 <span class="Heading">Operations for Associative Words</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X87CD4C6978A7936A">37.4-1 Length</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X7F5ED4357A9C12E6">37.4-2 ExponentSumWord</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X82CC92C17AF6FFA0">37.4-3 Subword</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X8509A0A4851981BB">37.4-4 PositionWord</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X79186218787C224A">37.4-5 <span class="Heading">SubstitutedWord</span></a>
</span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X8486BFE1844CFE59">37.4-6 EliminatedWord</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap37.html#X7D357E047ABD2C6B">37.5 <span class="Heading">Operations for Associative Words by their Syllables</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X842D0B547CE93CF2">37.5-1 NumberSyllables</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X7E91575F848F4526">37.5-2 ExponentSyllable</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X7F2A8CFD811C73B1">37.5-3 GeneratorSyllable</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X7B4F7A167E844FA5">37.5-4 SubSyllables</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap37.html#X80A9F39582ED296E">37.6 <span class="Heading">Representations for Associative Words</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X7E3612247B3E241B">37.6-1 IsLetterAssocWordRep</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X7E36F7897D82417F">37.6-2 IsLetterWordsFamily</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X7C84789D7BB161E9">37.6-3 IsBLetterAssocWordRep</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X8719E7F27CDA1995">37.6-4 IsBLetterWordsFamily</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X7886F8BD83CD8081">37.6-5 IsSyllableAssocWordRep</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X7869716C84EA9D81">37.6-6 IsSyllableWordsFamily</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X83F669828481FC32">37.6-7 Is16BitsFamily</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X7BD7647C7B088389">37.6-8 LetterRepAssocWord</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X7AC8EC757CFB9A51">37.6-9 AssocWordByLetterRep</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap37.html#X7934D3D5797102EC">37.7 <span class="Heading">The External Representation for Associative Words</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap37.html#X7DC99E4284093FBB">37.8 <span class="Heading">Straight Line Programs</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X7F69FF3F7C6694CB">37.8-1 IsStraightLineProgram</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X7AECA57280DA3195">37.8-2 StraightLineProgram</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X81A8AFC47F8E4B91">37.8-3 LinesOfStraightLineProgram</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X820A592881D57802">37.8-4 NrInputsOfStraightLineProgram</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X7847D32B863E822F">37.8-5 ResultOfStraightLineProgram</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X8098EAAF7D344466">37.8-6 StringOfResultOfStraightLineProgram</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X8274C7948248C053">37.8-7 CompositionOfStraightLinePrograms</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X7A582FA97C786640">37.8-8 IntegratedStraightLineProgram</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X7C9CABD17BE4850F">37.8-9 RestrictOutputsOfSLP</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X7EF202F17DCA5D1C">37.8-10 IntermediateResultOfSLP</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X8085CF79856B2889">37.8-11 IntermediateResultOfSLPWithoutOverwrite</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X873244F37FAA717A">37.8-12 IntermediateResultsOfSLPWithoutOverwrite</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X837101F982C35035">37.8-13 ProductOfStraightLinePrograms</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X84C83CE98194FD03">37.8-14 SlotUsagePattern</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap37.html#X8188799182D82A92">37.9 <span class="Heading">Straight Line Program Elements</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X85A5838482944FA5">37.9-1 IsStraightLineProgElm</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X78889E5B7E1B3BFF">37.9-2 StraightLineProgElm</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X81BC263A7E45E775">37.9-3 StraightLineProgGens</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X7BEAE8AC809B27DC">37.9-4 EvalStraightLineProgElm</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap37.html#X7D85D1DF84DC68E3">37.9-5 StretchImportantSLPElement</a></span>
</div></div>
</div>
<h3>37 <span class="Heading">Associative Words</span></h3>
<p><a id="X7AB546CB7B929253" name="X7AB546CB7B929253"></a></p>
<h4>37.1 <span class="Heading">Categories of Associative Words</span></h4>
<p>Associative words are used to represent elements in free groups, semigroups and monoids in <strong class="pkg">GAP</strong> (see <a href="chap37.html#X82E7EA7F7FD31EC3"><span class="RefLink">37.2</span></a>). An associative word is just a sequence of letters, where each letter is an element of an alphabet (in the following called a <em>generator</em>) or its inverse. Associative words can be multiplied; in free monoids also the computation of an identity is permitted, in free groups also the computation of inverses (see <a href="chap37.html#X79AF6C757A3547BD"><span class="RefLink">37.4</span></a>).</p>
<p>Different alphabets correspond to different families of associative words. There is no relation whatsoever between words in different families.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:= FreeGroup( "a", "b", "c" );</span>
<free group on the generators [ a, b, c ]>
<span class="GAPprompt">gap></span> <span class="GAPinput">gens:= GeneratorsOfGroup(f);</span>
[ a, b, c ]
<span class="GAPprompt">gap></span> <span class="GAPinput">w:= gens[1]*gens[2]/gens[3]*gens[2]*gens[1]/gens[1]*gens[3]/gens[2];</span>
a*b*c^-1*b*c*b^-1
<span class="GAPprompt">gap></span> <span class="GAPinput">w^-1;</span>
b*c^-1*b^-1*c*b^-1*a^-1
</pre></div>
<p>Words are displayed as products of letters. The letters are usually printed like <code class="code">f1</code>, <code class="code">f2</code>, <span class="SimpleMath">...</span>, but it is possible to give user defined names to them, which can be arbitrary strings. These names do not necessarily identify a unique letter (generator), it is possible to have several letters –even in the same family– that are displayed in the same way. Note also that <em>there is no relation between the names of letters and variable names</em>. In the example above, we might have typed</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">a:= f.1;; b:= f.2;; c:= f.3;;</span>
</pre></div>
<p>(<em>Interactively</em>, the function <code class="func">AssignGeneratorVariables</code> (<a href="chap37.html#X814203E281F3272E"><span class="RefLink">37.2-3</span></a>) provides a shorthand for this.) This allows us to define <code class="code">w</code> more conveniently:</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">w := a*b/c*b*a/a*c/b;</span>
a*b*c^-1*b*c*b^-1
</pre></div>
<p>Using homomorphisms it is possible to express elements of a group as words in terms of generators, see <a href="chap39.html#X7E19F92284F6684E"><span class="RefLink">39.5</span></a>.</p>
<p><a id="X7FA8DA728773BA89" name="X7FA8DA728773BA89"></a></p>
<h5>37.1-1 IsAssocWord</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsAssocWord</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsAssocWordWithOne</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsAssocWordWithInverse</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p><code class="func">IsAssocWord</code> is the category of associative words in free semigroups, <code class="func">IsAssocWordWithOne</code> is the category of associative words in free monoids (which admit the operation <code class="func">One</code> (<a href="chap31.html#X8046262384895B2A"><span class="RefLink">31.10-2</span></a>) to compute an identity), <code class="func">IsAssocWordWithInverse</code> is the category of associative words in free groups (which have an inverse). See <code class="func">IsWord</code> (<a href="chap36.html#X843F5C3A82239398"><span class="RefLink">36.1-1</span></a>) for more general categories of words.</p>
<p><a id="X82E7EA7F7FD31EC3" name="X82E7EA7F7FD31EC3"></a></p>
<h4>37.2 <span class="Heading">Free Groups, Monoids and Semigroups</span></h4>
<p>Usually a family of associative words will be generated by constructing the free object generated by them. See <code class="func">FreeMonoid</code> (<a href="chap51.html#X79FA3FA978CA2E43"><span class="RefLink">51.2-9</span></a>), <code class="func">FreeSemigroup</code> (<a href="chap51.html#X7C72E4747BF642BB"><span class="RefLink">51.1-10</span></a>) for details.</p>
<p><a id="X8215999E835290F0" name="X8215999E835290F0"></a></p>
<h5>37.2-1 <span class="Heading">FreeGroup</span></h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ FreeGroup</code>( [<var class="Arg">wfilt</var>, ]<var class="Arg">rank</var>[, <var class="Arg">name</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">‣ FreeGroup</code>( [<var class="Arg">wfilt</var>][,] [<var class="Arg">name1</var>[, <var class="Arg">name2</var>[, <var class="Arg">...</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">‣ FreeGroup</code>( [<var class="Arg">wfilt</var>, ]<var class="Arg">names</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">‣ FreeGroup</code>( [<var class="Arg">wfilt</var>, ]<var class="Arg">infinity</var>[, <var class="Arg">name</var>][, <var class="Arg">init</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">FreeGroup</code> returns a free group. The number of generators, and the labels given to the generators, can be specified in several different ways. Warning: the labels of generators are only an aid for printing, and do not necessarily distinguish generators; see the examples at the end of <code class="func">FreeSemigroup</code> (<a href="chap51.html#X7C72E4747BF642BB"><span class="RefLink">51.1-10</span></a>) for more information.</p>
<dl>
<dt><strong class="Mark">
1: For a given rank, and an optional generator name prefix
</strong></dt>
<dd><p>Called with a nonnegative integer <var class="Arg">rank</var>, <code class="func">FreeGroup</code> returns a free group on <var class="Arg">rank</var> generators. The optional argument <var class="Arg">name</var> must be a string; its default value is <code class="code">"f"</code>.</p>
<p>If <var class="Arg">name</var> is not given but the <code class="code">generatorNames</code> option is, then this option is respected as described in Section <a href="chap50.html#X7D0FFDA4793995FC"><span class="RefLink">50.1-16</span></a>.</p>
<p>Otherwise, the generators of the returned free group are labelled <var class="Arg">name</var><code class="code">1</code>, ..., <var class="Arg">name</var><code class="code">k</code>, where <code class="code">k</code> is the value of <var class="Arg">rank</var>.</p>
</dd>
<dt><strong class="Mark">2: For given generator names</strong></dt>
<dd><p>Called with various nonempty strings, <code class="func">FreeGroup</code> returns a free group on as many generators as arguments, which are labelled <var class="Arg">name1</var>, <var class="Arg">name2</var>, etc.</p>
</dd>
<dt><strong class="Mark">3: For a given list of generator names</strong></dt>
<dd><p>Called with a finite list <var class="Arg">names</var> of nonempty strings, <code class="func">FreeGroup</code> returns a free group on <code class="code">Length(<var class="Arg">names</var>)</code> generators, whose <code class="code">i</code>-th generator is labelled <var class="Arg">names</var><code class="code">[i]</code>.</p>
</dd>
<dt><strong class="Mark">
4: For the rank <code class="keyw">infinity</code>,
an optional default generator name prefix,
and an optional finite list of generator names
</strong></dt>
<dd><p>Called in the fourth form, <code class="func">FreeGroup</code> returns a free group on infinitely many generators. The optional argument <var class="Arg">name</var> must be a string; its default value is <code class="code">"f"</code>, and the optional argument <var class="Arg">init</var> must be a finite list of nonempty strings; its default value is an empty list. The generators are initially labelled according to the list <var class="Arg">init</var>, followed by <var class="Arg">name</var><code class="code">i</code> for each <code class="code">i</code> in the range from <code class="code">Length(<var class="Arg">init</var>)+1</code> to <code class="keyw">infinity</code>.</p>
</dd>
</dl>
<p>If the optional first argument <var class="Arg">wfilt</var> is given, then it must be either <code class="code">IsSyllableWordsFamily</code>, <code class="code">IsLetterWordsFamily</code>, <code class="code">IsWLetterWordsFamily</code>, or <code class="code">IsBLetterWordsFamily</code>. This filter specifies the representation used for the elements of the free group (see <a href="chap37.html#X80A9F39582ED296E"><span class="RefLink">37.6</span></a>). If no such filter is given, a letter representation is used.</p>
<p>(For interfacing to old code that omits the representation flag, use of the syllable representation is also triggered by setting the option <code class="code">FreeGroupFamilyType</code> to the string <code class="code">"syllable"</code>; this is overwritten by the optional first argument if it is given.)</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">FreeGroup(5);</span>
<free group on the generators [ f1, f2, f3, f4, f5 ]>
<span class="GAPprompt">gap></span> <span class="GAPinput">FreeGroup(4, "gen");</span>
<free group on the generators [ gen1, gen2, gen3, gen4 ]>
<span class="GAPprompt">gap></span> <span class="GAPinput">FreeGroup(3 : generatorNames := "ack");</span>
<free group on the generators [ ack1, ack2, ack3 ]>
<span class="GAPprompt">gap></span> <span class="GAPinput">FreeGroup(2 : generatorNames := ["u", "v", "w"]);</span>
<free group on the generators [ u, v ]>
<span class="GAPprompt">gap></span> <span class="GAPinput">FreeGroup();</span>
<free group of rank zero>
<span class="GAPprompt">gap></span> <span class="GAPinput">FreeGroup("a", "b", "c");</span>
<free group on the generators [ a, b, c ]>
<span class="GAPprompt">gap></span> <span class="GAPinput">FreeGroup(["x", "y"]);</span>
<free group on the generators [ x, y ]>
<span class="GAPprompt">gap></span> <span class="GAPinput">FreeGroup(infinity);</span>
<free group with infinity generators>
<span class="GAPprompt">gap></span> <span class="GAPinput">F := FreeGroup(infinity, "g", ["a", "b"]);</span>
<free group with infinity generators>
<span class="GAPprompt">gap></span> <span class="GAPinput">GeneratorsOfGroup(F){[1..4]};</span>
[ a, b, g3, g4 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">GeneratorsOfGroup(FreeGroup(infinity, "gen")){[1..3]};</span>
[ gen1, gen2, gen3 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">FreeGroup(IsSyllableWordsFamily, 50);</span>
<free group with 50 generators>
</pre></div>
<p><a id="X8601654A7C4AF1E7" name="X8601654A7C4AF1E7"></a></p>
<h5>37.2-2 IsFreeGroup</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsFreeGroup</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>Any group consisting of elements in <code class="func">IsAssocWordWithInverse</code> (<a href="chap37.html#X7FA8DA728773BA89"><span class="RefLink">37.1-1</span></a>) lies in the filter <code class="func">IsFreeGroup</code>; this holds in particular for any group created with <code class="func">FreeGroup</code> (<a href="chap37.html#X8215999E835290F0"><span class="RefLink">37.2-1</span></a>), or any subgroup of such a group.</p>
<p>Also see Chapter <a href="chap47.html#X7AA982637E90B35A"><span class="RefLink">47</span></a>.</p>
<p><a id="X814203E281F3272E" name="X814203E281F3272E"></a></p>
<h5>37.2-3 AssignGeneratorVariables</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ AssignGeneratorVariables</code>( <var class="Arg">G</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>If <var class="Arg">G</var> is a group, whose generators are represented by symbols (for example a free group, a finitely presented group or a pc group) this function assigns these generators to global variables with the same names.</p>
<p>The aim of this function is to make it easy in interactive use to work with (for example) a free group. It is a shorthand for a sequence of assignments of the form</p>
<div class="example"><pre>
var1:=GeneratorsOfGroup(G)[1];
var2:=GeneratorsOfGroup(G)[2];
...
varn:=GeneratorsOfGroup(G)[n];
</pre></div>
<p>However, since overwriting global variables can be very dangerous, <em>it is not permitted to use this function within a function</em>. (If –despite this warning– this is done, the result is undefined.)</p>
<p>If the assignment overwrites existing variables a warning is given, if any of the variables is write protected, or any of the generator names would not be a proper variable name, an error is raised.</p>
<p><a id="X8405BECB7AC4EB61" name="X8405BECB7AC4EB61"></a></p>
<h4>37.3 <span class="Heading">Comparison of Associative Words</span></h4>
<p><a id="X8206153078E97B90" name="X8206153078E97B90"></a></p>
<h5><code>37.3-1 \=</code></h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ \=</code>( <var class="Arg">w1</var>, <var class="Arg">w2</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Two associative words are equal if they are words over the same alphabet and if they are sequences of the same letters. This is equivalent to saying that the external representations of the words are equal, see <a href="chap37.html#X7934D3D5797102EC"><span class="RefLink">37.7</span></a> and <a href="chap36.html#X852C815F85DBE4BD"><span class="RefLink">36.2</span></a>.</p>
<p>There is no <q>universal</q> empty word, every alphabet (that is, every family of words) has its own empty word.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:= FreeGroup( "a", "b", "b" );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">gens:= GeneratorsOfGroup(f);</span>
[ a, b, b ]
<span class="GAPprompt">gap></span> <span class="GAPinput">gens[2] = gens[3];</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">x:= gens[1]*gens[2];</span>
a*b
<span class="GAPprompt">gap></span> <span class="GAPinput">y:= gens[2]/gens[2]*gens[1]*gens[2];</span>
a*b
<span class="GAPprompt">gap></span> <span class="GAPinput">x = y;</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">z:= gens[2]/gens[2]*gens[1]*gens[3];</span>
a*b
<span class="GAPprompt">gap></span> <span class="GAPinput">x = z;</span>
false
</pre></div>
<p><a id="X7BB12B9D7F990899" name="X7BB12B9D7F990899"></a></p>
<h5><code>37.3-2 \<</code></h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ \<</code>( <var class="Arg">w1</var>, <var class="Arg">w2</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>The ordering of associative words is defined by length and lexicography (this ordering is called <em>short-lex</em> ordering), that is, shorter words are smaller than longer words, and words of the same length are compared w.r.t. the lexicographical ordering induced by the ordering of generators. Generators are sorted according to the order in which they were created. If the generators are invertible then each generator <var class="Arg">g</var> is larger than its inverse <var class="Arg">g</var><code class="code">^-1</code>, and <var class="Arg">g</var><code class="code">^-1</code> is larger than every generator that is smaller than <var class="Arg">g</var>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:= FreeGroup( 2 );; gens:= GeneratorsOfGroup( f );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">a:= gens[1];; b:= gens[2];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">One(f) < a^-1; a^-1 < a; a < b^-1; b^-1 < b; b < a^2; a^2 < a*b;</span>
true
true
true
true
true
true
</pre></div>
<p><a id="X805C519682B0A7ED" name="X805C519682B0A7ED"></a></p>
<h5>37.3-3 IsShortLexLessThanOrEqual</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsShortLexLessThanOrEqual</code>( <var class="Arg">u</var>, <var class="Arg">v</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>returns <code class="code">IsLessThanOrEqualUnder(<var class="Arg">ord</var>, <var class="Arg">u</var>, <var class="Arg">v</var>)</code> where <var class="Arg">ord</var> is the short less ordering for the family of <var class="Arg">u</var> and <var class="Arg">v</var>. (This is here for compatibility with <strong class="pkg">GAP</strong> 4.2.)</p>
<p><a id="X84875E08847B39E1" name="X84875E08847B39E1"></a></p>
<h5>37.3-4 IsBasicWreathLessThanOrEqual</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsBasicWreathLessThanOrEqual</code>( <var class="Arg">u</var>, <var class="Arg">v</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>returns <code class="code">IsLessThanOrEqualUnder(<var class="Arg">ord</var>, <var class="Arg">u</var>, <var class="Arg">v</var>)</code> where <var class="Arg">ord</var> is the basic wreath product ordering for the family of <var class="Arg">u</var> and <var class="Arg">v</var>. (This is here for compatibility with <strong class="pkg">GAP</strong> 4.2.)</p>
<p><a id="X79AF6C757A3547BD" name="X79AF6C757A3547BD"></a></p>
<h4>37.4 <span class="Heading">Operations for Associative Words</span></h4>
<p>The product of two given associative words is defined as the freely reduced concatenation of the words. Besides the multiplication <code class="func">\*</code> (<a href="chap31.html#X8481C9B97B214C23"><span class="RefLink">31.12-1</span></a>), the arithmetical operators <code class="func">One</code> (<a href="chap31.html#X8046262384895B2A"><span class="RefLink">31.10-2</span></a>) (if the word lies in a family with identity) and (if the generators are invertible) <code class="func">Inverse</code> (<a href="chap31.html#X78EE524E83624057"><span class="RefLink">31.10-8</span></a>), <code class="func">\/</code> (<a href="chap31.html#X8481C9B97B214C23"><span class="RefLink">31.12-1</span></a>),<code class="func">\^</code> (<a href="chap31.html#X8481C9B97B214C23"><span class="RefLink">31.12-1</span></a>), <code class="func">Comm</code> (<a href="chap31.html#X80761843831B468E"><span class="RefLink">31.12-3</span></a>), and <code class="func">LeftQuotient</code> (<a href="chap31.html#X7A37082878DB3930"><span class="RefLink">31.12-2</span></a>) are applicable to associative words, see <a href="chap31.html#X7A2914307963E370"><span class="RefLink">31.12</span></a>.</p>
<p>See also <code class="func">MappedWord</code> (<a href="chap36.html#X7EC17930781D104A"><span class="RefLink">36.3-1</span></a>), an operation that is applicable to arbitrary words.</p>
<p>See Section <a href="chap37.html#X80A9F39582ED296E"><span class="RefLink">37.6</span></a> for a discussion of the internal representations of associative words that are supported by <strong class="pkg">GAP</strong>. Note that operations to extract or act on parts of words (letter or syllables) can carry substantially different costs, depending on the representation the words are in.</p>
<p><a id="X87CD4C6978A7936A" name="X87CD4C6978A7936A"></a></p>
<h5>37.4-1 Length</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Length</code>( <var class="Arg">w</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>For an associative word <var class="Arg">w</var>, <code class="func">Length</code> returns the number of letters in <var class="Arg">w</var>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f := FreeGroup("a","b");; gens := GeneratorsOfGroup(f);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">a := gens[1];; b := gens[2];;w := a^5*b*a^2*b^-4*a;;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"> w; Length( w ); Length( a^17 ); Length( w^0 );</span>
a^5*b*a^2*b^-4*a
13
17
0
</pre></div>
<p><a id="X7F5ED4357A9C12E6" name="X7F5ED4357A9C12E6"></a></p>
<h5>37.4-2 ExponentSumWord</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ExponentSumWord</code>( <var class="Arg">w</var>, <var class="Arg">gen</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>For an associative word <var class="Arg">w</var> and a generator <var class="Arg">gen</var>, <code class="func">ExponentSumWord</code> returns the number of times <var class="Arg">gen</var> appears in <var class="Arg">w</var> minus the number of times its inverse appears in <var class="Arg">w</var>. If both <var class="Arg">gen</var> and its inverse do not occur in <var class="Arg">w</var> then <span class="SimpleMath">0</span> is returned. <var class="Arg">gen</var> may also be the inverse of a generator.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">w; ExponentSumWord( w, a ); ExponentSumWord( w, b );</span>
a^5*b*a^2*b^-4*a
8
-3
<span class="GAPprompt">gap></span> <span class="GAPinput">ExponentSumWord( (a*b*a^-1)^3, a ); ExponentSumWord( w, b^-1 );</span>
0
3
</pre></div>
<p><a id="X82CC92C17AF6FFA0" name="X82CC92C17AF6FFA0"></a></p>
<h5>37.4-3 Subword</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Subword</code>( <var class="Arg">w</var>, <var class="Arg">from</var>, <var class="Arg">to</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>For an associative word <var class="Arg">w</var> and two positive integers <var class="Arg">from</var> and <var class="Arg">to</var>, <code class="func">Subword</code> returns the subword of <var class="Arg">w</var> that begins at position <var class="Arg">from</var> and ends at position <var class="Arg">to</var>. Indexing is done with origin 1.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">w; Subword( w, 3, 7 );</span>
a^5*b*a^2*b^-4*a
a^3*b*a
</pre></div>
<p><a id="X8509A0A4851981BB" name="X8509A0A4851981BB"></a></p>
<h5>37.4-4 PositionWord</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PositionWord</code>( <var class="Arg">w</var>, <var class="Arg">sub</var>, <var class="Arg">from</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Let <var class="Arg">w</var> and <var class="Arg">sub</var> be associative words, and <var class="Arg">from</var> a positive integer. <code class="func">PositionWord</code> returns the position of the first occurrence of <var class="Arg">sub</var> as a subword of <var class="Arg">w</var>, starting at position <var class="Arg">from</var>. If there is no such occurrence, <code class="keyw">fail</code> is returned. Indexing is done with origin 1.</p>
<p>In other words, <code class="code">PositionWord( <var class="Arg">w</var>, <var class="Arg">sub</var>, <var class="Arg">from</var> )</code> is the smallest integer <span class="SimpleMath">i</span> larger than or equal to <var class="Arg">from</var> such that <code class="code">Subword( <var class="Arg">w</var>, </code><span class="SimpleMath">i</span><code class="code">,</code> <span class="SimpleMath">i</span><code class="code">+Length( <var class="Arg">sub</var> )-1 ) =</code> <var class="Arg">sub</var>, see <code class="func">Subword</code> (<a href="chap37.html#X82CC92C17AF6FFA0"><span class="RefLink">37.4-3</span></a>).</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">w; PositionWord( w, a/b, 1 );</span>
a^5*b*a^2*b^-4*a
8
<span class="GAPprompt">gap></span> <span class="GAPinput">Subword( w, 8, 9 );</span>
a*b^-1
<span class="GAPprompt">gap></span> <span class="GAPinput">PositionWord( w, a^2, 1 );</span>
1
<span class="GAPprompt">gap></span> <span class="GAPinput">PositionWord( w, a^2, 2 );</span>
2
<span class="GAPprompt">gap></span> <span class="GAPinput">PositionWord( w, a^2, 6 );</span>
7
<span class="GAPprompt">gap></span> <span class="GAPinput">PositionWord( w, a^2, 8 );</span>
fail
</pre></div>
<p><a id="X79186218787C224A" name="X79186218787C224A"></a></p>
<h5>37.4-5 <span class="Heading">SubstitutedWord</span></h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SubstitutedWord</code>( <var class="Arg">w</var>, <var class="Arg">from</var>, <var class="Arg">to</var>, <var class="Arg">by</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">‣ SubstitutedWord</code>( <var class="Arg">w</var>, <var class="Arg">sub</var>, <var class="Arg">from</var>, <var class="Arg">by</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Let <var class="Arg">w</var> be an associative word.</p>
<p>In the first form, <code class="func">SubstitutedWord</code> returns the associative word obtained by replacing the subword of <var class="Arg">w</var> that begins at position <var class="Arg">from</var> and ends at position <var class="Arg">to</var> by the associative word <var class="Arg">by</var>. <var class="Arg">from</var> and <var class="Arg">to</var> must be positive integers, indexing is done with origin 1. In other words, <code class="code">SubstitutedWord( <var class="Arg">w</var>, <var class="Arg">from</var>, <var class="Arg">to</var>, <var class="Arg">by</var> )</code> is the product of the three words <code class="code">Subword( <var class="Arg">w</var>, 1, <var class="Arg">from</var>-1 )</code>, <var class="Arg">by</var>, and <code class="code">Subword( <var class="Arg">w</var>, <var class="Arg">to</var>+1, Length( <var class="Arg">w</var> ) )</code>, see <code class="func">Subword</code> (<a href="chap37.html#X82CC92C17AF6FFA0"><span class="RefLink">37.4-3</span></a>).</p>
<p>In the second form, <code class="func">SubstitutedWord</code> returns the associative word obtained by replacing the first occurrence of the associative word <var class="Arg">sub</var> of <var class="Arg">w</var>, starting at position <var class="Arg">from</var>, by the associative word <var class="Arg">by</var>; if there is no such occurrence, <code class="keyw">fail</code> is returned.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">w; SubstitutedWord( w, 3, 7, a^19 );</span>
a^5*b*a^2*b^-4*a
a^22*b^-4*a
<span class="GAPprompt">gap></span> <span class="GAPinput">SubstitutedWord( w, a, 6, b^7 );</span>
a^5*b^8*a*b^-4*a
<span class="GAPprompt">gap></span> <span class="GAPinput">SubstitutedWord( w, a*b, 6, b^7 );</span>
fail
</pre></div>
<p><a id="X8486BFE1844CFE59" name="X8486BFE1844CFE59"></a></p>
<h5>37.4-6 EliminatedWord</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ EliminatedWord</code>( <var class="Arg">w</var>, <var class="Arg">gen</var>, <var class="Arg">by</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>For an associative word <var class="Arg">w</var>, a generator <var class="Arg">gen</var>, and an associative word <var class="Arg">by</var>, <code class="func">EliminatedWord</code> returns the associative word obtained by replacing each occurrence of <var class="Arg">gen</var> in <var class="Arg">w</var> by <var class="Arg">by</var>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">w; EliminatedWord( w, a, a^2 ); EliminatedWord( w, a, b^-1 );</span>
a^5*b*a^2*b^-4*a
a^10*b*a^4*b^-4*a^2
b^-11
</pre></div>
<p><a id="X7D357E047ABD2C6B" name="X7D357E047ABD2C6B"></a></p>
<h4>37.5 <span class="Heading">Operations for Associative Words by their Syllables</span></h4>
<p>For an associative word <var class="Arg">w</var> <span class="SimpleMath">= x_1^{n_1} x_2^{n_2} ⋯ x_k^{n_k}</span> over an alphabet containing <span class="SimpleMath">x_1, x_2, ..., x_k</span>, such that <span class="SimpleMath">x_i ≠ x_{i+1}^{± 1}</span> for <span class="SimpleMath">1 ≤ i ≤ k-1</span>, the subwords <span class="SimpleMath">x_i^{e_i}</span> are uniquely determined; these powers of generators are called the <em>syllables</em> of <span class="SimpleMath">w</span>.</p>
<p><a id="X842D0B547CE93CF2" name="X842D0B547CE93CF2"></a></p>
<h5>37.5-1 NumberSyllables</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ NumberSyllables</code>( <var class="Arg">w</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p><code class="func">NumberSyllables</code> returns the number of syllables of the associative word <var class="Arg">w</var>.</p>
<p><a id="X7E91575F848F4526" name="X7E91575F848F4526"></a></p>
<h5>37.5-2 ExponentSyllable</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ExponentSyllable</code>( <var class="Arg">w</var>, <var class="Arg">i</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p><code class="func">ExponentSyllable</code> returns the exponent of the <var class="Arg">i</var>-th syllable of the associative word <var class="Arg">w</var>.</p>
<p><a id="X7F2A8CFD811C73B1" name="X7F2A8CFD811C73B1"></a></p>
<h5>37.5-3 GeneratorSyllable</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ GeneratorSyllable</code>( <var class="Arg">w</var>, <var class="Arg">i</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p><code class="func">GeneratorSyllable</code> returns the number of the generator that is involved in the <var class="Arg">i</var>-th syllable of the associative word <var class="Arg">w</var>.</p>
<p><a id="X7B4F7A167E844FA5" name="X7B4F7A167E844FA5"></a></p>
<h5>37.5-4 SubSyllables</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SubSyllables</code>( <var class="Arg">w</var>, <var class="Arg">from</var>, <var class="Arg">to</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p><code class="func">SubSyllables</code> returns the subword of the associative word <var class="Arg">w</var> that consists of the syllables from positions <var class="Arg">from</var> to <var class="Arg">to</var>, where <var class="Arg">from</var> and <var class="Arg">to</var> must be positive integers, and indexing is done with origin 1.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">w; NumberSyllables( w );</span>
a^5*b*a^2*b^-4*a
5
<span class="GAPprompt">gap></span> <span class="GAPinput">ExponentSyllable( w, 3 );</span>
2
<span class="GAPprompt">gap></span> <span class="GAPinput">GeneratorSyllable( w, 3 );</span>
1
<span class="GAPprompt">gap></span> <span class="GAPinput">SubSyllables( w, 2, 3 );</span>
b*a^2
</pre></div>
<p><a id="X80A9F39582ED296E" name="X80A9F39582ED296E"></a></p>
<h4>37.6 <span class="Heading">Representations for Associative Words</span></h4>
<p><strong class="pkg">GAP</strong> provides two different internal kinds of representations of associative words. The first one are <q>syllable representations</q> in which words are stored in syllable (i.e. generator,exponent) form. (Older versions of <strong class="pkg">GAP</strong> only used this representation.) The second kind are <q>letter representations</q> in which each letter in a word is represented by its index number. Negative numbers are used for inverses. Unless the syllable representation is specified explicitly when creating the free group/monoid or semigroup, a letter representation is used by default.</p>
<p>Depending on the task in mind, either of these two representations will perform better in time or in memory use and algorithms that are syllable or letter based (for example <code class="func">GeneratorSyllable</code> (<a href="chap37.html#X7F2A8CFD811C73B1"><span class="RefLink">37.5-3</span></a>) and <code class="func">Subword</code> (<a href="chap37.html#X82CC92C17AF6FFA0"><span class="RefLink">37.4-3</span></a>)) perform substantially better in the corresponding representation. For example when creating pc groups (see <a href="chap46.html#X7EAD57C97EBF7E67"><span class="RefLink">46</span></a>), it is advantageous to use a syllable representation while calculations in free groups usually benefit from using a letter representation.</p>
<p><a id="X7E3612247B3E241B" name="X7E3612247B3E241B"></a></p>
<h5>37.6-1 IsLetterAssocWordRep</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsLetterAssocWordRep</code>( <var class="Arg">obj</var> )</td><td class="tdright">( representation )</td></tr></table></div>
<p>A word in letter representation stores a list of generator/inverses numbers (as given by <code class="func">LetterRepAssocWord</code> (<a href="chap37.html#X7BD7647C7B088389"><span class="RefLink">37.6-8</span></a>)). Letter access is fast, syllable access is slow for such words.</p>
<p><a id="X7E36F7897D82417F" name="X7E36F7897D82417F"></a></p>
<h5>37.6-2 IsLetterWordsFamily</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsLetterWordsFamily</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>A letter word family stores words by default in letter form.</p>
<p>Internally, there are letter representations that use integers (4 Byte) to represent a generator and letter representations that use single bytes to represent a character. The latter are more memory efficient, but can only be used if there are less than 128 generators (in which case they are used by default).</p>
<p><a id="X7C84789D7BB161E9" name="X7C84789D7BB161E9"></a></p>
<h5>37.6-3 IsBLetterAssocWordRep</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsBLetterAssocWordRep</code>( <var class="Arg">obj</var> )</td><td class="tdright">( representation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsWLetterAssocWordRep</code>( <var class="Arg">obj</var> )</td><td class="tdright">( representation )</td></tr></table></div>
<p>these two subrepresentations of <code class="func">IsLetterAssocWordRep</code> (<a href="chap37.html#X7E3612247B3E241B"><span class="RefLink">37.6-1</span></a>) indicate whether the word is stored as a list of bytes (in a string) or as a list of integers).</p>
<p><a id="X8719E7F27CDA1995" name="X8719E7F27CDA1995"></a></p>
<h5>37.6-4 IsBLetterWordsFamily</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsBLetterWordsFamily</ | | |