Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/GAP/doc/ref/   (Algebra von RWTH Aachen Version 4.15.1©)  Datei vom 18.9.2025 mit Größe 123 kB image not shown  

Quelle  chap53.html   Sprache: HTML

 
 products/sources/formale Sprachen/GAP/doc/ref/chap53.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 53: Transformations</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="chap53"  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="chap52.html">[Previous Chapter]</a>    <a href="chap54.html">[Next Chapter]</a>   </div>

<p id="mathjaxlink" class="pcenter"><a href="chap53_mj.html">[MathJax on]</a></p>
<p><a id="X860026B880BCB2A5" name="X860026B880BCB2A5"></a></p>
<div class="ChapSects"><a href="chap53.html#X860026B880BCB2A5">53 <span class="Heading">Transformations</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap53.html#X7CF9291C7CC42340">53.1 <span class="Heading">The family and categories of transformations</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X7B6259467974FB70">53.1-1 IsTransformation</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X7A6747CE85F2E6EA">53.1-2 IsTransformationCollection</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X7E58AFA1832FF064">53.1-3 TransformationFamily</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap53.html#X80F3086F87E93DF8">53.2 <span class="Heading">Creating transformations</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X86ADBDE57A20E323">53.2-1 Transformation</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X8040642687531E7F">53.2-2 Transformation</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X7E82EBD68455EE4A">53.2-3 TransformationByImageAndKernel</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X85D1071484CE004C">53.2-4 Idempotent</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X7C2A3FC9782F2099">53.2-5 TransformationOp</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X7D6FCC417DE86CD1">53.2-6 TransformationNumber</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X8475448F87E8CB8A">53.2-7 <span class="Heading">RandomTransformation</span></a>
</span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X8268A58685BEFD6F">53.2-8 IdentityTransformation</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X7F1E4B5184210D2B">53.2-9 ConstantTransformation</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap53.html#X7F81A18B813C9DF0">53.3 <span class="Heading">Changing the representation of a transformation</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X7C5360B2799943F3">53.3-1 AsTransformation</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X846A6F6B7B715188">53.3-2 RestrictedTransformation</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X8708AE247F5B129B">53.3-3 PermutationOfImage</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap53.html#X812CEC008609A8A2">53.4 <span class="Heading">Operators for transformations</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X853031E37F214D10"><code>53.4-1 \^</code></a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X824A8E247DE7E53E"><code>53.4-2 \^</code></a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X7F6573E67D27D822"><code>53.4-3 \*</code></a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X828CA7137F97C124"><code>53.4-4 \/</code></a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X7856D91E8709EF5B">53.4-5 LeftQuotient</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X84B8E294826A9377"><code>53.4-6 \<</code></a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X7D454AAD851AE07E"><code>53.4-7 \=</code></a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X83DBA2A18719EFA8">53.4-8 PermLeftQuoTransformation</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X8275DFAA8270BB59">53.4-9 IsInjectiveListTrans</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X834A313B7DAF06D5">53.4-10 ComponentTransformationInt</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X82F5DEEC837B60A3">53.4-11 PreImagesOfTransformation</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap53.html#X86DE4F7A7C535820">53.5 <span class="Heading">Attributes for transformations</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X78A209C87CF0E32B">53.5-1 DegreeOfTransformation</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X7AEC9E6687B3505A">53.5-2 ImageListOfTransformation</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X839A6D6082A21D1F">53.5-3 ImageSetOfTransformation</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X818EBB167C7EA37B">53.5-4 RankOfTransformation</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X844F00F982D5BD3C">53.5-5 MovedPoints</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X7FA6A4B57FDA003D">53.5-6 NrMovedPoints</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X86C0DDDC7881273A">53.5-7 SmallestMovedPoint</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X8383A7727AC97724">53.5-8 LargestMovedPoint</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X7CCFE27E83676572">53.5-9 SmallestImageOfMovedPoint</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X7E7172567C3A3E63">53.5-10 LargestImageOfMovedPoint</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X8083794579274E87">53.5-11 FlatKernelOfTransformation</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X80FCB5048789CF75">53.5-12 KernelOfTransformation</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X860306EB7FAAD2D4">53.5-13 InverseOfTransformation</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X7BB9DB6E8558356D">53.5-14 Inverse</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X863216CB7AF88BED">53.5-15 IndexPeriodOfTransformation</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X85FE9F20810BCC70">53.5-16 SmallestIdempotentPower</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X858E944481F6B591">53.5-17 ComponentsOfTransformation</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X8640AE1C79201470">53.5-18 NrComponentsOfTransformation</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X784650B583CEAF7D">53.5-19 ComponentRepsOfTransformation</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X7EAA15557D55D93B">53.5-20 CyclesOfTransformation</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X786EB02A829260DB">53.5-21 CycleTransformationInt</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X845869E0815A6AA6">53.5-22 LeftOne</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X7F19C9C77F9F8981">53.5-23 TrimTransformation</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap53.html#X810D23017A5527B7">53.6 <span class="Heading">Displaying transformations</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap53.html#X7B51CE257B814B09">53.7 <span class="Heading">Semigroups of transformations</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X7EAF835D7FE4026F">53.7-1 IsTransformationSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X7EA699C687952544">53.7-2 DegreeOfTransformationSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X7D2B0685815B4053">53.7-3 FullTransformationSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X85C58E1E818C838C">53.7-4 IsFullTransformationSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X78F29C817CF6827F">53.7-5 IsomorphismTransformationSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap53.html#X820ECE00846E480F">53.7-6 AntiIsomorphismTransformationSemigroup</a></span>
</div></div>
</div>

<h3>53 <span class="Heading">Transformations</span></h3>

