Isogeny graphs of ordinary abelian varieties

Fix a prime number $\ell$. Graphs of isogenies of degree a power of $\ell$ are well-understood for elliptic curves, but not for higher-dimensional abelian varieties. We study the case of absolutely simple ordinary abelian varieties over a finite field. We analyse graphs of so-called $\mathfrak l$-isogenies, resolving that they are (almost) volcanoes in any dimension. Specializing to the case of principally polarizable abelian surfaces, we then exploit this structure to describe graphs of a particular class of isogenies known as $(\ell, \ell)$-isogenies: those whose kernels are maximal isotropic subgroups of the $\ell$-torsion for the Weil pairing. We use these two results to write an algorithm giving a path of computable isogenies from an arbitrary absolutely simple ordinary abelian surface towards one with maximal endomorphism ring, which has immediate consequences for the CM-method in genus 2, for computing explicit isogenies, and for the random self-reducibility of the discrete logarithm problem in genus 2 cryptography.

1. Introduction 1.1. Background. Graphs of isogenies of principally polarized abelian varieties of dimension g have been an extensive object of study in both number theory and mathematical cryptology. When g = 1, Kohel [Koh96] gave a description of the structure of such graphs and used it to compute the endomorphism ring of an elliptic curve over a finite field. This description has subsequently been utilized in a variety of cryptographic applications such as point counting on elliptic curves [FM02], random self-reducibility of the elliptic curve discrete logarithm problem in isogeny classes [JMV05,JMV09], generating elliptic curves with a prescribed number of points via the CM method based on the Chinese Remainder Theorem [Sut12], as well as computing modular polynomials [BLS12].
When g > 1, the problem of describing the structure of these graphs becomes harder. The literature has seen a number of attempts to generalize Kohel's thesis, yet the structure of these isogeny graphs has not been studied systematically. For g = 2, Bröker, Gruenewald and Lauter [BGL11] proved that graphs of ( , )isogenies of abelian surfaces are not volcanoes.
In [LR12a], Lauter and Robert observed that from a random abelian surface, it might not always be possible to reach an isogenous one with maximal endomorphism ring (locally at ) using only ( , )-isogenies. Following the footsteps of Kohel, Bisson [Bis15,Ch.5] sketched the relation between isogeny graphs and the lattice of orders in the endomorphism algebra for abelian varieties of higher dimension. This provides a first approximation of the global structure of the graphs, but allows no fine-grained analysis.
It was also unclear whether the notion of ( , )-isogenies is the right one to generalize the structure of isogeny graphs. Ionica and Thomé [IT14] observed that the subgraph of ( , )-isogenies restricted to surfaces with maximal real order in K 0 (globally) could be studied through what they called l-isogenies, where l is a prime ideal in K 0 above . They suggest that the l-isogeny graphs should be volcanoes, under certain assumptions 1 . When l is principal, of prime norm, generated by a real, totally positive endomorphism β, then l-isogenies coincide with the cyclic βisogenies from [DJR16] -an important notion, since these are the cyclic isogenies preserving principal polarizability.
Our main contributions include a full description of graphs of l-isogenies for any g ≥ 1. This proves the claims of [IT14] and extends them to a much more general setting. For g = 2, we exploit this l-structure to provide a complete description of graphs of ( , )-isogenies preserving the maximal real multiplication locally at . We also explore the structure of ( , )-isogenies when the real multiplication is not necessarily locally maximal. As an application of these results, we build an algorithm that, given as input a principally polarized abelian surface, finds a path of computable isogenies leading to a surface with maximal endomorphism ring. This was a missing -yet crutial -building block for the CRT-based CM-method in dimension 2, for computing explicit isogenies between two given surfaces, and for the random self-reducibility of the discrete logarithm problem in genus 2 cryptography. Applications are discussed more thoroughly in Section 1.5.
This structure of l-isogenies, when one assumes that l is of prime norm and trivial in the narrow class group of K 0 , implies in particular that graphs of cyclic β-isogenies are volcanoes. In parallel to the present work, Chloe Martindale has recently announced a similar result on cyclic β-isogenies. It will be found in her forthcoming Ph.D. thesis, as part of a larger project aimed at computing Hilbert class polynomials and modular polynomials in genus 2. Her results, which are proven in a complex-analytic setting different from our -adic methods, yield the same description of the graph in this particular case.
1.2. Setting. For a given ordinary, absolutely simple abelian variety A over a finite field k = F q , the associated endomorphism algebra End(A ) ⊗ Z Q is isomorphic to a CM-field K, i.e., a totally imaginary quadratic extension of a totally real number field K 0 . Moreover, the dimension g of A equals the degree [K 0 : Q]. The endomorphism ring End(A ) identifies with an order O in K. The Frobenius endomorphism π of A generates the endomorphism algebra K = Q(π), and its characteristic polynomial determines its k-isogeny class, by Tate's isogeny theorem [Tat66]. In particular, since End k (A ) = End k (A ) (see [Wat69,Thm.7.2.]), all isogenous varieties (over k) share the same CM-field K, and their endomorphism rings all correspond to orders in K. Thus, the structure of isogeny graphs is related to the structure of the lattice of orders of the field K.
The choice of an isomorphism End(A )⊗ Z Q ∼ = K naturally induces an embedding ı B : End(B) → K for any variety B that is isogenous to A , and it does not depend on the choice of an isogeny. We can then unambiguously denote by O(B) the order in K corresponding to the endomorphism ring of any B. Define the suborder 1 The proof of [IT14,Prop.15] gives a count of the number of points at each level of the graph, but does not allow a conclusive statement on the edge structure, and thus does not appear to prove that the graph is a volcano. 1.3. Main results. When A is an elliptic curve, the lattice of orders is simple: K being a quadratic number field (i.e. K 0 = Q), all the orders in K are of the form O c = Z + cO K , with c ∈ Z generating the conductor of O c . Locally at a prime number , the lattice of orders in K is simply the chain o K ⊃ Z + o K ⊃ Z + 2 o K ⊃ .... The (local) structure of the lattice of orders of a CM-field K is in general not as simple as the linear structure arising in the case of an imaginary quadratic field. This constitutes the main difficulty in generalizing the structural results to g > 1. For the rest of the paper, we let g > 1, and fix an isogeny class whose endomorphism algebra is the CM-field K.
1.3.1. Isogeny graphs preserving the real multiplication. In the case of quadratic number fields, the inclusion of orders corresponds to the divisibility relation of conductors. Neither the one-to-one correspondence between orders and conductors, nor the relationship between inclusion and divisibility holds in higher degree. We can, however, prove that such a correspondence between orders and conductors, and inclusion and divisibility still holds if we restrict to orders with maximal real multiplication, i.e., O K0 ⊂ O. More than that, it even holds locally, i.e., for the orders of K containing o 0 . More precisely, we show in Section 2, Theorem 4, that any order in K (respectively K ) with maximal real multiplication is of the form O K0 + fO K (respectively o 0 + fo K ) for some ideal f in O K0 . Our first results use this classification to provide a complete description of graphs of isogenies preserving the maximal real multiplication locally at . The main building block for isogenies preserving the real multiplication is the notion of l-isogeny.
Definition 1.1 (l-isogeny). Let l be a prime above in K 0 , and A a variety in the fixed isogeny class. Suppose l is coprime to the conductor of O 0 (A ). An l-isogeny from A is an isogeny whose kernel is a proper, O 0 (A )-stable subgroup of 2 A [l].
Remark 1.2. The degree of an l-isogeny is N l.
We will therefore study the structure of the graph W l whose vertices are the isomorphism classes of abelian varieties A in the fixed isogeny class, which have maximal real multiplication locally at (i.e., o 0 ⊂ o(A )), and there is an edge of multiplicity m from such a vertex with representative A to a vertex B if there are m distinct subgroups κ ⊂ A that are kernels of l-isogenies such that A /κ ∼ = B (of course, the multiplicity m does not depend on the choice of the representative A ).
Remark 1.3. When l is trivial in the narrow class group of K 0 , then l-isogenies preserve principal polarizability. The graph W l does not account for polarizations, but it is actually easy to add polarizations back to graphs of unpolarized varieties, as will be discussed in Section 5.
Each vertex A of this graph W l has a level, given by the valuation v l (A ) at l of the conductor of O(A ). Our first result, Theorem 1, completely describes the structure of the connected components of W l , which turns out to be closely related to the volcanoes observed for cyclic isogenies of elliptic curves. It is proven in Subsection 4.2.
Theorem 1. Let V be any connected component of the leveled l-isogeny graph (W l , v l ). For each i ≥ 0, let V i be the subgraph of V at level i. We have: (i) For each i ≥ 0, the varieties in V i share a common endomorphism ring O i . The order O 0 can be any order with locally maximal real multiplication at , whose conductor is not divisible by l; (ii) The level V 0 is isomorphic to the Cayley graph of the subgroup of Pic(O 0 ) with generators the prime ideals above l; fixing A ∈ V 0 , an isomorphism is given by sending any ideal class [a] to the isomorphism class of 1.3.2. Graphs of ( , )-isogenies. The following results focus on the case g = 2.
In contrast to the case of elliptic curves, where a principal polarization always exists, the property of being principally polarizable is not even invariant under cyclic isogeny in genus 2. In addition, basic algorithms for computing isogenies of elliptic curves from a given kernel (such as Vélu's formulae [Vél71]) are difficult to generalize and the only known methods [Rob10b, CR15, LR12b, DJR16] assume certain hypotheses and thus do not apply for general isogenies of cyclic kernels. On the other hand, ( , )-isogenies always preserve principal polarizability, and are computable with the most efficient of these algorithms [CR15]. These ( , )isogenies are therefore an important notion, and we are interested in understanding the structure of the underlying graphs.
Definition 1.4 (( , )-isogeny). Let (A , ξ A ) be a principally polarized abelian surface. We call an isogeny ϕ : A → B an ( , )-isogeny (with respect to ξ A ) if ker(ϕ) is a maximal isotropic subgroup of A [ ] with respect to the Weil pairing on A [ ] induced by the polarization isomorphism corresponding to ξ A .
One knows that if ϕ : A → B is an ( , )-isogeny, then there is a unique principal polarization ξ B on B such that ϕ * ξ B = ξ A (this is a consequence of Grothendieck descent [Mum66,; see also [Rob10a,Prop. 2.4.7]). This allows us to view an isogeny of a priori non-polarized abelian varieties ϕ as an isogeny of polarized abelian varieties ϕ : (A , L ) → (B, M).
First, we restrict our attention to abelian surfaces with maximal real multiplication at . The description of l-isogeny graphs provided by Theorem 1 leads to a complete understanding of graphs of ( , )-isogenies preserving the maximal real order locally at , via the next theorem. More precisely, we study the structure of the graph G , whose vertices are the isomorphism classes of principally polarizable surfaces A in the fixed isogeny class, which have maximal real multiplication locally at (i.e., o 0 ⊂ o(A )), with an edge of multiplicity m from such a vertex A to a vertex B if there are m distinct subgroups κ ⊂ A that are kernels of ( , )-isogenies such that A /κ ∼ = B. This definition will be justified by the fact that the kernels of ( , )-isogenies preserving the maximal real multiplication locally at do not depend on the choice of a principal polarization on the source (see Remark 7.10). The following theorem is proven in Subsection 7.2, where its consequences are discussed in details.
Theorem 2. Suppose that A has maximal real multiplication locally at . Let ξ be any principal polarization on A . There is a total of 3 + 2 + + 1 kernels of ( , )-isogenies from A with respect to ξ. Among these, the kernels whose target also has maximal local real order do not depend on ξ, and are: (i) the 2 + 1 kernels of O K0 -isogenies if is inert in K 0 , (ii) the 2 + 2 + 1 kernels of compositions of an l 1 -isogeny with an l 2 -isogeny if splits as l 1 l 2 in K 0 , (iii) the 2 + + 1 kernels of compositions of two l-isogenies if ramifies as l 2 in K 0 . The other ( , )-isogenies have targets with real multiplication by o 1 = Z + o 0 .
Second, we look at ( , )-isogenies when the real multiplication is not maximal at . Note that since g = 2, even though the lattice of orders in K is much more intricate than in the quadratic case, there still is some linearity when looking at the suborders O 0 (A ) = O(A ) ∩ K 0 , since K 0 is a quadratic number field. For any variety A in the fixed isogeny class, there is an integer f , the conductor of The next result describes how ( , )-isogenies can navigate between these "levels" of real multiplication. Let ϕ : A → B be an ( , )-isogeny with respect to a polarization ξ on A . If o 0 (A ) ⊂ o 0 (B), we refer to ϕ as an RM-ascending isogeny; Note that we start by considering ( , )-isogenies defined over the algebraic closure of the finite field k; in virtue of Remark 3.3, it is then easy to deduce the results on isogenies defined over k. The following assumes n > 0 since the case n = 0 is taken care of by Theorem 2.
Theorem 3. Suppose o 0 (A ) = o n with n > 0. For any principal polarization ξ on A , the kernels of ( , )-isogenies from (A , ξ) are: (i) A unique RM-ascending one, whose target has local order o n−1 · o(A ) (in particular, its local real order is o n−1 , and the kernel is defined over the same field as A ), (ii) 2 + RM-horizontal ones, and (iii) 3 RM-descending isogenies, whose targets have local real order o n+1 .
The proof of this theorem is the matter of Section 6.
1.4. Lattices in -adic symplectic spaces. The theorems stated above are proven using a different approach from the currently available analyses of the structure of -power isogeny graphs. Rather than working with complex tori, we attach to an -isogeny of abelian varieties a pair of lattices in an -adic symplectic space, whose relative position is determined by the kernel of the isogeny, following the proof of Tate's isogeny theorem [Tat66].
Inspired by [CV04,§6], where the theory of Hecke operators on GL 2 is used to understand the CM elliptic curves isogenous to a fixed curve, we analyze the possible local endomorphism rings (in K = K ⊗ Q Q ) for an analogous notion of "neighboring" lattices. This method gives a precise count of the horizontal isogenies as well as the vertical isogenies that increase or decrease the local endomorphism ring at .
1.5. "Going up" and applications. One of the applications of the above structural results is an algorithm that, given as input a principally polarized abelian surface, finds a path of computable isogenies leading to a surface with maximal endomorphism ring, when it is possible (and we can charaterize when it is possible). This algorithm is built and analysed in Section 8.
Such an algorithm has various applications. One of them is in generating (hyperelliptic) curves of genus 2 over finite fields with suitable security parameters via the CM method. The method is based on first computing invariants for the curve (Igusa invariants) and then using a method of Mestre [Mes91] (see also [CQ05]) to reconstruct the equation of the curve. The computation of the invariants is expensive and there are three different ways to compute their minimal polynomials (the Igusa class polynomials): 1) complex analytic techniques [vW99,Wen03,Str10]; 2) p-adic lifting techniques [CKL08, CL09, GHK + 06]; 3) a technique based on the Chinese Remainder Theorem [EL10, FL08, BGL11] (the CRT method ).
Even if 3) is currently the least efficient method, it is also the least understood and deserves more attention: its analog for elliptic curves holds the records for time and space complexity and for the size of the computed examples [ES10,Sut11].
The CRT method of [BGL11] requires one to find an ordinary abelian surface A /F q whose endomorphism ring is the maximal order O K of the quartic CM field K isomorphic to the endomorphism algebra End(A ) ⊗ Z Q. This is obtained by trying random hyperelliptic curves C in the isogeny class and using the maximal endomorphism test of [FL08], thus making the algorithm quite inefficient.
In [LR12a], the authors propose a different method based on ( , )-isogenies that does not require the endomorphism ring to be maximal (generalizing the method of Sutherland [Sut11] for elliptic curves). Starting from an arbitrary abelian surface in the isogeny class, the method is based on a probabilistic algorithm for "going up" to an abelian surface with maximal endomorphism ring. Although the authors cannot prove that the going-up algorithm succeeds with any fixed probability, the improvement is practical and heuristically, it reduces the running time of the CRT method in genus 2 from O(q 3 ) to O(q 3/2 ). Our algorithm for going up takes inspiration from [LR12a], but exploits our new structural results on isogeny graphs.
A second application is in the computation of an explicit isogeny between any two given principally polarized abelian surfaces in the same isogeny class. An algorithm is given in [JW15] to find an isogeny between two such surfaces with maximal endomorphism ring. This can be extended to other pairs of isogenous principally polarized abelian surfaces, by first computing paths of isogenies to reach the maximal endomorphism ring, then applying the method of [JW15].
Similarly, this "going up" algorithm can also extend results about the random self-reducibility of the discrete logarithm problem in genus 2 cryptography. The results of [JW15] imply that if the discrete logarithm problem is efficiently solvable on a non-negligible proportion of the Jacobians with maximal endomorphism ring within an isogeny class, then it is efficiently solvable for all isogenous Jacobians with maximal endomorphism ring. For this to hold on any other Jacobian in the isogeny class, it only remains to compute a path of isogenies reaching the level of the maximal endomorphism ring.
Finally, we note that the "going-up" algorithm can also be applied in the computation of endomorphism rings of abelian surfaces over finite fields, thus extending the work of Bisson [Bis15]. This will be the subject of a forthcoming paper.

