Function: idealismaximal
Section: number_fields
C-Name: idealismaximal
Prototype: GG
Help: idealismaximal(nf,x): if x is a maximal ideal, return it in prid form,
 else return 0.
Doc: given \var{nf} a number field as output by \kbd{nfinit} and an ideal
 $x$, return $0$ if $x$ is not a maximal ideal. Otherwise return a \kbd{prid}
 structure \var{nf} attached to the ideal. This function uses
 \kbd{ispseudoprime} and may return a wrong result in case the underlying
 rational pseudoprime is not an actual prime number: apply \kbd{isprime(pr.p)}
 to guarantee correctness. If $x$ is an extended ideal, the extended part is
 ignored.
 \bprog
 ? K = nfinit(y^2 + 1);
 ? idealismaximal(K, 3) \\ 3 is inert
 %2 = [3, [3, 0]~, 1, 2, 1]
 ? idealismaximal(K, 5) \\ 5 is not
 %3 = 0
 ? pr = idealprimedec(K,5)[1] \\ already a prid
 %4 = [5, [-2, 1]~, 1, 1, [2, -1; 1, 2]]
 ? idealismaximal(K, pr) \\ trivial check
 %5 = [5, [-2, 1]~, 1, 1, [2, -1; 1, 2]]
 ? x = idealhnf(K, pr)
 %6 =
 [5 3]

 [0 1]
 ? idealismaximal(K, x) \\ converts from matrix form to prid
 %7 = [5, [-2, 1]~, 1, 1, [2, -1; 1, 2]]
 @eprog\noindent This function is noticeably faster than \kbd{idealfactor}
 since it never involves an actually factorization, in particular when $x
 \cap \Z$ is not a prime number.