<p>This chapter describes the functions in <strong class="pkg">GAP</strong> for transformations.</p>

<p>A <em>transformation</em> in <strong class="pkg">GAP</strong> is simply a function from the positive integers to the positive integers. Transformations are to semigroup theory what permutations are to group theory, in the sense that every semigroup can be realised as a semigroup of transformations. In <strong class="pkg">GAP</strong> transformation semigroups are always finite, and so only finite semigroups can be realised in this way.</p>

<p>A transformation in <strong class="pkg">GAP</strong> acts on the positive integers (up to some architecture dependent limit) on the right. The image of a point <code class="code">i</code> under a transformation <code class="code">f</code> is expressed as <code class="code">i ^ f</code> in <strong class="pkg">GAP</strong>. This action is also implemented by the function <code class="func">OnPoints</code> (<a href="chap41.html#X7FE417DD837987B4"><span class="RefLink">41.2-1</span></a>). If <code class="code">i ^ f</code> is different from <code class="code">i</code>, then <code class="code">i</code> is <em>moved</em> by <em>f</em> and otherwise it is <em>fixed</em> by <code class="code">f</code>. Transformations in <strong class="pkg">GAP</strong> are created using the operations described in Section <a href="chap53.html#X80F3086F87E93DF8"><span class="RefLink">53.2</span></a>.</p>

<p>The <em>degree</em> of a transformation <code class="code">f</code> is usually defined as the largest positive integer where <code class="code">f</code> is defined. In previous versions of <strong class="pkg">GAP</strong>, transformations were only defined on positive integers less than their degree, it was only possible to multiply transformations of equal degree, and a transformation did not act on any point exceeding its degree. Starting with version 4.7 of <strong class="pkg">GAP</strong>, transformations behave more like permutations, in that they fix unspecified points and it is possible to multiply arbitrary transformations; see Chapter <a href="chap42.html#X80F808307A2D5AB8"><span class="RefLink">42</span></a>. The definition of the degree of a transformation <code class="code">f</code> in the current version of <strong class="pkg">GAP</strong> is the largest value <code class="code">n</code> such that <code class="code">n ^ f <> n</code> or <code class="code">i ^ f = n</code> for some <code class="code">i <> n</code>. Equivalently, the degree of a transformation is the least value <code class="code">n</code> such that <code class="code">[ n + 1, n + 2, ... ]</code> is fixed pointwise by <code class="code">f</code>.</p>

<p>The transformations of a given degree belong to the full transformation semigroup of that degree; see <code class="func">FullTransformationSemigroup</code> (<a href="chap53.html#X7D2B0685815B4053"><span class="RefLink">53.7-3</span></a>). Transformation semigroups are hence subsemigroups of the full transformation semigroup.</p>

<p>It is possible to use transformations in <strong class="pkg">GAP</strong> without reference to the degree, much as it is possible to use permutations in this way. However, for backwards compatibility, and because it is sometimes useful, it is possible to access the degree of a transformation using <code class="func">DegreeOfTransformation</code> (<a href="chap53.html#X78A209C87CF0E32B"><span class="RefLink">53.5-1</span></a>). Certain attributes of transformations are also calculated with respect to the degree, such as the rank, image set, or kernel (these values can also be calculated with respect to any positive integer). So, it is possible to ignore the degree of a transformation if you prefer to think of transformations as acting on the positive integers in a similar way to permutations. For example, this approach is used in the <strong class="pkg">FR</strong> package. It is also possible to think of transformations as only acting on the positive integers not exceeding their degree. For example, this was the approach formerly used in <strong class="pkg">GAP</strong> and it is also useful in the <strong class="pkg">Semigroups</strong> package.</p>

<p>Transformations are displayed, by default, using the list <code class="code">[ 1 ^ f .. n ^ f ]</code> where <code class="code">n</code> is the degree of <code class="code">f</code>. This behaviour differs from that of versions of <strong class="pkg">GAP</strong> earlier than 4.7. See Section <a href="chap53.html#X810D23017A5527B7"><span class="RefLink">53.6</span></a> for more information.</p>

<p>The <em>rank</em> of a transformation on the positive integers up to <code class="code">n</code> is the number of distinct points in <code class="code">[ 1 ^ f .. n ^ f ]</code>. The <em>kernel</em> of a transformation <code class="code">f</code> on <code class="code">[ 1 .. n ]</code> is the equivalence relation on <code class="code">[ 1 .. n ]</code> consisting of those pairs <code class="code">(i, j)</code> of positive integers such that <code class="code">i ^ f = j ^ f</code>. The kernel of a transformation is represented in two ways: as a partition of <code class="code">[ 1 .. n ]</code> or as the image list of a transformation <code class="code">g</code> such that the kernel of <code class="code">g</code> on <code class="code">[ 1 .. n ]</code> equals the kernel of <code class="code">f</code> and <code class="code">j ^ g = i</code> for all <code class="code">j</code> in <code class="code">i</code>th class. The latter is referred to as the <em>flat kernel</em> of <code class="code">f</code>. For any given transformation <code class="code">f</code> and value <code class="code">n</code>, there is a unique transformation <code class="code">g</code> with this property.</p>

