1Function: nfdisc
2Section: number_fields
3C-Name: nfdisc
4Prototype: G
5Help: nfdisc(T): discriminant of the number field defined by
6 the polynomial T. An argument [T,listP] is possible, where listP is a list
7 of primes or a prime bound.
8Doc: \idx{field discriminant} of the number field defined by the integral,
9 preferably monic, irreducible polynomial $T(X)$. Returns the discriminant of
10 the number field $\Q[X]/(T)$, using the Round $4$ algorithm.
11
12 \misctitle{Local discriminants, valuations at certain primes}
13
14 As in \kbd{nfbasis}, the argument $T$ can be replaced by $[T,\var{listP}]$,
15 where \kbd{listP} is as in \kbd{nfbasis}: a vector of pairwise coprime
16 integers (usually distinct primes), a factorization matrix, or a single
17 integer. In that case, the function returns the discriminant of an order
18 whose basis is given by \kbd{nfbasis(T,listP)}, which need not be the maximal
19 order, and whose valuation at a prime entry in \kbd{listP} is the same as the
20 valuation of the field discriminant.
21
22 In particular, if \kbd{listP} is $[p]$ for a prime $p$, we can
23 return the $p$-adic discriminant of the maximal order of $\Z_p[X]/(T)$,
24 as a power of $p$, as follows:
25 \bprog
26 ? padicdisc(T,p) = p^valuation(nfdisc([T,[p]]), p);
27 ? nfdisc(x^2 + 6)
28 %2 = -24
29 ? padicdisc(x^2 + 6, 2)
30 %3 = 8
31 ? padicdisc(x^2 + 6, 3)
32 %4 = 3
33 @eprog\noindent The following function computes the discriminant of the
34 maximal order under the assumption that $P$ is a vector of prime numbers
35 containing (at least) all prime divisors of the field discriminant:
36 \bprog
37 globaldisc(T, P) =
38 { my (D = nfdisc([T, P]));
39   sign(D) * vecprod([p^valuation(D,p) | p <-P]);
40 }
41 ? globaldisc(x^2 + 6, [2, 3, 5])
42 %1 = -24
43 @eprog
44
45 \synt{nfdisc}{GEN T}. Also available is \fun{GEN}{nfbasis}{GEN T, GEN *d},
46 which returns the order basis, and where \kbd{*d} receives the order
47 discriminant.
48