Sato-Tate and the angles of split primes I was reading this blog by Evan Chen about complex multiplication.  He's discussing Sato-Tate Conjecture.  We can have elliptic curve $E/\mathbb{Q}$ and solve it over finite fields.
\begin{eqnarray*}
a_p &=& (p+1) - \#E(\mathbb{F}_p)\\
a_p &=& 2 \sqrt{p} \cos \theta_p \
\end{eqnarray*}
Sato-Tate is going say that $\theta_p$ is distributed like some kind of sine  measure

Sato-Tate Fix an elliptic curve $E/\mathbb{Q}$ which does not have Complex Multiplication (over $\mathbb{C}$).  As $p$ varies across unramified primes the probability that $\theta_p \in [a,b]$ is:
  $$ \frac{2}{\pi}\int_a^b \sin^2 \theta \, d\theta $$ 
  In other words $\theta_p$ is equidistributed with respect to $\mu =  \sin^2 \theta \, d\theta$

If there is complex multiplication, there is a relationship to splitting of primes. 
$$ E : y^2 = x^3 - 17x \quad\text{ has }\quad \text{End}(E) \simeq \mathbb{Z}[i] $$
Apparently there are "bad primes" $p = 2, 17$.  Chen observes that $a_p = 0$ for $p \in  4\mathbb{Z}+3$ and states a CM Sato-Tate conjecture.

CM Sato-Tate Let $E/\mathbb{Q}$ be an elliptic curve with CM by $\mathcal{O}_K$.  Let $\mathfrak{p}$ be an unramified prime over $\mathcal{O}_K$:
  
  
*
  
*If $\mathfrak{p}$ is inert then $a_\mathfrak{p} = 0$ (i.e. $\theta_\mathfrak{p} = \frac{\pi}{2}$)
  
*If $\mathfrak{p}$ is split then $\theta_\mathfrak{p}$ is uniform across $[0, 2\pi]$
  

In his example $a_p$ is also related to the splitting of $p \in \mathbb{Z}[i]$

This looks an awful lot like the equidstibution of primes $\mathfrak{p} \in \mathbb{Z}[i]$.  Is there always this link between complex multiplication and the angles of primes?
He points to Deuring's Theorem

Let $E/\mathbb{Q}$ have CM by $\mathcal{O}_K$.  Then
  $$L(s, E/K) = L(s, \xi) L(s, \overline{\xi})$$
  for a Hecke Grossencharacter $\xi$.

