Function: rnfinit
Section: number_fields
C-Name: rnfinit
Prototype: GG
Help: rnfinit(nf,pol): pol being a non constant irreducible polynomial
 defined over the number field nf, initializes a vector of data necessary for
 working in relative number fields (rnf functions). See manual for technical
 details.
Doc: $\var{nf}$ being a number field in \kbd{nfinit}
 format considered as base field, and \var{pol} a polynomial defining a relative
 extension over $\var{nf}$, this computes all the necessary data to work in the
 relative extension. The main variable of \var{pol} must be of higher priority
 (see \secref{se:priority}) than that of $\var{nf}$, and the coefficients of
 \var{pol} must be in $\var{nf}$.

 The result is a row vector, whose components are technical. In the following
 description, we let $K$ be the base field defined by $\var{nf}$, $m$ the
 degree of the base field, $n$ the relative degree, $L$ the large field (of
 relative degree $n$ or absolute degree $nm$), $r_1$ and $r_2$ the number of
 real and complex places of $K$.

 $\var{rnf}[1]$ contains the relative polynomial \var{pol}.

 $\var{rnf}[2]$ is currently unused.

 $\var{rnf}[3]$ is a two-component row vector $[\goth{d}(L/K),s]$ where
 $\goth{d}(L/K)$ is the relative ideal discriminant of $L/K$ and $s$ is the
 discriminant of $L/K$ viewed as an element of $K^*/(K^*)^2$, in other words
 it is the output of \kbd{rnfdisc}.

 $\var{rnf}[4]$ is the ideal index $\goth{f}$, i.e.~such that
 $d(pol)\Z_K=\goth{f}^2\goth{d}(L/K)$.

 $\var{rnf}[5]$ is currently unused.

 $\var{rnf}[6]$ is currently unused.

 $\var{rnf}[7]$ is a two-component row vector, where the first component is
 the relative integral pseudo basis expressed as polynomials (in the variable of
 $pol$) with polmod coefficients in $\var{nf}$, and the second component is the
 ideal list of the pseudobasis in HNF.

 $\var{rnf}[8]$ is the inverse matrix of the integral basis matrix, with
 coefficients polmods in $\var{nf}$.

 $\var{rnf}[9]$ is currently unused.

 $\var{rnf}[10]$ is $\var{nf}$.

 $\var{rnf}[11]$ is the output of \kbd{rnfequation(nf, pol, 1)}. Namely, a
 vector \var{vabs} with 3 entries describing the \emph{absolute} extension
 $L/\Q$. $\var{vabs}[1]$ is an absolute equation, more conveniently obtained
 as \kbd{rnf.pol}. $\var{vabs}[2]$ expresses the generator $\alpha$ of the
 number field $\var{nf}$ as a polynomial modulo the absolute equation
 $\var{vabs}[1]$. $\var{vabs}[3]$ is a small integer $k$ such that, if $\beta$
 is an abstract root of \var{pol} and $\alpha$ the generator of $\var{nf}$,
 the generator whose root is \var{vabs} will be
 $\beta + k \alpha$. Note that one must be very careful if $k\neq0$ when
 dealing simultaneously with absolute and relative quantities since the
 generator chosen for the absolute extension is not the same as for the
 relative one. If this happens, one can of course go on working, but we
 strongly advise to change the relative polynomial so that its root will be
 $\beta + k \alpha$. Typically, the GP instruction would be

 \kbd{pol = subst(pol, x, x - k*Mod(y,\var{nf}.pol))}

 $\var{rnf}[12]$ is by default unused and set equal to 0. This
 field is used to store further information about the field as it becomes
 available (which is rarely needed, hence would be too expensive to compute
 during the initial \kbd{rnfinit} call).
