Download A Tutorial for Pari/GP

Transcript
Up to now, we have only worked to low precision. The goal was to obtain this unknown
integer 517. Note that this number has absolutely no mathematical significance: indeed the notion
of reduction of a form with positive discriminant is not well defined since there are usually many
reduced forms equivalent to a given form. However, when PARI makes its computations, the specific
order and reductions that it performs are dictated entirely by the coefficients of the quadratic form
itself, and not by the distance component, hence the precision used has no effect.
Hence we now start again by setting the precision to (for example) 500, we retype the definition
of u (why is this necessary?), and then qfbred(u, 1)^517. Of course we know in advance that we
land on the unit form, and the fourth component gives us the regulator to 500 decimal places with
no effort at all.
In a similar way, we could obtain the so-called compact representation of the fundamental unit
itself, or p-adic regulators. I leave this as exercises for the interested reader.
You can try the quadhilbert function on that field but, since the class number is 1, the result
won’t be that exciting. If you try it on our preceding example (3 ∗ 3299) it should take about 2
seconds.
Time for a coffee break?
12. Working in General Number Fields.
12.1. Elements.
The situation here is of course more difficult. First of all, remembering what we did with
elliptic curves, we need to initialize data linked to our base number field, with something more
serious than quadgen. For example assume that we want to work in the number field K defined by
one of the roots of the equation x4 + 24x2 + 585x + 1791 = 0. This is done by typing
T = x^4 + 24*x^2 + 585*x + 1791
nf = nfinit(T)
We get an nf structure but, thanks to member functions, we do not need to know anything about
it. If you type nf.pol, you will get the polynomial T which you just input. nf.sign yields the
signature (r1 , r2 ) of the field, nf.disc the field discriminant, nf.zk an integral basis, etc. . . .
The integral basis is expressed in terms of a generic root x of T and we notice it’s very far
from being a power integral basis, which is a little strange for such a small field. Hum, let’s check
that: poldisc(T)? Ooops, small wonder we had such denominators, the index of the power order
Z[x]/(T ) in the maximal order ZK is, well, nf.index. Note that this is also given by
sqrtint(poldisc(nf.pol) / nf.disc)
Anyway, that’s 3087, we don’t want to work with such a badly skewed polynomial! So, we type
P = polred(T)
We see from the third component that the polynomial x4 − x3 − 21x2 + 17x + 133 defines the same
field with much smaller coefficients, so type
A = P[3]
The polred function usually gives a simpler polynomial, and also sometimes some information on
the existence of subfields. For example in this case, the second component of polred tells us that
34