And lastly I learned that both of these things have Euler products:
$$ 1 - \frac{a_\mathfrak{p}}{(N\mathfrak{p})^{s + \frac{1}{2}}} 
+ \frac{1}{(N\mathfrak{p})^{2s }} = \left(1 - \frac{\xi(\mathfrak{p})}{(N\mathfrak{p})^s} \right)\left(1 - \frac{\overline{\xi}(\mathfrak{p})}{(N\mathfrak{p})^s} \right)$$
Is Hecke equidistribution a special case of Sato-Tate?  Certainly there is a Grossencharakter:
\begin{eqnarray*}
a_\mathfrak{p} &=& 2 \sqrt{N\mathfrak{p}} \cos \theta_\mathfrak{p}\\
\xi(\mathfrak{p}) &=& \exp (i \theta_\mathfrak{p})
\end{eqnarray*}
Chen doesn't quite say this map is just the angle $p \mapsto a+bi = \sqrt{a^2 + b^2} e^{i\theta}$.  Maybe it's not?
$$\mathfrak{p} \mapsto \left\{  \begin{array}{cc} 
e^{i\theta_\mathfrak{p}} & \text{gcd}(N\mathfrak{p}, N) =1 \\ 
0 & \text{gcd}(N\mathfrak{p}, N) >1  \end{array}\right. $$
Basically, we have read his whole blog.  I noticed this looks like Fermat's two-squares theorem and I kept reading.  His discussion makes it no less mysterious.
In the very broadest strokes, when does Sato-Tate relate to the splitting of primes in this way?

Higher Rank
What do those Satake parameters have to do with the splitting of primes? In our case $a_p = 2x$ where $p = x^2 + y^2$.  Perhaps there is a higher-rank analogue. Originally I was merely going to ask about other CM elliptic curves.  
Which compact group is being used when we discuss elliptic curves over complex multiplication?  I think it's $G = SU(2)$.  
In the non-CM case, the splitting of primes play no role and I wonder what is happening there?  Perhaps the additional symmetry is restricting the location of the angles $\theta_\mathfrak{p}$.
 A: Sato-Tate has a much more general form in random matrix theory stating that the Satake parameters are distributed as the eigenvalues of some random matrix in a compact Lie group related to the Zariski closure of the image of the associated Galois representation. The measure is just the Haar measure on that group. This applies to abelian representations, and recovers Hecke's equidistribution result.
A: You can see pretty easily that the angle Großencharacter appearing in Hecke's equidistribution theorem cannot arise as the Großencharacter associated to a CM elliptic curve just by thinking about $\infty$-types. The angle Großencharacter sends an ideal $\mathfrak{a} = (\alpha)$ to $(\alpha/\overline{\alpha})^4$ (raising to the $4$-th power is needed to make sure that the choice of generator doesn't matter; the units of $\mathbf{Q}(i)$ are $\pm 1, \pm i$). This has $\infty$-type $(4, -4)$. 
On the other hand, the Großencharacter associated to any CM elliptic curve $E$ over an imaginary quadratic field $K$ will have $\infty$-type $(1, 0)$. Consider the adelic Tate module $V_f E_K = \prod_\ell V_\ell E_k$. This is a module over the finite adeles $\mathbf{A}_\mathbf{Q}^f$, so the fact that $K$ acts on $E_K$ by endomorphisms implies that we have an action of $K \otimes_\mathbf{Q} \mathbf{A}^f_\mathbf{Q} = \mathbf{A}_K^f$. At the same time, we have an $\mathbf{A}^f_\mathbf{Q}$-linear action of $\mathrm{Gal}(K)$ and this commutes with the $K$-action (since the endomorphisms giving $E$ CM by $K$ are defined over $K$). We can think of $V_f E_K$ as a module over the full adeles $\mathbf{A}_K$ by letting the archimedean places act trivially. 
Now, the main theorem of CM says that for any $x \in (\mathbf{A}_K)^\times$, there is a unique $\alpha_x \in K^\times$ such that $\alpha_x = x \cdot \mathrm{rec}(x)$ as endomorphisms of $V_f E_K$. The definition of $\xi$ is that $\xi(x) = \alpha_x$. In particular, since $\mathrm{rec}(\alpha) = 1$ for $\alpha \in K^\times$, we have $\xi((\alpha)) = \alpha$, so the $\infty$-type of $\xi$ is $(1, 0)$. 
To see that this definition of $\xi$ agrees with the one above, let $\mathfrak{p}$  be a prime of good reduction for $E_K$ and $\ell$ of good reduction for $E$ such that $\mathfrak{p} \nmid \ell$. Choose a uniformizer $\pi_{\mathfrak{p}} \in K_{\mathfrak{p}}$. The action of $\mathrm{Gal}(K)$ on $V_\ell E_K$ is unramified at $\mathfrak{p}$ (by the Néron-Ogg-Shafarevich criterion), so the action of $\mathrm{rec}(\pi_\mathfrak{p})$ on $V_\ell E_K$ agrees with the well-defined action of $\mathrm{Frob}_\mathfrak{p}$. Also, the adele $\pi_\mathfrak{p}$ has component $1$ at $\ell$. Thus, the relation $\xi(\pi_\mathfrak{p}) = \pi_\mathfrak{p} \cdot \mathrm{rec}(\pi_\mathfrak{p})$ tells us exactly that $\xi(\pi_\mathfrak{p})$ is the $(K\otimes_{\mathbf{Q}} \mathbf{Q}_\ell)$-eigenvalue of $\mathrm{Frob}_\mathfrak{p}$ acting on $V_\ell E_K$, which explains the relationship with $a_\mathfrak{p}$ (note that we can compute $\xi(\mathfrak{p}) \in K^\times$ by looking at its image at any place of $K$). 
You should expect the Großencharacter $\xi$ to be more complicated than the angle character, since it "knows about" the whole Galois representation associated to $E$, which encodes all sorts of arithmetic information about $E$: the number of points over finite fields, the rank of its Mordell-Weil group, etc.
A: All of these questions are answered (either explicitly or implicitly) in Andrew Sutherland's beautiful and accessible exposition on Sato-Tate distributions: https://arxiv.org/abs/1604.01256.
