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

Quelle  chap10.html   Sprache: HTML

 
 products/sources/formale Sprachen/GAP/pkg/utils/doc/chap10.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 (Utils) - Chapter 10: Various other functions</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="chap10"  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="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="chap9.html">[Previous Chapter]</a>    <a href="chap11.html">[Next Chapter]</a>   </div>

<p id="mathjaxlink" class="pcenter"><a href="chap10_mj.html">[MathJax on]</a></p>
<p><a id="X83EFC3178180D918" name="X83EFC3178180D918"></a></p>
<div class="ChapSects"><a href="chap10.html#X83EFC3178180D918">10 <span class="Heading">Various other functions</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap10.html#X81A0A4FF842B039B">10.1 <span class="Heading">File operations</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap10.html#X7B7ECADF85F748BE">10.1-1 Log2HTML</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap10.html#X84D2922D87EDE9E9">10.2 <span class="Heading">LaTeX strings</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap10.html#X87DEB2B58266F858">10.2-1 IntOrOnfinityToLaTeX</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap10.html#X7DC642B97CD02F4E">10.2-2 LaTeXStringFactorsInt</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap10.html#X79F021B1830B68F6">10.3 <span class="Heading">Conversion to <span class="SimpleMath">Magma</span> strings</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap10.html#X8768D7707B4CBBD4">10.3-1 ConvertToMagmaInputString</a></span>
</div></div>
</div>

<h3>10 <span class="Heading">Various other functions</span></h3>

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

<h4>10.1 <span class="Heading">File operations</span></h4>

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

