# Elliptic Curves

Let $E$ be an elliptic curve. By the modularity theorem, which was recently proved by Breuil, Conrad, Diamond, Taylor, and Wiles there is a two-dimensional space $M$ of modular symbols attached to $E$. Let $N$ be the conductor of $E$; then $M$ is obtained from `ModularSymbols(N,2)` by intersecting the kernels of $T_p-a_p(E)$ for sufficiently many $p$.

**Warning:** The computation of $M$ can already be very resource intensive for elliptic curves for which `Conductor(E)` is on the order of $5000$. For example, the seemingly harmless expression `ModularSymbols(EllipticCurve([0,6]))` would bring my computer to its knees.

## `ModularSymbols(E): CrvEll -> ModSym`

## `ModularSymbols(E, sign): CrvEll, RngIntElt -> ModSym`

The space $M$ of modular symbols associated to the elliptic curve E.

## `EllipticCurve(M): ModSym -> CrvEll`

```magma
Database: BoolElt                    Default: true
```

An elliptic curve over the rational numbers that lies in the isogeny class of elliptic curves associated to M.

By default, the Cremona database is used. To compute the curve from scratch, set the optional parameter `Database` to `false`. (Note however that this is not optimized for large level.)

## `pAdicLSeries(E, p): CrvEll, RngIntElt -> RngSerPowElt`

```magma
CoefficientPrecision: RngIntElt                    Default: 3
SeriesPrecision     : RngIntElt                    Default: 5
QuadraticTwist      : RngIntElt                    Default: 1
ProperScaling       : BoolElt                      Default: true
```

Given an elliptic curve over the rationals and a prime of multiplicative or good ordinary reduction, compute the $p$-adic $L$-series. For technical reasons involving caching, the curve is required to be given by a (global) minimal model.

This computation can be rather time-consuming for large conductors and/or primes. The algorithm needs to compute the modular symbols (taking $N^3$ time or so), and typically needs to evaluate $2(p-1)p^n$ of them, where $n$ is the desired coefficient precision. Also, the desired coefficient precision does not always apply to every term in the series.

The `QuadraticTwist` vararg computes the $p$-adic $L$-series for a twist by a fundamental discriminant $D$. This requires $|D|$ as many modular symbols to be computed, but in most cases is much faster than computing the modular symbols for the twisted curve. The twisting discriminant is required to be coprime to the conductor of the curve.

The `ProperScaling` vararg indicates whether to ensure that the scaling of the $p$-adic $L$-series is correct. For many applications, only the valuation of the coefficients is needed. The computation of the proper scaling induces a bit of extra overhead, but is still typically faster than computing the modular symbols for examples of interest.

## `Example: BSD389A (ex-7194fd)`

We use the elliptic curve functions to numerically compute the Birch and Swinnerton-Dyer conjectural order of the Shafarevich-Tate group of the elliptic curve **389A**, which is the curve of rank $2$ with smallest conductor. The Birch and Swinnerton-Dyer conjecture asserts that

$$
{L^{(r)}(E,1) \over r!}=
   {\prod c_p  \cdot {\rm Sha} \cdot {\rm Reg}
   \over
   |E({\mathbb{Q}})_{\rm tor}|^2},
$$

where $r$ is the order of vanishing of $L(E,s)$ at $s=1$.

```magma
> E := EllipticCurve(CremonaDatabase(),"389A");
> M := ModularSymbols(E);
> M;
Modular symbols space of level 389, weight 2, and dimension 2
> LRatio(M,1);
0

```

Next we compute the analytic rank and the leading coefficient of the $L$-series at $s=1$. (If your computer is very slow, use a number smaller than $300$ below.)

```magma
> L1, r := LSeriesLeadingCoefficient(M,1,300);
> L1;
0.7593165002922467906576260031
> r;        // The analytic rank is 2.
2

```

Finally we check that the rank conjecture is true in this case, and compute the conjectural order of the Shafarevich-Tate group.

```magma
> Rank(E);  // The algebraic rank is 2.
2
> Omega := Periods(M,300)[2][1] * 2; Omega;
4.980435433609741580582713757
> Reg := Regulator(E); Reg;
0.1524601779431437875
> #TorsionSubgroup(E);
1
> TamagawaNumber(E,389);
1
> TamagawaNumber(M,389);        // entirely different algorithm
1
> Sha := L1/(Omega*Reg); Sha;
0.9999979295234896211
> f := pAdicLSeries(E,3); _<T> := Parent(f); f;
O(3^11) + O(3^3)*T - (1 + O(3^3))*T^2 + (2 + O(3^2))*T^3
 - (2 + O(3^2))*T^4 + (1 + O(3^2))*T^5 + O(T^6)

```
