Reductions of elliptic curves over number fields (implementation on Sage) I have found two elliptic curves over a number field whose reductions are isomorphic to supersingular elliptic curves (used Deuring Lifting Theorem). How can I check which reduction is isomorphic to which supersingular elliptic curve?
sage: H = hilbert_class_polynomial(-64)  
sage: S.<l> = H.splitting_field()  
sage: R = H.roots(ring = S)  
sage: for r in R:  
....:     j0 = r[0]  
....:     E = EllipticCurve(j=j0)  
....:     I = S.ideal(p)  
....:     Ebar = E.reduction(I)    
....:     Ebar    
....:     Ebar.j_invariant()  
Elliptic Curve defined by y^2 = x^3 + (67*lbar+26)*x + (54*lbar+71) over Residue field in lbar of Fractional ideal (179)  
lbar  
Elliptic Curve defined by y^2 = x^3 + (112*lbar+44)*x + (125*lbar+171) over Residue field in lbar of Fractional ideal (179)  
178*lbar + 35  


sage: p = 179
sage: F.<i> = GF(p^2, modulus=x^2+1)
sage: Rp = H.roots(ring=F)
sage: for r in Rp:
....:     j0 = r[0]
....:     EllipticCurve(j=j0)
....:     j0
Elliptic Curve defined by y^2 = x^3 + (10*i+35)*x + (155*i+121) over Finite Field in i of size 179^2 
99*i + 107
Elliptic Curve defined by y^2 = x^3 + (169*i+35)*x + (24*i+121) over Finite Field in i of size 179^2
80*i + 107

 A: The answer is that there is no canonical correspondence between the reductions and the curves over the finite field: it depends on how we identify the residue field $\kappa(p)$ with $\mathbb{F}_{p^2}$.
First, let's make lists of the curves we're trying to match up.
p = 179
H = hilbert_class_polynomial(-64)  
S.<l> = H.splitting_field()  
F.<i> = GF(p^2, modulus=x^2+1)
Es = []
Rp = H.roots(ring=F)
for r in Rp:
  j0 = r[0]
  Es.append(EllipticCurve(j=j0))

R = H.roots(ring = S)  
reductions = []
for r in R:  
  j0 = r[0]  
  E = EllipticCurve(j=j0)  
  I = S.ideal(p)  
  Ebar = E.reduction(I)    
  reductions.append(Ebar)

Denote the residue field by $\kappa(p) = \mathbb{F}_{p}(\overline{\ell})$. To find an isomorphism with $\mathbb{F}_{p^2}$, we compute the minimal polynomial of $\overline{\ell}$ and then find its roots $\{r_0, r_1\}$ in $\mathbb{F}_{p^2}$. In this way, we get two isomorphisms
\begin{align*}
f_j: \kappa(p) = \mathbb{F}_{p}(\overline{\ell}) &\overset{\sim}{\to} \mathbb{F}_{p^2}\\
\overline{\ell} &\mapsto r_j
\end{align*}
for $j = 0,1$.
k = reductions[0].base_field()
lbar = k.gens()[0]
m = lbar.minimal_polynomial()
m_roots = [el[0] for el in m.roots(F)]
f0 = k.hom([m_roots[0]])
f1 = k.hom([m_roots[1]])                                 

Now we can base change the reductions to $\mathbb{F}_{p^2}$ using these isomorphisms. However, we find that which curve corresponds to which reduction depends on the choice of isomorphism.
sage: for E in reductions: 
....:   E.change_ring(f0) 
....:                                                          
Elliptic Curve defined by y^2 = x^3 + (10*i+35)*x + (155*i+121) over Finite Field in i of size 179^2
Elliptic Curve defined by y^2 = x^3 + (169*i+35)*x + (24*i+121) over Finite Field in i of size 179^2
sage: for E in reductions: 
....:   E.change_ring(f1) 
....:                                                          
Elliptic Curve defined by y^2 = x^3 + (169*i+35)*x + (24*i+121) over Finite Field in i of size 179^2
Elliptic Curve defined by y^2 = x^3 + (10*i+35)*x + (155*i+121) over Finite Field in i of size 179^2

