Periods of modular GL2-type abelian varieties and p-adic integration

Let F be a number field and N an integral ideal in its ring of integers. Let f be a modular newform over F of level Gamma0(N) with rational Fourier coefficients. Under certain additional conditions, Guitart-Masdeu-Sengun constructed a p-adic lattice which is conjectured to be the Tate lattice of an elliptic curve E whose L-function equals that of f. The aim of this note is to generalize this construction when the Hecke eigenvalues of f generate a number field of degree d>= 1, in which case the geometric object associated to f is expected to be, in general, an abelian variety A of dimension d. We also provide numerical evidence supporting the conjectural construction in the case of abelian surfaces.


Introduction
Let F be a number field and N ⊂ O F an integral ideal. Let f be a modular newform over F of level 0 (N) with rational Fourier coefficients. Under certain additional conditions, [Guitart et al. 16] constructed a p-adic lattice which is conjectured to be the Tate lattice of an elliptic curve E f whose L-function equals that of f . The aim of this note is to generalize this construction when the Hecke eigenvalues of f generate a number field of degree d ≥ 1, in which case the geometric object associated with f is expected to be, in general, an abelian variety A f of dimension d. That is, we attach to f a lattice that conjecturally uniformizes A f over C p . In the particular case of abelian surfaces, we provide numerical verifications of the conjecture, as well as some further arithmetic applications.
To put this construction into perspective, let us first briefly recall the situation for classical modular forms over Q. Let f = n≥1 a n q n momentarily denote a weight two newform for the congruence subgroup 0 (N ) ⊂ SL 2 (Z), and let K f = Q({a n } n≥1 ) be the field generated by the Hecke eigenvalues of f . A construction of Eichler and Shimura (cf. [Shimura 71, Section 7.5]) associates with f an abelian variety A f /Q of dimension d = [K f : Q] and conductor N d that satisfies the equality of L-functions (1-1) where σ i run over the embeddings of K f into Q, and σ f = n≥1 σ (a n )q n . Moreover, the algebra Q ⊗ End(A f ) of endomorphisms defined over Q is isomorphic to K f .
Recall that in this setting 0 (N ) acts on the complex upper half plane H, and the compactification of the quotient space 0 (N )\H are the C-points of the modular curve X 0 (N )/Q. The Eichler-Shimura construction realizes A f quite explicitly as a simple factor of the Jacobian of X 0 (N ), and in a manner that is amenable for numerical calculations. In particular, the lattice uniformizing A f ⊗ C can be given as where ω i denotes the differential form corresponding to σ i f (z)dz. This lattice can be efficiently computed by means of the modular symbols method [Cremona 97], [Stein 07] and, in the case of dimension one, namely when A f is an elliptic curve, is the base for producing exhaustive tables of elliptic curves up to a certain conductor (currently, the Cremona database ( [Cremona 16]) contains all elliptic curves up to conductor 380,000). There is also extensive literature on higher dimensional computations, specially in dimension 2 (see, e.g., [ . When A f admits a principal polarization, some of these works also provide methods to compute equations of genus 2 curves whose Jacobian is isogenous to A f . When f is a modular form over a number field F other than Q, an abelian variety A f satisfying (1-1) is also expected to exist in general 1 . This is only known in some cases for totally real fields F, but if F has some complex place the conjecture is completely open. We state this conjecture more precisely in Section 2, but in order to describe the contents of the article let us give a brief overview.
We will only treat the case where F has narrow class number 1, so we make this assumption from now on. In this setting, the newform f over F can be identified with a harmonic differential form on the orbifold 0 (N)\(H r × H s 3 ), where r (resp. s) is the number of real (resp. complex) places of F and H 3 = C × R >0 denotes the hyperbolic upper half space. The only situation where the Eichler-Shimura construction over Q generalizes satisfactorily is when F is totally real and f admits a Jacquet-Langlands transfer to a modular form f B for some arithmetic subgroup B 0 (m) ⊂ B, with B/F a quaternion algebra that ramifies at all infinite places but one. The form f B corresponds in this case to a holomorphic differential form on B 0 (m)\H, which are the C-points of a Shimura curve X B defined over F. Then A f , as a variety over F, can be constructed as a quotient of the Jacobian of X B . Over C, one can describe its period lattice as in (1-2); that is, as periods of the differentials attached to f B and its conjugates.
When F is totally real and f does not admit a suitable Jacquet-Langlands lift (the simplest case where this happens is when [F : Q] = 2 and N = O F ) no construction of A f is known. However, a conjecture of Oda [Oda 82] describes the complex period lattice of A f in terms of certain periods of the Hilbert modular form f , and is the basis of the algorithm introduced in [Dembélé 08] to compute equations of A f in the one-dimensional case. More recently, abelian surfaces of trivial conductor over real quadratic fields attached to Hilbert modular forms have been computed using this approach in [Dembélé and Kumar 16], thus providing numerical evidence also for Oda's conjecture in higher dimension.
The situation seems to be even more mysterious when F is not totally real. Indeed, in this case there is no apparent connection to algebraic geometry because 0 (N)\(H r × H s 3 ) has no complex structure if s > 0. Since no algebraic variety seems to present itself as a natural candidate to give rise to A f , no geometric construction of A f is known in this context. In fact, to the best of our knowledge, such a construction has not even been conjectured.
In the one-dimensional case, there is a huge amount of experimental evidence supporting the existence of elliptic curves attached to modular forms over non totally real fields (see [Grunewald et al. 78], [Cremona 84], [ [Guitart et al. 15] contains two conjectural analytic constructions of the period lattice of the elliptic curve A f . The first construction concerns the complex lattice of A f and is a generalization of Oda's conjecture to number fields having at least one real place, in the spirit of the work of Darmon-Logan [Darmon and Logan 03] and Gartner [Gärtner 12]. The second, which builds on constructions of Darmon [Darmon 01] and Greenberg [Greenberg 09] in the context of Stark-Heegner points, is for the p-adic Tate lattice of A f . Numerical evidence for the p-adic construction as well as an algorithm to compute the equation of the elliptic curve A f from its p-adic periods were presented in [Guitart et al. 16]. The aim of the present note is to generalize the construction of the p-adic lattice of A f to the case where d = dim A f > 1. In the case of F = Q this generalization was obtained by Dasgupta in [Dasgupta 05] and by Longo-Rotger-Vigni in [Longo et al. 12] (see also the work [Rotger and Adamo Seveso 12] for a generalization to modular forms of higher weight). The construction that we present is valid for number fields of arbitrary degree and signature, under the assumption that there exists a prime p dividing exactly the level of the modular form f . We show that in that case the abelian variety A f , if it exists, admits a p-adic uniformization: there exists a lat- where p = p ∩ Z and C p is the completion of an algebraic closure of Q p . The main construction of the present article associates with the modular form f a certain p-adic lattice f defined by means of a p-adic integration pairing, which can be regarded as a p-adic analog of (1-2). We then conjecture that (C × p ) d / f and (C × p ) d / f are isogenous abelian varieties, thus providing a conjectural p-adic analytic construction of the abelian variety A f satisfying (1-1).
An alternative way of phrasing the conjecture above is as asserting the equality of the L-invariant of f and the L-invariant of A f . Indeed, equality of the L-invariants of two p-adic lattices of rank d with an action of a number field of degree d is equivalent to the corresponding rigid analytic tori being isogenous. The L-invariant of f can then be regarded as an automorphic Darmon-style L-invariant. The theme of relating automorphic L-invariants to other L-invariants, such as the geometric one, is also relevant for its connections with p-adic L-functions. The reader can consult [ The paper is organized as follows. Section 2 contains some background material on the relation between modular forms and certain cohomology classes, as well as to the abelian varieties conjecturally attached to them. We also record some results on p-adic uniformization and p-adic lattices. We describe the construction of the lattice that conjecturally uniformizes A f in Section 3, which in fact is a natural generalization of the elliptic curve case of [Darmon 01], [Greenberg 09],and [Guitart et al. 16]. One of the main points of the present note is to provide numerical evidence supporting the conjecture in the case where dim A f = 2, and this is the main content of Section 4: in Section 4.1 we discuss the algorithms that we used for the calculations (which work under the additional assumption that the number field has at most one complex place); in Section 4.2 we recall the formulas of Teitelbaum [Teitelbaum 88] to compute p-adic lattices of genus two curves; and in Section 4.3 we report on the explicit computation of the p-adic lattice f of a modular form over a number field F of signature (1, 1) whose Hecke eigenvalues generate a quadratic number field. We check (up to the working precision of 50 p-adic digits) that this lattice is isogenous with the p-adic lattice of a genus two curve whose Jacobian is A f . Finally, in Sections 5 and 6, we give two additional applications of our construction. The first one is to computing equations of genus two curves whose Jacobian is the variety A f attached to f , by means of the explicit uniformization formulas for genus two curves of [Teitelbaum 88]. The second is to the (conjectural) computation of the p-adic L-invariant of A f .

Notation
If F is a number field we denote by O F its ring of integers, and we say that F is of signature (r, s) if it has r real places and s complex places. For an abelian variety A defined over F, we denote by End(A) the endomorphisms of A defined over F. For an extension L/F, A L denotes the base change A × Spec K Spec L; consequently End(A L ) stands for the endomorphisms of A defined over L.

Modular forms, cohomology classes, and p-adic uniformization
We begin this section by formulating a precise version of the conjecture that associates an abelian variety with any modular form over a number field, mainly following the presentation of [Taylor 95]. We describe it not only for modular forms over GL 2 , but over arbitrary quaternion algebras over F. By the Jacquet-Langlands correspondence, the systems of Hecke eigenvalues on quaternion algebras already arise on the split algebra GL 2 , so one does not gain much from a theoretical point of view.
However, as we will see in Section 4, for computational purposes it is sometimes helpful to transfer the problem to a non-split quaternion algebra. The complex upper half plane H is endowed with an action of PSL 2 (R) by fractional linear transformations. Similarly, the hyperbolic upper half space H 3 is acted on by PSL 2 (C) as follows: if we let Q = C ⊕ jC denote Hamilton's quaternions and we identify H 3 with {x + jy ∈ Q : y ∈ R >0 }, then a matrix acts on z ∈ H 3 by the formula In the construction of Section 3 we consider modular forms over F with the property that there is a prime dividing N exactly, so we introduce this assumption in the levels of the modular forms considered in this section. In fact, let us assume from now on that N admits a factorization into coprime ideals of the form N = pdm, with p prime and d square-free.
The condition that there exists a prime p dividing N exactly is inherent to this kind of construction, and it was already present in the works of Darmon and Greenberg [Darmon 01] [Greenberg 09]. The condition that d is square-free arises because we want to translate the problem to a quaternion algebra. Let B/F be a quaternion algebra of discriminant d and which is split at n ≤ r real places of F. We remark that d is allowed to be trivial. If in addition n = r, then B is simply the matrix algebra M 2 (F ). Let R 0 (pm) ⊂ R 0 (m) be Eichler orders in B of levels pm and m, respectively. Let R 0 (pm) × 1 and R 0 (m) × 1 denote their group of norm 1 units and put 0 (pm) = R 0 (pm) × 1 /{±1} and 0 (m) = R 0 (m) × 1 /{±1}. By fixing isomorphisms B ⊗ σ R M 2 (R) for all real places σ of F at which B is split and B ⊗ σ C M 2 (C) for all complex places of F, the group 0 (pm) acts on H n × H s 3 . Results of Harder [Harder 87] allow to interpret modular forms for 0 (pm) either as harmonic differential forms on the quotient 0 (pm)\(H n × H s 3 ) or, equivalently, as cohomology classes in the Betti cohomology group H n+s ( 0 (pm)\(H n × H s 3 ), C). We will take from now on the latter point of view.
For the sake of simplicity, we shall assume that 0 (pm) is torsion free. This implies, in particular, that for any abelian group A we have canonical isomorphisms where the group on the left is Betti cohomology and the others represent group cohomology.
For any B × /F × -module V and any ideal n ⊂ O F , the cohomology groups H i ( 0 (n), V ) are endowed with the action of the Hecke operators defined by means of the formalism of double coset operators (see, for example, [Ash and Stevens 86, Section 1.1]): for every prime l of F not dividing d there is an endomorphism In addition, for every infinite place v of F splitting in B there is an involution T v of the same space. All these operators commute. We denote by T the Hecke algebra, by which we mean the free polynomial ring over Z generated {T l } l d and {T v }, regarded as formal variables. The Hecke algebra T acts on the cohomology groups H i ( 0 (n), V ) by letting each formal variable act as the corresponding Hecke operator.
We will say that a cohomology class f ∈ H n+s ( 0 (pm), C) is an eigenclass if for all primes l d we have that In this case, the field K f = Q({a l ( f )} l d ) is a number field and, since we are considering subgroups of the form 0 , it is in fact totally real.
We will say that f is trivial if a l ( f ) equals |l| + 1 for all l pmd (here |l| stands for the norm of l). Finally, if there does not exist any g ∈ H n+s ( 0 (m ), C) with m | pm and T l g = a l ( f )g for all but finitely many primes l, then we say that f is new. The following conjecture attaches an abelian variety to any nontrivial new eigenclass; it was formulated essentially in this form in [Taylor 95], the only difference being that below we make explicit the expected relation between the level of the newform and the conductor of the abelian variety.
Conjecture 2.1. Let f ∈ H n+s ( 0 (pm), C) be a nontrivial new eigenclass of level N = pmd. Then one of the following holds: (1) There exists a simple abelian variety (2) There exists a simple abelian variety A f /F of dimension 2d and conductor N 2d , and a quaternion division algebra D over K f such that Q ⊗ End(A f ) contains D and Moreover, A f does not have complex multiplication (CM) defined over F, and if F has at least one real embedding then (2) does not occur.
We note that in [Taylor 95] the conjecture is stated for modular forms of arbitrary level, not necessarily of the form N = pmd with p || N. Our running assumption that there exists a prime dividing the level exactly is necessary for our construction, but not for the (conjectural) existence of A f . However, this condition is also useful in addressing an issue concerning the case in which A f belongs to the second case in Conjecture 2.1. The point is that the construction of Section 3 associates with the eigenclass f a p-adic lattice in (C × p ) d , which is conjectured to be the lattice of A f . But a lattice in (C × p ) d can only correspond to an abelian variety of dimension d (see Section 2.1). Therefore, if for a given f the variety A f turned out to be of dimension 2d it would not be clear a priori what our construction would be giving, even conjecturally. This is the question that we shall address now.
Suppose that A f is as in case (2) of Conjecture 2.1. In particular, dim A f = 2d and there is an injection of the quaternion division algebra D into End(A f ) ⊗ Q. Observe that, in fact, this must be an isomorphism D which has a dimension 4d over Q; this implies that [D : Q] ≤ 4d and since [D : Q] = 4d we have D = D . Therefore, since D is the endomorphism algebra of a simple abelian variety, it belongs to either type II or type III in Albert's classification (see [Mumford 08, Section 21, Theorem 2]). In particular, D is either totally definite or totally indefinite.
The following proposition shows that the case where D is totally indefinite cannot occur, since we are assuming that the conductor of A f has valuation 2d at p. Proof. Let be a prime different from the residue characteristic of p. Let V = T ⊗ Q be the rational -adic Tate module of A, which is of rank 4d over Q . Let M be a maximal subfield of D; it is a quadratic extension of K and therefore [M : Q] = 2d. Since M is contained in End(A) ⊗ Q, we have that V is an M ⊗ Q module of rank 2 and V ⊗ Q Q breaks as the direct sum of 2d representations of dimension 2, each of them conjugate to a given representation, say ρ : Gal(F/F ) → Aut(V ). The exponent at p of the conductor of ρ is equal to codim(V I p ) + δ p , where I p is the inertia at p and δ p is the Swan exponent. Therefore, v p (L) = 2d codim V I p + δ p and we see that v p (L) is a multiple of 2d. We are assuming that p divides L and therefore that A has bad reduction at p. By the criterion of Néron-Ogg-Shaffarevic this implies that codim(V I p ) ≥ 1 and therefore v p (L) ≥ 2d. In order to finish the proof, it is then enough to rule out the possibility that v p (L) = 2d; that is to say, we need to rule out the possibility that codim(V I p ) = 1 and δ p = 0.
Aiming for contradiction, assume that codim(V I p ) = 1 and δ p = 0. Let A be the connected component of the special fiber of the Néron model of A over O F p . It sits in an exact sequence where T is a torus, U is a unipotent group, and B is an abelian variety over the finite field We claim that A has potentially good reduction; that is to say, t = 0 (cf. [Ribet 81, Theorem 3]). Indeed, if t > 0 then by functoriality D acts on T , and we get an inclusion and therefore t ≥ 4d. But t ≤ 2d and this forces t = 0, as we claimed. Therefore (2-3) can be written as with u + dim B = 2d. Since δ p = 0 and A has potentially good reduction, we have that v p (L) = 2u (cf. [Serre and Tate 68] Theorem 4 and the Remarks in page 500).
Since we are assuming that v p (L) = 2d, this implies that dim B = d.
Let M be a maximal subfield of D, which we can choose to be totally real because D is totally indefinite. By functo- where this is stated for simple varieties, from which the case of isotypic varieties follows directly. Therefore, since dim is the dimension over Q of the maximal subfields of D . Since we have an inclusion D → D , the field M is also a subfield of D , hence M is a maximal subfield 2 of D because [M : Q] = 2d. In particular L is contained in M. Since M is totally real, this implies that L is totally real as well and that D is split at the real places of L (because a maximal subfield of a simple algebra is a splitting field). But this contradicts [Tate 66, Theorem 2 (d)], which asserts that the endomorphism algebra of an isotypic variety over a finite field does not split at any real place of the center.
The same argument does not allow us to rule out the case where D is totally definite. However, in this case f is necessarily a modular form with complex multiplication. More precisely, the L-function of A f is a product of L-functions of Hecke characters of F.

Proposition 2.3. Let A/F be an abelian variety of dimension 2d. Suppose that D = Q ⊗ End(A) is totally definite quaternion division algebra over a totally real number field K and [K : Q] = d. Then there exist Hecke characters
Proof. Since D is totally definite and 2[K : Q] = dim A, a theorem of Shimura [Shimura 63, Proposition 15] ensures that A is Q-isogenous to the square of a CM abelian variety B of dimension d. Now the idea is to use the wellknown relation between L-functions of CM abelian varieties and Hecke characters. But we have to be careful in this case, because the complex multiplication of A is not defined over K. Next, we will show that A satisfies the hypothesis of [Milne 72, Section 3], and then Theorem 4 of loc. cit. implies the conclusion of the proposition.
To begin with, we remark that B might not be simple. But it is easy to show that A Q is isotypical. Indeed, if A Q ∼ B 1 × B 2 where B 1 and B 2 are not isogenous, then D would act on each B i ; in particular it would act on H 1 (B i , Q) which have dimension <4d, and since [D : Q] = 4d this is not possible. Therefore, we see that necessarily A Q ∼ C r for some simple CM variety C.
We choose also a maximal subfield M ⊂ D with the property that M does not contain N. This is possible because the intersection of two maximal subfields of D is K, and K does not contain N because N is a CM field and K is totally real. We identify M with a subfield of Q ⊗ End necessarily [E : Q] > 2d, but on the other hand [E : Q] ≤ 2 dim A = 4d. Therefore, we have constructed a field E such that A L has complex multiplication by E defined over L. Moreover, E is stable under the action of Gal(L/F ). This is because N is the center of End(A Q ) and is stable, and M consists of endomorphisms defined over K and it is also stable. Therefore, we are in the assumptions of [Milne 72, Theorem 4] (they are stated in the last paragraph of p. 186), and the proposition follows from this theorem.
We assume for the rest of the article that f does not have CM. In view of Propositions 2.3 and 2.2, this implies that A f has dimension d, rather than 2d.
The next step is to show that A f has purely multiplicative reduction at p (this implies that A f admits a p-adic uniformization, see Section 2.1). As before let A be the connected component of the special fiber of the Néron model of A f over O F p , which sits in an exact sequence where T is a torus, say of dimension t, U is a unipotent group, and B is an abelian variety over the finite field Recall our running assumption that p||N, which implies that the exponent of p in the conductor of A f is d. It is a well-known result that if an elliptic curve has exponent at p of the conductor equal to 1, it has multiplicative reduction at p. The following is a generalization of this statement to dimension d > 1, under the assumption that there is a totally real number field of degree d acting on the abelian variety.
Proposition 2.4. Let A/F be an abelian variety of dimension d, equipped with an embedding K → End(A) ⊗ Q of a totally real number field K of degree d over Q. Suppose that p is a prime such that the exponent of the conductor of A at p is d. Then A has purely multiplicative reduction at p.

Proof.
First of all we claim that if A does not have potentially good reduction at p, then it has purely multiplicative reduction. Indeed, if A does not have potentially good reduction then t > 0. By functoriality K acts on the torus T , and we get an inclusion This implies that d ≤ t, and since we already know that t ≤ d this proves the claim.
Therefore, in order to finish the proof it is enough to show that A does not have potentially good reduction. Let be a prime different from p ∩ Z and consider the Tate ⊗Q is the direct sum of d representations of dimension 2, all conjugate to a given one, say to ρ : Gal(F/F ) → V . Since they are all conjugate, each of them has conductor exponent at p exactly 1. The exponent of the conductor of ρ at p is codim(V I p ) + δ p , where I p is the inertia subgroup of any extension of p toK and δ p is the Swan part of the exponent. By the criterion of Néron-Ogg-Shafarevich, since A has bad reduction at p necessarily codim(V I p ) ≥ 1. This implies that δ p = 0 and for some character ψ. Since K is totally real, by [Ribet 76, Lemma 4.5.1] the determinant of V is the (unramified) cyclotomic character. Therefore ψ = 1 and ρ |I p = 1 0 1 . In particular, the image of I p under ρ is infinite. By [Serre and Tate 68, Theorem 2] this implies that A does not have potentially good reduction at p.

Uniformization and p-adic lattices
We next recall the basic facts that we use on p-adic uniformization of abelian varieties. Let A/F be an abelian variety of dimension d with purely multiplicative reduction at p. Then A admits a p-adic uniformization: there exist free abelian groups X, Y , and a pairing such that the composition ord p a i : X ⊗ Q × Y ⊗ Q → Q is a perfect pairing and induces an isomorphism We will be interested in how the lattices of isogenous abelian varieties are related. Suppose that A and A are abelian varieties over F p , uniformized by lattices and the matrices whose columns are the vectors of these bases. Following a notation introduced in Similarly, for C = (c ij ) ∈ M d (Z) we denote by C W the matrix with entries Alternatively, these matrices can also be characterized as follows. Let λ : F × p → R be any group homomorphism of F × p to the additive group of a ring R, and for a matrix U = (u ij ) denote by λ(U ) the matrix with entries λ(u ij ); then The following result of Kadziela characterizes isogenies of abelian varieties over F p in terms of their uniformizing lattices.

Integration pairing and construction of the lattice
Let f ∈ H n+s ( 0 (pm), C) be a new eigenclass and let be the number field, say of degree d, generated by the eigenvalues of f . We suppose that f is also an eigenclass with eigenvalue +1 for all the involutions at infinity 3 ; that is, Then f gives rise to a character of the Hecke algebra via the formulas λ(T l ) = a l ( f ) for all l d and λ(T v ) = 1 for the infinite places v. For any embedding σ : K f → C there is a conjugate newform σ f , characterized by the fact that its character, that we denote by λ σ , is given by λ σ (T l ) = σ (λ(T l )) and λ σ (T v ) = 1. We denote by the T-irreducible subspace such that f belongs to H n+s ( 0 (pm), Q) f ⊗ C. Since f is a newform, by multiplicity one this space decomposes over C as the sum of d one-dimensional T-eigenspaces: where for any C ⊗ T-module M and any character α : Define also  We remark that the construction of the lattice works for any choice of signs at infinity, and we expect Conjecture . to hold for any choice. However, our numerical experiments have been done for eigenclasses with eigenvalues +1 at infinity, so we prefer to consider this case.
The Hecke algebra also acts on the homology groups, with the same systems of Hecke eigenvalues. Similarly as before, we define H n+s ( 0 (pm), Q) f to be the Hecke constituent such that the system of Hecke eigenvalues Note that both H n+s ( 0 (pm), Z) f and H n+s ( 0 (pm), Z) f are free abelian groups of rank d.
In this section we recall and slightly generalize the constructions of [Guitart et al. 16], which can be formulated as the existence of a multiplicative integration pairing where F p 2 stands for the quadratic unramified extension of F p . We then conjecture that this pairing can be identified with the uniformization pairing (2-6) for A f . The construction, which follows very closely the ideas introduced in [Greenberg 09], is based on passing to the cohomology of a certain S-arithmetic group related to 0 (m) and 0 (pm).
Let O F,{p} denote the elements of F with non-negative valuation at the primes different from p, and set As usual, R × 1 stands for the group of norm 1 elements of R, and we denote by the image of R × 1 in B × /F × . Recall that B splits at p. By fixing an isomorphism B ⊗ F F p M 2 (F p ) we can regard as a subgroup of PGL 2 (F p ). Similarly as before, for any PGL 2 (F p )-module V the (co)homology groups H i ( , V ) and H i ( , V ) are equipped with the action of Hecke operators T l for l pd and involutions at infinity T v for the infinite places of F that split in B.
Let A be an abelian group. An A-valued measure on if U 1 and U 2 are disjoint. We denote by Meas 0 (P 1 (F p ), A) the set of such measures which in addition satisfy that ω(P 1 (F p )) = 0. There is a natural action of PGL 2 (F p ) on measures, and therefore also of B × /F × , by means of (gω)(U ) = ω(g −1 U ). In particular, there are Hecke operators acting on the cohomology groups H i ( , Meas 0 (P 1 (F p ), Z)).
Let H p = F p 2 \ F p denote the F p 2 -rational points of the p-adic upper half plane. Given ω ∈ Meas 0 (P 1 (F p ), Z) and x, y ∈ H p , the multiplicative integral y x × ω is defined as where U runs over the coverings of P 1 (F p ) by opencompacts with diameter tending to zero, and t U is any sample point in U . This can be seen as a pairing which induces a corresponding pairing in (co)homology, via cap product: Finally, we proceed to explain how this gives rise to the pairing (3-9).
The first step is to show that there is a subspace of H n+s ( , Meas 0 (P 1 (F p ), Q)) which is isomorphic to H n+s ( 0 (pm), Q) f as a Hecke module. We will make use of the following notation: let denote the annihilator of T acting on the irreducible space H n+s ( 0 (pm), Q) f ; then, for any T-module M, we define Observe that the notation is consistent with the one introduced before, in the sense that H n+s ( 0 (pm), Q) f , as introduced in (3-8), indeed coincides with ∩ T ∈I f ker(T ). Here HC(Q) stands for the module of Q-valued harmonic cocycles on the Bruhat-Tits tree of PGL 2 (F p ), which is isomorphic to Meas 0 (P 1 (F p ), Q). Moreover, there is a short exact sequence Applying the functor Hom T (T/I f , ·) to the above exact sequence, we obtain coker α). To finish the proof, it remains to show that both (coker α) f and Ext 1 T (T/I f , coker α) are zero. Since cuspidal cohomology vanishes in degree < n + s, the Hecke operators T l act on H n+s−1 ( 0 (pm), Q) as multiplication by |l| + 1. By construction, coker α is a quotient of H n+s−1 ( 0 (pm), Q) 2 ; this implies that T l acts on coker α as multiplication by |l| + 1. Since f is cuspidal, we see that (coker α) f = 0.
Finally, we show that Ext 1 is a T-module extension of T/I f by coker α, and we will see that it splits. Let s be a section of π as Q-vector spaces. This might not be a T-module homomorphism, but it can be modified to obtain a section of T-modules: observe that T l − |l| − 1 acts on T/I f K f as multiplication by d l := a l ( f ) − |l| − 1, and since f is cuspidal d l = 0; then we define s : T/I f → E as It is easy to check that s is indeed a section of T-modules, and therefore (3-10) splits.
The group is isomorphic to the amalgamated product of two copies of 0 (m) over 0 (pm) (see, e.g., [Serre 80]). The Mayer-Vietoris sequence in this setting [Brown 82, Chapter II, Section 7] is then Proof. We claim that H n+s ( 0 (pm), Q) f lies in the kernel of ∂. Indeed, it is enough to show this for H n+s ( 0 (pm)) f ⊗ C; but this has a basis of eigenclasses which are new, and the fact that they are new at p is equivalent to being in the kernel of ∂. Moreover, η is injective because H n+s+1 ( 0 (m), Q) f = 0 (since f is a newform of level pm, its system of eigenvalues cannot be found in lower level). Now consider the exact sequence of B × /F × modules: It induces a long exact sequence in group homology; we are interested in the connecting homomorphism Finally, we define the pairing as follows: given ω ∈ H n+s ( 0 (pm), Z) f and γ ∈ H n+s ( 0 (pm), Z) f , then We conjecture that the pairing (3-4) uniformizes A f /F p up to isogeny. To make this statement more explicit, let γ 1 , . . . .γ d be a basis of H n+s+1 ( 0 (pm), Z) f and In the next section we provide some numerical evidence for the conjecture in the case d = 2 and F a cubic field of signature (1, 1). is non-degenerate, which implies that f is a lattice. The non-degeneracy of (3-6) is a consequence, on the one hand, of the naturality of the several (co)homological maps involved in the definition of the pairing and, crucially, of the combinatorial description of ord p a ·, · f as stated, for instance, in [Greenberg 09, Lemma 28]. If we denote by η * : H n+s ( 0 (pn), Q) f H n+s+1 ( , Q) f the map arising from η via the universal coefficients theorem, then the penultimate display in [Greenberg 09, p. 573], shows that ord p η * (−), η(−) f coincides with the natural pairing

The case of abelian surfaces: Calculations and numerical evidence
In this section we present some computational evidence for Conjecture 3.3 in the case where A f is of dimension 2. We report on the numerical calculation of the lattice f for a concrete modular form f , which turns out to coincide (up to our working precision of 50 p-adic digits) with a lattice which is isogenous to the lattice of A f . In Section 4.1, we briefly describe the algorithms that we have used to compute the period lattice f , which are actually an adaptation of the ones described in [Guitart et al. 16] for the case of elliptic curves. In Section 4.2 we review Teitelbaum's explicit formulas to compute the p-adic lattice of the Jacobian of a genus two curve of [Teitelbaum 88], which we use to compute the lattice of A f . In Section 4.3 we present the results of our numerical calculations of f for a modular form f over a number field F of signature (1, 1). In this case, A f turns out to be isogenous to the Jacobian of a genus two curve C f for which we know an explicit equation. Using Teitelbaum's formulas we can compute its period lattice f , and check that it is isogenous (up to high precision) to the lattice f .

Algorithms for the computation of the p-adic lattice
The code that we use to compute the pairing (3-11) in dimension 2 can be found at https://github. com/mmasdeu/darmonpoints. The algorithms are mainly an adaptation of the ones presented in [Guitart et al. 16] for the one-dimensional case, and thus we give a brief overview of them, emphasizing the points which require to be modified in higher dimension. A complete discussion of the details that we omit can be found in [Guitart et al. 16, Section 3]. Recall our running notation: F is a number field of narrow class number 1 and N ⊂ O K is an ideal that decomposes into coprime ideals N = pmd, where p is prime and d is squarefree. Also B/F is a quaternion algebra of discriminant d and 0 (pm) ⊂ 0 (m) are the norm 1 units of Eichler orders of level pm and m, respectively. We denote by n the number of split real places of B and by s the number of complex places of F. Our goal is, first of all, to decide whether there exists a newform f ∈ H n+s ( 0 (pm), C) with [K f : Q] = 2; in case it does, we aim to compute it and to compute the integration pairing (3-11) and the lattice f . The algorithms that we next describe only work under the assumption that n + s = 1. In other words, if B splits at a single infinite place. From now on we assume this: Assumption 4.1. n + s = 1.
There are two reasons for this restriction. The first one is that the (co)homology groups are then in degree 1, and higher degrees are more difficult to deal with algorithmically; the second is that under Assumption 4.1 we can use the algorithms of Voight [Voight 09] (if n = 1) and Page [Page 15] (if s = 1) that compute generators and relations of 0 (pm) and provide an effective solution of the word problem.
If G is a group and A is a G-module, a convenient way of thinking of the homology groups is in terms of the bar resolution, in which the group of ith chains is In order to compute H 1 ( 0 (pm), Z), it is also useful to use the canonical isomorphism with the abelianization From the generators and relations for 0 (pm), it is straightforward to obtain generators and relations for the 0 (pm) ab . Then computing the Hecke operator at a prime l N essentially boils down to finding an element π l ∈ R 0 (pm) whose reduced norm generates l and is positive at the real places. This can be done with the routines for quaternion algebras implemented by Voight in [Voight 05] and available in Magma [Bosma et al. 97]. Once π l is found one can find a decomposition of the double coset 0 (pm)π l 0 (pm) of the form 0 (pm)π l 0 (pm) = |l| i=0 g i 0 (pm).
If c = g n g · g ∈ Z[G] is a cycle, the Hecke operator acting on the homology class [c] is given by the explicit formula where t i (g) is defined by the equality g −1 g i = g j t i (g) −1 for some (unique) j. Similar explicit formulas exist for the operators T l for l | pm and for the Hecke operators at the infinite places T v . Now, if c 1 , . . . , c t is the basis of H 1 ( 0 (pm), Z), one can compute T l (c i ) using the above formula, and express it in terms of the basis by using the explicit solution to the word problem provided by the algorithms of Voight and Page. We are not interested in torsion homology classes, so if (say) c 1 , . . . , c m are the free generators we obtain an m × m matrix of T l acting on the torsion-free part of H 1 ( 0 (pm), Z); equivalently, we can also think that this is the matrix of T l acting on H 1 ( 0 (pm), Q).
We have implemented the algorithms under the assumption that the ideal m is trivial. This is not a restriction of the method and it could be dispensed with, but we restricted to this case in order to simplify some of the steps in the calculation. So let us suppose from now on that m = (1).
The first step is to compute the p-new part of H 1 ( 0 (p), Q). Let ω p ∈ R 0 (p) × be an element whose reduced norm is positive at the real places of F and that normalizes 0 (p). Then, if we let 0 (1) = ω −1 p 0 (1)ω p , we can identify the group introduced in page 11 with the amalgamated product 0 (1) 0 (p) 0 (1) (all the groups viewed as subgroups of ). The inclusions 0 (p) ⊂ 0 (1) and 0 (p) ⊂ 0 (1) induce maps Then the p-new part is H 1 ( 0 (p), Q) p−new = ker(α) ∩ ker(α), which can be easily computed from the generators and relations of 0 (p) ab and 0 (1) ab . We compute next H 1 ( 0 (p), Q) + p−new , the subspace on which T v acts as +1 where v is the real place of F that splits in B (this is only needed if n = 1). Now we compute the matrix of T l 1 acting on H 1 ( 0 (p), Q) + p−new for some small prime l 1 N. This module decomposes into a direct sum of submodules, given by the factorization of the minimal polynomial of T l 1 into coprime factors. If some factor is irreducible, then the corresponding submodule is an irreducible T-module. To each non-irreducible submodule, we apply the same procedure for the Hecke operator T l 2 for some other prime l 2 , and so on. In this way, after applying a finite number of Hecke operators T l 1 , T l 2 , T l 3 , . . . , we will have decomposed H 1 ( 0 (p), Q) + p−new into a direct sum of irreducible T-modules. Then the submodules of rank 2 correspond to newforms f with [K f : Q] = 2, and the submodule is what we denoted H 1 ( 0 (p), Q) f . At this point we have explicitly computed a basisγ 1 ,γ 2 of H 1 ( 0 (p), Q) f . Since we are interested in integral classes, we set γ 1 =γ a 1 and γ 2 =γ b 2 , for a, b ∈ Z such that γ 1 , γ 2 ∈ H 1 ( 0 (p), Z) f . The next step is for each γ ∈ {γ 1 , γ 2 } to compute δ a d −1 (γ ) ∈ H 1 ( , Div 0 H p ). By construction γ lies in ker(α) ∩ ker(α). Therefore, γ is trivial when viewed as an element in both 0 (1) ab and 0 (1) ab , so that it is a product of commutators in 0 (1) and in 0 (1). Using the effective solution to the word problem in 0 (1) provided by The computations on cohomology groups are practically the same as for the one-dimensional situation. More precisely, we identify the cohomology group H 1 ( 0 (p), Q) as the dual of H 1 ( 0 (p), Q). In particular, the basis {γ 1 , γ 2 } gives rise to a dual basis {c 1 , c 2 }, whose elements actually lie in H 1 ( 0 (p), Z) f . These correspond, under the isomorphism of Proposition 3.1, to cohomology classes by means of an explicit formula. The main point is that if B is a ball in P 1 (F p ), then either B or P 1 (F p ) \ B is of the form gO F p for some g ∈ / 0 (p). Thus a measure in Meas 0 (P 1 (F p ), Z) can be regarded as an element in Coind 0 (p) Z, satisfying certain additional properties. Now the Shapiro isomorphism gives . This isomorphism can be given at the level of cocycles by an explicit formula, as follows. Let {γ e } be a system of representatives of / 0 (p); for h ∈ denote by γ e(h) the representative such that h ∈ γ e(h) · 0 (p). Then, for a cocycle c : 0 (p) → Z its image under the above isomorphism is represented by the cocycle g → ω g , where ω g (h) = c(r) for the unique r ∈ 0 (p) such that γ e(h) g = rγ e , for some representative γ e .
The element ω g in principle belongs to Coind 0 (p) Z. With an appropriate choice of the representatives {γ e } introduced in [Longo et al. 12] (see also [Guitart et al. 16, Section 3.3]), one sees that ω g in fact belongs to Meas 0 (P 1 (F p ), Z) for all g ∈ . In this way we compute the cocycles ω 1 and ω 2 .
The last step is to compute the integration pairing. That is to say, for γ ∈ {γ 1 , γ 2 } and ω ∈ {ω 1 , ω 2 } we need to compute (an approximation) of × δ a d −1 γ ρ −1 (ω). This presents no difference with the case of dimension 1, and we use exactly the same algorithm presented in [Guitart et al. 16, Section 3.4].

p-adic periods of genus two Mumford curves
In this section, we compute the period lattice attached to a modular form f . In order to numerically test Conjecture 3.3, we need a method to compute the period lattice of the abelian surface A f . In our examples, A f can be taken to be the Jacobian of a genus two curve C f . Then we can use Teitelbaum's formulas [Teitelbaum 88], which provide formulas for the p-adic periods of a genus two Mumford curve in terms of the coefficients of an equation of the curve. The strategy of [Teitelbaum 88] is to first express the coefficients of an equation as power series in the padic periods of the curve, and then to invert these series. In a sense, this is similar to the case of Tate elliptic curves, whose j-invariant in terms of the Tate period is given by and the expression for the Tate period in terms of the jinvariant is obtained by inverting the series. The formulas in the genus two case are rather more complicated, but since they is a key tool in our computations we give an account on how they are obtained (and we also take the chance to correct some minor typos in the formulas of [Teitelbaum 88]). Let F be a complete local field. Denote by O F its ring of integers, π a uniformizer, and k the residue field, which we assume to be of characteristic = 2. Let X be a genus two Mumford curve over F; that is, X is smooth, irreducible, projective, and it has a stable model over O F such that all components of its generic fiber are isomorphic to P 1 k and all double points are k-rational. Then Mumford's uniformization theory guarantees the existence of a free subgroup of rank two X ⊂ PGL 2 (F ) such that X an / X (here ⊂ P 1 F is the set of non-limit points of X and X an denotes the rigid analytic space attached to X). Manin and Drinfeld [Manin and Drinfeld 73] constructed a symmetric pairing that uniformizes the Jacobian of X. That is, (4-1) embeds X as a discrete subgroup of Hom( X , F × ) and, if we call the image of X , then the quotient Hom( X , F × )/ is isomorphic to Jac(X ).
Let us assume that the Weierstrass points of X are defined over F. The reduction of X determines a partition of the set of Weierstrass points into three subsets S 1 , S 2 , S 3 of two elements, which can be read off from the distribution of the Weierstrass points in the special fiber of a minimal regular model for X [Teitelbaum 88, Proposition 9].
To be more precise, the set of Weierstrass points reduce to either three points w 1 , w 2 , w 3 of multiplicities 2, 2, 2, or to four points w 1 , w 2 , w 3 , w 3 with multiplicities 2, 2, 1, 1. For i = 1, 2 the set S i consists of the points that reduce to w i . In the first case, S 3 consists of the points that reduce to w 3 , whereas in the second case it consists of those points that reduce to w 3 or w 3 . Observe that the ordering of the S i 's is not uniquely determined, although in the second case the set S 3 is distinguished.
For each i we choose a labeling of the points in S i as Let γ 1 , γ 2 , γ 3 ∈ X be the elements associated with the choice of this labeling as in [Teitelbaum 88, Section 2.1]. For our purposes, we do not need to know much about these elements, just that they generate X and that γ 1 γ 2 γ 3 = 1. Teitelbaum defines the fundamental periods of X as Observe that a period lattice of Jac(X ) is given by the columns of the matrix so indeed the lattice can be recovered from the q i 's. For later use, we note that the periods can also be recovered from the lattice: A related notion, which plays a key role in Teitelbaum's formulas, is the so-called half-periods of X, defined as where χ 12 , χ 23 , and χ 31 are the elements in Hom( X , F × ) defined in [Teitelbaum 88, Definition 17]. The χ ij 's are defined by very explicit expressions, but we do not need them actually. Indeed, one of the main results of [Teitelbaum 88] is an expression of the coefficients of an equation of X as power series in the p i 's; by inverting these series one obtains formulas for the p i 's in terms of an equation of X. These are the formulas that we are interested in, since the p i 's are related to the q i 's by the simple relation q i = p −2 i (which also justifies the name of half periods). Before stating the formulas, we still need to introduce some more notation. Let be the bilinear pairing defined by (γ i , γ j ) = p −1 k for different i, j, k (observe that this determines the pairing completely because of the relation γ 1 γ 2 γ 3 = 1), and let θ : Hom( X , F × ) −→ F × be the theta function defined by the formula by means of explicit formulas in terms of the half periods. These characters, together with the trivial character χ 1 , are the set of 2-torsion points of the Jacobian of X (under the identification Jac(X ) Hom( X , F × )/ ). Let x be the function on X that has a double pole at P + 1 , a double zero at P + 2 , and such that x(P + 3 ) = 1. Then, possibly after adding the square root of some element of F, we can assume that X has a model given by Then by [Teitelbaum 88, Theorem 28] we have that Note that there is a typo in display (25) of [Teitelbaum 88] in the sign affecting the sum. In this way, these expressions give the coordinates x(P − 1 ), x(P − 2 ), and x(P − 3 ) as power series in the half periods p 1 , p 2 , and p 3 .
If one starts with a genus two Mumford curve X/F, one can compute its half periods p i , and therefore its periods q i = p −2 i , as follows. Consider a hyperelliptic model y 2 = f (x), with f (x) of degree 6. After possibly changing F we can assume that f has its six roots in F, and hence the Weierstrass points are defined over F; the next step is to label them as P + 1 , P − 1 , P + 2 , P − 2 , P + 3 , P − 3 . The reductionf of f (mod π ) factors either as In the first case we take x(P ± i ) as the roots reducing tox i (in any order). In the second, x(P ± 1 ) (resp. x(P ± 2 )) reduce tox 1 (resp.x 2 ), and x(P ± 3 ) are the points reducing tox 3 andx 3 (again, in any order). Next, apply the transformation , which sends P + 1 to ∞, P + 2 to 0, and P + 3 to 1; denote again by x(P − 1 ), x(P − 2 ), and x(P − 3 ) the x-coordinates of the P − i after applying the transformation. Then the half periods are obtained by plugging these values in (4-18), and solving for p 1 , p 2 , and p 3 . The power series can be inverted, as is done in [Teitelbaum 88, p. 141]. However, computationally it is more efficient to solve the system numerically, by applying a three-dimensional Newton scheme.

A numerical verification
Consider the cubic field F = Q(α), where α is a root of the polynomial x 3 − x 2 + 3x − 2. This field has signature (1, 1). Let p = (α 2 + 1), which has norm p = 5, and let d = (−2α 2 + 4α − 7), of norm 173. We see that in this example F p = Q p = Q 5 . Let B be the (unique) quaternion algebra over F of discriminant d. It is generated by i and j satisfying i 2 = −4α 2 + 4α − 7 and j 2 = −173. We have computed the cohomology group H 1 ( 0 (p), C) associated with normone units of an Eichler order of level p in B, and found it to be of dimension 4. The Hecke operator T l , where l = (α), acts on it with characteristic polynomial (x 2 + x − 4)(x 2 + x − 1). Therefore there are two irreducible two-dimensional components. We consider the component corresponding to the factor x 2 + x − 1, which corresponds to a newform f whose eigenvalues generate the quadratic field Q( √ 5).
Using the methods described in Section 4.1 (the actual code for the implementation can be found in https:// github.com/mmasdeu/darmonpoints), we find a basis {ϕ 1 , ϕ 2 } of H 1 ( 0 (p), Z) f . Similarly, we find a basis {θ 1 , θ 2 } of H 1 ( 0 (p), Z) f . If we identify H 1 ( 0 (p), Q) f with the dual of H 1 ( 0 (p), Q) f , these two bases are not dual to each other: the matrix of cap-product pairings is which has determinant −144. This leads us to consider a new basis for the homology which is a "pseudo"-dual basis for {ϕ 1 , ϕ 2 } and which has the property that the resulting cap-product is On this new basis {θ 1 , θ 2 }, the Hecke operator T l acts as Computing the integration pairing (3-11), we obtain the periods: A 0 = ϕ 1 , θ 1 = 5 45 · 227015308497264163898130173143 (mod 5 87 ), The periods C 0 = ϕ 2 , θ 1 and D 0 = ϕ 2 , θ 2 are readily obtained from A 0 , B 0 and the matrix T l , by Heckeequivariance of the pairing. In this particular case, for example: The lattice f is therefore generated by the columns of the matrix A 0 B 0 C 0 D 0 . Now, we want to verify that f is isogenous to the period lattice of A f . For this, consider the genus two curve X/F given by the following equation: We have obtained this curve by specializing the parameters in the Brumer family (see [Hashimoto 00]), and therefore the endomorphism algebra of Jac(X ) contains Q( √ 5). The conductor of Jac(X ) can be computed using Magma: it is precisely p 2 d 2 . Moreover, we have computed the eigenvalue a l ( f ) and we have checked that the relation holds. These properties lead us to think that, in all likelihood, Jac(X ) is isogenous to A f . Since we have the equation of X, we have been able to use Teitelbaum's formulas recalled in Section 4.2 to compute an approximation (up to 50 digits) to the p-adic periods A, B, D of Jac(X ) as in (4-2). This is precisely the lattice f . Now, in order to check that f and f are isogenous, as predicted by Conjecture 3.3, we need to find matrices Y, What we do, in fact, is to find matrices satisfying the weaker relation (see (2-7) for the notation): where denotes a p-adic logarithm. To this purpose, lattice reduction techniques allow us to express the logarithms of the Teitelbaum periods A, B, and D that we computed for X in terms of small linear combinations of the integration periods A 0 , B 0 . In this particular example, the following relation holds (up to the working precision): Since A 0 and B 0 are assumed to be algebraically independent, (4-6) yields a homogeneous system of eight equations in eight variables (the entries of Y and Z). It turns out that this system has a two-dimensional space of solutions, which allows us to extract the sought (non-zero) matrices Y and Z. For example, one can take the Kadziela matrices A posteriori we check that the multiplicative relation V Y = Z W holds as well, thus giving numerical evidence that indeed the lattice f is isogenous to the lattice of A f .

Equations of genus two curves
In the previous section we have computed the period lattice f and, in order to compute the periods of A f and check Conjecture 3.3, we have crucially used that in that case A f is the Jacobian of a genus two curve X/F. We remark that the equation of X was known beforehand.
In this section, we describe a method to recover a model for the curve X directly from the lattice f . Since The idea of the method is as follows. First of all we compute the matrix W = A 0 B 0 C 0 D 0 whose columns are the basis of f by means of the integration pairing. Suppose that A f is isogenous to the Jacobian of a genus two curve X/F, and let V = A B C D be the period matrix of X. Granting Conjecture 3.3, these two matrices will be related by for some matrices Y, Z ∈ M 2 (Z). Assuming for now that we can find Y and Z (we will say later on how to do it), we can solve for V , and therefore obtain the periods A, B, D of the curve X. From this, one readily recovers the periods q 1 , q 2 , q 3 using the relations given in (4-3): Taking square roots one recovers the half periods p i = q −1/2 i , which can be plugged in the power series for the Theta series (4-5) and ultimately give the Weierstrass points of X. The resulting approximations to the Weierstrass points, although algebraic, are not defined over F in general and we cannot hope to recognize them algebraically from these p-adic approximations. Instead, what we can do is to compute a p-adic approximation of the (absolute) invariants of the curve X, which are defined as i 1 = I 5 2 I 10 , i 2 = I 3 2 I 4 I 10 , i 3 = I 2 2 I 6 I 10 .
Here, I 2 , I 4 , I 6 , I 10 are the Igusa-Clebsch invariants, defined as certain symmetric polynomials in the Weierstrass points of X. Since X is defined over F, then i 1 , i 2 , i 3 do belong to F. Now, from the approximations to the Weierstrass points we can compute approximations to the invariants, sayĩ 1 ,ĩ 2 ,ĩ 3 . If we have enough precision we will be able to recognize them as elements of F. This gives us the method for finding the matrices Y and Z: we run over pairs of 2 × 2 integer matrices and, for each trial, we compute the resulting approximation to the invariantsĩ 1 ,ĩ 2 ,ĩ 3 ; if we are not able to identify them as elements of F, this likely means that Y and Z are wrong and we try with a different pair.
Trying over pairs of matrices Y, Z a priori involves exploring an eight-dimensional lattice, but one can reduce the search by imposing that the resulting matrix V is symmetrical. The finding of Y and Z, which is the twodimensional generalization of the problem of guessing the valuation of the Tate parameter of an elliptic curve from its p-adic L-invariant, is one of the places that makes the computation challenging.
In addition to this, this strategy soon reveals another problem: the absolute invariants have very large height compared to the coefficients of a minimal Weierstrass model. If for a given pair Y, Z we are not able to recognizeĩ 1 ,ĩ 2 ,ĩ 3 as elements in F, this could also be because the height of the invariants i 1 , i 2 , i 3 is too large to be recognized with our working precision, and it would prevent the method to work unless one was able to compute to extremely high precision.
Instead, there is an improvement to the method that makes the computation feasible in some cases: since we are aiming at curves with a specific conductor (obtained from the level of the modular form from which we started), we have a certain control on what the discriminant of the curve should be. Unlike the case of elliptic curves, the support of the discriminant of the genus two curve may be larger than that of its conductor, and hence it is in principle possible that there are more primes in the discriminant than those appearing in our level. We expect this not to happen except for small primes, which we can include in our search. Suppose that we guess the discriminant I 10 of the curve. Then from the approximations (ĩ 1 ,ĩ 2 ,ĩ 3 ) to the invariants we can extract approximations to I 2 = (i 1 I 10 ) 1/5 , I 4 = i 2 I 10 I −3 2 , and I 6 = i 3 I 10 I −2 2 , which are defined over F (because I 10 belongs to F) and have lower height than I 10 itself.
As a proof of concept, we illustrate the method with an example for which we had the target curve beforehand. Consider the number field F = Q(α), with α a root of the polynomial x 3 − x 2 + 1, which has signature (1, 1). We consider the quaternion algebra with relations i 2 = 9α 2 − 3α − 11, j 2 = −2α 2 , which has discriminant d = (8α 2 − 10α − 1) of norm 821. Let p = (−2α 2 + α) be the unique prime of norm 7 in F. In this case we find a two-dimensional component of the cohomology and homology, on which T l (with l = (α 2 + α − 2), a prime of norm 11) acts with characteristic polynomial x 2 − 2x − 19. In fact, with respect to the chosen pseudoorthogonal bases {ϕ 1 , ϕ 2 }, {θ 1 , θ 2 }, the operator T l acts on the homology via the matrix This corresponds then to a newform f such that K f Q( √ 5), and we aim to compute the invariants of a curve X/F such that Jac(X ) = A f . The first step is to compute the periods of the lattice f by means of the integration pairing, as in the previous section. They are: This yields q 1 , q 2 , q 3 : From this we compute the half periods taking square roots and the Weierstrass points using formula (4-5). With the Weierstrass points, we can compute approximations to the invariants The discriminant of the sought hyperelliptic curve should have support {2, p, d}. In this case, the fundamental unit of F is α, so we have tried discriminants of the form That is, for different pairs of a and b we have computed I 2 , I 4 , I 6 , and we have tried to identify them as elements of F. This has worked for a = −12 and b = 12, so that our guess of the discriminant is I 10 = α −12 2 12 (−2α 2 + α) 2 (8α 2 − 10α − 1) 2 With this I 10 , we have recognized I 2 , I 4 , and I 6 to be the following elements in F: I 2 = 576α 2 − 712α + 840, I 4 = 7396α 2 − 11208α + 9636, It is worth remarking how the quantities I 2 , I 4 , I 6 were actually found. If one has access to arbitrarily high precision, one can simply use the algdep commands that exist in Sage or Pari, which return a polynomial approximately satisfied by the input. However, since we are expecting to find elements in F we may be more successful finding linear dependency relations among the input and a power basis of F. In this example, while 50 p-adic digits suffice to recover the Igusa invariants, the algdep command would require instead about 90 p-adic digits, which would make the computation nearly unfeasible with the computational resources available to us. Under Conjecture 3.3, the invariants (I 2 , I 4 , I 6 , I 10 ) should correspond to the invariants of a genus two curve X/F such that Jac(X ) = A f . At this point, one can run Mestre's algorithm, which is implemented in Magma to find the equation of a curve X /F with these invariants. The curve X will be then a twist of X, and by looking at its conductor one can untwist it to recover X. This is the strategy used, in a similar situation, in [Dembélé and Kumar 16, Section 4.1.1]. However, in this case the model that Mestre's algorithm outputs has very large height (as is usually the case), and since F is not totally real we do not currently dispose of algorithms to reduce it to a more manageable size.
As in the previous section, we have obtained it by specialization of the parameters in the Brumer family, so the endomorphism algebra of its Jacobian contains K f = Q( √ 5). Moreover, it has conductor p 2 d 2 , and we have checked that the number of points modulo l that lie on the curve agrees with the expected value predicted by the eigenvalue of f . It seems to correspond, then, to the abelian surface A f , and one can check that its Igusa-Clebsch invariants coincide with the ones found above. This gives evidence that the method presented in this section can be used to compute the Igusa invariants of a genus two curve whose Jacobian is A f in terms of the integration pairing ·, · f .

p-adic L-invariants
The Hecke-equivariant pairing ·, · f of Equation (3-4), together with Conjecture 3.3, allows for the definition of a p-adic L-invariant of f . In the case of dimension 2, it can be computed explicitly by means of the methods of Section 4. The fact that it coincides when F = Q with the p-adic L-invariant introduced in [Mazur et al. 86] allows for an alternative method of computation as well.
We define the p-adic L-invariant only for abelian surfaces, the higher dimensional case is analogous. Let T f ⊂ End (H 1 ( 0 (pm), Q) f ) be the set of endomorphisms generated by the Hecke operators acting on H 1 ( 0 (pm), Q) f . We have that T f ⊗ Q is a number field isomorphic to K f , which also acts on H 1 ( 0 (pm), Q) f in a way compatible with ·, · f . Moreover, H 1 ( 0 (pm), Q) f and H 1 ( 0 (pm), Q) f are K f -modules of rank 1. Now consider the maps α, β : H 1 ( 0 (pm), Q) f → Hom(H 1 ( 0 (pm), Q) f , F p ) given by where ord p denotes the order at p and log p a p-adic logarithm (say, the one that takes a generator of p to 0). Under Conjecture 3.3 the map ord p ·, · f is non-degenerate, making α an isomorphism. The p-adic L-invariant is defined as the unique element L p ( f ) ∈ T f ⊗ F p such that β = L p ( f )α.

Examples over Q
Teitelbaum introduced in [Teitelbaum 88] is a method used to compute p-adic L-invariants of Jacobians of genus two modular curves. In this section we compute the padic L-invariants attached to two-dimensional simple factors of Jacobians of modular curves of genus larger than 2, for which in principle one cannot use the methods of [Teitelbaum 88].
As a first example, consider the space of modular forms of level 0 (165) (note that 165 = 3 · 5 · 11). We work with the indefinite quaternion algebra B of discriminant 15 and with p = 11. We find a two-dimensional factor of the cohomology H 1 ( B 0 (11), Z), on which the Hecke operator T 2 acts with characteristic polynomial x 2 + 2x − 1. This corresponds to a modular form f whose Hecke eigenvalues generate the field Q( √ 2). This defines an isomorphism T f ⊗ Z Q p ∼ = Q p 2 = Q p (T 2 ), and we find that L p ( f ) is 11 · 2434708053353386815382354389779 +11 2 · 1134757179957513984261268713424 · T 2 +O(11 31 ).
As a second example, consider this time 0 (357) (note that 357 = 3 · 7 · 17). We work with the quaternion algebra of discriminant 3 · 17, and with p = 7. In this case, the Hecke algebra is generated by T 5 which has characteristic polynomial x 2 + 2x − 1 (the fact that it is the same as the previous example is a mere coincidence), giving an isomorphism T f ⊗ Z Q p ∼ = Q p 2 = Q p (T 5 ), and in this case we find that L p ( f ) is 7 · 15066781074161344457224002 +7 2 · 1814973922464853030271319 · T 5 +O(7 31 ).

Examples over cubic number fields
We have also computed p-adic L-invariants of some modular forms over number fields Q(α). Here is the summarized data for the modular forms of the examples in the previous sections.