Orders
2.1. Global and local orders. An order in a number field is a full rank Z-lattice which is also a subring. If is a prime, and L is a finite extension of Q or a finite product of finite extensions of Q , an order in L is a full rank Z -lattice which is also a subring. If K is a number field, write K = K ⊗ Q Q . In this section, if O an order in K, write O = O ⊗ Z Z ; then O is an order in K . Proof. This is well-known, but we include a proof for completeness. Let n = [K : Q] and pick a Z-basis for the maximal order O K of K. With this choice, a lattice Λ in O K may be described by a matrix in M n (Z) ∩ GL n (Q) whose column vectors are a basis; this matrix is well-defined up to the left action of GL n (Z). Similarly, a local lattice Λ in K may be described by a matrix in M n (Z ) ∩ GL n (Q ), well-defined up to the left-action of GL n (Z ). It thus suffices to prove that, given matrices 2.2. Orders with maximal real multiplication. Suppose that K 0 is a number field or finite product of extensions of Q p , and let K a quadratic extension of K 0 (i.e., an algebra of the form K 0 [x]/f (x), where f is a separable quadratic polynomial). The non-trivial element of Aut(K/K 0 ) will be denoted †. In the case that K is a CM-field and K 0 its maximally real subfield, Goren and Lauter [GL09] proved that if K 0 has a trivial class group, the orders with maximal real multiplication, i.e., the orders containing O K0 , are characterized by their conductor -under the assumption that ideals of O K fixed by Gal(K/K 0 ) are ideals of O K0 augmented to O K , which is rather restrictive, since it implies that no finite prime of K 0 ramifies in K. In that case, these orders are exactly the orders O K0 + f 0 O K , for any ideal f 0 in O K0 . We generalize this result to an arbitrary quadratic extension; abusing language, we will continue to say an order of K has "maximal real multiplication" if it contains O K0 .
Proof. The direct implication is obvious. For the other direction, suppose Lemma 2.3. Let f and g be two ideals in O K , such that g divides f. Let π : Proof. Any element in π(O K0 ) ∩ π(g) can be written as π(x) = π(y) for some x ∈ O K0 and y ∈ g. Then, x − y ∈ f ⊂ g, so x = (x − y) + y ∈ g. So where the last relation comes from the canonical isomorphism between the rings Lemma 2.4. Let O be an order in K of conductor f with maximal real multiplication. Then, O is stable under † and f comes from an ideal of O K0 , i.e., Proof. From Lemma 2.2, it is obvious that any order with maximal real multiplication is stable under †. Its conductor f is thereby a †-stable ideal of O K . For any prime ideal p 0 in O K0 , let f p0 be the part of the factorization of f that consists in prime ideals above p 0 . Then, f = p0 f p0 , and each f p0 is †-stable. It is easy to see that each f p0 comes from an ideal of O K0 when p 0 is inert or splits in O K . Now suppose it ramifies as p 0 O K = p 2 . Then f p0 is of the form p α . If α is even, We now need to prove that α cannot be odd. By contradiction, suppose α = 2β + 1 for some integer β. Let π : where N denotes the absolute norm, so π(p α−1 g) ⊂ π(O K0 ) ⊂ π(O). Finally, which contradicts the fact that f is the biggest ideal of O K contained in O.
Proof. The order O K is a module over O K0 . It is locally free, and finitely generated, thus it is projective.
In the former case write n for [K : Q] and in the latter for the dimension of K p as a Q p -vector space.
As modules over A, O K is of rank 2n and O K0 of rank n, hence M must be of rank n. Therefore, as an On the other hand, |π( There are two elements y, z ∈ R such that x + f = y + zα. Then, zα ∈ O/f, and we obtain that (zR)α ⊂ O/f. There exists an ideal g 0 dividing f 0 such that

From abelian surfaces to lattices, and vice-versa
3.1. Tate modules and isogenies. Consider again the setting introduced in Subsection 1.2, with A an abelian variety over the finite field k in the fixed isogeny class -ordinary, absolutely simple, and of dimension g. Write T = T A for the -adic Tate module of A , and V for T ⊗ Z Q . Then V is a 2g-dimensional Qvector space with an action of the algebra K , over which it has rank one, and T is similarly of rank one over the ring The elements of T are the sequences (Q n ) n≥0 with Q n ∈ A [ n ], Q n = Q n−1 for all n ≥ 1. An element of V identifies with a sequence (P n ) n≥0 with P n ∈ A [ ∞ ] and P n = P n−1 for n ≥ 1 as follows: and under this identification, T is the subgroup of V where P 0 = 0 ∈ A [ ∞ ]. The projection to the zeroth coordinate then yields a canonical identification under which the action of π on the left-hand side corresponds to the action of the arithmetic Frobenius element in Gal(k/k) on the right-hand side.
We are now ready to state the main correspondence between lattices in V containing the Tate module T and -power isogenies from A .
Proposition 3.1. There is a one-to-one correspondence where a lattice Γ is sent to the subgroup Γ/T , through the identification (1). Under this correspondence, (i) A lattice is stable under π n if and only if the corresponding subgroup is defined over the degree n extension F q n of k.
, let Γ be the set of sequences in V whose zeroth coordinate is in κ. It follows that the subgroup of A [ ∞ ] corresponding to this lattice under (1) is κ, so that this process is indeed bijective.
The claim about fields of definition follows from the previously-discussed Frobenius equivariance of (1). The claim about endomorphism rings is Tate's isogeny theorem applied to Hom(A /κ, A /κ).
Remark 3.2. Observe that given a subgroup κ ⊂ A [ ∞ ], any two isogenies of kernel κ differ only by an isomorphism between the targets. Therefore if ϕ : A → B is any isogeny of kernel κ, then o(A /κ) = o(B).
Remark 3.3. Recall that all varieties and morphisms are considered over k. We are however also interested in the structures arising when restricting to varieties and morphisms defined over k, in the sense of Subsection 1.2. To this end, the most important fact (which is special to the case of simple, ordinary abelian varieties) is that if a variety B is k-isogenous to A , then any isogeny A → B is defined over k (this is an easy consequence of [Wat69, Thm.7.2.]: if B is defined over k, and ϕ, ψ : A → B are two isogenies then ϕ • ψ −1 is an element of End(B) ⊗ Z Q, hence defined over k, so ϕ is defined over k if and only if ψ is). Similarly to Remark 3.2, if κ is defined over k, any two k-isogenies of kernel κ differ by a k-isomorphism between the targets. From Proposition 3.1(ii), if π ∈ o(A /κ), then κ is defined over k, and is thereby the kernel of a k-isogeny 3 . We obtain a correspondence between subgroups κ defined over k and Γ lattices stabilized by π.
The following proposition justifies the strategy of working locally at , as it guarantees that -power isogenies do not affect endomorphism rings at primes = .
Proposition 3.4. Let ϕ : A → B be an isogeny of abelian varieties of -power degree. Then for any prime Proof. Let C be the category whose objects are abelian varieties over k and whose morphisms are , so ϕ induces an isomorphism in C ; it follows that the endomorphism rings of A and B in this category are identified.

3.2.
Polarizations and symplectic structures. Fix a polarization ξ of A . It induces a polarization isogeny λ : A → A ∨ , which in turn gives a map T → T (A ∨ ). Therefore the Weil pairing equips T with a natural Z -linear pairing −, − , which extends to a pairing on V . We gather standard facts about this pairing in the following lemma.
Lemma 3.5. One has: for the dual lattice of Γ. Then T ⊂ T * , and the quotient is isomorphic to (ker λ)[ ∞ ]. In particular, T is self-dual if and only if the degree of λ is coprime to .

Graphs of l-isogenies
In this section we study l-isogenies through the lens of lattices in an -adic vector space, endowed with an action of the algebra K . 4.1. Lattices with locally maximal real multiplication. Throughout this subsection, V is a Q -vector space of dimension 2g, is a prime number, K is a quartic CM-field, with K 0 its maximal real subfield. The algebra K is a Q -algebra of dimension 2g. Suppose that it acts (Q -linearly) on V . Define the order of a full-rank be the order of Λ, and suppose that it has maximal real multiplication, i.e., that o contains the maximal order o 0 of K 0, = K 0 ⊗ Q Q . We now need some commutative algebra: Theorem 4, all the orders containing o 0 are of this form.
Definition 4.2 (l-neighbors). Let Λ be a lattice with maximal real multiplication, and let l be a prime ideal in o 0 . The set L l (Λ) of l-neighbors of Λ consists of all the lattices Γ such that lΛ ⊂ Γ ⊂ Λ, and Γ/lΛ ∼ = o 0 /l, i.e., Γ/lΛ ∈ P 1 (Λ/lΛ).    Proof. This is a direct consequence of Lemma 4.4, together with the fact that Λ is a free o f -module of rank 1.

4.2.
Graphs of l-isogenies. Fix again a principally polarizable absolutely simple ordinary abelian variety A of dimension g over k, with endomorphism algebra K.
Suppose that A has locally maximal real multiplication at (i.e., o 0 ⊂ o(A )). The l-neighbors correspond in the world of varieties to l-isogenies (see Remark 4.3). More explicitely, if l divides f, there is a unique l-ascending l-kernel from A , and N (l) l-descending l-kernels. If l does not divide f, we have: and N (l) l-descending ones.
Proof. This proposition follows from Proposition 4.5 together with Remark 4.3.
Definition 4.8 (l-predecessor). When it exists, let κ be the unique l-ascending kernel of Proposition 4.7. We call pr l (A ) = A /κ the l-predecessor of A , and denote by up l A : A → pr l (A ) the canonical projection. The following notion of volcano was introduced in [FM02] to describe the structure of graphs of -isogenies between elliptic curves. Definition 4.9 (volcano). Let n be a positive integer. An (infinite) n-volcano V is an (n + 1)-regular, connected, undirected graph whose vertices are partitioned into levels {V i } i∈Z ≥0 such that: (i) The subgraph V 0 , the surface, is a finite regular graph of degree at most 2, (ii) For each i > 0, each vertex in V i has exactly one neighbor in V i−1 , and these are exactly the edges of the graph that are not on the surface. For any positive integer h, the corresponding (finite) volcano of height h is the restriction of V to its first h levels.
Let l be a prime of K 0 above . Consider the l-isogeny graph W l as defined in Section 1.3.1. Note that it is a directed multigraph; we say that such a graph is undirected if for any vertices u and v, the multiplicity of the edge from u to v is the same as the multiplicity from v to u. The remainder of this section is a proof of Theorem 1, which provides a complete description of the structure of the leveled l-isogeny graph (W l , v l ), closely related to volcanoes. Proof. The elements α ∈ O(A ) act on the subgroups of A via the isomorphism O(A ) ∼ = End(A ), and we denote this action κ → κ α . Let κ = ker ϕ. If u ∈ O(A ) × is a unit, then κ u is also the kernel of an l-isogeny. Furthermore, u canonically induces an isomorphism A /κ → A /κ u , so κ u is the kernel of a l-isogeny with target B.
It only remains to prove that the orbit of κ for the action of Recall that for any variety C in our isogeny class, we have fixed an isomorphism ı C : End(C ) → O(C ), and that these isomorphisms are all compatible in the sense that for any isogeny ψ : C → D, be the natural projection. We obtain the following commutative diagram: Now, consider O and O as in the statement of the lemma. We obtain  .5, and observe that if Γ ∈ L l (Λ), then lΓ ∈ L l (lΛ)). We can deduce in particular that V 0 is connected: a path from A ∈ V 0 to another vertex of V 0 containing only vertical isogenies can only end at a vertex A /A [l i ], which can also be reached within V 0 .
We now need to look at a bigger graph. For each i ≥ 0, let U i be the orbit of the level V i for the CM-action of Pic(O i ). The action is transitive on U 0 since the connected graph V 0 is in a single orbit of the action of Pic(O 0 ). Let us show by induction that each U i+1 consists of a single orbit, and that each vertex of U i+1 is reachable by an edge from U i . First, U i+1 is non-empty because, by induction, U i is non-empty, and each vertex in U i has neighbors in U i+1 . Choose any isogeny ϕ : A → A from U i to U i+1 . For any vertex B in the orbit of A , there is an isogeny ψ : A → B of degree coprime to . The isogeny ψ • ϕ factors through a variety B via an isogeny ψ : A → B of same degree as ψ, and an isogeny ν : B → B of kernel ψ (ker ϕ). In particular, ν is an l-isogeny, and B is in the orbit of A for the CM-action, so it is in U i . This proves that any vertex in the orbit of A is reachable by an isogeny down from U i .
Let E i be the set of all edges (counted with multiplicities) from U i to U i+1 . From Proposition 4.7, we have For any B ∈ U i+1 , let d(B) be the number of edges in E i targeting B (with multiplicities). We have seen that any B is reachable from U i , therefore d(B) ≥ 1, and we deduce from Lemma 4.10 that d( Together with Equation (2), we obtain the inequality  Example 4.15. When K is a primitive quartic CM-field, we have seen in Remark 4.13 that the multiplicities [O × i : O × i+1 ] are always one, except maybe if K = Q(ζ 5 ). Actually, even for K = Q(ζ 5 ), only the maximal order O K has units that are not in K 0 . We give in Figure 2 examples of l-isogeny graphs when the order at the surface is O K = Z[ζ 5 ] (which is a principal ideal domain). The primes 2 and 3 are inert in K, so we consider l = 2O K0 and l = 3O K0 , and the prime number 5 is ramified in K 0 so l 2 = 5O K0 (and l is also ramified in K, explaining the self-loop at the surface of the last graph).
Notation 4.16. Let O be any order in K with locally maximal real multiplication at , whose conductor is not divisible by l. We denote by V l (O) the connected graph V described in Theorem 1. If l does divide the conductor of O, let O be the smallest order containing O, whose order is not divisible by l. Then, we also write V l (O) for the graph V l (O ).

Graphs of l-isogenies with polarization
When l is trivial in the narrow class group of K 0 , then l-isogenies preserve principal polarizability. The graphs of l-isogenies studied in Section 4.2 do not account for polarizations. The present section fills this gap, by describing polarized graphs of β-isogenies, where β ∈ K 0 is a totally positive generator of l. The main result of this section is Theorem 5 according to which the connected components of polarized isogeny graphs are either isomorphic to the corresponding components of the non-polarized isogeny graphs, or non-trivial double-covers thereof. Yet, this description is not quite exact due to problems arising when the various abelian varieties occurring in a connected component have different automorphism groups. 5.1. Graphs with polarization. Before defining the graph, we record the following proposition, which implies that one vertex of a fixed connected component of (W β , v β ) is principally polarizable if and only if all of them are. Note that since β is a generator of l, we will write β-isogeny to mean l-isogeny.
Proposition 5.1. If ϕ : A → B is a β-isogeny, then there is a unique principal polarization ξ B on B satisfying Proof. Writing ϕ ξ A the polarization isogeny, then ker(ϕ) ⊂ ker(ϕ ξ β A ) is a maximal isotropic subgroup for the commutator pairing and hence by Grothendieck descent (see [Rob10a, Lem.2.4.7]); the proof there is in characteristic 0, but it extends to ordinary abelian varieties in characteristic p via to canonical lifts), it follows that ξ β A is a pullback of a principal polarization ξ B on B. For uniqueness, note that the homomorphism ϕ * : NS(B) → NS(A ) of free abelian groups of the same rank becomes an isomorphism after tensoring with Q, hence is injective.
We define the principally polarized, leveled, β-isogeny graph (W pp β , v β ) as follows. A point is an isomorphism class 4 of pair (A , ξ A ), where A is a principally polarizable abelian variety occuring in (W β , v β ), and ξ A is a principal polarization on A . There is an edge of multiplicity m from the isomorphism class of (A , ξ A ) to the isomorphism class of (B, ξ B ) if there are m distinct subgroups of A that are kernels of β-isogenies ϕ : A → B such that ϕ * ξ B is isomorphic to ξ β A , for some polarization ξ B isomorphic to ξ B . The graph W pp β admits a forgetful map to W β , and in particular inherits the structure of a leveled graph (W pp β , v β ). Remark 5.2. It can be the case that there is no β-isogeny ϕ : A → B such that ϕ * ξ B ∼ = ξ β A , but that there is nonetheless an edge (because there is a map with this property for some other polarization ξ B , isomorphic to ξ B ). This can happen because pullbacks of isomorphic polarizations are not necessarily isomorphic, when A and B have different automorphism groups.
We note that this graph is undirected: Proposition 5.3. If ϕ : A → B is a β-isogeny, then there is a unique β-isogenỹ ϕ : B → A satisfyingφϕ = β, called the β-dual of ϕ.
Proof. Let κ be the kernel of ϕ. The group A [β] is an O 0 (A )/(β)-vector space of dimension 2, of which the kernel κ is a vector subspace of dimension 1. Therefore there is another vector subspace κ such that A [β] = κ ⊕ κ , and ϕ(κ ) is the kernel of a β-isogeny ψ : B → C . Then, the kernel of the composition ψ • ϕ is A [β] so there is an isomorphism u : C → A such that u • ψ • ϕ = β. The isogeny u • ψ is the β-dual of ϕ (which is trivially unique).