<p>A <em>functional digraph</em> is a directed graph where every vertex has out-degree <span class="SimpleMath">1</span>. A transformation <var class="Arg">f</var> can be thought of as a functional digraph with vertices the positive integers and edges from <code class="code">i</code> to <code class="code">i ^ f</code> for every <code class="code">i</code>. A <em>component</em> of a transformation is defined as a component of the corresponding functional digraph. More specifically, <code class="code">i</code> and <code class="code">j</code> are in the same component if and only if there are <span class="SimpleMath">i = v_0, v_1, ..., v_n = j</span> such that either <span class="SimpleMath">v_k+1=v_k^f</span> or <span class="SimpleMath">v_k=v_k+1^f</span> for all <span class="SimpleMath">k</span>. A <em>cycle</em> of a transformation is defined as a cycle (or strongly connected component) of the corresponding functional digraph. More specifically, <code class="code">i</code> belongs to a cycle of <var class="Arg">f</var> if there are <span class="SimpleMath">i=v_0, v_1, ..., v_n=i</span> such that either <span class="SimpleMath">v_k+1=v_k^f</span> or <span class="SimpleMath">v_k=v_k+1^f</span> for all <span class="SimpleMath">k</span>.</p>

<p>Internally, <strong class="pkg">GAP</strong> stores a transformation <code class="code">f</code> as a list consisting of the images <code class="code">i ^ f</code> for all values of <code class="code">i</code> less than a value which is at least the degree of <code class="code">f</code> and which is determined at the time of the creation of <code class="code">f</code>. When the degree of a transformation <code class="code">f</code> is at most 65536, the images of points under <code class="code">f</code> are stored as 16-bit integers, the kernel and image set are subobjects of <code class="code">f</code> which are plain lists of <strong class="pkg">GAP</strong> integers. When the degree of <code class="code">f</code> is greater than 65536, the images of points under <code class="code">f</codeare stored as 32-bit integers; the kernel and image set are stored in the same way as before. A transformation belongs to <code class="code">IsTrans2Rep</code> if it is stored using 16-bit integers and to <code class="code">IsTrans4Rep</code> if it is stored using 32-bit integers.</p>

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

<h4>53.1 <span class="Heading">The family and categories of transformations</span></h4>

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

<h5>53.1-1 IsTransformation</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsTransformation</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>Every transformation in <strong class="pkg">GAP</strong> belongs to the category <code class="code">IsTransformation</code>. Basic operations for transformations are <code class="func">ImageListOfTransformation</code> (<a href="chap53.html#X7AEC9E6687B3505A"><span class="RefLink">53.5-2</span></a>), <code class="func">ImageSetOfTransformation</code> (<a href="chap53.html#X839A6D6082A21D1F"><span class="RefLink">53.5-3</span></a>), <code class="func">KernelOfTransformation</code> (<a href="chap53.html#X80FCB5048789CF75"><span class="RefLink">53.5-12</span></a>), <code class="func">FlatKernelOfTransformation</code> (<a href="chap53.html#X8083794579274E87"><span class="RefLink">53.5-11</span></a>), <code class="func">RankOfTransformation</code> (<a href="chap53.html#X818EBB167C7EA37B"><span class="RefLink">53.5-4</span></a>), <code class="func">DegreeOfTransformation</code> (<a href="chap53.html#X78A209C87CF0E32B"><span class="RefLink">53.5-1</span></a>), multiplication of two transformations via <code class="keyw">*</code>, and exponentiation with the first argument a positive integer <code class="code">i</code> and second argument a transformation <code class="code">f</code> where the result is the image <code class="code">i ^ f</code> of the point <code class="code">i</code> under <code class="code">f</code>.</p>

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

<h5>53.1-2 IsTransformationCollection</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsTransformationCollection</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>Every collection of transformations belongs to the category <code class="code">IsTransformationCollection</code>. For example, transformation semigroups belong to <code class="code">IsTransformationCollection</code>.</p>

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

<h5>53.1-3 TransformationFamily</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ TransformationFamily</code></td><td class="tdright">( family )</td></tr></table></div>
<p>The family of all transformations is <code class="code">TransformationFamily</code>.</p>

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

<h4>53.2 <span class="Heading">Creating transformations</span></h4>

<p>There are several ways of creating transformations in <strong class="pkg">GAP</strong>, which are described in this section.</p>

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

