Function: hyperellminimalmodel
Section: elliptic_curves
C-Name: hyperellminimalmodel
Prototype: GD&DG
Help: hyperellminimalmodel(C,{&m},{pr}): C being a nonsingular integral
 hyperelliptic model of a curve, return an integral model of C with minimal
 discriminant. If pr is given, it must be a list of primes and the model is
 then only garanteed minimal at the elements of pr.
 C can be given either by a squarefree polynomial P such that
 C:y^2=P(x) or by a vector [P,Q] such that C:y^2+Q(x)*y=P(x) and Q^2+4P is
 squarefree.
Doc:
 $C$ being a nonsingular integral hyperelliptic model of a curve,
 return an integral model of $C$ with minimal discriminant.
 If $pr$ is given, it must be a list of primes and
 the model is then only garanteed minimal at the elements of $pr$.
 If present, $m$ is set to the mapping from the original model to the new
 one: a three-component vector $[e,[a,b;c,d],H]$ such that
 if $(x,y)$ is a point on $W$, the corresponding point on $C$ is given by
 $$
   x_C = (a*x+b)/(c*x+d)
 $$
 $$
   y_C = (e*y+H(x))/(c*x+d)^{g+1}
 $$
 where $g$ is the genus.
 $C$ can be given either by a squarefree polynomial $P$ such that
 $C: y^2 = P(x)$ or by a vector $[P,Q]$ such that
 $C: y^2 + Q(x)\*y = P(x)$ and $Q^2+4\*P$ is squarefree.
 \bprog
 ? W = [x^6+216*x^3+324,0];
 ? D = hyperelldisc(W)
 %2 = 1828422898924853919744000
 ? Wn = hyperellminimalmodel(W,&M)
 %3 = [2*x^6+18*x^3+1,x^3];
 ? hyperelldisc(Wn)
 %4 = 29530050606000
 ? hyperellchangecurve(W, M)
 %5 = [2*x^6+18*x^3+1,x^3]
 @eprog
