# Tate's algorithm

In the theory of elliptic curves, Tate's algorithm takes as input an integral model of an elliptic curve E over $\mathbb {Q}$, or more generally an algebraic number field, and a prime or prime ideal p. It returns the exponent f$_p$ of p in the conductor of E, the type of reduction at p, the local index
    $c_{p}=[E(\mathbb {Q} _{p}):E^{0}(\mathbb {Q} _{p})],$
where $E^{0}(\mathbb {Q} _{p})$ is the group of $\mathbb {Q} _{p}$-points whose reduction mod p is a non-singular point. Also, the algorithm determines whether or not the given integral model is minimal at p, and, if not, returns an integral model with integral coefficients for which the valuation at p of the discriminant is minimal.
Tate's algorithm also gives the structure of the singular fibers given by the Kodaira symbol or Néron symbol, for which, see elliptic surfaces: in turn this determines the exponent f$_p$ of the conductor E.
Tate's algorithm can be greatly simplified if the characteristic of the residue class field is not 2 or 3; in this case the type and c and f can be read off from the valuations of j and Δ (defined below).
Tate's algorithm was introduced by John Tate (1975) as an improvement of the description of the Néron model of an elliptic curve by Néron (1964).

## Notation

Assume that all the coefficients of the equation of the curve lie in a complete discrete valuation ring R with perfect residue field K and maximal ideal generated by a prime π. The elliptic curve is given by the equation
    $y^{2}+a_{1}xy+a_{3}y=x^{3}+a_{2}x^{2}+a_{4}x+a_{6}.$
Define:
    $v(\Delta )=$ the p-adic valuation of $\pi$ in $\Delta$, that is, exponent of $\pi$ in prime factorization of $\Delta$, or infinity if $\Delta =0$
    $a_{i,m}=a_{i}/\pi ^{m}$
    $b_{2}=a_{1}^{2}+4a_{2}$
    $b_{4}=a_{1}a_{3}+2a_{4}^$
    $b_{6}=a_{3}^{2}+4a_{6}$
    $b_{8}=a_{1}^{2}a_{6}-a_{1}a_{3}a_{4}+4a_{2}a_{6}+a_{2}a_{3}^{2}-a_{4}^{2}$
    $c_{4}=b_{2}^{2}-24b_{4}$
    $c_{6}=-b_{2}^{3}+36b_{2}b_{4}-216b_{6}$
    $\Delta =-b_{2}^{2}b_{8}-8b_{4}^{3}-27b_{6}^{2}+9b_{2}b_{4}b_{6}$
    $j=c_{4}^{3}/\Delta .$

## The algorithm

* Step 1: If π does not divide Δ then the type is I$_0$, c=1 and f=0.
* Step 2: If π divides Δ but not c$_4$ then the type is I$_v$ with v = v(Δ), c=v, and f=1.
* Step 3. Otherwise, change coordinates so that π divides a$_3$,a$_4$,a$_6$. If π$^2$ does not divide a$_6$ then the type is II, c=1, and f=v(Δ);
* Step 4. Otherwise, if π$^3$ does not divide b$_8$ then the type is III, c=2, and f=v(Δ)−1;
* Step 5. Otherwise, let Q$_1$ be the polynomial
       $Q_{1}(Y)=Y^{2}+a_{3,1}Y-a_{6,2}.$.
    If π$^3$ does not divide b$_6$ then the type is IV, c=3 if $Q_{1}(Y)$ has two roots in K and 1 if it has two roots outside of K, and f=v(Δ)−2.
* Step 6. Otherwise, change coordinates so that π divides a$_1$ and a$_2$, π$^2$ divides a$_3$ and a$_4$, and π$^3$ divides a$_6$. Let P be the polynomial
       $P(T)=T^{3}+a_{2,1}T^{2}+a_{4,2}T+a_{6,3}.$
    If $P(T)$ has 3 distinct roots modulo π then the type is I$_0$$^*$, f=v(Δ)−4, and c is 1+(number of roots of P in K).
* Step 7. If P has one single and one double root, then the type is I$_ν$$^*$ for some ν>0, f=v(Δ)−4−ν, c=2 or 4: there is a "sub-algorithm" for dealing with this case.
* Step 8. If P has a triple root, change variables so the triple root is 0, so that π$^2$ divides a$_2$ and π$^3$ divides a$_4$, and π$^4$ divides a$_6$. Let Q$_2$ be the polynomial
       $Q_{2}(Y)=Y^{2}+a_{3,2}Y-a_{6,4}.$.
    If $Q_{2}(Y)$ has two distinct roots modulo π then the type is IV$^*$, f=v(Δ)−6, and c is 3 if the roots are in K, 1 otherwise.
* Step 9. If $Q_{2}(Y)$ has a double root, change variables so the double root is 0. Then π$^3$ divides a$_3$ and π$^5$ divides a$_6$. If π$^4$ does not divide a$_4$ then the type is III$^*$ and f=v(Δ)−7 and c = 2.
* Step 10. Otherwise if π$^6$ does not divide a$_6$ then the type is II$^*$ and f=v(Δ)−8 and c = 1.
* Step 11. Otherwise the equation is not minimal. Divide each a$_n$ by π$^n$ and go back to step 1.

## Implementations

The algorithm is implemented for algebraic number fields in the PARI/GP computer algebra system, available through the function elllocalred.