Function: msfromell
Section: modular_forms
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)$.
 For each choice of sign, this defines a unique symbol up to multiplication by
 a constant and we normalize it so that the associated $p$-adic measure yields
 the $p$-adic $L$-function. Namely, we have
 $$ x^\varepsilon([0]-[\infty]) = L(E,1) / \Omega,$$
 for $\Omega$ the real period of $E$ (this defines $x^{\pm}$ unless $L(E,1)=0$).
 Furthermore, for all fundamental discriminants $d$ coprime to $2N$ such
 that $\varepsilon \cdot d > 0$ and $L(E^{(d)},1) \neq 0$, we also have
 $$\sum_{0\leq a<|d|} (d|a) x^\varepsilon([a/|d|]-[\infty])
    = L(E^{(d)},1) / \Omega_d,$$
 where $(d|a)$ is the Kronecker symbol and $\Omega_d$ is the real
 period of the twist $E^{(d)}$.

 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 = 101; (mshecke(M,p) - ellap(E,p))*x[1]
 %4 = [0, 0, 0]~ \\ true at all primes; same for x[2]
 @eprog
