SD 9 -- Sato-Tate Exercises
system:sage

<font color='black'><h1>Sage Days 9 Sato-Tate Exercises</h1></font>


<font color='black'><h1>The SATO-Tate Conjecture</h1></font>

The biggest recent result in number theory was Richard Taylor's proof of most of the Sato-Tate
conjecture.  The problems below are about visualizing this conjecture using Sage. 
<br><br>

An <b><i>elliptic curve</i></b> over the rational numbers is a cubic curve defined by an equation
$$
  y^2 = x^3 + a x + b
$$
with $a,b$ integers such that the cubic $x^3 + ax + b$ has distinct complex roots.

<br><br>
<b>EXERCISE 1:</b>  Use the <tt>EllipticCurve([a,b])</tt> command in Sage to create some elliptic curves.
Draw plots of them (using <tt>E.plot()</tt>).

{{{id=34|
EllipticCurve([1,2]).plot(thickness=5, rgbcolor='orange')
///
}}}

{{{id=0|

///
}}}

{{{id=2|

///
}}}

{{{id=3|

///
}}}

<br><br>
A very cool thing people do with elliptic curves is count the number of solutions
to the equation $y^3 = x^3 + ax + b$ modulo $p$.  That is, they count
$$
 \{(X,Y) : 0 \leq X, Y < p \text{ and } Y^2 \equiv X^3 + aX + b \pmod{p}.
$$

<b>EXERCISE 2:</b> Choose a particular elliptic curve $E$ and draw plots of the
solution sets above for various $p$.

{{{id=8|
p = 389
plot( EllipticCurve(GF(p), [2,3]), pointsize=30)
///
}}}

{{{id=12|

///
}}}

{{{id=13|

///
}}}

{{{id=14|

///
}}}

{{{id=15|

///
}}}

{{{id=16|

///
}}}

In fact, for a fixed curve $E$, let $N_p$ be the number of solutions modulo $p$, and let
$$
   a_p = p - N_p.
$$

If <tt>E</tt> is an elliptic curve, and $p$ is a prime number <tt>E.ap(p)</tt> computes
the number $a_p$ in Sage. 
<br><br>
<b>Theorem (Hasse).</b> <i>For every prime $p$ we have 
$$
  |a_p| < 2\sqrt{p}.
$$
</i>
<br><br>

<b>EXERCISE 3:</b> Use Sage to check that the assertion of the above theorem for several elliptic curves
and a large number of primes $p$.

{{{id=5|
E = EllipticCurve([2,5])
for p in prime_range(100):
    if abs(E.ap(p)) >= 2*math.sqrt(p):
        print "hasse is wrong!"
///
}}}

{{{id=6|

///
}}}

{{{id=7|

///
}}}

{{{id=18|

///
}}}

{{{id=19|

///
}}}

{{{id=20|

///
}}}

<br><br>Because $|a_p| < 2\sqrt{p}$, we have
$$
  -1 \leq  b_p = \frac{a_p}{2\sqrt{p}} \leq 1.
$$
Thus an elliptic curve is a <i>recipe</i>, if you like, for producing a sequence
of numbers $b_2, b_3, b_5, b_7, b_{11}, \ldots$.  

<br><br>
<b>EXERCISE 4:</b>
Plot frequency histograms of the numbers $b_p$, say for $p < 100$, $p<1000$, $p<10000$, etc.
Do you notice any patterns?  Try other elliptic curves.

{{{id=9|
E = EllipticCurve([2,3])
finance.TimeSeries([E.ap(p)/(2*math.sqrt(p)) for p in primes(10000)]).plot_histogram(15)
///
}}}

{{{id=10|

///
}}}

{{{id=11|

///
}}}

{{{id=22|

///
}}}

{{{id=23|

///
}}}

{{{id=24|

///
}}}

<br><br>
<b>EXERCISE 5:</b>
Sato and Tate did notice a pattern!  In particular, they famously conjectured that the numbers you get
are distributed like a semicircle normalized to have area 1 under it (unless your elliptic curve
has "complex multiplication").   Do the math to figure out how to draw a plot of a semicircle
of radius 1  that is scaled so it has area 1 under it, and superimpose that on top of some of the
frequency histograms from above.  (I drew a picture similar to this that was published in NATURE
magazine last year... See <a href="http://www.math.harvard.edu/~mazur/">Barry Mazur's Web Page</a>.)

{{{id=33|

///
}}}

{{{id=32|

///
}}}

{{{id=31|

///
}}}

{{{id=30|

///
}}}

{{{id=26|

///
}}}

{{{id=27|

///
}}}

{{{id=28|

///
}}}

{{{id=29|

///
}}}