Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 91213ddcfbe7f54821d42c2d9e091326 > files > 470

gap-system-packages-4.4.12-5mdv2010.0.i586.rpm

<?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 (AtlasRep) - Chapter 3: Private Extensions of the AtlasRep Package
</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" />
</head>
<body>


<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="chapBib.html">Bib</a>  <a href="chapInd.html">Ind</a>  </div>

<div class="chlinkprevnexttop">&nbsp;<a href="chap0.html">Top of Book</a>&nbsp;  &nbsp;<a href="chap2.html">Previous Chapter</a>&nbsp;  &nbsp;<a href="chap4.html">Next Chapter</a>&nbsp;  </div>

<p><a id="X7DF711157F9EFA28" name="X7DF711157F9EFA28"></a></p>
<div class="ChapSects"><a href="chap3.html#X7DF711157F9EFA28">3 <span class="Heading">Private Extensions of the <strong class="pkg">AtlasRep</strong> Package
</span></a>
<div class="ContSect"><span class="nocss">&nbsp;</span><a href="chap3.html#X8072E5C9825D6CCE">3.1 <span class="Heading">Adding a Private Data Directory</span></a>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X825AF58885A48520">3.1-1 AtlasOfGroupRepresentationsNotifyPrivateDirectory</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X8748A8BB7C7089EE">3.1-2 AtlasOfGroupRepresentationsForgetPrivateDirectory</a></span>
</div>
<div class="ContSect"><span class="nocss">&nbsp;</span><a href="chap3.html#X7E186BFA7E59BD47">3.2 <span class="Heading">The Effect of Private Extensions on the User Interface</span></a>
</div>
<div class="ContSect"><span class="nocss">&nbsp;</span><a href="chap3.html#X86CC8CDD866A1FC3">3.3 <span class="Heading">An Example of Extending the <strong class="pkg">AtlasRep</strong> Package
</span></a>
</div>
</div>

<h3>3 <span class="Heading">Private Extensions of the <strong class="pkg">AtlasRep</strong> Package
</span></h3>

<p>It may be interesting to use the functions of the <strong class="pkg">GAP</strong> interface also for representations or programs that are <em>not</em> part of the <strong class="pkg">ATLAS</strong> of Group Representations. This chapter describes how to achieve this.</p>

<p>The main idea is that users can notify directories containing the "private" data files, which may consist of</p>

<ol>
<li><p>new representations and programs for groups that are declared already in the "official" <strong class="pkg">ATLAS</strong> of Group Representations,</p>

</li>
<li><p>the declaration of groups that are not declared in the "official" <strong class="pkg">ATLAS</strong> of Group Representations, and representations and programs for them, and</p>

</li>
<li><p>the definition of new kinds of representations and programs.</p>

</li>
</ol>
<p>The first two kinds are dealt with in Section <a href="chap3.html#X8072E5C9825D6CCE"><b>3.1</b></a> and Section <a href="chap3.html#X7E186BFA7E59BD47"><b>3.2</b></a>. The last is described in Section <a href="chap5.html#X86366BF08533DA5E"><b>5.5</b></a>.</p>

<p>Finally, an example of using private extensions is given in Section <a href="chap3.html#X86CC8CDD866A1FC3"><b>3.3</b></a>.</p>

<p>Several of the sanity checks for the official part of the <strong class="pkg">AtlasRep</strong> package make sense also for private extensions, see Section <a href="chap5.html#X84A565E482DBF4C1"><b>5.8</b></a> for more information.</p>

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

<h4>3.1 <span class="Heading">Adding a Private Data Directory</span></h4>

<p>After the <strong class="pkg">AtlasRep</strong> package has been loaded into the <strong class="pkg">GAP</strong> session, one can add private data. However, one should <em>not</em> add private files to the local data directories of the package, or modify files in these directories. It should be noted that a data file is fetched from a server only if the local data directories do not contain a file with this name, independent of the contents of the files. (As a consequence, corrupted files in the local data directories are <em>not</em> automatically replaced by a correct server file.)</p>

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

