Function: ellissupersingular
Section: elliptic_curves
C-Name: ellissupersingular
Prototype: iGDG
Help: ellissupersingular(E,{p}): return 1 if the elliptic curve E, defined
 over a number field or a finite field, is supersingular at p, and 0 otherwise.
Doc:
 Return 1 if the elliptic curve $E$ defined over a number field, $\Q_{p}$
 or a finite field is supersingular at $p$, and $0$ otherwise.
 If the curve is defined over $\Q$ or a number field, $p$ must be explicitly
 given, and must be a prime number, resp.~a maximal ideal; we return $1$ if and
 only if $E$ has supersingular good reduction at $p$.

 Alternatively, $E$ can be given by its $j$-invariant in a finite field. In
 this case $p$ must be omitted.
 \bprog
 ?  g = ffprimroot(ffgen([7,5]))
 %1 = 4*x^4+5*x^3+6*x^2+5*x+6
 ?  [g^n | n <- [1 .. 7^5 - 1], ellissupersingular(g^n)]
 %2 = [6]
 ?  j = ellsupersingularj(2^31-1)
 %3 = 1618591527*w+1497042960
 ?  ellissupersingular(j)
 %4 = 1

 ?  K = nfinit(y^3-2); P = idealprimedec(K, 2)[1];
 ?  E = ellinit([y,1], K);
 ?  ellissupersingular(E, P)
 %7 = 1
 ?  Q = idealprimedec(K,5)[1];
 ?  ellissupersingular(E, Q)
 %9 = 0
 @eprog
Variant: Also available is
 \fun{int}{elljissupersingular}{GEN j} where $j$ is a $j$-invariant of a curve
 over a finite field.
