TITLE: Isomorphic endomorphism algebras implies isogenous (for abelian varieties over finite fields)?
QUESTION [8 upvotes]: $\newcommand{\F}{\mathbb{F}} 
\newcommand{\End}{\mathrm{End}} 
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Z}{\mathbb{Z}}$
I would like to know if the following is true:

Proposition A : Let $A_1, A_2$ be two abelian varieties over a finite field $k$. If $\End_{\overline k}(A_1) \otimes_{\Z} \Q$ and $\End_{\overline k}(A_2) \otimes_{\Z} \Q$ are isomorphic (as $\Q$-algebras), then $A_1, A_2$ are isogenous over $\overline k$.

The converse holds: let $\phi : A_1 \to A_2$ be an isogeny of degree $m$. There is an isogeny $\psi : A_2 \to A_1$ such that $psi \circ \phi = [m]$ (see Poonen "Lectures on rational points", Proposition 4.1.19 ; this is not the dual isogeny!). Define a map $\End_{\overline k}(A_1) \otimes_{\Z} \Q   \to \End_{\overline k}(A_2) \otimes_{\Z} \Q$ via
$f   \longmapsto     \dfrac{1}{m}  \phi \circ f \circ \psi $.
It is an algebra isomorphism.
The result holds over $\mathbb C$, see here or Prop. 1.2.17. It holds for elliptic curves over a finite field: the supersingular case can be proved "by hand", using Tate isogeny theorem, while the ordinary case follows from Deuring's work on CM (lifting, etc.).
Note that the curves do not need to be isogenous over the base field $k$. I skimmed through the paper Endomorphisms  of  Abelian  Varieties  over  Finite  Fields of Tate, but I did not find such a statement.
Maybe one could use Serre–Tate theory instead of Deuring, but it seems to be only available for ordinary abelian varieties. I am not aware of the details here anyway. If the claim does not hold, is there a suitable hypothesis to make it true?

REPLY [9 votes]: Here is a counterexample to  Proposition A provided by 8-dimensional abelian varieties $A_1$ and $A_2$ over a finite field $F_{p^2}$ where $p$ is any prime that is congruent to $1$ modulo $17$ (e.g., $p=103$). The corresponding endomorphism algebra is the $17$th cyclotomic field $E=Q(\zeta_{17})$. The congruence condition  means that $p$ splits completely in $E$. It is known that $E/Q$ is a cyclic extension, the class number of $E$ is $1$ (see ``Introduction to cyclotomic fields" by Larry Washington) and any proper subfield of $E$ is totally real (because $17$ is a Fermat prime).
Let $O_E$ be the ring of integers in $E$ and $\iota: E \to E$ be the complex conjugation, which is the only element of order 2 in the cyclic Galois group $G:=Gal(E/Q)$ of order 16=2^4. (In particular, every nontrivial subgroup of $G$ contains $\iota$.)
Let S be the 16-element set of maximal ideals $\mathfrak{P}$ of integers $O_E$ with residual characteristic $p$. The group $G$ acts freely transitively on the set $S$ of maximal ideals in $O_E$ and $\Pi_{\mathfrak{P}\in S}\mathfrak{P}=p \cdot O_E$. Let H be the set of ideals $\mathfrak{B}$ of $O_E$ such that $\mathfrak{B}\cdot \iota(\mathfrak{B})=p \cdot O_E$. The set $H$ has $2^8=16^2$ elements.  I claim that the natural action of $16$-element $G$ on $H$ is free. Indeed, if it's not free then there is $\mathfrak{B}\in H$ such that $\iota(\mathfrak{B})=\mathfrak{B}$ and therefore
$$p \cdot O_E=\mathfrak{B}\cdot \iota(\mathfrak{B})=\mathfrak{B}^2,$$
which implies that $p$ is ramified in $E$, which is not the case. So, the action is free and therefore $H$ consists of $16$ orbits of $G$.
Now let's construct Weil's $p^2$-numbers $\pi_1$ and $\pi_2$, using $\mathfrak{B}_1, \mathfrak{B}_2 \in H$ that belong to different orbits of $G$.  Let $z_1, z_2 \in O_E$ be generators of ideals $\mathfrak{B}_1$ and $\mathfrak{B}_2$ respectively. Then both
$v_1=z_1 \iota(z_1)$ and  $v_2=z_2 \iota(z_2)$ are ``real" (i.e., $\iota$-invariant) generators of $p\cdot O_E$, i.e., there are exist units $u_1,u_2 \in O_E^*$ such that
$$v_1=p u_1, \ v_2=p u_2.$$
Clearly, both $u_1$ and $u_2$ are real totally positive. Now let us put
$$\pi_1=z_1^2/u_1 \in O_E, \ \pi_2=z_2^2/u_2\in O_E.$$
Clearly,
$$\pi_1\cdot \iota(\pi_1)=p^2=\pi_2\cdot \iota(\pi_2)$$
(recall that $\iota(u_1)=u_1$ and $\iota(u_2)=u_2$).  Taking into account that
$$\pi_1 O_E=\mathfrak{B}_1^2, \pi_2 O_E=\mathfrak{B}_2^2,$$
we conclude that $\pi_1$ and $\pi_2$ are not Galois-conjugate (and the same is true for powers $\pi_1^m$ and $\pi_2^m$ for any positive integer $m$). Clearly,
$$\pi_1 \ne \iota(\pi_1), \ \pi_2 \ne \iota(\pi_2)$$
and therefore
$$Q(\pi_1)=E= Q(\pi_2).$$
Now if $A_1$ (resp. $A_2$) is a simple abelian variety over $F_{p^2}$ attached (by Honda-Tate) to $\pi_i$  then the center of the division algebra $End(A_i)\otimes Q$ is isomorphic to $E$.  Since $\pi_1$ and $\pi_2$ (and even their powers) are not Galois-conjugate then $A_1$ and $A_2$ are not isogenous over $F_{p^2}$ (and even over its algebraic closure). On the other hand, both $A_1$ and $A_2$ are obviously ordinary. Since they are simple, their endomorphism algebras are commutative, i.e., coincide with their centers and therefore both $End(A_1)\otimes Q$ and $End(A_2)\otimes Q$ are isomorphic to $E$, Hence,
$$\dim(A_1)=[E:Q]/2=\dim(A_2),$$
i.e., both $A_1$ and $A_2$ are $8$-dimensional and
$End(A_1)\otimes Q$ is isomorphic to $End(A_2)\otimes Q$.
Let me stress that both $A_1$ and $A_2$ remain simple over an algebraic closure of $F_{p^2}$ and their endomorphism algebras remain isomorphic to $E$.