<h5>53.2-1 Transformation</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Transformation</code>( <var class="Arg">list</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">‣ Transformation</code>( <var class="Arg">list</var>, <var class="Arg">func</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">‣ TransformationList</code>( <var class="Arg">list</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A transformation.</p>

<p><code class="code">TransformationList</code> returns the transformation <code class="code">f</code> such that <code class="code">i ^ <var class="Arg">f</var> = <var class="Arg">list</var>[i]</code> if <code class="code">i</code> is between <code class="code">1</code> and the length of <var class="Arg">list</var> and <code class="code">i ^ <var class="Arg">f</var> = i</code> if <code class="code">i</code> is larger than the length of <var class="Arg">list</var>. An error will occur in <code class="code">TransformationList</code> if <var class="Arg">list</var> is not dense, if <var class="Arg">list</var> contains an element which is not a positive integer, or if <var class="Arg">list</var> contains an integer not in <code class="code">[ 1 .. Length( <var class="Arg">list</var> ) ]</code>.</p>

<p><code class="code">TransformationList</code> is the analogue in the context of transformations of <code class="func">PermList</code> (<a href="chap42.html#X78D611D17EA6E3BC"><span class="RefLink">42.5-2</span></a>). <code class="code">Transformation</code> is a synonym of <code class="code">TransformationList</code> when the argument is a list.</p>

<p>When the arguments are a list of positive integers <var class="Arg">list</var> and a function <var class="Arg">func</var>, <code class="code">Transformation</code> returns the transformation <code class="code">f</code> such that <code class="code"><var class="Arg">list</var>[i] ^ f = <var class="Arg">func</var>( <var class="Arg">list</var>[i] )</code> if <code class="code">i</code> is in the range <code class="code">[ 1 .. Length( <var class="Arg">list</var> ) ]</code> and <code class="code">f</codefixes all other points.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">SetUserPreference( "NotationForTransformations""input" );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">f := Transformation( [ 11, 10, 2, 11, 4, 4, 7, 6, 9, 10, 1, 11 ] );</span>
Transformation( [ 11, 10, 2, 11, 4, 4, 7, 6, 9, 10, 1, 11 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">f := TransformationList( [ 2, 3, 3, 1 ] );</span>
Transformation( [ 2, 3, 3, 1 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">SetUserPreference( "NotationForTransformations""fr" );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">f := Transformation( [ 10, 11 ], x -> x ^ 2 );</span>
<transformation: 1,2,3,4,5,6,7,8,9,100,121>
<span class="GAPprompt">gap></span> <span class="GAPinput">SetUserPreference( "NotationForTransformations""input" );</span>
</pre></div>

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

<h5>53.2-2 Transformation</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Transformation</code>( <var class="Arg">src</var>, <var class="Arg">dst</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">‣ TransformationListList</code>( <var class="Arg">src</var>, <var class="Arg">dst</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A transformation.</p>

<p>If <var class="Arg">src</var> and <var class="Arg">dst</var> are lists of positive integers of the same length, such that <var class="Arg">src</var> contains no element twice, then <code class="code">TransformationListList( <var class="Arg">src</var>, <var class="Arg">dst</var> )</code> returns a transformation <code class="code">f</code> such that <code class="code">src[i] ^ <var class="Arg">f</var> = dst[i]</code>. The transformation <var class="Arg">f</var> fixes all points larger than the maximum of the entries in <var class="Arg">src</var> and <var class="Arg">dst</var>.</p>

<p><code class="code">TransformationListList</code> is the analogue in the context of transformations of <code class="func">MappingPermListList</code> (<a href="chap42.html#X8087DCC780B9656A"><span class="RefLink">42.5-3</span></a>). <code class="code">Transformation</code> is a synonym of <code class="code">TransformationListList</code> when its arguments are two lists of positive integers.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">Transformation( [ 10, 11 ],[ 11, 12 ] );</span>
Transformation( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 12 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">TransformationListList( [ 1, 2, 3 ], [ 4, 5, 6 ] );</span>
Transformation( [ 4, 5, 6, 4, 5, 6 ] )
</pre></div>

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

<h5>53.2-3 TransformationByImageAndKernel</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ TransformationByImageAndKernel</code>( <var class="Arg">im</var>, <var class="Arg">ker</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A transformation or <code class="keyw">fail</code>.</p>

<p>This operation returns the transformation <code class="code">f</code> where <code class="code">i ^ f = <var class="Arg">im</var>[<var class="Arg">ker</var>[i]]</code> for <code class="code">i</codein the range <code class="code">[ 1 .. Length( <var class="Arg">ker</var> ) ]</code>. This transformation has flat kernel equal to <var class="Arg">ker</var> and image set equal to <code class="code">Set( <var class="Arg">im</var> )</code>.</p>

<p>The argument <var class="Arg">im</var> should be a duplicate free list of positive integers and <var class="Arg">ker</var> should be the flat kernel of a transformation with rank equal to the length of <var class="Arg">im</var>. If the arguments do not fulfil these conditions, then <code class="keyw">fail</code> is returned.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">TransformationByImageAndKernel( [ 8, 1, 3, 4 ],</span>
<span class="GAPprompt">></span> <span class="GAPinput">                                   [ 1, 2, 3, 1, 2, 1, 2, 4 ] );</span>
Transformation( [ 8, 1, 3, 8, 1, 8, 1, 4 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">TransformationByImageAndKernel( [ 1, 3, 8, 4 ],</span>
<span class="GAPprompt">></span> <span class="GAPinput">                                   [ 1, 2, 3, 1, 2, 1, 2, 4 ] );</span>
Transformation( [ 1, 3, 8, 1, 3, 1, 3, 4 ] )
</pre></div>

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

<h5>53.2-4 Idempotent</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Idempotent</code>( <var class="Arg">im</var>, <var class="Arg">ker</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A transformation or <code class="keyw">fail</code>.</p>

<p><code class="func">Idempotent</code> returns the idempotent transformation with image set <var class="Arg">im</var> and flat kernel <var class="Arg">ker</var> if such a transformation exists and <code class="keyw">fail</code> if it does not. More specifically, a transformation is returned when the argument <var class="Arg">im</var> is a set of positive integers and <var class="Arg">ker</var> is the flat kernel of a transformation with rank equal to the length of <var class="Arg">im</var> and where <var class="Arg">im</var> has one element in every class of the kernel corresponding to <var class="Arg">ker</var>.</p>

<p>Note that this is function does not always return the same transformation as <code class="code">TransformationByImageAndKernel</code> with the same arguments.</p>


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

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

<h5>53.2-5 TransformationOp</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ TransformationOp</code>( <var class="Arg">obj</var>, <var class="Arg">list</var>[, <var class="Arg">func</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">‣ TransformationOpNC</code>( <var class="Arg">obj</var>, <var class="Arg">list</var>[, <var class="Arg">func</var>] )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A transformation or <code class="keyw">fail</code>.</p>

<p><code class="func">TransformationOp</code> returns the transformation that corresponds to the action of the object <var class="Arg">obj</var> on the domain or list <var class="Arg">list</var> via the function <var class="Arg">func</var>. If the optional third argument <var class="Arg">func</var> is not specified, then the action <code class="func">OnPoints</code> (<a href="chap41.html#X7FE417DD837987B4"><span class="RefLink">41.2-1</span></a>) is used by default. Note that the returned transformation refers to the positions in <var class="Arg">list</var> even if <var class="Arg">list</var> itself consists of integers.</p>

<p>This function is the analogue in the context of transformations of <code class="func">Permutation</code> (<a href="chap41.html#X7807A33381DCAB26"><span class="RefLink">41.9-1</span></a>).</p>

<p>If <var class="Arg">obj</var> does not map elements of <var class="Arg">list</var> into <var class="Arg">list</var>, then <code class="keyw">fail</code> is returned.</p>

<p><code class="func">TransformationOpNC</code> does not check that <var class="Arg">obj</var> maps elements of <var class="Arg">list</var> to elements of <var class="Arg">list</var> or that a transformation is defined by the action of <var class="Arg">obj</var> on <var class="Arg">list</var> via <var class="Arg">func</var>. This function should be used only with caution, and in situations where it is guaranteed that the arguments have the required properties.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f := Transformation( [ 10, 2, 3, 10, 5, 10, 7, 2, 5, 6 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">TransformationOp( f, [ 2, 3 ] );</span>
IdentityTransformation
<span class="GAPprompt">gap></span> <span class="GAPinput">TransformationOp( f, [ 1, 2, 3 ] );</span>
fail
<span class="GAPprompt">gap></span> <span class="GAPinput">S := SemigroupByMultiplicationTable( [ [ 1, 1, 1 ],</span>
<span class="GAPprompt">></span> <span class="GAPinput">                                          [ 1, 1, 1 ],</span>
<span class="GAPprompt">></span> <span class="GAPinput">                                          [ 1, 1, 2 ] ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">TransformationOp( Elements( S )[1], S, OnRight );</span>
Transformation( [ 1, 1, 1 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">TransformationOp( Elements( S )[3], S, OnRight );</span>
Transformation( [ 1, 1, 2 ] )
</pre></div>

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

<h5>53.2-6 TransformationNumber</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ TransformationNumber</code>( <var class="Arg">m</var>, <var class="Arg">n</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">‣ NumberTransformation</code>( <var class="Arg">f</var>[, <var class="Arg">n</var>] )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A transformation or a number.</p>

<p>These functions implement a bijection from the transformations with degree at most <var class="Arg">n</var> to the numbers <code class="code">[ 1 .. <var class="Arg">n</var> ^ <var class="Arg">n</var> ]</code>.</p>

<p>More precisely, if <var class="Arg">m</var> and <var class="Arg">n</var> are positive integers such that <var class="Arg">m</var> is at most <code class="code"><var class="Arg">n</var> ^ <var class="Arg">n</var></code>, then <code class="code">TransformationNumber</code> returns the <var class="Arg">m</var>th transformation with degree at most <var class="Arg">n</var>.</p>

<p>If <var class="Arg">f</var> is a transformation and <var class="Arg">n</var> is a positive integer, which is greater than or equal to the degree of <var class="Arg">f</var>, then <code class="code">NumberTransformation</code> returns the number in <code class="code">[ 1 .. <var class="Arg">n</var> ^ <var class="Arg">n</var> ]</code> that corresponds to <var class="Arg">f</var>. If the optional second argument <var class="Arg">n</var> is not specified, then the degree of <var class="Arg">f</var> is used by default.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f := Transformation( [ 3, 3, 5, 3, 3 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">NumberTransformation( f, 5 );</span>
1613
<span class="GAPprompt">gap></span> <span class="GAPinput">NumberTransformation( f, 10 );</span>
2242256790
<span class="GAPprompt">gap></span> <span class="GAPinput">TransformationNumber( 2242256790, 10 );</span>
Transformation( [ 3, 3, 5, 3, 3 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">TransformationNumber( 1613, 5 );</span>
Transformation( [ 3, 3, 5, 3, 3 ] )</pre></div>

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

<h5>53.2-7 <span class="Heading">RandomTransformation</span></h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RandomTransformation</code>( <var class="Arg">n</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A random transformation.</p>

<p>If <var class="Arg">n</var> is a positive integer, then <code class="code">RandomTransformation</code> returns a random transformation with degree at most <var class="Arg">n</var>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">RandomTransformation( 6 );</span>
Transformation( [ 2, 1, 2, 1, 1, 2 ] )</pre></div>

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

<h5>53.2-8 IdentityTransformation</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IdentityTransformation</code></td><td class="tdright">( global variable )</td></tr></table></div>
<p>This variable is bound to the identity transformation, which has degree <code class="code">0</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">IdentityTransformation;</span>
IdentityTransformation
</pre></div>

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

<h5>53.2-9 ConstantTransformation</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ConstantTransformation</code>( <var class="Arg">m</var>, <var class="Arg">n</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A transformation.</p>

<p>This function returns a constant transformation <code class="code">f</code> such that <code class="code">i ^ f = <var class="Arg">n</var></code> for all <code class="code">i</code> less than or equal to <var class="Arg">m</var>, when <var class="Arg">n</var> and <var class="Arg">m</var> are positive integers.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">ConstantTransformation( 5, 1 );</span>
Transformation( [ 1, 1, 1, 1, 1 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">ConstantTransformation( 6, 4 );</span>
Transformation( [ 4, 4, 4, 4, 4, 4 ] )
</pre></div>

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

<h4>53.3 <span class="Heading">Changing the representation of a transformation</span></h4>

<p>It is possible that a transformation in <strong class="pkg">GAP</strong> can be represented as another type of object, or that another type of <strong class="pkg">GAP</strongobject can be represented as a transformation.</p>

<p>The operations <code class="func">AsPermutation</code> (<a href="chap42.html#X8353AB8987E35DF3"><span class="RefLink">42.5-6</span></a>) and <code class="func">AsPartialPerm</code> (<a href="chap54.html#X87EC67747B260E98"><span class="RefLink">54.4-2</span></a>) can be used to convert transformations into permutations or partial permutations, where appropriate. In this section we describe functions for converting other types of objects into transformations.</p>

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

<h5>53.3-1 AsTransformation</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ AsTransformation</code>( <var class="Arg">f</var>[, <var class="Arg">n</var>] )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: A transformation.</p>

<p><code class="code">AsTransformation</code> returns the permutation, transformation, partial permutation or binary relation <var class="Arg">f</var> as a transformation.</p>


<dl>
<dt><strong class="Mark">for permutations</strong></dt>
<dd><p>If <var class="Arg">f</var> is a permutation and <var class="Arg">n</var> is a non-negative integer, then <code class="code">AsTransformation( <var class="Arg">f</var>, <var class="Arg">n</var> )</code> returns the transformation <code class="code">g</code> such that <code class="code">i ^ g = i ^ f</code> for all <code class="code">i</code> in the range <code class="code">[ 1 .. <var class="Arg">n</var> ]</code>.</p>

<p>If no non-negative integer <var class="Arg">n</var> is specified, then the largest moved point of <var class="Arg">f</var> is used as the value for <var class="Arg">n</var>; see <code class="func">LargestMovedPoint</code> (<a href="chap42.html#X84AA603987C94AC0"><span class="RefLink">42.3-2</span></a>).</p>

</dd>
<dt><strong class="Mark">for transformations</strong></dt>
<dd><p>If <var class="Arg">f</var> is a transformation and <var class="Arg">n</var> is a non-negative integer less than the degree of <var class="Arg">f</var> such that <var class="Arg">f</var> is a transformation of <code class="code">[ 1 .. <var class="Arg">n</var> ]</code>, then <code class="code">AsTransformation</code> returns the restriction of <var class="Arg">f</var> to <code class="code">[ 1 .. <var class="Arg">n</var> ]</code>.</p>

<p>If <var class="Arg">f</var> is a transformation and <var class="Arg">n</var> is not specified or is greater than or equal to the degree of <var class="Arg">f</var>, then <var class="Arg">f</var> is returned.</p>

</dd>
<dt><strong class="Mark">for partial permutations</strong></dt>
<dd><p>A partial permutation <var class="Arg">f</var> can be converted into a transformation <code class="code">g</code> as follows. The degree <code class="code">m</code> of <code class="code">g</codeis equal to the maximum of <var class="Arg">n</var>, the largest moved point of <var class="Arg">f</var> plus <code class="code">1</code>, and the largest image of a moved point plus <code class="code">1</code>. The transformation <code class="code">g</code> agrees with <var class="Arg">f</var> on the domain of <var class="Arg">f</var> and maps the points in <code class="code">[ 1 .. m ]</code>, which are not in the domain of <var class="Arg">f</var> to <code class="code">n</code>, i.e. <code class="code">i ^ g = i ^ <var class="Arg">f</var></code> for all <code class="code">i</code> in the domain of <var class="Arg">f</var>, <code class="code">i ^ g = n</code> for all <code class="code">i</code> in <code class="code">[ 1 .. n ]</code>, and <code class="code">i ^ g = i</code> for all <code class="code">i</code> greater than <var class="Arg">n</var>. <code class="code">AsTransformation( <var class="Arg">f</var> )</code> returns the transformation <code class="code">g</code> defined in the previous sentences.</p>

<p>If the optional argument <var class="Arg">n</var> is not present, then the default value of the maximum of the largest moved point and the largest image of a moved point of <var class="Arg">f</var> plus <code class="code">1</code> is used.</p>

</dd>
<dt><strong class="Mark">for binary relations</strong></dt>
<dd><p>In the case that <var class="Arg">f</var> is a binary relation, which defines a transformation, <code class="code">AsTransformation</code> returns that transformation.</p>

</dd>
</dl>

<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f := Transformation( [ 3, 5, 3, 4, 1, 2 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">AsTransformation( f, 5 );</span>
Transformation( [ 3, 5, 3, 4, 1 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">AsTransformation( f, 10 );</span>
Transformation( [ 3, 5, 3, 4, 1, 2 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">AsTransformation( (1,3)(2,4) );</span>
Transformation( [ 3, 4, 1, 2 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">AsTransformation( (1,3)(2,4), 10 );</span>
Transformation( [ 3, 4, 1, 2 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">f := PartialPerm( [ 1, 2, 3, 4, 5, 6 ], [ 6, 7, 1, 4, 3, 2 ] );</span>
[5,3,1,6,2,7](4)
<span class="GAPprompt">gap></span> <span class="GAPinput">AsTransformation( f, 11 );</span>
Transformation( [ 6, 7, 1, 4, 3, 2, 11, 11, 11, 11, 11 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">AsPartialPerm( last, DomainOfPartialPerm( f ) );</span>
[5,3,1,6,2,7](4)
<span class="GAPprompt">gap></span> <span class="GAPinput">AsTransformation( f, 14 );</span>
Transformation( [ 6, 7, 1, 4, 3, 2, 14, 14, 14, 14, 14, 14, 14, 14 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">AsPartialPerm( last, DomainOfPartialPerm( f ) );</span>
[5,3,1,6,2,7](4)
<span class="GAPprompt">gap></span> <span class="GAPinput">AsTransformation( f );</span>
Transformation( [ 6, 7, 1, 4, 3, 2, 8, 8 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">AsTransformation( Transformation( [ 1, 1, 2 ] ), 0 );</span>
IdentityTransformation
</pre></div>

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

<h5>53.3-2 RestrictedTransformation</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RestrictedTransformation</code>( <var class="Arg">f</var>, <var class="Arg">list</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: A transformation.</p>

<p><code class="code">RestrictedTransformation</code> returns the new transformation <code class="code">g</code> such that <code class="code"> i ^ g = i ^ <var class="Arg">f</var></code> for all <code class="code">i</code> in <var class="Arg">list</var> and such that <code class="code">i ^ g = i</code> for all <code class="code">i</code> not in <var class="Arg">list</var>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f := Transformation( [ 2, 10, 5, 9, 10, 9, 6, 3, 8, 4, 6, 5 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">RestrictedTransformation( f, [ 1, 2, 3, 10, 11, 12 ] );</span>
Transformation( [ 2, 10, 5, 4, 5, 6, 7, 8, 9, 4, 6, 5 ] )</pre></div>

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

<h5>53.3-3 PermutationOfImage</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PermutationOfImage</code>( <var class="Arg">f</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: A permutation or <code class="keyw">fail</code>.</p>

<p>If the transformation <var class="Arg">f</var> is a permutation of the points in its image, then <code class="code">PermutationOfImage</code> returns this permutation. If <var class="Arg">f</var> does not permute its image, then <code class="keyw">fail</code> is returned.</p>

<p>If <var class="Arg">f</var> happens to be a permutation, then <code class="code">PermutationOfImage</code> with argument <var class="Arg">f</var> returns the same value as <code class="code">AsPermutation</code> with argument <var class="Arg">f</var>.</p>


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

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

<h4>53.4 <span class="Heading">Operators for transformations</span></h4>

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

<h5><code>53.4-1 \^</code></h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ \^</code>( <var class="Arg">i</var>, <var class="Arg">f</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p><code class="code"><var class="Arg">i</var> ^ <var class="Arg">f</var></code> returns the image of the positive integer <var class="Arg">i</var> under the transformation <var class="Arg">f</var>.</p>

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

<h5><code>53.4-2 \^</code></h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ \^</code>( <var class="Arg">f</var>, <var class="Arg">g</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p><code class="code"><var class="Arg">f</var> ^ <var class="Arg">g</var></code> returns <code class="code"><var class="Arg">g</var> ^ -1 * <var class="Arg">f</var> * <var class="Arg">g</var></code> when <var class="Arg">f</var> is a transformation and <var class="Arg">g</var> is a permutation <code class="func">\^</code> (<a href="chap31.html#X8481C9B97B214C23"><span class="RefLink">31.12-1</span></a>). This operation requires essentially the same number of steps as multiplying a transformation by a permutation, which is approximately one third of the number required to first invert <var class="Arg">g</var>, take the product with <var class="Arg">f</var>, and then the product with <var class="Arg">g</var>.</p>

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

<h5><code>53.4-3 \*</code></h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ \*</code>( <var class="Arg">f</var>, <var class="Arg">g</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p><code class="code"><var class="Arg">f</var> * <var class="Arg">g</var></code> returns the composition of <var class="Arg">f</var> and <var class="Arg">g</var> when <var class="Arg">f</var> and <var class="Arg">g</var> are transformations or permutations. The product of a permutation and a transformation is returned as a transformation.</p>

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

<h5><code>53.4-4 \/</code></h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ \/</code>( <var class="Arg">f</var>, <var class="Arg">g</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p><code class="code"><var class="Arg">f</var> / <var class="Arg">g</var></code> returns <code class="code"><var class="Arg">f</var> * <var class="Arg">g</var> ^ -1</code> when <var class="Arg">f</var> is a transformation and <var class="Arg">g</var> is a permutation. This operation requires essentially the same number of steps as multiplying a transformation by a permutation, which is approximately half the number required to first invert <var class="Arg">g</var> and then take the product with <var class="Arg">f</var>.</p>

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

<h5>53.4-5 LeftQuotient</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ LeftQuotient</code>( <var class="Arg">g</var>, <var class="Arg">f</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p>returns <code class="code"><var class="Arg">g</var> ^ -1 * <var class="Arg">f</var></code> when <var class="Arg">f</var> is a transformation and <var class="Arg">g</var> is a permutation. This operation uses essentially the same number of steps as multiplying a transformation by a permutation, which is approximately half the number required to first invert <var class="Arg">g</var> and then take the product with <var class="Arg">f</var>.</p>

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

<h5><code>53.4-6 \<</code></h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ \<</code>( <var class="Arg">i</var>, <var class="Arg">f</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p><code class="code"><var class="Arg">f</var> < <var class="Arg">g</var></code> returns <code class="keyw">true</code> if the image list of <var class="Arg">f</var> is lexicographically less than the image list of <var class="Arg">g</var> and <code class="keyw">false</code> if it is not.</p>

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

<h5><code>53.4-7 \=</code></h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ \=</code>( <var class="Arg">f</var>, <var class="Arg">g</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p><code class="code"><var class="Arg">f</var> = <var class="Arg">g</var></code> returns <code class="keyw">true</code> if the transformation <var class="Arg">f</var> equals the transformation <var class="Arg">g</var> and returns <code class="keyw">false</code> if it does not.</p>

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

<h5>53.4-8 PermLeftQuoTransformation</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PermLeftQuoTransformation</code>( <var class="Arg">f</var>, <var class="Arg">g</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">‣ PermLeftQuoTransformationNC</code>( <var class="Arg">f</var>, <var class="Arg">g</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: A permutation.</p>

<p>Returns the permutation on the image set of <var class="Arg">f</var> induced by <code class="code"><var class="Arg">f</var> ^ -1 * <var class="Arg">g</var></code> when the transformations <var class="Arg">f</var> and <var class="Arg">g</var> have equal kernel and image set.</p>

<p><code class="code">PermLeftQuoTransformation</code> verifies that <var class="Arg">f</var> and <var class="Arg">g</var> have equal kernels and image sets, and returns an error if they do not. <code class="code">PermLeftQuoTransformationNC</code> does no checks.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f := Transformation( [ 5, 6, 7, 1, 4, 3, 2, 7 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">g := Transformation( [ 5, 7, 1, 6, 4, 3, 2, 1 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PermLeftQuoTransformation( f, g );</span>
(1,6,7)
<span class="GAPprompt">gap></span> <span class="GAPinput">PermLeftQuoTransformation( g, f );</span>
(1,7,6)
</pre></div>

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

<h5>53.4-9 IsInjectiveListTrans</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsInjectiveListTrans</code>( <var class="Arg">list</var>, <var class="Arg">obj</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: <code class="keyw">true</code> or <code class="keyw">false</code>.</p>

<p>The argument <var class="Arg">obj</var> should be a transformation or the list of images of a transformation and <var class="Arg">list</var> should be a list of positive integers. <code class="code">IsInjectiveListTrans</code> checks if <var class="Arg">obj</var> is injective on <var class="Arg">list</var>.</p>

<p>More precisely, if <var class="Arg">obj</var> is a transformation, then we define <code class="code">f := <var class="Arg">obj</var></code> and if <var class="Arg">obj</var> is the image list of a transformation we define <code class="code">f := Transformation( <var class="Arg">obj</var> )</code>. <code class="code">IsInjectiveListTrans</code> returns <code class="keyw">true</code> if <code class="code">f</code> is injective on <var class="Arg">list</var> and <code class="keyw">false</code> if it is not. If <var class="Arg">list</var> is not duplicate free, then <code class="keyw">false</code> is returned.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f := Transformation( [ 2, 6, 7, 2, 6, 9, 9, 1, 1, 5 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsInjectiveListTrans( [ 1, 5 ], f );</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IsInjectiveListTrans( [ 5, 1 ], f );</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IsInjectiveListTrans( [ 5, 1, 5, 1, 1, ], f );</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">IsInjectiveListTrans( [ 5, 1, 2, 3 ], [ 1, 2, 3, 4, 5 ] );</span>
true
</pre></div>

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

<h5>53.4-10 ComponentTransformationInt</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ComponentTransformationInt</code>( <var class="Arg">f</var>, <var class="Arg">n</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A list of positive integers.</p>

<p>If <var class="Arg">f</var> is a transformation and <var class="Arg">n</var> is a positive integer, then <code class="code">ComponentTransformationInt</code> returns those elements <code class="code">i</code> such that <code class="code"><var class="Arg">n</var> ^ <var class="Arg">f</var> ^ j = i</code> for some positive integer <code class="code">j</code>, i.e. the elements of the component of <var class="Arg">f</var> containing <var class="Arg">n</var> that can be obtained by applying powers of <var class="Arg">f</var> to <var class="Arg">n</var>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f := Transformation( [ 6, 2, 8, 4, 7, 5, 8, 3, 5, 8 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">ComponentTransformationInt( f, 1 );</span>
[ 1, 6, 5, 7, 8, 3 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">ComponentTransformationInt( f, 12 );</span>
[ 12 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">ComponentTransformationInt( f, 5 );</span>
[ 5, 7, 8, 3 ]
</pre></div>

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

<h5>53.4-11 PreImagesOfTransformation</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PreImagesOfTransformation</code>( <var class="Arg">f</var>, <var class="Arg">n</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A set of positive integers.</p>

<p>Returns the preimages of the positive integer <var class="Arg">n</var> under the transformation <var class="Arg">f</var>, i.e. the positive integers <code class="code">i</code> such that <code class="code">i ^ <var class="Arg">f</var> = n</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f := Transformation( [ 2, 6, 7, 2, 6, 9, 9, 1, 1, 5 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PreImagesOfTransformation( f, 1 );</span>
[ 8, 9 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">PreImagesOfTransformation( f, 3 );</span>
[  ]
<span class="GAPprompt">gap></span> <span class="GAPinput">PreImagesOfTransformation( f, 100 );</span>
[ 100 ]
</pre></div>

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

<h4>53.5 <span class="Heading">Attributes for transformations</span></h4>

<p>In this section we describe the functions available in <strong class="pkg">GAP</strong> for finding various properties and attributes of transformations.</p>

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

<h5>53.5-1 DegreeOfTransformation</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DegreeOfTransformation</code>( <var class="Arg">f</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">‣ DegreeOfTransformationCollection</code>( <var class="Arg">coll</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: A positive integer.</p>

<p>The <em>degree</em> of a transformation <var class="Arg">f</var> is the largest value such that <code class="code">n ^ <var class="Arg">f</var> <> n</code> or <code class="code">i ^ <var class="Arg">f</var> = n</code> for some <code class="code">i <> n</code>. Equivalently, the degree of a transformation is the least value <code class="code">n</code> such that <code class="code">[ n + 1, n + 2, ... ]</code> is fixed pointwise by <var class="Arg">f</var>.</p>

<p>The degree of a collection of transformations <var class="Arg">coll</var> is the maximum degree of any transformation in <var class="Arg">coll</var>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">DegreeOfTransformation( IdentityTransformation );</span>
0
<span class="GAPprompt">gap></span> <span class="GAPinput">DegreeOfTransformationCollection(</span>
<span class="GAPprompt">></span> <span class="GAPinput">[ Transformation( [ 1, 3, 4, 1 ] ),</span>
<span class="GAPprompt">></span> <span class="GAPinput">  Transformation( [ 3, 1, 1, 3, 4 ] ),</span>
--> --------------------

--> maximum size reached

--> --------------------

100%


¤ Dauer der Verarbeitung: 0.13 Sekunden  (vorverarbeitet)  ¤

*© 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 ist noch experimentell.