Quelle chap31.html
Sprache: HTML
|
|
| products/sources/formale Sprachen/GAP/doc/ref/chap31.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 31: Domains and their Elements</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="chap31" 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="chap30.html">[Previous Chapter]</a> <a href="chap32.html">[Next Chapter]</a> </div>
<p id="mathjaxlink" class="pcenter"><a href="chap31_mj.html">[MathJax on]</a></p>
<p><a id="X7E651AC287AFDCC1" name="X7E651AC287AFDCC1"></a></p>
<div class="ChapSects"><a href="chap31.html#X7E651AC287AFDCC1">31 <span class="Heading">Domains and their Elements</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X859C7AB97B34F55F">31.1 <span class="Heading">Operational Structure of Domains</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X84FA03F87A17B059">31.2 <span class="Heading">Equality and Comparison of Domains</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X82039A218274826F">31.3 <span class="Heading">Constructing Domains</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X7EA77DE17DD8A231">31.4 <span class="Heading">Changing the Structure</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X860FCCBE7A41412F">31.5 <span class="Heading">Changing the Representation</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X7D72F11B82F4A036">31.6 <span class="Heading">Domain Categories</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X7CBDD36E7B7BE286">31.7 <span class="Heading">Parents</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7BC856CC7F116BB0">31.7-1 Parent</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X7B58FDEF80338DD6">31.8 <span class="Heading">Constructing Subdomains</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X86D579707B112970">31.9 <span class="Heading">Operations for Domains</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X86B4AC017FAF4D12">31.9-1 IsGeneralizedDomain</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7E353DD1838AB223">31.9-2 GeneratorsOfDomain</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X826A21287FD3ACC0">31.9-3 Domain</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X7C2B0C1280237CB0">31.10 <span class="Heading">Attributes and Properties of Elements</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X81278E53800BF64D">31.10-1 Characteristic</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X8046262384895B2A">31.10-2 OneImmutable</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X8040AC7A79FFC442">31.10-3 ZeroImmutable</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X86DEB543824C40EB">31.10-4 MultiplicativeZeroOp</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X814D78347858EC13">31.10-5 IsOne</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X82BDA47282F9BBA7">31.10-6 IsZero</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7CB5896082D29173">31.10-7 IsIdempotent</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X78EE524E83624057">31.10-8 InverseImmutable</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X84BB723C81D55D63">31.10-9 AdditiveInverseImmutable</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X84F59A2687C62763">31.10-10 Order</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X7B3BC7BA7BB2646D">31.11 <span class="Heading">Comparison Operations for Elements</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7EF67D047F03CA6F">31.11-1 <span class="Heading">\= and \<</span></a>
</span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7EFE013B8634D214">31.11-2 CanEasilyCompareElements</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X7A2914307963E370">31.12 <span class="Heading">Arithmetic Operations for Elements</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X8481C9B97B214C23">31.12-1 <span class="Heading">\+, \*, \/, \^, \mod</span></a>
</span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7A37082878DB3930">31.12-2 LeftQuotient</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X80761843831B468E">31.12-3 Comm</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X86A62A937A42B82E">31.12-4 LieBracket</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7E8F1FB87C229BB0">31.12-5 Sqrt</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X80A2D8A7874B268B">31.13 <span class="Heading">Relations Between Domains</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7C03098C838ADE40">31.13-1 UseSubsetRelation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X78039B628262BFA8">31.13-2 UseFactorRelation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X839BE6467E8474D9">31.13-3 UseIsomorphismRelation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X863C35007C7AA914">31.13-4 InstallSubsetMaintenance</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7BB7EE5078EF6F47">31.13-5 InstallFactorMaintenance</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X79F97F0F78D89186">31.13-6 InstallIsomorphismMaintenance</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X7B97A0307EA161E5">31.14 <span class="Heading">Useful Categories of Elements</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7FBD4F65861C2DF2">31.14-1 IsExtAElement</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7F346AA47AEC39AB">31.14-2 IsNearAdditiveElement</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X78D042B486E1D7F7">31.14-3 IsAdditiveElement</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7CE2353F836F6E0A">31.14-4 IsNearAdditiveElementWithZero</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X87F3552A789C572D">31.14-5 IsAdditiveElementWithZero</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X84B0929982B51CB4">31.14-6 IsNearAdditiveElementWithInverse</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7C0E4AE883947778">31.14-7 IsAdditiveElementWithInverse</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X860D1E387DD5CCCF">31.14-8 IsExtLElement</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X809E0C097E480AF1">31.14-9 IsExtRElement</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X797D3B2A7A2B2F53">31.14-10 IsMultiplicativeElement</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X82BC294F7D388AE8">31.14-11 IsMultiplicativeElementWithOne</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X8703BFC2841BBD63">31.14-12 IsMultiplicativeElementWithZero</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7FDB14E57814FA3B">31.14-13 IsMultiplicativeElementWithInverse</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X802F34F280B29DF4">31.14-14 IsVector</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X799AEDE180C31276">31.14-15 IsNearRingElement</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X84BF40CA86C07361">31.14-16 IsRingElement</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7C724689784EEF3D">31.14-17 IsNearRingElementWithOne</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X875B67208017608E">31.14-18 IsRingElementWithOne</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X80CD04ED85B6B2F9">31.14-19 IsNearRingElementWithInverse</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X8113834E84FD0435">31.14-20 IsRingElementWithInverse</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X7ABEF00C870789D2">31.15 <span class="Heading">Useful Categories for all Elements of a Family</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7979AFAA80FF795A">31.15-1 IsAssociativeElement</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X78A286418205CE44">31.15-2 IsAdditivelyCommutativeElement</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X8137FA8D86714AC0">31.15-3 IsCommutativeElement</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X810D2E5E832594AA">31.15-4 IsFiniteOrderElement</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X796957D0805A0221">31.15-5 IsJacobianElement</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7844399D7847AB24">31.15-6 IsZeroSquaredElement</a></span>
</div></div>
</div>
<h3>31 <span class="Heading">Domains and their Elements</span></h3>
<p><em>Domain</em> is <strong class="pkg">GAP</strong>'s name for structured sets. The ring of Gaussian integers ℤ[sqrt{-1}] is an example of a domain, the group D_12 of symmetries of a regular hexahedron is another.
<p>The <strong class="pkg">GAP</strong> library predefines some domains. For example the ring of Gaussian integers is predefined as <code class="func">GaussianIntegers</code> (<a href="chap60.html#X80BD5EAB879F096E"><span class="RefLink">60.5-1</span></a>) (see <a href="chap60.html#X85E9E90D7FE877CC"><span class="RefLink">60.5</span></a>) and the field of rationals is predefined as <code class="func">Rationals</code> (<a href="chap17.html#X7B6029D18570C08A"><span class="RefLink">17.1-1</span></a>) (see <a href="chap17.html#X87003045878E74DF"><span class="RefLink">17</span></a>). Most domains are constructed by functions, which are called <em>domain constructors</em> (see <a href="chap31.html#X82039A218274826F"><span class="RefLink">31.3</span></a>). For example the group <span class="SimpleMath">D_12</span> is constructed by the construction <code class="code">Group( (1,2,3,4,5,6), (2,6)(3,5) )</code> (see <code class="func">Group</code> (<a href="chap39.html#X7D7B075385435151"><span class="RefLink">39.2-1</span></a>)) and the finite field with 16 elements is constructed by <code class="code">GaloisField( 16 )</code> (see <code class="func">GaloisField</code> (<a href="chap59.html#X8592DBB086A8A9BE"><span class="RefLink">59.3-2</span></a>)).</p>
<p>The first place where you need domains in <strong class="pkg">GAP</strong> is the obvious one. Sometimes you simply want to deal with a domain. For example if you want to compute the size of the group <span class="SimpleMath">D_12</span>, you had better be able to represent this group in a way that the <code class="func">Size</code> (<a href="chap30.html#X858ADA3B7A684421"><span class="RefLink">30.4-6</span></a>) function can understand.</p>
<p>The second place where you need domains in <strong class="pkg">GAP</strong> is when you want to be able to specify that an operation or computation takes place in a certain domain. For example suppose you want to factor 10 in the ring of Gaussian integers. Saying <code class="code">Factors( 10 )</code> will not do, because this will return the factorization <code class="code">[ 2, 5 ]</code> in the ring of integers. To allow operations and computations to happen in a specific domain, <code class="func">Factors</code> (<a href="chap56.html#X82D6EDC685D12AE2"><span class="RefLink">56.5-9</span></a>), and many other functions as well, accept this domain as optional first argument. Thus <code class="code">Factors( GaussianIntegers, 10 )</code> yields the desired result <code class="code">[ 1+E(4), 1-E(4), 2+E(4), 2-E(4) ]</code>. (The imaginary unit <span class="SimpleMath">sqrt{-1}</span> is written as <code class="code">E(4)</code> in <strong class="pkg">GAP</strong>, see <code class="func">E</code> (<a href="chap18.html#X8631458886314588"><span class="RefLink">18.1-1</span></a>).)</p>
<p>An introduction to the most important facts about domains is given in Chapter <a href="../../doc/tut/chap7.html#X7BAF69417BB925F6"><span class="RefLink">Tutorial: Domains</span></a>.</p>
<p>There are only few <em>operations</em> especially for domains (see <a href="chap31.html#X86D579707B112970"><span class="RefLink">31.9</span></a>), operations such as <code class="func">Intersection</code> (<a href="chap30.html#X851069107CACF98E"><span class="RefLink">30.5-2</span></a>) and <code class="func">Random</code> (<a href="chap30.html#X7FF906E57D6936F8"><span class="RefLink">30.7-1</span></a>) are defined for the more general situation of collections (see Chapter <a href="chap30.html#X8050A8037984E5B6"><span class="RefLink">30</span></a>).</p>
<p><a id="X859C7AB97B34F55F" name="X859C7AB97B34F55F"></a></p>
<h4>31.1 <span class="Heading">Operational Structure of Domains</span></h4>
<p>Domains have an <em>operational structure</em>, that is, a collection of operations under which the domain is closed. For example, a group is closed under multiplication, taking the zeroth power of elements, and taking inverses of elements. The operational structure may be empty, examples of domains without additional structure are the underlying relations of general mappings (see <a href="chap32.html#X7E5A430D7F838F1C"><span class="RefLink">32.3</span></a>).</p>
<p>The operations under which a domain is closed are a subset of the operations that the elements of a domain admit. It is possible that the elements admit more operations. For example, matrices can be multiplied and added. But addition plays no role in a group of matrices, and multiplication plays no role in a vector space of matrices. In particular, a matrix group is not closed under addition.</p>
<p>Note that the elements of a domain exist independently of this domain, usually they existed already before the domain was created. So it makes sense to say that a domain is <em>generated</em> by some elements with respect to certain operations.</p>
<p>Of course, different sets of operations yield different notions of generation. For example, the group generated by some matrices is different from the ring generated by these matrices, and these two will in general be different from the vector space generated by the same matrices, over a suitable field.</p>
<p>The other way round, the same set of elements may be obtained by generation w.r.t. different notions of generation. For example, one can get the group generated by two elements <span class="SimpleMath">g</span> and <span class="SimpleMath">h</span> also as the monoid generated by the elements <span class="SimpleMath">g</span>, <span class="SimpleMath">g^{-1}</span>, <span class="SimpleMath">h</span>, <span class="SimpleMath">h^{-1}</span>; if both <span class="SimpleMath">g</span> and <span class="SimpleMath">h</span> have finite order then of course the group generated by <span class="SimpleMath">g</span> and <span class="SimpleMath">h</span> coincides with the monoid generated by <span class="SimpleMath">g</span> and <span class="SimpleMath">h</span>.</p>
<p>Additionally to the operational structure, a domain can have properties. For example, the multiplication of a group is associative, and the multiplication in a field is commutative.</p>
<p>Note that associativity and commutativity depend on the set of elements for which one considers the multiplication, i.e., it depends on the domain. For example, the multiplication in a full matrix ring over a field is not commutative, whereas its restriction to the set of diagonal matrices is commutative.</p>
<p>One important difference between the operational structure and the properties of a domain is that the operational structure is fixed when the domain is constructed, whereas properties can be discovered later. For example, take a domain whose operational structure is given by closure under multiplication. If it is discovered that the inverses of all its elements also do (by chance) lie in this domain, being closed under taking inverses is <em>not</em> added to the operational structure. But a domain with operational structure of multiplication, taking the identity, and taking inverses will be treated as a group as soon as the multiplication is found out to be associative for this domain.</p>
<p>The operational structures available in <strong class="pkg">GAP</strong> form a hierarchy, which is explicitly formulated in terms of domain categories, see <a href="chap31.html#X7D72F11B82F4A036"><span class="RefLink">31.6</span></a>.</p>
<p><a id="X84FA03F87A17B059" name="X84FA03F87A17B059"></a></p>
<h4>31.2 <span class="Heading">Equality and Comparison of Domains</span></h4>
<p><em>Equality</em> and <em>comparison</em> of domains are defined as follows.</p>
<p>Two domains are considered <em>equal</em> if and only if the sets of their elements as computed by <code class="func">AsSSortedList</code> (<a href="chap30.html#X856D927378C33548"><span class="RefLink">30.3-10</span></a>)) are equal. Thus, in general <code class="code">=</code> behaves as if each domain operand were replaced by its set of elements. Except that <code class="code">=</code> will also sometimes, but not always, work for infinite domains, for which of course <strong class="pkg">GAP</strong> cannot compute the set of elements. Note that this implies that domains with different algebraic structure may well be equal. As a special case of this, either operand of <code class="code">=</code> may also be a proper set (see <a href="chap21.html#X80ABC25582343910"><span class="RefLink">21.19</span></a>), i.e., a sorted list without holes or duplicates (see <code class="func">AsSSortedList</code> (<a href="chap30.html#X856D927378C33548"><span class="RefLink">30.3-10</span></a>)), and <code class="code">=</code> will return <code class="keyw">true</code> if and only if this proper set is equal to the set of elements of the argument that is a domain.</p>
<p><em>No</em> general <em>ordering</em> of arbitrary domains via <code class="code"><</code> is defined in <strong class="pkg">GAP</strong> 4. This is because a well-defined <code class="code"><</code> for domains or, more general, for collections, would have to be compatible with <code class="code">=</code> and would need to be transitive and antisymmetric in order to be used to form ordered sets. In particular, <code class="code"><</code> would have to be independent of the algebraic structure of its arguments because this holds for <code class="code">=</code>, and thus there would be hardly a situation where one could implement an efficient comparison method. (Note that in the case that two domains are comparable with <code class="code"><</code>, the result is in general <em>not</em> compatible with the set theoretical subset relation, which can be decided with <code class="func">IsSubset</code> (<a href="chap30.html#X79CA175481F8105F"><span class="RefLink">30.5-1</span></a>).)</p>
<p><a id="X82039A218274826F" name="X82039A218274826F"></a></p>
<h4>31.3 <span class="Heading">Constructing Domains</span></h4>
<p>For several operational structures (see <a href="chap31.html#X859C7AB97B34F55F"><span class="RefLink">31.1</span></a>), <strong class="pkg">GAP</strong> provides functions to construct domains with this structure (note that such functions do not exist for all operational structures). For example, <code class="func">Group</code> (<a href="chap39.html#X7D7B075385435151"><span class="RefLink">39.2-1</span></a>) returns groups, <code class="func">VectorSpace</code> (<a href="chap61.html#X805413157CE9BECF"><span class="RefLink">61.2-1</span></a>) returns vector spaces etc.:</p>
<p><code class="code"><var class="Arg">Struct</var>( <var class="Arg">arg1</var>, <var class="Arg">arg2</var>, ... )</code></p>
<p>The syntax of these functions may vary, dependent on the structure in question. Usually a domain is constructed as the closure of some elements under the given operations, that is, the domain is given by its <em>generators</em>. For example, a group can be constructed from a list of generating permutations or matrices or whatever is admissible as group elements, and a vector space over a given field <span class="SimpleMath">F</span> can be constructed from <span class="SimpleMath">F</span> and a list of appropriate vectors.</p>
<p>The idea of generation and generators in <strong class="pkg">GAP</strong> is that the domain returned by a function such as <code class="code">Group</code>, <code class="code">Algebra</code>, or <code class="code">FreeLeftModule</code> <em>contains</em> the given generators. This implies that the generators of a group must know how they are multiplied and inverted, the generators of a module must know how they are added and how scalar multiplication works, and so on. Thus one cannot use for example permutations as generators of a vector space.</p>
<p>The function <var class="Arg">Struct</var> first checks whether the arguments admit the construction of a domain with the desired structure. This is done by calling the operation</p>
<p><code class="code">IsGeneratorsOf<var class="Arg">Struct</var>( [<var class="Arg">info</var>, ]<var class="Arg">gens</var> )</code></p>
<p>where <var class="Arg">arglist</var> is the list of given generators and <var class="Arg">info</var> an argument of <var class="Arg">Struct</var>, for example the field of scalars in the case that a vector space shall be constructed. If the check failed then <var class="Arg">Struct</var> returns <code class="keyw">fail</code>, otherwise it returns the result of <code class="code"><var class="Arg">Struct</var>ByGenerators</code> (see below). (So if one wants to omit the check then one should call <code class="code"><var class="Arg">Struct</var>ByGenerators</code> directly.)</p>
<p><code class="code">GeneratorsOf<var class="Arg">Struct</var>( <var class="Arg">D</var>)</code></p>
<p>For a domain <var class="Arg">D</var> with operational structure corresponding to <var class="Arg">Struct</var>, the attribute <code class="code">GeneratorsOf<var class="Arg">Struct</var></code> returns a list of corresponding generators of <var class="Arg">D</var>. If these generators were not yet stored in <var class="Arg">D</var> then <var class="Arg">D</var> must know <em>some</em> generators if <code class="code">GeneratorsOf<var class="Arg">Struct</var></code> shall have a chance to compute the desired result; for example, monoid generators of a group can be computed from known group generators (and vice versa). Note that several notions of generation may be meaningful for a given domain, so it makes no sense to ask for <q>the generators of a domain</q>. Further note that the generators may depend on other information about <var class="Arg">D</var>. For example the generators of a vector space depend on the underlying field of scalars; the vector space generators of a vector space over the field with four elements need not generate the same vector space when this is viewed as a space over the field with two elements.</p>
<p><code class="code"><var class="Arg">Struct</var>ByGenerators( [<var class="Arg">info</var>, ]<var class="Arg">gens</var> )</code></p>
<p>Domain construction from generators <var class="Arg">gens</var> is implemented by operations <code class="code"><var class="Arg">Struct</var>ByGenerators</code>, which are called by the simple functions <var class="Arg">Struct</var>; methods can be installed only for the operations. Note that additional information <var class="Arg">info</var> may be necessary to construct the domain; for example, a vector space needs the underlying field of scalars in addition to the list of vector space generators. The <code class="code">GeneratorsOf<var class="Arg">Struct</var></code> value of the returned domain need <em>not</em> be equal to <var class="Arg">gens</var>. But if a domain <var class="Arg">D</var> is printed as <code class="code"><var class="Arg">Struct</var>([<var class="Arg">a</var>, <var class="Arg">b</var>, ...])</code> and if there is an attribute <code class="code">GeneratorsOf<var class="Arg">Struct</var></code> then the list <code class="code">GeneratorsOf<var class="Arg">Struct</var>( <var class="Arg">D</var> )</code> is guaranteed to be equal to <code class="code">[ <var class="Arg">a</var>, <var class="Arg">b</var>, ... ]</code>.</p>
<p><code class="code"><var class="Arg">Struct</var>WithGenerators( [<var class="Arg">info</var>, ]<var class="Arg">gens</var> )</code></p>
<p>The only difference between <code class="code"><var class="Arg">Struct</var>ByGenerators</code> and <code class="code"><var class="Arg">Struct</var>WithGenerators</code> is that the latter guarantees that the <code class="code">GeneratorsOf<var class="Arg">Struct</var></code> value of the result is equal to the given generators <var class="Arg">gens</var>.</p>
<p><code class="code">Closure<var class="Arg">Struct</var>( <var class="Arg">D</var>, <var class="Arg">obj</var> )</code></p>
<p>For constructing a domain as the closure of a given domain with an element or another domain, one can use the operation <code class="code">Closure<var class="Arg">Struct</var></code>. It returns the smallest domain with operational structure corresponding to <var class="Arg">Struct</var> that contains <var class="Arg">D</var> as a subset and <var class="Arg">obj</var> as an element.</p>
<p><a id="X7EA77DE17DD8A231" name="X7EA77DE17DD8A231"></a></p>
<h4>31.4 <span class="Heading">Changing the Structure</span></h4>
<p>The same set of elements can have different operational structures. For example, it may happen that a monoid <span class="SimpleMath">M</span> does in fact contain the inverses of all of its elements; if <span class="SimpleMath">M</span> has not been constructed as a group (see <a href="chap31.html#X7D72F11B82F4A036"><span class="RefLink">31.6</span></a>) then it is reasonable to ask for the group that is equal to <span class="SimpleMath">M</span>.</p>
<p><code class="code">As<var class="Arg">Struct</var>( [<var class="Arg">info</var>, ]<var class="Arg">D</var> )</code></p>
<p>If <var class="Arg">D</var> is a domain that is closed under the operational structure given by <var class="Arg">Struct</var> then <code class="code">As<var class="Arg">Struct</var></code> returns a domain <var class="Arg">E</var> that consists of the same elements (that is, <code class="code"><var class="Arg">D</var> = <var class="Arg">E</var></code>) and that has this operational structure (that is, <code class="code">Is<var class="Arg">Struct</var>( <var class="Arg">E</var> )</code> is <code class="keyw">true</code>); if <var class="Arg">D</var> is not closed under the structure given by <var class="Arg">Struct</var> then <code class="code">As<var class="Arg">Struct</var></code> returns <code class="keyw">fail</code>.</p>
<p>If additional information besides generators are necessary to define <var class="Arg">D</var> then the argument <var class="Arg">info</var> describes the value of this information for the desired domain. For example, if we want to view <var class="Arg">D</var> as a vector space over the field with two elements then we may call <code class="code">AsVectorSpace( GF(2), <var class="Arg">D</var> )</code>; this allows us to change the underlying field of scalars, for example if <var class="Arg">D</var> is a vector space over the field with four elements. Again, if <var class="Arg">D</var> is not equal to a domain with the desired structure and additional information then <code class="keyw">fail</code> is returned.</p>
<p>In the case that no additional information <var class="Arg">info</var> is related to the structure given by <var class="Arg">Struct</var>, the operation <code class="code">As<var class="Arg">Struct</var></code> is in fact an attribute (see <a href="chap13.html#X7C701DBF7BAE649A"><span class="RefLink">13.5</span></a>).</p>
<p>See the index of the <strong class="pkg">GAP</strong> Reference Manual for an overview of the available <code class="code">As<var class="Arg">Struct</var></code> functions.</p>
<p><a id="X860FCCBE7A41412F" name="X860FCCBE7A41412F"></a></p>
<h4>31.5 <span class="Heading">Changing the Representation</span></h4>
<p>Often it is useful to answer questions about a domain via computations in a different but isomorphic domain. In the sense that this approach keeps the structure and changes the underlying set of elements, it can be viewed as a counterpart of keeping the set of elements and changing its structure (see <a href="chap31.html#X7EA77DE17DD8A231"><span class="RefLink">31.4</span></a>).</p>
<p>One reason for doing so can be that computations with the elements in the given domain are not very efficient. For example, if one is given a solvable matrix group (see Chapter <a href="chap44.html#X7CF51CB48610A07D"><span class="RefLink">44</span></a>) then one can compute an isomorphism to a polycyclicly presented group <span class="SimpleMath">G</span>, say (see Chapter <a href="chap45.html#X86007B0083F60470"><span class="RefLink">45</span></a>); the multiplication of two matrices –which is essentially determined by the dimension of the matrices– is much more expensive than the multiplication of two elements in <span class="SimpleMath">G</span> –which is essentially determined by the composition length of <span class="SimpleMath">G</span>.</p>
<p><code class="code">Isomorphism<var class="Arg">Rep</var><var class="Arg">Struct</var>( <var class="Arg">D</var> )</code></p>
<p>If <var class="Arg">D</var> is a domain that is closed under the operational structure given by <var class="Arg">Struct</var> then <code class="code">Isomorphism<var class="Arg">Rep</var><var class="Arg">Struct</var></code> returns a mapping <var class="Arg">hom</var> from <var class="Arg">D</var> to a domain <span class="SimpleMath">E</span> having structure given by <var class="Arg">Struct</var>, such that <var class="Arg">hom</var> respects the structure <var class="Arg">Struct</var> and <var class="Arg">Rep</var> describes the representation of the elements in <span class="SimpleMath">E</span>. If no domain <span class="SimpleMath">E</span> with the required properties exists then <code class="keyw">fail</code> is returned.</p>
<p>For example, <code class="func">IsomorphismPermGroup</code> (<a href="chap43.html#X80B7B1C783AA1567"><span class="RefLink">43.3-1</span></a>) takes a group as its argument and returns a group homomorphism (see <a href="chap40.html#X83702FC27B3C3098"><span class="RefLink">40</span></a>) onto an isomorphic permutation group (see Chapter <a href="chap43.html#X85ED46007CED6191"><span class="RefLink">43</span></a>) provided the original group is finite; for infinite groups, <code class="func">IsomorphismPermGroup</code> (<a href="chap43.html#X80B7B1C783AA1567"><span class="RefLink">43.3-1</span></a>) returns <code class="keyw">fail</code>. Similarly, <code class="func">IsomorphismPcGroup</code> (<a href="chap46.html#X873CEB137BA1CD6E"><span class="RefLink">46.5-2</span></a>) returns a group homomorphism from its argument to a polycyclicly presented group (see <a href="chap46.html#X7EAD57C97EBF7E67"><span class="RefLink">46</span></a>) if the argument is polycyclic, and <code class="keyw">fail</code> otherwise.</p>
<p>See the index of the <strong class="pkg">GAP</strong> Reference Manual for an overview of the available <code class="code">Isomorphism<var class="Arg">Rep</var><var class="Arg">Struct</var></code> functions.</p>
<p><a id="X7D72F11B82F4A036" name="X7D72F11B82F4A036"></a></p>
<h4>31.6 <span class="Heading">Domain Categories</span></h4>
<p>As mentioned in <a href="chap31.html#X859C7AB97B34F55F"><span class="RefLink">31.1</span></a>, the operational structure of a domain is fixed when the domain is constructed. For example, if <var class="Arg">D</var> was constructed by <code class="func">Monoid</code> (<a href="chap51.html#X7F95328B7C7E49EA"><span class="RefLink">51.2-2</span></a>) then <var class="Arg">D</var> is in general not regarded as a group in <strong class="pkg">GAP</strong>, even if <var class="Arg">D</var> is in fact closed under taking inverses. In this case, <code class="func">IsGroup</code> (<a href="chap39.html#X7939B3177BBD61E4"><span class="RefLink">39.2-7</span></a>) returns <code class="keyw">false</code> for <var class="Arg">D</var>. The operational structure determines which operations are applicable for a domain, so for example <code class="func">SylowSubgroup</code> (<a href="chap39.html#X7AA351308787544C"><span class="RefLink">39.13-1</span></a>) is not defined for <var class="Arg">D</var> and therefore will signal an error.</p>
<p><code class="code">Is<var class="Arg">Struct</var>( <var class="Arg">D</var> )</code></p>
<p>The functions <code class="code">Is<var class="Arg">Struct</var></code> implement the tests whether a domain <var class="Arg">D</var> has the respective operational structure (upon construction). <code class="code">Is<var class="Arg">Struct</var></code> is a filter (see <a href="chap13.html#X7E8202627B421DB1"><span class="RefLink">13</span></a>) that involves certain categories (see <a href="chap13.html#X7CC6903E78F24167"><span class="RefLink">13.3</span></a>) and usually also certain properties (see <a href="chap13.html#X871597447BB998A1"><span class="RefLink">13.7</span></a>). For example, <code class="func">IsGroup</code> (<a href="chap39.html#X7939B3177BBD61E4"><span class="RefLink">39.2-7</span></a>) is equivalent to <code class="code">IsMagmaWithInverses and IsAssociative</code>, the first being a category and the second being a property.</p>
<p>Implications between domain categories describe the hierarchy of operational structures available in <strong class="pkg">GAP</strong>. Here are some typical examples.</p>
<ul>
<li><p><code class="func">IsDomain</code> (<a href="chap31.html#X86B4AC017FAF4D12"><span class="RefLink">31.9-1</span></a>) is implied by each domain category,</p>
</li>
<li><p><code class="func">IsMagma</code> (<a href="chap35.html#X87D3F38B7EAB13FA"><span class="RefLink">35.1-1</span></a>) is implied by each category that describes the closure under multiplication <code class="code">*</code>,</p>
</li>
<li><p><code class="func">IsAdditiveMagma</code> (<a href="chap55.html#X8565FD0C847BAA3A"><span class="RefLink">55.1-4</span></a>) is implied by each category that describes the closure under addition <code class="code">+</code>,</p>
</li>
<li><p><code class="func">IsMagmaWithOne</code> (<a href="chap35.html#X86071DE7835F1C7C"><span class="RefLink">35.1-2</span></a>) implies <code class="func">IsMagma</code> (<a href="chap35.html#X87D3F38B7EAB13FA"><span class="RefLink">35.1-1</span></a>); a <em>magma-with-one</em> is a magma such that each element (and thus also the magma itself) can be asked for its zeroth power,</p>
</li>
<li><p><code class="func">IsMagmaWithInverses</code> (<a href="chap35.html#X82CBFF648574B830"><span class="RefLink">35.1-4</span></a>) implies <code class="func">IsMagmaWithOne</code> (<a href="chap35.html#X86071DE7835F1C7C"><span class="RefLink">35.1-2</span></a>); a <em>magma-with-inverses</em> is a magma such that each element can be asked for its inverse; important special cases are <em>groups</em>, which in addition are associative,</p>
</li>
<li><p>a <em>ring</em> is a magma that is also an additive group,</p>
</li>
<li><p>a <em>ring-with-one</em> is a ring that is also a magma-with-one,</p>
</li>
<li><p>a <em>division ring</em> is a ring-with-one that is also closed under taking inverses of nonzero elements,</p>
</li>
<li><p>a <em>field</em> is a commutative division ring.</p>
</li>
</ul>
<p>Each operational structure <var class="Arg">Struct</var> has associated with it a domain category <code class="code">Is<var class="Arg">Struct</var></code>, and operations <code class="code"><var class="Arg">Struct</var>ByGenerators</code> for constructing a domain from generators, <code class="code">GeneratorsOf<var class="Arg">Struct</var></code> for storing and accessing generators w.r.t. this structure, <code class="code">Closure<var class="Arg">Struct</var></code> for forming the closure, and <code class="code">As<var class="Arg">Struct</var></code> for getting a domain with the desired structure from one with weaker operational structure and for testing whether a given domain can be regarded as a domain with <var class="Arg">Struct</var>.</p>
<p>The functions applicable to domains with the various structures are described in the corresponding chapters of the Reference Manual. For example, functions for rings, fields, groups, and vector spaces are described in Chapters <a href="chap56.html#X81897F6082CACB59"><span class="RefLink">56</span></a>, <a href="chap58.html#X80A8E676814A19FD"><span class="RefLink">58</span></a>, <a href="chap39.html#X8716635F7951801B"><span class="RefLink">39</span></a>, and <a href="chap61.html#X7DAD6700787EC845"><span class="RefLink">61</span></a>, respectively. More general functions for arbitrary collections can be found in Chapter <a href="chap30.html#X8050A8037984E5B6"><span class="RefLink">30</span></a>.</p>
<p><a id="X7CBDD36E7B7BE286" name="X7CBDD36E7B7BE286"></a></p>
<h4>31.7 <span class="Heading">Parents</span></h4>
<p><a id="X7BC856CC7F116BB0" name="X7BC856CC7F116BB0"></a></p>
<h5>31.7-1 Parent</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Parent</code>( <var class="Arg">D</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">‣ SetParent</code>( <var class="Arg">D</var>, <var class="Arg">P</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">‣ HasParent</ | |