TITLE: The valuation of j-functions vs number of isomorphisms for an elliptic curve
QUESTION [21 upvotes]: Gross and Zagier prove the following fantastic result in their paper "Singular Moduli":
Let $R$ be a discrete valuation ring over $\mathbb Z_p$ with uniformizer $\pi$ such that $k = R/\pi$ is algebraically closed and normalize the valuation so that $v(\pi) = 1$.
Now, let $E_1,E_2$ be two distinct (ie, non isomorphic) elliptic curves over $R$ with complex multiplication with $j$-invariants $j_i = j(E_i)$. These are algebraic integers in $R$ and we can talk about their reduction mod $\pi$. Define $$i(n) = \frac{|\operatorname{Isom}_{R/\pi^n}(E_1,E_2)|}{2}.$$
Then Gross-Zagier show that:
$$v(j_1-j_2) = \sum_{n\geq 1}i(n).$$
Unfortunately, their proof is a very explicit case by case analysis (depending on both $n,p$) of both sides of the equation. 
This proof is very unsatisfying to me because of how uniform the statement of the result is (it doesn't depend on p or the Elliptic curves, it doesn't even distinguish between the curves with extra automorphisms and those without).
However, I suspect that there should be a very nice uniform proof using maybe a moduli space (stack..?) of Elliptic curves. For instance, we easily see that $v(j_1-j_2) \geq 1  \iff i(1) \geq 1$ because over an algebraically closed field the $j$-invariant determines the isomorphism class.
Does anyone know such a uniform proof?
(The paper I am referring to is here, the theorem is 2.3 on page 196.)

REPLY [17 votes]: Yes, let's use the fact that the moduli stack of elliptic curves is etale-locally a scheme. We could also use the formal deformation space of the elliptic curve mod $\pi$ (of course we may assume $E_1 \cong E_2 \mod \pi$). We pick an etale-local model of the moduli stack of pairs of elliptic curves that includes $(E_1,E_2)$ as an $R$-point. (This many involve henselizing or completing $R$, which obviously won't affect things.)
Over the moduli stack of pairs of elliptic curves, and thus over any etale-local model, the scheme of isomorphisms is a disjoint union of smooth closed curves (Proof is deformation theory - the deformation space of an isomorphism is one-dimensional and always maps injectively to the deformation space of a pair of curves, because it is just the deformation space of one curves). The sum $i(n)$ is the sum over isomorphisms mod $\pi$ of half the power of $\pi$ they lift too, which is a sum over these curves of half the intersection number with $\operatorname{Spec} R$. In other words, each of these curves is locally defined by an equation in the moduli stack, and we restrict that equation to $R$ and look at its degree, then sum these degrees and divide by two.
On the other hand, the valuation of $j(E_1)-j(E_2)$ is the intersection number with the divisor of $j(E_1)- j(E_2)$. This divisor is supported at the union of all the curves in the Isom scheme.  So it suffices to show that the divisor of $j(E_1)-j(E_2)$ is half the sum of all the curves in the Isom scheme. Because these are divisors supported at the same union of curves, it suffices to check at their mutual generic points. But these generic points are generic elliptic curves with an automorphism of order two, so the Isom divisor appears with multiplicity two while the $j$ divisor has multiplicity one.