Function: msfromell
Section: modular_symbols
C-Name: msfromell
Prototype: GD0,L,
Help: msfromell(E, {sign=0}): return the [M, x], where M is msinit(N,2)
 and x is the modular symbol in M associated to the elliptic curve E/Q.
Doc: Let $E/\Q$ be an elliptic curve of conductor $N$. For $\varepsilon =
 \pm1$, we define the (cuspidal, new) modular symbol $x^\varepsilon$ in
 $H^1_c(X_0(N),\Q)^\varepsilon$  associated to
 $E$. For all primes $p$ not dividing $N$ we have
 $T_p(x^\varepsilon) =  a_p x^\varepsilon$, where $a_p = p+1-\#E(\F_p)$.

 Let $\Omega^+ = \kbd{E.omega[1]}$ be the real period of $E$
 (integration of the N\'eron differential $dx/(2y+a_1x+a3)$ on the connected
 component of $E(\R)$, i.e.~the generator of $H_1(E,\Z)^+$) normalized by
 $\Omega^+>0$. Let $i\Omega^-$ the integral on a generator of $H_1(E,\Z)^-$ with
 $\Omega^- \in \R_{>0}$. If $c_\infty$ is the number of connected
 components of $E(\R)$, $\Omega^-$ is equal to
 $(-2/c_\infty) \times \kbd{imag(E.omega[2])}$.
 The complex modular symbol is defined by
 $$F: \delta \to  2i\pi \int_{\delta} f(z) dz$$
 The modular symbols $x^\varepsilon$ are normalized so that
 $ F = x^+ \Omega^+ + x^- i\Omega^-$.
 In particular, we have
 $$ x^+([0]-[\infty]) = L(E,1) / \Omega^+,$$
 which defines $x^{\pm}$ unless $L(E,1)=0$.
 Furthermore, for all fundamental discriminants $D$ such
 that $\varepsilon \cdot D > 0$, we also have
 $$\sum_{0\leq a<|D|} (D|a) x^\varepsilon([a/|D|]-[\infty])
    = L(E,(D|.),1) / \Omega^{\varepsilon},$$
 where $(D|.)$ is the Kronecker symbol.
 The period $\Omega^-$ is also $2/c_\infty \times$ the real period
 of the twist $E^{(-4)} = \kbd{elltwist(E,-4)}$.

 This function returns the pair $[M, x]$, where $M$ is
 \kbd{msinit}$(N,2)$ and $x$ is $x^{\var{sign}}$ as above when $\var{sign}=
 \pm1$, and $x = [x^+,x^-]$ when \var{sign} is $0$.
 The modular symbols $x^\pm$ are given as a \typ{COL} (in terms
 of the fixed basis of $\text{Hom}_G(\Delta,\Q)$ chosen in $M$).
 \bprog
 ? E=ellinit([0,-1,1,-10,-20]);  \\ X_0(11)
 ? [M,xp]= msfromell(E,1);
 ? xp
 %3 = [1/5, -1/2, -1/2]~
 ? [M,x]= msfromell(E);
 ? x    \\ both x^+ and x^-
 %5 = [[1/5, -1/2, -1/2]~, [0, 1/2, -1/2]~]
 ? p = 23; (mshecke(M,p) - ellap(E,p))*x[1]
 %6 = [0, 0, 0]~ \\ true at all primes, including p = 11; same for x[2]
 @eprog
