Sophie

Sophie

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

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

<html><head><title>[ALNUTH] 3 An example application</title></head>
<body text="#000000" bgcolor="#ffffff">
[<a href = "chapters.htm">Up</a>] [<a href ="CHAP002.htm">Previous</a>] [<a href ="CHAP004.htm">Next</a>] [<a href = "theindex.htm">Index</a>]
<h1>3 An example application</h1><p>
<P>
<H3>Sections</H3>
<oL>
<li> <A HREF="CHAP003.htm#SECT001">Number fields defined by matrices</a>
<li> <A HREF="CHAP003.htm#SECT002">Number fields defined by a polynomial</a>
</ol><p>
<p>
In this section we outline two example computations with the functions
of the previous chapter. The first example uses number fields defined 
by matrices and the second example considers number fields defined by
a polynomial.
<p>
<p>
<h2><a name="SECT001">3.1 Number fields defined by matrices</a></h2>
<p><p>
<pre>
gap&gt; m1 := [ [ 1, 0, 0, -7 ], 
             [ 7, 1, 0, -7 ], 
             [ 0, 7, 1, -7 ],
             [ 0, 0, 7, -6 ] ];;

gap&gt; m2 := [ [ 0, 0, -13, 14 ], 
             [ -1, 0, -13, 1 ], 
             [ 13, -1, -13, 1 ], 
             [ 0, 13, -14, 1 ] ];;

gap&gt; F := FieldByMatricesNC( [m1, m2] );
&lt;field in characteristic 0&gt;

gap&gt; DegreeOverPrimeField(F);
4
gap&gt; PrimitiveElement(F);
[ [ 1, 0, 0, -7 ], [ 7, 1, 0, -7 ], [ 0, 7, 1, -7 ], [ 0, 0, 7, -6 ] ]

gap&gt; Basis(F);
Basis( &lt;field in characteristic 0&gt;, 
[ [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ] ], 
  [ [ 0, 1, 0, 0 ], [ -1, 1, 1, 0 ], [ -1, 0, 1, 1 ], [ -1, 0, 0, 1 ] ], 
  [ [ 0, 0, 1, 0 ], [ -1, 0, 1, 1 ], [ -1, -1, 1, 1 ], [ 0, -1, 0, 1 ] ], 
  [ [ 0, 0, 0, 1 ], [ -1, 0, 0, 1 ], [ 0, -1, 0, 1 ], [ 0, 0, -1, 1 ] ] ] )

gap&gt; MaximalOrderBasis(F);
Basis( &lt;field in characteristic 0&gt;, 
[ [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ] ], 
  [ [ 1, 0, 0, -1 ], [ 1, 1, 0, -1 ], [ 0, 1, 1, -1 ], [ 0, 0, 1, 0 ] ], 
  [ [ 1, 0, -1, 0 ], [ 1, 1, -1, -1 ], [ 1, 1, 0, -1 ], [ 0, 1, 0, 0 ] ], 
  [ [ 1, -1, 0, 0 ], [ 1, 0, -1, 0 ], [ 1, 0, 0, -1 ], [ 1, 0, 0, 0 ] ] ] )

gap&gt; U := UnitGroup(F);
&lt;matrix group with 2 generators&gt;

gap&gt; u := GeneratorsOfGroup( U );;

gap&gt; nat := IsomorphismPcpGroup(U);
[ [ [ 0, 1, -1, 0 ], [ 0, 1, 0, -1 ], [ 0, 1, 0, 0 ], [ -1, 1, 0, 0 ] ], 
  [ [ 1, 0, -1, 1 ], [ 0, 1, -1, 0 ], [ 1, 0, 0, 0 ], [ 0, 1, -1, 1 ] ] ] -&gt; 
[ g1, g2 ]

gap&gt; H := Image(nat);
Pcp-group with orders [ 10, 0 ]
gap&gt; ImageElm( nat, u[1]*u[2] );
g1*g2
gap&gt; PreImagesRepresentative(nat, GeneratorsOfGroup(H)[1] );
[ [ 0, 1, -1, 0 ], [ 0, 1, 0, -1 ], [ 0, 1, 0, 0 ], [ -1, 1, 0, 0 ] ]
</pre>
<p>
<p>
<h2><a name="SECT002">3.2 Number fields defined by a polynomial</a></h2>
<p><p>
<pre>
gap&gt; x:=Indeterminate(Rationals);
x_1
gap&gt; g:= x^4-4*x^3-28*x^2+64*x+16;
x_1^4-4*x_1^3-28*x_1^2+64*x_1+16

