Function: ellpadicL
Section: elliptic_curves
C-Name: ellpadicL
Prototype: GGLDGD0,L,DG
Help: ellpadicL(E, p, n, {s = 0}, {r = 0}, {D}): returns the value
  on a character of Z_p^* represented by an integer s or a vector [s1,s2]
  of the derivative of order r of the p-adic L-function of
  the elliptic curve E (twisted by D > 0, if present).
Doc:
  The $p$-adic $L$ function is defined on the set of continuous characters
  of $\text{Gal}(\Q(\mu_{p^{\infty}})/ \Q)$, identified to $\Z_p^*$
  via the cyclotomic character $\chi_p$ with values in $\overline{\Q_p}^*$.
  Denote by $\tau:\Z_p^*\to\Z_p^*$ the Teichm\"uller character
  and $\langle\chi_p\rangle=\chi_p \tau^{-1}$.
  The continuous character of $\text{Gal}(\Q(\mu_{p^{\infty}})/ \Q)$ given by
  $\langle\chi_p\rangle^{s_1} \tau^{s_2}$ is represented by the pair
  of integers
  $s=(s_1,s_2)$, with $s_1 \in \Z_p$ and $s_2 \bmod p-1$ for $p > 2$,
  (resp. mod $2$ for $p = 2$); $s$ may be also an integer, representing
  $(s,s)$.

  When $E$ has good supersingular reduction, the $L$ function takes its
  values in $\Q_p \otimes H^1_{dR}(E/\Q)$ and satisfies
  $$(1-p^{-1} F)^{-2} L_p(E, \chi^0)= (L(E,1) / \Omega) \cdot \omega$$
  where $F$ is the Frobenius, $L(E,1)$ is the value of the complex $L$
  function at $1$, $\omega$ is the N\'eron differential
  and $\Omega$ the attached period on $E(\R)$. Here, $\chi^0$ represents
  the trivial character.

  The derivative is taken at $s=0$ along $\langle\chi_p\rangle^s$.
  In other words, the function $L_p$ is defined as
  $\int_{\Z_p^*} \chi^s d \mu$ for a certain $p$-adic distribution $\mu$ on
  $\Z_p^*$, and we have
   $$L_p^{(r)}(E, \chi^0) = \int_{\Z_p^*} \log_p^r(a) d\mu(a).$$
  The function returns the components of $L_p{(r)}(E,\tau^0)$ in
  the basis $(\omega, F(\omega))$.
  \smallskip

  When $E$ has ordinary good reduction, this method only defines
  the projection of $L_p(E,\chi^0)$ on the $\alpha$-eigenspace,
  where $\alpha$ is the unit eigenvalue for $F$. This is what the function
  returns. This value satisfies
  $$(1- \alpha^{-1})^{-2} L_{p,\alpha}(E,\chi^0)= L(E,1) / \Omega.$$

  \bprog
  ? cxL(e) = bestappr( ellL1(e,0) / e.omega[1] );

  ? e = ellinit("17a1"); p=3; \\ supersingular
  ? L = ellpadicL(e,p,4);
  ? F = [0,-p;1,ellap(e,p)]; \\ Frobenius matrix in the basis (omega,F(omega)
  ? (1-p^(-1)*F)^-2 * L~ / cxL(e)
  %5 = [1 + O(3^4), O(3^4)]~

  ? p=5; ap = ellap(e,p)
  %6 = -2 \\ ordinary
  ? L = ellpadicL(e,p,4)
  %7 = 4 + 3*5 + 4*5^2 + 2*5^3 + O(5^4)
  ? al = padicappr(x^2 - ap*x + p, ap + O(p^7))[1];
  ? (1-al^(-1))^(-2) * L / cxL(e)
  %10 = 1 + O(5^4)

  ? e = ellinit("116a1"); p=3; \\ supersingular
  ? L = ellpadicL(e,p,4);
  ? F = [0,-p; 1,ellap(e,p)];
  ? (1-p^(-1)*F)^-2*L~ / cxL(e)
  %15 = [1 + O(3^4), O(3^5)]~

  ? e = ellinit("26b1"); p=3;
  ? L = ellpadicL(e,p,4)
  %18 = [2*3^-1 + 2 + 3^2 + O(3^4), 2 + 3 + 2*3^2 + O(3^4)]~
  ? F = [0,-p;1,ellap(e,p)];
  ? (1-p^(-1)*F)^-2*L~ / cxL(e)
  %20 = [1 + O(3^4), O(3^5)]~
  @eprog
  This function is a special case of \tet{mspadicL}, and it also appears
  as the first term of \tet{mspadicseries}:
  \bprog
  ? e = ellinit("17a1"); p=5
  ? L = ellpadicL(e,p,4)
  %2 = 4 + 3*5 + 4*5^2 + 2*5^3 + O(5^4)

  ? [M,xpm] = msfromell(e, 1);
  ? Mp = mspadicinit(M, p, 4);
  ? XPM = mspadicmoments(Mp, xpm);
  ? mspadicL(XPM)
  %6 = [4 + 3*5 + 4*5^2 + 2*5^3 + 2*5^4 + 5^5 + O(5^6)]~
  ?  mspadicseries(XPM)
  %6 = (4 + 3*5 + 4*5^2 + 2*5^3 + 2*5^4 + 5^5 + O(5^6))
        + (3 + 3*5 + 5^2 + 5^3 + O(5^4))*x
        + (2 + 3*5 + 5^2 + O(5^3))*x^2
        + (3 + 4*5 + 4*5^2 + O(5^3))*x^3
        + (3 + 2*5 + O(5^2))*x^4 + O(x^5)
 @eprog