<h5>3.1-1 AtlasOfGroupRepresentationsNotifyPrivateDirectory</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; AtlasOfGroupRepresentationsNotifyPrivateDirectory</code>( <var class="Arg">dir[, dirid]</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><b>Returns: </b><code class="keyw">true</code> if none of the filenames with admissible format in the directory <var class="Arg">dir</var> is contained in other data directories and if the data belongs to groups whose names have been declared, otherwise <code class="keyw">false</code>.</p>

<p>Let <var class="Arg">dir</var> be a directory (see <a href="../../../doc/htm/ref/CHAP009.htm#SECT003"><b>Reference: Directories</b></a>) or a string denoting the name of a directory (such that the <strong class="pkg">GAP</strong> object describing this directory can be obtained by calling <code class="func">Directory</code> (<a href="../../../doc/htm/ref/CHAP009.htm#SECT003"><b>Reference: Directory</b></a>) with the argument <var class="Arg">dir</var>). In the following, let <var class="Arg">dirname</var> be the name of the directory. So <var class="Arg">dirname</var> can be an absolute path or a path relative to the home directory of the user (starting with a tilde character <code class="code">~</code>) or a path relative to the directory where <strong class="pkg">GAP</strong> was started.</p>

<p>If the second argument <var class="Arg">dirid</var> is given, it must be a string. This value will be used in the <code class="code">identifier</code> components of the records that are returned by interface functions (see Section <a href="chap2.html#X806ED7BB83FD848B"><b>2.5</b></a>) for data contained in the directory <var class="Arg">dir</var>. Note that the directory name may be different in different <strong class="pkg">GAP</strong> sessions or for different users who want to access the same data, whereas the <code class="code">identifier</code> components shall be independent of such differences. The default for <var class="Arg">dirid</var> is <var class="Arg">dirname</var>.</p>

<p><code class="func">AtlasOfGroupRepresentationsNotifyPrivateDirectory</code> notifies the data in the directory <var class="Arg">dir</var> to the <strong class="pkg">AtlasRep</strong> package. First the pair <code class="code">[ <var class="Arg">dirname</var>, <var class="Arg">dirid</var> ]</code> is added to the <code class="code">private</code> component of <code class="func">AtlasOfGroupRepresentationsInfo</code> (<a href="chap5.html#X7BEC94A6781E126E"><b>5.1-5</b></a>). If the directory contains a file with the name <code class="file">toc.g</code> then this file is read; this file is useful for adding new group names (see <code class="func">AGRGNAN</code> (<a href="chap5.html#X8229700C8744F09B"><b>5.7-1</b></a>)), for adding field information for characteristic zero representations (see <code class="func">AGRRNG</code> (<a href="chap5.html#X86698BC778570236"><b>5.7-2</b></a>)), or for adding new data types (see Section <a href="chap5.html#X86366BF08533DA5E"><b>5.5</b></a>). Next the table of contents of the private directory is built from the list of files contained in the private directory or in its subdirectories (one layer deep).</p>

<p>Only those files are considered whose names match an admissible format (see Section <a href="chap5.html#X7D16BE31788F0E8A"><b>5.6</b></a>). Filenames that are already contained in another data directory of the <strong class="pkg">AtlasRep</strong> package are ignored, and messages about these filenames are printed if the info level of <code class="func">InfoAtlasRep</code> (<a href="chap5.html#X8006BE167EB81E16"><b>5.1-1</b></a>) is at least 1.</p>

<p>Note that this implies that the files of the "official" (i.e. non-private) data directories have priority over files in private directories.</p>

<p>If the directory contains files for groups whose names have not been declared before and if the info level of <code class="func">InfoAtlasRep</code> (<a href="chap5.html#X8006BE167EB81E16"><b>5.1-1</b></a>) is at least 1 then a message about these names is printed.</p>

<p>For convenience, the user may collect the notifications of private data directories in the file <code class="file">.gaprc</code> (see Section <a href="../../../doc/htm/ref/CHAP003.htm#SECT004"><b>Reference: The .gaprc file</b></a>).</p>

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

<h5>3.1-2 AtlasOfGroupRepresentationsForgetPrivateDirectory</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; AtlasOfGroupRepresentationsForgetPrivateDirectory</code>( <var class="Arg">dirid</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>If <var class="Arg">dirid</var> is the identifier of a private data directory that has been notified with <code class="func">AtlasOfGroupRepresentationsNotifyPrivateDirectory</code> (<a href="chap3.html#X825AF58885A48520"><b>3.1-1</b></a>) then <code class="func">AtlasOfGroupRepresentationsForgetPrivateDirectory</code> removes the directory from the list of notified private directories; this means that from then on, the data in this directory cannot be accessed anymore in the current session.</p>

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

<h4>3.2 <span class="Heading">The Effect of Private Extensions on the User Interface</span></h4>

<p>First suppose that only new groups or new data for known groups are added.</p>

<p>In this case, <code class="func">DisplayAtlasInfo</code> (<a href="chap2.html#X79DACFFA7E2D1A99"><b>2.5-1</b></a>) lists the private representations and programs in the same way as the "official" data, except that private parts are marked with the string stored in the component <code class="code">markprivate</code> of <code class="func">AtlasOfGroupRepresentationsInfo</code> (<a href="chap5.html#X7BEC94A6781E126E"><b>5.1-5</b></a>); by default, this is a star <code class="code">*</code>. The ordering of representations listed by <code class="func">DisplayAtlasInfo</code> (<a href="chap2.html#X79DACFFA7E2D1A99"><b>2.5-1</b></a>) (and referred to by <code class="func">AtlasGenerators</code> (<a href="chap2.html#X7D1CCCF8852DFF39"><b>2.5-2</b></a>)) will in general change when private directories are notified. If several private directories are used then the ordering of data may depend on the ordering of notifications. For the other interface functions described in Chapter <a href="chap2.html#X87EAF8E578D95793"><b>2</b></a>, the only difference is that also the private data can be accessed. In particular the "free format" <code class="code"><var class="Arg">groupname</var>G<var class="Arg">i</var>-X<var class="Arg">descr</var>W<var class="Arg">n</var></code> for straight line programs (see Section <a href="chap5.html#X7D16BE31788F0E8A"><b>5.6</b></a>) may be used in private directories; the data can be accessed with <code class="func">AtlasProgram</code> (<a href="chap2.html#X801F2E657C8A79ED"><b>2.5-3</b></a>), where the last two arguments are the strings <code class="code">"other"</code> and <var class="Arg">descr</var>.</p>

<p>If also private data types are introduced (see Section <a href="chap5.html#X86366BF08533DA5E"><b>5.5</b></a>) then additional columns or rows can appear in the output of <code class="func">DisplayAtlasInfo</code> (<a href="chap2.html#X79DACFFA7E2D1A99"><b>2.5-1</b></a>), and new inputs can become meaningful for all interface functions. Examples for these changes can be found in Section <a href="chap3.html#X86CC8CDD866A1FC3"><b>3.3</b></a>.</p>

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

<h4>3.3 <span class="Heading">An Example of Extending the <strong class="pkg">AtlasRep</strong> Package
</span></h4>

<p>In the beginning we set the info level of <code class="func">InfoAtlasRep</code> (<a href="chap5.html#X8006BE167EB81E16"><b>5.1-1</b></a>) to 1.</p>


<table class="example">
<tr><td><pre>
gap&gt; level:= InfoLevel( InfoAtlasRep );;
gap&gt; SetInfoLevel( InfoAtlasRep, 1 );
</pre></td></tr></table>

<p>Let us assume that the directory <code class="file">privdir</code> contains data for the cyclic group C_4 of order 4 and for the symmetric group S_5 on 5 points, respectively. Note that it is obvious what the term "standard generators" means for the group C_4.</p>

<p>Further let us assume that <code class="file">privdir</code> contains the following files.</p>


<dl>
<dt><strong class="Mark"><code class="file">C4G1-p4B0.m1</code></strong></dt>
<dd><p>a faithful permutation representation of C_4 on 4 points,</p>

</dd>
<dt><strong class="Mark"><code class="file">C4G1-max1W1</code></strong></dt>
<dd><p>the straight line program that returns the square of its unique input,</p>

</dd>
<dt><strong class="Mark"><code class="file">C4G1-a2W1</code></strong></dt>
<dd><p>the straight line program that applies an outer automorphism to its unique input,</p>

</dd>
<dt><strong class="Mark"><code class="file">C4G1-XtestW1</code></strong></dt>
<dd><p>the straight line program that returns the square of its unique input,</p>

</dd>
<dt><strong class="Mark"><code class="file">S5G1-p2B0.m1</code> and <code class="file">S5G1-p2B0.m2</code></strong></dt>
<dd><p>the permutation representation of the commutator factor group of S_5, on 2 points.</p>

</dd>
</dl>
<p>The directory and the files can be created as follows.</p>


<table class="example">
<tr><td><pre>
gap&gt; pkg:= Filename( DirectoriesPackageLibrary( "atlasrep", "" ), "" );;
gap&gt; prv:= DirectoryTemporary( "privdir" );;
gap&gt; FileString( Filename( prv, "C4G1-p4B0.m1" ),
&gt;                MeatAxeString( [ (1,2,3,4) ], 4 ) );;
gap&gt; FileString( Filename( prv, "C4G1-max1W1" ),
&gt;                "inp 1\npwr 2 1 2\noup 1 2\n" );;
gap&gt; FileString( Filename( prv, "C4G1-XtestW1" ),
&gt;                "inp 1\npwr 2 1 2\noup 1 2\n" );;
gap&gt; FileString( Filename( prv, "C4G1-a2W1" ),
&gt;                "inp 1\npwr 3 1 2\noup 1 2\n" );;
gap&gt; FileString( Filename( prv, "C4G1-Ar1aB0.g" ),
&gt;                "return rec( generators:= [ [[E(4)]] ] );\n" );;
gap&gt; FileString( Filename( prv, "S5G1-p2B0.m1" ),
&gt;                MeatAxeString( [ (1,2) ], 2 ) );;
gap&gt; FileString( Filename( prv, "S5G1-p2B0.m2" ),
&gt;                MeatAxeString( [ (1,2) ], 2 ) );;
</pre></td></tr></table>

<p>(We could also introduce intermediate directories <code class="file">C4</code> and <code class="file">S5</code>, say, each with the data for one group only. Here we do not show this because creating directories seems to be not possible without the <strong class="pkg">GAP</strong> package <strong class="pkg">IO</strong>.)</p>

<p>Now we create a file whose name is not admissible because it occurs already in the official part of the database. (This will cause an info line below.)</p>


<table class="example">
<tr><td><pre>
gap&gt; FileString( Filename( prv, "S5G1-p5B0.m1" ),
&gt;                MeatAxeString( [ (1,2) ], 5 ) );;
</pre></td></tr></table>

<p>The official part of the <strong class="pkg">AtlasRep</strong> package does not contain information about C_4, so we first notify this group, in the file <code class="file">privdir/toc.g</code>. (The group S_5 is known with name <code class="code">A5.2</code> in the official part of the <strong class="pkg">AtlasRep</strong> package, so it cannot be notified.)</p>


<table class="example">
<tr><td><pre>
gap&gt; FileString( Filename( prv, "toc.g" ),
&gt;                "AGRGNAN(\"C4\",\"C4\");\n" );;
</pre></td></tr></table>

<p>Then we notify the private directory.</p>


<table class="example">
<tr><td><pre>
gap&gt; AtlasOfGroupRepresentationsNotifyPrivateDirectory( prv, "priv" );
#I  file `S5G1-p5B0.m1' was already in another t.o.c.
false
</pre></td></tr></table>

<p>(The nonadmissible filename <code class="code">S5G1-p5B0.m1</code> was ignored for the private directory. If this file would not be present then the return value would be <code class="keyw">true</code>.) Now we can use the interface functions for accessing the data in the private directory.</p>


<table class="example">
<tr><td><pre>
gap&gt; DisplayAtlasInfo( [ "C4" ] );
group    #  maxes  cl  cyc  out  find  check  pres
--------------------------------------------------
C4*      2      1   -    -    2     -      -     -
gap&gt; DisplayAtlasInfo( "C4" );
Representations for G = C4:    (all refer to std. generators 1)
---------------------------
1: G &lt;= Sym(4)*
2: G &lt;= GL(1a,C)*

Programs for G = C4:    (all refer to std. generators 1)
--------------------
available maxes of G:  [ 1 ]*
available automorphisms:  [ "2" ]*
available other scripts:
   "test"*
gap&gt; DisplayAtlasInfo( "C4", IsPermGroup, true );
Representations for G = C4:    (all refer to std. generators 1)
---------------------------
1: G &lt;= Sym(4)*
gap&gt; DisplayAtlasInfo( "C4", IsMatrixGroup );
Representations for G = C4:    (all refer to std. generators 1)
---------------------------
2: G &lt;= GL(1a,C)*
gap&gt; DisplayAtlasInfo( "C4", Dimension, 2 );
gap&gt; DisplayAtlasInfo( "A5.2", NrMovedPoints, 2 );
Representations for G = A5.2:    (all refer to std. generators 1)
-----------------------------
4: G &lt;= Sym(2)*
gap&gt; info:= OneAtlasGeneratingSetInfo( "C4" );
rec( groupname := "C4", standardization := 1, repnr := 1, 
  identifier := [ [ "priv", "C4" ], [ "C4G1-p4B0.m1" ], 1, 4 ], p := 4, 
  id := "" )
gap&gt; AtlasGenerators( info.identifier );
rec( generators := [ (1,2,3,4) ], groupname := "C4", standardization := 1,
  repnr := 1, identifier := [ [ "priv", "C4" ], [ "C4G1-p4B0.m1" ], 1, 4 ], 
  p := 4, id := "" )
gap&gt; AtlasProgram( "C4", 1 );
rec( program := &lt;straight line program&gt;, standardization := 1, 
  identifier := [ [ "priv", "C4" ], "C4G1-max1W1", 1 ], groupname := "C4" )
gap&gt; AtlasProgram( "C4", "maxes", 1 );
rec( program := &lt;straight line program&gt;, standardization := 1, 
  identifier := [ [ "priv", "C4" ], "C4G1-max1W1", 1 ], groupname := "C4" )
gap&gt; AtlasProgram( "C4", "maxes", 2 );
fail
gap&gt; AtlasGenerators( "C4", 1 );
rec( generators := [ (1,2,3,4) ], groupname := "C4", standardization := 1,
  repnr := 1, identifier := [ [ "priv", "C4" ], [ "C4G1-p4B0.m1" ], 1, 4 ], 
  p := 4, id := "" )
gap&gt; AtlasGenerators( "C4", 2 );
rec( generators := [ [ [ E(4) ] ] ], groupname := "C4", standardization := 1,
  repnr := 2, identifier := [ [ "priv", "C4" ], "C4G1-Ar1aB0.g", 1, 1 ], 
  dim := 1, id := "a" )
gap&gt; AtlasGenerators( "C4", 3 );
fail
gap&gt; AtlasProgram( "C4", "other", "test" );
rec( program := &lt;straight line program&gt;, standardization := 1, 
  identifier := [ [ "priv", "C4" ], "C4G1-XtestW1", 1 ], groupname := "C4" )
</pre></td></tr></table>

<p>For checking the data in the private directory, we apply some of the sanity checks (see Section <a href="chap5.html#X84A565E482DBF4C1"><b>5.8</b></a>).</p>


<table class="example">
<tr><td><pre>
gap&gt; AtlasOfGroupRepresentationsTestWords( "priv" );
true
gap&gt; AtlasOfGroupRepresentationsTestFileHeaders( "priv" );
true
</pre></td></tr></table>

<p>Finally, we "uninstall" the private directory, and reset the info level that had been set to 1 in the beginning. (Also the group name <code class="code">C4</code> is removed this way, which is an advantage of using a <code class="file">toc.g</code> file over calling <code class="func">AGRGNAN</code> (<a href="chap5.html#X8229700C8744F09B"><b>5.7-1</b></a>) directly.), Note that we need not remove the data in the temporary directory, <strong class="pkg">GAP</strong> will do this automatically.</p>


<table class="example">
<tr><td><pre>
gap&gt; AtlasOfGroupRepresentationsForgetPrivateDirectory( "priv" );
gap&gt; SetInfoLevel( InfoAtlasRep, level );
</pre></td></tr></table>


<div class="chlinkprevnextbot">&nbsp;<a href="chap0.html">Top of Book</a>&nbsp;  &nbsp;<a href="chap2.html">Previous Chapter</a>&nbsp;  &nbsp;<a href="chap4.html">Next Chapter</a>&nbsp;  </div>


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

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