gap&gt; F := FieldByPolynomialNC(g);
&lt;field in characteristic 0&gt;
gap&gt; PrimitiveElement(F);
(a)
gap&gt; MaximalOrderBasis(F);
Basis( &lt;field in characteristic 0&gt;,
[ !1, (1/2*a), (1/4*a^2), (5/7+1/14*a+1/14*a^2+1/56*a^3) ] )

gap&gt; U := UnitGroup(F);
[ !-1, (-3/7+6/7*a+3/28*a^2-1/28*a^3),
  (13/7+25/14*a+1/28*a^2-3/56*a^3), (36/7-9/7*a-2/7*a^2+3/56*a^3) ]
&lt;group with 4 generators&gt;

gap&gt; natU := IsomorphismPcpGroup(U);
[ !-1, (-3/7+6/7*a+3/28*a^2-1/28*a^3),
  (13/7+25/14*a+1/28*a^2-3/56*a^3), (36/7-9/7*a-2/7*a^2+3/56*a^3)
 ] -&gt; [ g1, g2, g3, g4 ]

gap&gt; elms := List( [1..10], x-&gt; Random(F) );
[ (4-1/2*a-1*a^2+3/2*a^3), (4/5-2/3*a+4/3*a^3), (1+a+2*a^2-1*a^3),
  (3/4+3*a+3*a^2), (-1-1/5*a^3), (-1/4*a-5/3*a^2), (1-1*a+1/2*a^2),
  (4-3/2*a+1/2*a^2), (-2/5+a-3/2*a^2), (-1*a+a^2+2*a^3) ]

gap&gt;  PcpPresentationOfMultiplicativeSubgroup( F, elms );
Pcp-group with orders [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]

gap&gt;isom := IsomorphismPcpGroup( F, elms );
[ (4-1/2*a-1*a^2+3/2*a^3), (4/5-2/3*a+4/3*a^3),
  (1+a+2*a^2-1*a^3), (3/4+3*a+3*a^2), (-1-1/5*a^3),
  (-1/4*a-5/3*a^2), (1-1*a+1/2*a^2), (4-3/2*a+1/2*a^2),
  (-2/5+a-3/2*a^2), (-1*a+a^2+2*a^3) ]
[ (4-1/2*a-1*a^2+3/2*a^3), (4/5-2/3*a+4/3*a^3), (1+a+2*a^2-1*a^3),
  (3/4+3*a+3*a^2), (-1-1/5*a^3), (-1/4*a-5/3*a^2), (1-1*a+1/2*a^2),
  (4-3/2*a+1/2*a^2), (-2/5+a-3/2*a^2), (-1*a+a^2+2*a^3) ] -&gt;
[ g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 ]

gap&gt; y := RandomGroupElement( elms );
(-475709724976707031371325/71806328788189775767952976
-379584641261299592239825/13055696143307231957809632*a
-462249188570593771377595/287225315152759103071811904*a^2+
2639763613873579813685/2901265809623829323957696*a^3)

gap&gt; ImageElm( isom, y );
g1^-1*g3^-2*g6^2*g8^-1*g9^-1
gap&gt; z := last;
g1^-1*g3^-2*g6^2*g8^-1*g9^-1

gap&gt; PreImagesRepresentative( isom, z );
(-475709724976707031371325/71806328788189775767952976
-379584641261299592239825/13055696143307231957809632*a
-462249188570593771377595/287225315152759103071811904*a^2+
2639763613873579813685/2901265809623829323957696*a^3)

gap&gt; FactorsPolynomialKant( g, F );
[ x_1+(-40/7+31/7*a+3/7*a^2-1/7*a^3), x_1+(-2+a), x_1+(-1*a),
  x_1+(26/7-31/7*a-3/7*a^2+1/7*a^3) ]

</pre>
<p>
<p>
[<a href = "chapters.htm">Up</a>] [<a href ="CHAP002.htm">Previous</a>] [<a href ="CHAP004.htm">Next</a>] [<a href = "theindex.htm">Index</a>]
<P>
<address>ALNUTH manual<br>November 2006
</address></body></html>