Function: nfgaloisconj
Section: number_fields
C-Name: galoisconj0
Prototype: GD0,L,DGp
Help: nfgaloisconj(nf,{flag=0},{d}): list of conjugates of a root of the
 polynomial x=nf.pol in the same number field. flag is optional (set to 0 by
 default), meaning 0: use combination of flag 4 and 1, always complete; 1:
 use nfroots; 2 : use complex numbers, LLL on integral basis (not always
 complete); 4: use Allombert's algorithm, complete if the field is Galois of
 degree <= 35 (see manual for details). nf can be simply a polynomial.
Doc: $\var{nf}$ being a number field as output by \kbd{nfinit}, computes the
 conjugates of a root $r$ of the non-constant polynomial $x=\var{nf}[1]$
 expressed as polynomials in $r$. This also makes sense when the number field
 is not \idx{Galois} since some conjugates may lie in the field.
 $\var{nf}$ can simply be a polynomial.

 If no flags or $\fl=0$, use a combination of flag $4$ and $1$ and the result
 is always complete. There is no point whatsoever in using the other flags.

 If $\fl=1$, use \kbd{nfroots}: a little slow, but guaranteed to work in
 polynomial time.

 If $\fl=2$ (OBSOLETE), use complex approximations to the roots and an integral
 \idx{LLL}. The result is not guaranteed to be complete: some
 conjugates may be missing (a warning is issued if the result is not proved
 complete), especially so if the corresponding polynomial has a huge index,
 and increasing the default precision may help. This variant is slow and
 unreliable: don't use it.

 If $\fl=4$, use \kbd{galoisinit}: very fast, but only applies to (most) Galois
 fields. If the field is Galois with weakly
 super-solvable Galois group (see \tet{galoisinit}), return the complete list
 of automorphisms, else only the identity element. If present, $d$ is assumed to
 be a multiple of the least common denominator of the conjugates expressed as
 polynomial in a root of \var{pol}.

 This routine can only compute $\Q$-automorphisms, but it may be used to get
 $K$-automorphism for any base field $K$ as follows:
 \bprog
 rnfgaloisconj(nfK, R) = \\ K-automorphisms of L = K[X] / (R)
 { my(polabs, N);
   R *= Mod(1, nfK.pol);             \\ convert coeffs to polmod elts of K
   polabs = rnfequation(nfK, R);
   N = nfgaloisconj(polabs) % R;     \\ Q-automorphisms of L
   \\ select the ones that fix K
   select(s->subst(R, variable(R), Mod(s,R)) == 0, N);
 }
 K  = nfinit(y^2 + 7);
 rnfgaloisconj(K, x^4 - y*x^3 - 3*x^2 + y*x + 1)  \\ K-automorphisms of L
 @eprog

Variant: Use directly
 \fun{GEN}{galoisconj}{GEN nf, GEN d}, corresponding to $\fl = 0$, the others
 only have historical interest.
