File: CHAP003.htm

package info (click to toggle)
gap-alnuth 3.2.1-2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,000 kB
  • sloc: makefile: 117; sh: 13
file content (111 lines) | stat: -rw-r--r-- 3,735 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<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;rational matrix field of unknown degree&gt;

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

gap&gt; Basis(F);
Basis( &lt;rational matrix field of degree 4&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;rational matrix field of degree 4&gt;, 
[ [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ] ],
  [ [ -1, 1, 1, 0 ], [ -2, 0, 2, 1 ], [ -2, -1, 1, 2 ], [ -1, -1, 0, 1 ] ],
  [ [ -3, -2, 2, 3 ], [ -3, -5, 0, 5 ], [ 0, -5, -3, 3 ], [ 2, -2, -3, 0 ] ],
  [ [ -1, -1, 0, 1 ], [ 0, -2, -1, 1 ], [ 1, -1, -2, 0 ], [ 1, 0, -1, -1 ] ]
 ] )

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

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

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

gap&gt; F := FieldByPolynomialNC(g);
&lt;algebraic extension over the Rationals of degree 4&gt;
gap&gt; PrimitiveElement(F);
a
gap&gt; MaximalOrderBasis(F);
Basis( &lt;algebraic extension over the Rationals of degree 4&gt;,
[ !1, 1/2*a, 1/4*a^2, 1/56*a^3+1/14*a^2+1/14*a-2/7 ] )

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

gap&gt; natU := IsomorphismPcpGroup(U);;
gap&gt; elms := List( [1..10], x-&gt; Random(F) );;

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 );;
gap&gt; y := RandomGroupElement( elms );;
gap&gt; z := ImageElm( isom, y );;
gap&gt; y = PreImagesRepresentative( isom, z );
true

gap&gt; FactorsPolynomialAlgExt( F, g );
[ x_1+(-a), x_1+(a-2), x_1+(-1/7*a^3+3/7*a^2+31/7*a-40/7),
  x_1+(1/7*a^3-3/7*a^2-31/7*a+26/7) ]
</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>April 2022
</address></body></html>