<h5>10.1-1 Log2HTML</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Log2HTML</code>( <var class="Arg">filename</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>This function has been transferred from package <strong class="pkg">RCWA</strong>.</p>

<p>This function converts the <strong class="pkg">GAP</strong> logfile <code class="file">filename</code> to HTML. It appears that the logfile should be in your current directory. The extension of the input file must be <code class="file">*.log</code>. The name of the output file is the same as the one of the input file except that the extension <code class="file">*.log</code> is replaced by <code class="file">*.html</code>. There is a sample CSS file in <code class="file">utils/doc/gaplog.css</code>, which you can adjust to your taste.</p>


<div class="example"><pre>

<span class="GAPprompt">gap></span> <span class="GAPinput">LogTo( "triv.log" );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">a := 33^5;</span>
39135393
<span class="GAPprompt">gap></span> <span class="GAPinput">LogTo(); </span>
<span class="GAPprompt">gap></span> <span class="GAPinput">Log2HTML( "triv.log" );     </span>

</pre></div>

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

<h4>10.2 <span class="Heading">LaTeX strings</span></h4>

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

<h5>10.2-1 IntOrOnfinityToLaTeX</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IntOrOnfinityToLaTeX</code>( <var class="Arg">n</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>This function has been transferred from package <strong class="pkg">ResClasses</strong>.</p>

<p><code class="code">IntOrInfinityToLaTeX(n)</code> returns the LaTeX string for <var class="Arg">n</var>.</p>


<div class="example"><pre>

<span class="GAPprompt">gap></span> <span class="GAPinput">IntOrInfinityToLaTeX( 10^3 );</span>
"1000"
<span class="GAPprompt">gap></span> <span class="GAPinput">IntOrInfinityToLaTeX( infinity );</span>
"\\infty"

</pre></div>

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

<h5>10.2-2 LaTeXStringFactorsInt</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ LaTeXStringFactorsInt</code>( <var class="Arg">n</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>This function has been transferred from package <strong class="pkg">RCWA</strong>.</p>

<p>It returns the prime factorization of the integer <span class="SimpleMath">n</span> as a string in LaTeX format.</p>


<div class="example"><pre>

<span class="GAPprompt">gap></span> <span class="GAPinput">LaTeXStringFactorsInt( Factorial(12) );</span>
"2^{10} \\cdot 3^5 \\cdot 5^2 \\cdot 7 \\cdot 11"

</pre></div>

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

<h4>10.3 <span class="Heading">Conversion to <span class="SimpleMath">Magma</span> strings</span></h4>

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

<h5>10.3-1 ConvertToMagmaInputString</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ConvertToMagmaInputString</code>( <var class="Arg">arg</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>The function <code class="code">ConvertToMagmaInputString( obj [, str] )</code> attempts to output a string <code class="code">s</code> which can be read into <span class="SimpleMath">Magma</span> <a href="chapBib.html#biBMAGMA">[BCP97]</a> so as to produce the same group in that computer algebra system. In the second form the user specifies the name of the resulting object, so that the output string has the form <code class="code">"str := ..."</code>.</p>

<p>When <code class="code">obj</code> is a permutation group, the operation <code class="code">PermGroupToMagmaFormat(obj)</code> is called. This function has been taken from <code class="file">other.gi</code> in the main library where it was called <code class="code">MagmaInputString</code>.</p>

<p>When <code class="code">obj</code> is a pc-group, the operation <code class="code">PcGroupToMagmaFormat(obj)</code> is called. This function was private code of Max Horn.</p>

<p>When <code class="code">obj</code> is a matrix group over a finite field, the operation <code class="code">MatrixGroupToMagmaFormat(obj)</code> is called. This function is a modification of private code of Frank Lübeck.</p>

<p>Hopefully code for other types of group will be added in due course.</p>

<p>These functions should be considered <em>experimental</em>, and more testing is desirable.</p>


<div class="example"><pre>

<span class="GAPprompt">gap></span> <span class="GAPinput">## permutation groups</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">ConvertToMagmaInputString( Group( (1,2,3,4,5), (3,4,5) ) );</span>
"PermutationGroup<5|(1,2,3,4,5),\n(3,4,5)>;\n"
<span class="GAPprompt">gap></span> <span class="GAPinput">ConvertToMagmaInputString( Group( (1,2,3,4,5) ), "c5" );        </span>
"c5 := PermutationGroup<5|(1,2,3,4,5)>;\n"
<span class="GAPprompt">gap></span> <span class="GAPinput">## pc-group</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">ConvertToMagmaInputString( DihedralGroup( IsPcGroup, 10 ) );</span>
"PolycyclicGroup< f1,f2 |\nf1^2,\nf2^5,\nf2^f1 = f2^4\n>;\n"
<span class="GAPprompt">gap></span> <span class="GAPinput">## fp-group</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">F2 := FreeGroup( 2 );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">f := F2.1;;  g := F2.2;;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">relq8 := [ f^4, g^4, f*g*f*g^-1, f^2*g^2 ];; </span>
<span class="GAPprompt">gap></span> <span class="GAPinput">q8 := F2/relq8;; </span>
<span class="GAPprompt">gap></span> <span class="GAPinput">ConvertToMagmaInputString( q8 );</span>
no conversion function yet available for fp-groups
fail
<span class="GAPprompt">gap></span> <span class="GAPinput">## matrix group</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">M := GL(2,5);;  Size(M); </span>
480
<span class="GAPprompt">gap></span> <span class="GAPinput">s1 := ConvertToMagmaInputString( M );</span>
"F := GF(5);\nP := GL(2,F);\ngens := [\nP![2,0,0,1],\nP![4,1,4,0]\n];\nsub<P |\
 gens>;\n"
<span class="GAPprompt">gap></span> <span class="GAPinput">Print( s1 );</span>
F := GF(5);
P := GL(2,F);
gens := [
P![2,0,0,1],
P![4,1,4,0]
];
sub<P | gens>;
<span class="GAPprompt">gap></span> <span class="GAPinput">n1 := [ [ Z(9)^0, Z(9)^0 ], [ Z(9)^0, Z(9) ] ];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">n2 := [ [ Z(9)^0, Z(9)^3 ], [ Z(9)^4, Z(9)^2 ] ];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">N := Group( n1, n2 );;  Size( N );</span>
5760
<span class="GAPprompt">gap></span> <span class="GAPinput">s2 := ConvertToMagmaInputString( N"gpN" );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">Print( s2 );</span>
F := GF(3^2);
P := GL(2,F);
w := PrimitiveElement(F);
gens := [
P![ 1, 1, 1,w^1],
P![ 1,w^3, 2,w^2]
];
gpN := sub<P | gens>;

</pre></div>


<div class="chlinkprevnextbot"> <a href="chap0.html">[Top of Book]</a>   <a href="chap0.html#contents">[Contents]</a>    <a href="chap9.html">[Previous Chapter]</a>    <a href="chap11.html">[Next Chapter]</a>   </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="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="chapBib.html">Bib</a>  <a href="chapInd.html">Ind</a>  </div>

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

91%


¤ Dauer der Verarbeitung: 0.41 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.