Function: ellweilcurve
Section: elliptic_curves
C-Name: ellweilcurve
Prototype: GD&
Help: ellweilcurve(E, {&ms}): let E be an elliptic curve over Q given by
 ellinit or a rational isogeny class given by ellisomat. Return a list
 of isomorphism classes of elliptic curves isogenous to E as given by ellisomat
 and the list of the Smith invariants of the lattice associated to E in
 H^1(E,Q) in the lattice associated to the modular form. If ms is present,
 it contains the output of msfromell(Emin,0) where Emin is the list of minimal
 models attached to the curves in the isogeny class.
Doc: If $E'$ is an elliptic curve over $\Q$, let $L_{E'}$ be the
 sub-$\Z$-module of $\Hom_{\Gamma_0(N)}(\Delta,\Q)$ attached to $E'$
 (It is given by $x[3]$ if $[M,x] = \kbd{msfromell}(E')$.)

 On the other hand, if $N$ is the conductor of $E$ and $f$ is the modular form
 for $\Gamma_0(N)$ attached to $E$, let $L_f$ be the lattice of the
 $f$-component of $\Hom_{\Gamma_0(N)}(\Delta,\Q)$ given by the elements
 $\phi$ such that $\phi(\{0,\gamma^{-1} 0\}) \in \Z$ for all
 $\gamma \in \Gamma_0(N)$ (see \tet{mslattice}).

 Let $E'$ run through the isomorphism classes of elliptic curves
 isogenous to $E$ as given by \kbd{ellisomat} (and in the same order).
 This function returns a pair \kbd{[vE,vS]} where \kbd{vE} contains minimal
 models for the $E'$ and \kbd{vS} contains the list of Smith invariants for
 the lattices $L_{E'}$ in $L_f$. The function also accepts the output of
 \kbd{ellisomat}, i.e. the isogeny class. If the optional argument \kbd{ms}
 is present, it contains the output of \kbd{msfromell(vE, 0)}, i.e. the new
 modular symbol space $M$ of level $N$ and a vector of triples $[x^+,x^-, L]$
 attached to each curve $E'$.

 In particular, the strong Weil curve amongst the curves isogenous to $E$
 is the one whose Smith invariants are $[c,c]$, where $c$ is the Manin
 constant, conjecturally equal to $1$.
 \bprog
 ? E = ellinit("11a3");
 ? [vE, vS] = ellweilcurve(E);
 ? [n] = [ i | i<-[1..#vS], vS[i]==[1,1] ]  \\ lattice with invariant [1,1]
 %3 = [2]
 ? ellidentify(vE[n]) \\ ... corresponds to strong Weil curve
 %4 = [["11a1", [0, -1, 1, -10, -20], []], [1, 0, 0, 0]]

 ? [vE, vS] = ellweilcurve(E, &ms); \\ vE,vS are as above
 ? [M, vx] = ms; msdim(M) \\ ... but ms contains more information
 %6 = 3
 ? #vx
 %7 = 3
 ? vx[1]
 %8 = [[1/25, -1/10, -1/10]~, [0, 1/2, -1/2]~, [1/25,0; -3/5,1; 2/5,-1]]
 ? forell(E, 11,11, print(msfromell(ellinit(E[1]), 1)[2]))
 [1/5, -1/2, -1/2]~
 [1, -5/2, -5/2]~
 [1/25, -1/10, -1/10]~
 @eprog\noindent The last example prints the modular symbols $x^+$ in $M^+$
 attached to the curves \kbd{11a1}, \kbd{11a2} and \kbd{11a3}.