Counting polarizations.
To describe (W pp β , v β ), we need to count principal polarizations on any fixed variety. If O is an order in K, write O +× for the group of totally positive units in O ∩ K 0 .
Proposition 5.4. Let A be a simple ordinary abelian variety over F q with endomorphism ring O. Then the set of isomorphism classes of principal polarizations (when non-empty) on A is a torsor for the group Proof. See [BL04, Cor.5.2.7] for a proof in characteristic 0. That the result remains true for ordinary abelian varieties in characteristic p follows from the theory of canonical lifts.
The following lemma recalls some well-known facts about U (O). 4 Recall that two polarizations ξ A and ξ A on A are isomorphic if and only if there is a unit Proof. Writing N for the norm from K to K 0 , we have the following hierarchy, the last containment following because for β ∈ O r one has β 2 = Nβ: By Dirichlet's unit theorem (and its extension to non-maximal orders), the group O × 0 is of the form {±1} × A, where A is a free abelian group of cardinality 2 g−1 , so the quotient (O ∩ K 0 ) × /(O ∩ K 0 ) ×2 is an F 2 -vector space of dimension at most g. Since −1 is never a totally positive unit, the first claim follows. The second sentence of the lemma is clear.
Remark 5.6. We remark that, other than the simple calculations described, there is little one can say in great generality about the indices of the containments in (4), which vary depending on the specific fields K and orders O chosen. For example, if g = 2, the total index in (4) is 4, and one has examples with the "missing" factor of 2 (i.e., the one unaccounted for by the totally negative unit −1) occurring in any of the three containments. 5.3. Structure of (W pp β , v β ). We may now state the main theorem.
(iv) For each i > 0, and any x ∈ V pp i , there is one simple edge from x to a vertex of V pp i−1 , and Lemma 5.7. Let ϕ : A → B be a β-isogeny, and let ξ A be a principal polarization on A . We have: (i) If ϕ is β-ascending, there is, up to isomorphism, a unique polarization ξ B on B such that ϕ * ξ B is isomorphic to ξ β A ; (ii) It ϕ is β-descending, there are, up to isomorphism, exactly Proof. Let us first prove (i). From Proposition 5.1, there exists a polarization ξ B on B such that ϕ * ξ B = ξ β A . Suppose ξ B is a polarization such that ϕ * ξ B ∼ = ξ β A . Then, there is a unit u ∈ O(A ) × such that ϕ * ξ B = u * ξ β A . But ϕ is ascending, so u ∈ O(B) × and therefore These results, and the fact that V 0 is connected, imply that V pp 0 is connected. We can then deduce (ii) from the action of the Shimura class group C(O 0 ). Now, (iii) (respectively, (iv)) is a consequence of Theorem 1(iii) (respectively, Theorem 1(iv)) together with Lemma 5.7. The statement on multiplicities of the edges also uses the fact that if ϕ, ψ : A → B are two β-isogenies with same kernel, and ξ A is a principal polarization on A , then the two principal polarizations on B induced via ϕ and ψ are isomorphic. The volcano property follows from the corresponding phrase in the statement of Theorem 1, and the statement on fields of definition follows from Remark 3.3, which shows that the isomorphism from a principally polarized absolutely simple ordinary abelian variety to its dual, and hence the polarization, is defined over the field of definition of the variety. 5.4. Principally polarizable surfaces. The result of Theorem 5 for abelian surfaces is a bit simpler than the general case, thanks to the following lemma. Proof. In these cases, one has O × K = O × K0 except in the case K = Q(ζ 5 ) (see Remark 4.13); but even when K = Q(ζ 5 ) the equality is true up to units of norm 1. Therefore for any order O in K, one has NO × = N(O ∩ K 0 ) × . Thus, none of the groups U (O i ) actually depend on i.
Therefore, the factors |U (O i+1 )|/|U (O i )| disappear when g = 2. It follows that each component W pp is either isomorphic to its image in (W β , v β ), or is isomorphic to the natural double cover of this image constructed by doubling the length of the cycle V 0 (as illustrated in Figure 3). The first case occurs when (β) is inert in K/K 0 , or when the order of (L, β) in C(O 0 ) equals the order of L in Cl(O 0 ) (where L is a prime ideal of O 0 above (β)). The second case occurs when the order of (L, β) is twice that of L.

