1Function: nfgrunwaldwang
2Section: number_fields
3C-Name: nfgrunwaldwang
4Prototype: GGGGDn
5Help: nfgrunwaldwang(nf,Lpr,Ld,pl,{v='x}): a polynomial in the variable v
6 defining a cyclic extension of nf (given in nf or bnf form) with local
7 behavior prescribed by Lpr, Ld and pl: the extension has local degree a
8 multiple of Ld[i] at the prime Lpr[i], and the extension is complex at the
9 i-th real place of nf if pl[i]=-1 (no condition if pl[i]=0). The extension
10 has degree the LCM of the local degrees.
11Doc: Given \var{nf} a number field in \var{nf} or \var{bnf} format,
12 a \typ{VEC} \var{Lpr} of primes of \var{nf} and a \typ{VEC} \var{Ld} of
13 positive integers of the same length, a \typ{VECSMALL} \var{pl} of length
14 $r_1$ the number of real places of \var{nf}, computes a polynomial with
15 coefficients in \var{nf} defining a cyclic extension of \var{nf} of
16 minimal degree satisfying certain local conditions:
17
18 \item at the prime~$Lpr[i]$, the extension has local degree a multiple
19 of~$Ld[i]$;
20
21 \item at the $i$-th real place of \var{nf}, it is complex if $pl[i]=-1$
22 (no condition if $pl[i]=0$).
23
24 The extension has degree the LCM of the local degrees. Currently, the degree
25 is restricted to be a prime power for the search, and to be prime for the
26 construction because of the \kbd{rnfkummer} restrictions.
27
28 When \var{nf} is $\Q$, prime integers are accepted instead of \kbd{prid}
29 structures. However, their primality is not checked and the behavior is
30 undefined if you provide a composite number.
31
32 \misctitle{Warning} If the number field \var{nf} does not contain the $n$-th
33 roots of unity where $n$ is the degree of the extension to be computed,
34 the function triggers the computation of the \var{bnf} of $nf(\zeta_n)$,
35 which may be costly.
36
37 \bprog
38 ? nf = nfinit(y^2-5);
39 ? pr = idealprimedec(nf,13)[1];
40 ? pol = nfgrunwaldwang(nf, [pr], [2], [0,-1], 'x)
41 %3 = x^2 + Mod(3/2*y + 13/2, y^2 - 5)
42 @eprog
43