Levels for the real multiplication in dimension 2
We now specialize to the case g = 2. Then, A is of dimension 2, and K is a primitive quartic CM-field. The subfield K 0 is a real quadratic number field. The orders in K 0, are linearly ordered since they are all of the form Z + n o 0 . These n's can be seen as "levels" of real multiplication. Taking advantage of this simple structure, the goal of this section is to prove Theorem 3. 6.1. Preliminaries on symplectic lattices. Let F be the finite field with elements.
Proof. In the following, a line or a plane means a dimension 1 or 2 subspace of a vector space (i.e., they contain the origin of the vector space). Fix any line L in W . We will count the number of maximal isotropic subspaces of W containing L. The line L is itself isotropic (yet not maximal), so L ⊂ L ⊥ . Also, dim L + dim L ⊥ = 4, so dim L ⊥ = 3. Since any maximal isotropic subspace of W is of dimension 2, it is easy to see that those containing L are exactly the planes in L ⊥ containing L. There are + 1 such planes, because they are in natural correspondence with the lines in the dimension 2 vector space L ⊥ /L. It follows that there are + 1 maximal isotropic subspaces of W containing L. There are 3 + 2 + + 1 lines L in W , and each maximal isotropic subspace of W contains + 1 lines, we conclude that there are 3 + 2 + + 1 maximal isotropic subspaces.
Definition 6.4 (( , )-neighbors). The set L (Λ) of ( , )-neighbors of Λ is the set of lattices Γ such that Λ ⊂ Γ ⊂ Λ, and Γ/ Λ is maximal isotropic in Λ/ Λ. Remark 6.5. Consider the lattice T = T A . Note that ( , )-isogenies A → B correspond under Proposition 3.1 to lattices Γ with T ⊂ Γ ⊂ 1 T and Γ/T a maximal isotropic subspace of 1 T /T , i.e., to ( , )-neighbors of T rescaled by a factor −1 . 6.2. ( , )-neighboring lattices. Throughout this section, V is a symplectic Qvector space of dimension 4. Again, we consider a prime number , a quartic CM-field K, with K 0 its quadratic real subfield. The algebra K = K ⊗ Q Q is a Q -algebra of dimension 4, with an involution x → x † fixing K 0, induced by the generator of Gal(K/K 0 ). Suppose that K acts (Q -linearly) on V , and that for any x ∈ K , u, v ∈ V , we have xu, v = u, x † v . For any lattice Λ in V , the real order of Λ is the order in K 0, = K 0 ⊗ Q Q defined as Any order in K 0, is of the form o n = Z + n o 0 , for some non-negative integer n, with o 0 the maximal order of K 0, . We say that Λ is an o n -lattice if o(Λ) = o n . The goal of this section is to prove Theorem 3 by first proving its lattice counterpart, in the form of the following proposition. Using a standard abuse of notation, write F [ ] for the ring of dual numbers, i.e. an F -algebra isomorphic to F [X]/X 2 via an isomorphism sending to X.
submodules of R of F -dimension 2 are exactly the 2 + +1 modules R, and F [ ]·g for any g ∈ R. A complete list of these orbits F [ ] · g is given by F [ ] · (b f 1 + f 2 ) for any b ∈ F , and F [ ] · (f 1 + αf 2 + β f 2 ), for any α, β ∈ F .
Proof. Let H ⊂ R be a subspace of dimension 2, stable under the action of F [ ]. For any g ∈ H, write g = a g f 1 + b g f 1 + c g f 2 + d g f 2 ∈ H for a g , b g , c g , d g ∈ F . Since H is F [ ]-stable, for any g ∈ H, the element g = a g f 1 + c g f 2 is also in H.
First suppose a g = 0 and c g = 0 for any g ∈ H. Then, as H = R, it is indeed an F [ ]-submodule and has F -dimension 2. Now, suppose a g = 0 for any g ∈ H, but H contains an element g such that c g = 0 is non-zero. Then, H contains both b g f 1 + c g f 2 + d g f 2 , and c g f 2 , so H is the F -vector space spanned by f 2 and b g f 1 + c g f 2 . There are + 1 such subspaces H (one for each possible (b g : c g ) ∈ P 1 (F )), and all of them are of dimension 2 and R-stable.
Finally, suppose there exists g ∈ H such that a g = 0. Then, it is spanned as an F -vector spaces by a pair {f 1 + αf 2 + β f 2 , f 1 + α f 2 }, with α, β ∈ F , and any of the 2 subspaces of this form are F [ ]-submodules. Lemma 6.9. Let Λ be an o n -lattice, for some non-negative integer n. For any element g ∈ Λ/ Λ, the orbit o n · g is an isotropic subspace of Λ/ Λ.
Proof of Proposition 6.6. From Lemma 6.7, Λ splits as e 1 o n ⊕ e 2 o n , for some e 1 , e 2 ∈ Λ. Observe that there is an element ∈ o n such that o n / o n = F [ ] ∼ = F [X]/(X 2 ), via the isomorphism sending to X. The quotient R = Λ/ Λ is a free F [ ]-module of rank 2. Let π : Λ → R be the canonical projection. The set From Lemma 6.8, R contains 2 + + 1 subspaces of dimension 2 that are Together with Lemma 6.9, we conclude that all 2 + + 1 of these F [ ]-stable subspaces are maximal isotropic. From Lemma 6.1, R contains a total of 3 + 2 + + 1 maximal isotropic subspaces. Thus, the ( , )-neighbors corresponding to the remaining 3 subspaces are not stable for the action of o n . They are however stable for the action of o n+1 , so those are o n+1 -lattices.
It remains to prove that among the 2 + + 1 neighbors that are o n -stable, only the lattice o n−1 Λ (which corresponds to the subspace R) is o n−1 -stable, and that it is not o n−2 -stable. This would prove that o n−1 Λ is an o n−1 -lattice, and the 2 + other lattices have order o n . Write Γ = o n−1 Λ. Then π(Γ) = R is maximal isotropic and F [ ]-stable. Suppose by contradiction that we have o n−2 Γ ⊂ Γ. Then, o n−2 Λ ⊂ o n−2 Γ ⊂ Γ ⊂ Λ, so o n−2 Λ ⊂ Λ. But o n−2 ⊂ o n , which contradicts the fact that Λ is an o n -lattice. Therefore Γ is an o n−1 -lattice.
Let H ⊂ R be another maximal isotropic subspace, and suppose that π −1 (H) is o n−1 -stable. Let λ = e 1 (a + n x) + e 2 (b + n y) ∈ π −1 (H), with a, b ∈ Z and x, y ∈ o 0 , and let z ∈ o n−1 . A simple computation yields Λ = zλ + Λ = zae 1 + zbe 2 + Λ. Therefore, both za and zb must be in o n for any z ∈ o n−1 . It follows that a and b must be in Z , whence λ ∈ Γ. So π −1 (H) ⊂ Γ, and we conclude that H = R from the fact that both are maximal isotropic. This proves that no ( , )-neighbor other that Γ is o n−1 -stable.
6.3. Changing the real multiplication with ( , )-isogenies. The results for lattices are now ready to be applied to analyze how ( , )-isogenies can change the real multiplication. Fix a principally polarizable absolutely simple ordinary abelian surface A over F q . As usual, K is its endomorphism algebra, and K 0 the maximal real subfield of K. The local real order o 0 (A ) of A is of the form o n = Z + n o 0 for some non-negative integer n. Proof of Theorem 3. Theorem 3 follows from Proposition 6.6 together with Remark 6.5, and the observation that the o n−1 -lattice o n−1 Λ has order o n−1 ·o(Λ).
In the following, we show that some structure of the graphs of horizontal isogenies at any level can be inferred from the structure at the maximal level: indeed, there is a graph homomorphism from any non-maximal level to the level above. Proposition 6.12. Suppose n > 0. For any principal polarization ξ on A , and any RM-horizontal ( , )-isogeny ϕ : A → B with respect to ξ, there is an ( , )isogenyφ : pr(A ) → pr(B) with respect to pr(ξ) such that the following diagram commutes: Proof. This follows from the fact that if Λ is an o n -lattice, and Γ ∈ L (Λ) is an ( , )-neighbor of Λ, then o n−1 Γ ∈ L ( o n−1 Λ). 7. ( , )-isogenies preserving the real multiplication 7.1. ( , )-neighbors and l-neighbors. Let L 0 (Λ) be the set of ( , )-neighbors of the lattice Λ with maximal real multiplication. These neighbors will be analysed through l-neighbors, for l a prime ideal in o 0 . This will allow us to account for the possible splitting behaviors of . The relation between the set L 0 (Λ) and the sets L l (Λ) is given by the following proposition proved case-by-case in the following three sections, as Propositions 7.2, 7.6 and 7.8: Proposition 7.1. Let Λ be a lattice with maximal real multiplication. The set of ( , )-neighbors with maximal real multiplication is if ramifies as l 2 in K 0 .
7.1.1. The inert case. Suppose that is inert in K 0 . Then, O K0 is the unique prime ideal of K 0 above . The orders in K with maximal real multiplication are exactly the orders o n o0 = o 0 + n o K .
Proposition 7.2. Let Λ be a lattice with maximal real multiplication. If is inert in K 0 , the set of ( , )-neighbors with maximal real multiplication is Proof. Since o 0 / o 0 ∼ = F 2 , Λ/ Λ is a free o(Λ)/ o(Λ)-module of rank 1. In particular, it is a vector space over F 2 of dimension 2, and thereby the o 0 -stable maximal isotropic subspaces of Λ/ Λ are F 2 -lines. Since any F 2 -line is isotropic, L o0 (Λ) is precisely the set of ( , )-neighbors preserving the maximal real multiplication.
For the converse, suppose Γ = l 2 Γ 1 +l 1 Γ 2 for some Γ 1 ∈ L l1 (Λ) and Γ 2 ∈ L l2 (Λ). Then Γ/ Λ is of dimension 2, so it suffices to prove that it is isotropic. Each summand l i Γ j is isotropic, because it is of dimension 1, and Lemma 7.4 implies that l 2 Γ 1 and l 1 Γ 2 are orthogonal, so their sum Γ is isotropic.
Remark 7.9. We can deduce from Lemma 6.8 that |L 0 (Λ)| = 2 + + 1. In fact, for any two distinct lattices Π 1 , Π 2 ∈ L l (Λ), we have L l (Π 1 ) ∩ L l (Π 2 ) = {lΛ}. 7.2. Locally maximal real multiplication and ( , )-isogenies. Fix again a principally polarizable absolutely simple ordinary abelian surface A over F q , with endomorphism algebra K, and K 0 the maximal real subfield of K. Now suppose that A has locally maximal real multiplication at . Recall from Theorem 4 that any such locally maximal real order is of the form o f = o 0 + fo K , for some o 0 -ideal f. The structure of l-isogeny graphs as described by Theorem 1 can be used to describe graphs of ( , )-isogenies preserving the real multiplication, via Theorem 2. multiplication locally at . When is inert in K 0 , the connected component of A in the ( , )-isogeny graph (again, for maximal local real multiplication) is exactly the volcano V l (O) (see Notation 4.16). When ramifies as l 2 in K 0 , the connected component of A in the graph of l-isogenies is isomorphic to the graph V l (O), and the graph of ( , )-isogenies can be constructed from it as follows: on the same set of vertices, add an edge in the ( , )-graph between B and C for each path of length 2 between B and C in the l-volcano; each vertex B has now 2 + 2 + 1 outgoing edges, while there are only 2 + + 1 possible kernels of RM-preserving ( , )-isogenies (see Remark 7.9). This is because the edge corresponding to the canonical projection B → B/B[l] has been accounted for + 1 times. Remove of these copies, and the result is exactly the graph of ( , )-isogenies. 7.2.2. The split case. For simplicity, suppose again that the primitive quartic CMfield K is a different from Q(ζ 5 ). Let A be any principally polarizable abelian variety with order O, with maximal real multiplication locally at . The situation when splits as l 1 l 2 in K 0 (with l 1 and l 2 principal in O ∩ K 0 ) is a bit more delicate because the l 1 and l 2 -isogeny graphs need to be carefully pasted together. Let G l1,l2 (A ) be the connected component of A in the labelled isogeny graphs whose edges are l 1 -isogenies (labelled l 1 ) and l 2 -isogenies (labelled l 2 ). The graph of ( , )isogenies is the graph on the same set of vertices, such that the number of edges between two vertices B and C is exactly the number of paths of length 2 from B to C , whose first edge is labelled l 1 and second edge is labelled l 2 . It remains to fully understand the structure of the graph G l1,l2 (A ). Like for the cases where is inert or ramified in K 0 , we would like a complete characterization of the structure of the isogeny graph, i.e., a description that is sufficient to construct an explicit model of the abstract graph.
Without loss of generality, suppose O is locally maximal at . Then, the endomorphism ring of any variety in G l1,l2 (A ) is characterized by the conductor l m 1 l n 2 at , and we denote by O m,n the corresponding order. The graph G l1,l2 (A ) only depends on the order, so we also denote it G l1,l2 (O). For simplicity of exposition, let us assume that l 1 and l 2 are principal in O ∩ K 0 , so that the l i -isogeny graphs are volcanoes.
Definition 7.12 (cyclic homomorphism). Let X and Y be two graphs. A graph homomorphism ψ : X → Y is a cyclic homomorphism if each edge of X and Y can be directed in such a way that ψ becomes a homomorphism of directed graphs, and each undirected cycle in X becomes a directed cycle.
Lemma 7.13. Let X , Y and Y be connected, d-regular graphs, with d ≤ 2, such that Y and Y are isomorphic. If ϕ : Y → X and ϕ : Y → X are two cyclic homomorphisms, there is an isomorphism ψ : Y → Y such that ϕ = ϕ • ψ.
Proof. The statement is trivial if d is 0 or 1. Suppose d = 2, i.e., X , Y and Y are cycles. Let X be the cycle x 0 − x 1 − · · · − x m , with x m = x 0 . Similarly, Y is the cycles y 0 − y 1 − · · · − y n , with y n = y 0 . Without loss of generality, ϕ(y 0 ) = x 0 and ϕ(y 1 ) = x 1 . There is a direction on the edges of X and Y such that ϕ becomes a homomorphism of directed graphs, and Y becomes a directed cycle. Without loss of generality, the direction of Y is given by y i → y i+1 . Since y 0 → y 1 , we have ϕ(y 0 ) → ϕ(y 1 ), hence x 0 → x 1 . Since y 1 → y 2 , we must also have x 1 → ϕ(y 2 ), so ϕ(y 2 ) = x 0 and therefore ϕ(y 2 ) = x 2 , and as a consequence x 1 → x 2 . Repeating inductively, we obtain x i → x i+1 for all i ≤ m, and ϕ(y i ) = x i mod m for all i ≤ n. Similarly, any direction on X and Y such that Y is a directed cycle and ϕ becomes a homomorphism of directed graphs turns X into a directed cycle. Without loss of generality, it is exactly the directed cycle x 0 → x 1 → · · · → x m (if it is the other direction, simply invert the directions of Y ). There is then an enumeration {y i } n i=0 of Y such that ϕ (y i ) = x i , and y i → y i+1 for each i. The isomorphism ψ is then simply given by ψ(y i ) = y i .
Proposition 7.14. The graph G l1,l2 (O), with edges labelled by l 1 and l 2 , and bilevelled by (v l1 , v l2 ), is isomorphic to the unique (up to isomorphism) graph G with edges labelled by l 1 and l 2 , and bi-levelled by a pair (v 1 , v 2 ), satisfying: Let G and G be two graphs with these properties. For i = 1, 2, let pr i (respectively, pr i ) be the predecessor map induced by the volcano structure of the l i -edges on G (respectively, on G ). We will construct an isomorphism Ψ : G → G by starting with the isomorphism between G 0,0 and G 0,0 and extending it on the blocks G m,n and G m,n one at a time. Let n > 0, and suppose, by induction, that Ψ has been defined exactly on the blocks G i,j for i + j < n. Let us extend Ψ to the blocks G m,n−m for m = 0, . . . , n in order.
Both G 0,n and G 0,n have the same number of vertices, and their connected components are all isomorphic C 0,n , which are of degree d at most 2. We have the graph homomorphism pr 2 : G 0,n → G 0,n−1 . Let S be the set of connected components of G 0,n . Define the equivalence relation on S A ∼ B ⇐⇒ pr 2 (A) = pr 2 (B).
Similarly define the equivalence relation ∼ on the set S of connected components of G 0,n . Observe that each equivalence class for either ∼ or ∼ has same cardinality, so one can choose a bijection Θ : S → S such that for any A ∈ S, we have Ψ(pr 2 (A)) = pr 2 (Θ(A)). It is not hard to check that pr 2 and pr 2 are cyclic homomorphisms, using Property (iv). From Lemma 7.13, for each A ∈ S, there is a graph isomorphism ψ A : A → Θ(A) such that for any x ∈ A, pr 2 (ψ A (x)) = Ψ(pr 2 (x)). LetΨ be the map extending Ψ by sending any x ∈ G 0,n to ψ A (x), where A is the connected component of x in G 0,n . We need to show that it is a graph isomorphism. Write D and D the domain and codomain of Ψ. The mapΨ, restricted and corestricted to D and D is exactly Ψ so is an isomorphism. Also, the restriction and corestriction to G 0,n and G 0,n is an isomorphism, by construction. Only the edges between G 0,n and D (respectively G 0,n and D ) might cause trouble. The only edges between G 0,n and D are actually between G 0,n and G 0,n−1 , and are of the form (x, pr 2 (x)). But Ψ was precisely constructed so that Ψ(pr 2 (x)) = pr 2 (Ψ(x)), soΨ is indeed an isomorphism. Now, let 0 < m < n and suppose that Ψ has been extended to the components G i,n−i for each i < m. Let us extend it to G m,n−m . Since m > 0 and n − m > 0, the graph C m,n−m is a single point, with no edge. Let us now prove that for any pair (x 1 , x 2 ), where x 1 is a vertex in G m−1,n−m and x 2 in G m,n−m−1 such that pr 2 (x 1 ) = pr 1 (x 2 ), there is a unique vertex x in G m,n−m such that (x 1 , x 2 ) = (pr 1 (x), pr 2 (x)). First, we show that for any vertex x ∈ G m,n−m , we have pr −1 1 (pr 1 (x)) ∩ pr −1 2 (pr 2 (x)) = {x}.
It is then easy to check that the extension of Ψ induced by ψ is an isomorphism. The final step, extending on G n,0 , is similar to the case of G 0,n . This concludes the induction, and proves that G and G are isomorphic.
8. Applications to "going up" algorithms 8.1. Largest reachable orders. The results from Section 6.3 and Section 7.2 on the structure of the graph of ( , )-isogenies allow us to determine exactly when there exists a sequence of ( , )-isogenies leading to a surface with maximal local order at . When there is no such path, one can still determine the largest reachable orders.  Theorem 6. For any A , there exists a sequence of ( , )-isogenies starting from A and ending at a variety with maximal local order, except in the following two cases: (i) A has parity 1, splits in K 0 as l 1 l 2 , and both l 1 and l 2 are inert in K, in which case the largest reachable local orders are o 0 + l 1 o K and o 0 + l 2 o K ; (ii) A has parity 1, ramifies in K 0 as l 2 , and l is inert in K, in which case the largest reachable local order is o 0 + lo K .
Proof. First, from Propositon 6.12, there is a sequence of ( , )-isogenies starting from A and ending at a variety with maximal local order if and only if there is such a path that starts by a sequence of isogenies up to B = pr(pr(. . . pr(A ) . . . )), and then only consists of ( , )-isogenies preserving the maximality of the local real order. It is therefore sufficient to look at sequences of RM-preserving ( , )-isogenies from B, which has by construction the same parity s as A . From Proposition 8.1, there is a path from B to a surface C with local order o(C ) = o l s where l is a prime ideal of o 0 above , and s is the parity of A . We are done if the parity is 0. Suppose the parity is 1. From Propositions 4.7 and Theorem 2, one can see that there exists a sequence of RM-preserving ( , )-isogeny from C which changes the parity to 0 if and only if ramifies in K 0 as l 2 and l is not inert in K, or splits in K 0 as l 1 l 2 and either l 1 or l 2 is not inert in K. This concludes the proof. 8.2. A "going up" algorithm. In many applications (in particular, the CM method in genus 2 based on the CRT) it is useful to find a chain of isogenies to a principally polarized abelian surface with maximal endomorphism ring starting from any curve whose Jacobian is in the given isogeny class. Lauter and Robert [LR12a,§5] propose a probabilistic algorithm to construct a principally polarized abelian variety whose endomorphism ring is maximal. That algorithm is heuristic, and the probability of failure is difficult to analyze. We now apply our structural results from Subsection 7.2 to some of their ideas to give a provable algorithm. 8.2.1. Prior work of Lauter-Robert. Given a prime for which we would like to find an isogenous abelian surface over F q with maximal local endomorphism ring at , suppose that α = e α for some α ∈ O K and some e > 0. To find a surface A /F q for which α/ e ∈ End(A ), Lauter and Robert [LR12a, §5] use ( , )-isogenies and a test for whether α/ e ∈ End(A ). In fact, α/ e ∈ End(A ) is equivalent to testing that α(A [ e ]) = 0, i.e., α is trivial on the e -torsion of A . To guarantee that, one defines an "obstruction" N e = #α(A [ e ]) that measures the failure of α/ e to be an endomorphism of A . To construct an abelian surface that contains the element α/ e as endomorphism, one uses ( , )-isogenies iteratively in order to decrease the associated obstruction N e (this is in essence the idea of [LR12a, Alg.21]).
To reach an abelian surface with maximal local endomorphism ring at , Lauter and Robert look at the structure of End(A ) ⊗ Z Z as a Z -module and define an obstruction via a particular choice of a Z -basis [LR12a, Alg.23].
8.2.2. Refined obstructions and provable algorithm. Theorem 6 above gives a provable "going up" algorithm that runs in three main steps: 1) it uses ( , )-isogenies to reach a surface with maximal local real endomorphism ring at ; 2) it reaches the largest possible order via ( , )-isogenies as in Theorem 6; 3) if needed, it makes a last step to reach maximal local endomorphism ring via a cyclic isogeny. To implement 1) and 2), one uses refined obstructions, which we now describe in detail.
8.2.3. "Going up" to maximal real multiplication. Considering the local orders o 0 = O K0 ⊗ Z Z and Z [π + π † ], choose a Z -basis {1, β/ e } for o 0 such that β ∈ Z[π, π † ] and we apply a "real-multiplication" modification of [LR12a, Alg.21] to β. Thus, given an abelian surface A with endomorphism algebra isomorphic to K, define the obstruction for A to have maximal real multiplication at as To compute these obstructions, we compute γ on the l-power torsion of A . The idea is similar to Algorithm 1, except that in the split case, one must test the obstructions N l (A , ) for both prime ideals l ⊂ O K0 above at the same time. We now show that one can reach the maximal possible "reachable" (in the sense of Theorem 6) local order at starting from A and using only ( , )-isogenies. When is either inert or ramified in K 0 , there is only one obstruction N l (A ), and one can ensure that it decreases at each step via the obvious modification of Algorithm 1.
Suppose now that O K0 = l 1 l 2 is split. Let f = l i1 1 l i2 2 be the conductor of A and suppose, without loss of generality, that i 1 ≥ i 2 . To first ensure that one can reach an abelian surface A for which 0 ≤ i 1 − i 2 ≤ 1, we relate the conductor f to the two obstructions at l 1 and l 2 . and v l2 (f) = N l2 (A ).
Proof. The proof is the same as the one of Lemma 8.4.
Using the lemma, and assuming N l1 (A ) − N l2 (A ) > 1, one repeatedly looks for an ( , )-isogeny at each step that will decrease N l1 (A ) by 1 and increase N l2 (A ) by 1. Such an isogeny exists by Proposition 8.1(iii). One repeats this process until If at this stage N l2 (A ) > 0, this means that | f and hence, by Proposition 8.1(i), there exists a unique ( , )-isogeny decreasing both obstructions. One searches for that ( , )-isogeny by testing whether the two obstructions decrease simultaneously, and repeats until N l2 (A ) = 0.
If N l1 (A ) = 0, then the maximal local order at has been reached. If N l1 (A ) = 1 then Proposition 8.1(iii) implies that, if l 2 is not inert in K, then there exists an ( , )-isogeny that decreases N l1 (A ) to 0 and keeps N l2 (A ) at zero. 8.2.5. Final step via a cyclic isogeny. In the exceptional cases of Theorem 6, it may happen that one needs to do an extra step via a cyclic isogeny to reach maximal local endomorphism ring at . Whenever this cyclic l-isogeny is computable via the algorithm of [DJR16], one can always reach maximal local endomorphism ring at . But l-isogenies are computable if and only if l is trivial in the narrow class group of K 0 . We thus distinguish the following two cases: (1) If l-isogenies are computable by [DJR16] then one can always reach maximal local endomorphism ring at .
(2) If l-isogenies are not computable by [DJR16], one can only use ( , )-isogenies, so Theorem 6 tells us what the largest order that we can reach is.