Tropical moments of tropical Jacobians

Each metric graph has canonically associated to it a polarized real torus called its tropical Jacobian. A fundamental real-valued invariant associated to each polarized real torus is its tropical moment. We give an explicit and efficiently computable formula for the tropical moment of a tropical Jacobian in terms of potential theory on the underlying metric graph. We show that there exists a universal linear relation between the tropical moment, the tau invariant, and the total length of a metric graph. We argue that this linear relation is a non-archimedean analogue of a recent remarkable identity established by Wilms for invariants of compact Riemann surfaces. We also relate our work to the computation of heights attached to principally polarized abelian varieties.

1. Introduction 1 2. Polarized real tori and tropical moments 7 3. Metric graphs, models, and tropical Jacobians 8 4. Potential theory on metric graphs 10 5. Calculus of random spanning trees 14 6. Energy levels of rooted spanning trees 18 7. Combinatorics of Voronoi polytopes 24 8. Tropical moments of tropical Jacobians 27 9. Heights of Jacobians in dimension two 29 10. Tau invariant of metric graphs 31 11. The linear relation 32 References 33 1. Introduction 1.1. Background and aim. A metric graph is a compact, connected length metric space Γ homeomorphic to a topological graph. It is known that metric graphs are the appropriate analogues of compact, connected Riemann surfaces in the nonarchimedean setting. For example, one can associate to Γ its tropical Jacobian Jac(Γ) = H 1 (Γ, R)/H 1 (Γ, Z), which is a real torus endowed with a canonical inner product [·, ·] on its tangent space (i.e., a polarized real torus, or polarized tropical abelian variety).
The lattice H 1 (Γ, Z) together with the inner product [·, ·] canonically determines a compact convex region in H 1 (Γ, R) given as known as the Voronoi polytope centered at the origin. Let µ L denote the Lebesgue measure on H 1 (Γ, R), normalized to give Vor(0) unit volume. In this paper we are interested in the tropical moment of Jac(Γ), defined as the integral (1.1) I(Jac(Γ)) = Vor (0) [z, z] dµ L (z) .
We provide an explicit and efficiently computable formula for I(Jac(Γ)) in terms of potential theory on Γ (see Theorem A). As we will explain, our formula seems rather unexpected from the computational complexity point of view. Next, we establish a simple connection between I(Jac(Γ)) and a well known potential theoretic invariant associated to Γ called the tau invariant, denoted by τ (Γ) (see Theorem B). The invariant τ (Γ) can be traced back to the fundamental work of Chinburg and Rumely [CR93] in their study of the Arakelov geometry of arithmetic surfaces at non-archimedean places.
Finally, we argue that the identity we prove in Theorem B is an analogue, in the non-archimedean setting, of a recent remarkable identity established by Wilms [Wil17] relating three fundamental invariants of compact connected Riemann surfaces (see §1.5). We also explain how our work is connected with the computation of the stable Faltings height of principally polarized abelian varieties defined over number fields (see §1.6).
1.2. Formula for the tropical moment. It is well known that one can think of a metric graph Γ as an electrical network. For x, y, z ∈ Γ we define j z (x, y) to be the electric potential at x if one unit of current enters the network at y and exits at z, with z 'grounded' (i.e. has zero potential). The j-function provides a fundamental solution of the Laplacian operator on Γ, so naturally it is an important function in studying harmonic analysis on Γ. The effective resistance between x and y is defined as r(x, y) = j y (x, x), which has the expected physical meaning in terms of electrical networks. See §4.2.
It is convenient to fix a vertex set (which is a finite non-empty set containing all the branch points of Γ) and to think of the metric graph Γ as being obtained from a finite (combinatorial) graph G. The metric data will be encoded by positive real numbers ℓ(e) for each edge e of G. We call the finite weighted graph arising in this way a model of Γ. If e is an edge of G, the Foster coefficient of e is defined by F(e) = 1−r(u, v)/ℓ(e), where u and v are the two endpoints of the edge e = {u, v} (see Definition 4.3).
Our formula for the tropical moment of a tropical Jacobian is as follows.
Theorem A. (=Theorem 8.1) Let Γ be a metric graph. Fix a model G of Γ and fix a vertex q of G. Then I(Jac(Γ)) = 1 12 e F(e) 2 ℓ(e) + 1 4 e={u,v} where the sums are over all edges e ∈ E(G).
The formula in Theorem A seems to be rather unexpected from the point of view of computational complexity. As follows from our discussion in §4, in order to obtain all ingredients of the formula, one essentially only needs to perform some basic operations on the discrete Laplacian matrix of G. It follows that, given a model G of Γ, one can compute I(Jac(Γ)) in time O(n ω ), where n is the number of vertices of G, and where ω is the exponent for the 'matrix multiplication' algorithm (currently ω < 2.38). We refer to Remark 8.2 (ii) for details.
On the other hand, computing tropical moments for general polarized real tori is expected to be NP-complete (or worse) in the hierarchy of complexity classes, and there seems to be no a priori reason to expect that the computation might be easier for tori arising from metric graphs. For example, if one wants to compute the tropical moment via the 'simplex method' (see, e.g., [CS99,Chapter 21, §2]), then one needs to know the vertices of Vor(0). However, as is shown in [DSSV09], even computing the number of vertices of Vor(0) is already #P-hard.
The proof of Theorem A is very subtle. Our strategy is as follows. To handle the integral in (1.1), we provide an explicit polytopal decomposition of Vor(0). Given a base point q ∈ V (G), there is a full-dimensional polytope σ T + C T in our decomposition attached to each spanning tree T of G. Here C T is a centrally symmetric polytope, which makes σ T into the center of σ T +C T (see Theorem 7.5). The desired integral over Vor(0) is then a sum of integrals over each σ T + C T .
The contribution from the centrally symmetric polytopes C T is rather easy to handle. The real difficulty comes in handling the contributions from the centers σ T . We introduce the notion of energy level of rooted spanning trees (see Definition 6.1). A crucial ingredient is the notion of cross ratio introduced in [dJS18b] for electrical networks. We prove that the weighted average of energy levels over all spanning trees has a remarkably simple expression in terms of values of the jfunction (see Theorem 6.3). Proving this, in turn, uses some subtle computations related to functions arising from random spanning trees (see §5). We also repeatedly use our generalized (and quantitative) version of Rayleigh's law in electrical networks, as developed in the companion paper [dJS18b].
1.3. Tropical moment and tau invariant. Fix a point q ∈ Γ. Let f (x) = 1 2 r(x, q), where r denotes the effective resistance on Γ as above. The tau invariant of Γ can be given by the simple formula (see Definition 10.1) Here dx denotes the (piecewise) Lebesgue measure on Γ. We will prove the following remarkably simple linear identity connecting τ (Γ) and I(Jac(Γ)). We refer to Definition 11.1 for the total length of Γ.
In the next two sections, we would like to argue that the linear relation in Theorem B is a non-archimedean analogue of a recent remarkable identity established by Wilms [Wil17] for invariants of compact Riemann surfaces.
1.4. Tropical moment as a tropical limit. A polarized real torus is a real torus equipped with a Euclidean inner product on its tangent space. For each given polarized real torus T one clearly has an associated Voronoi polytope Vor(0) centered at the origin, as well as an associated tropical moment I(T). Following [MZ08,FRSS18] one can also naturally attach to T a tropical Riemann theta function Ψ (z), which is a real-valued piecewise affine function on the tangent space of T (see §2). By modifying Ψ into the function Ψ (z) = Ψ (z)+ 1 2 [z, z] one obtains a lattice-invariant function, which therefore descends to give a map Ψ : T → R. It is not difficult to see that the tropical moment of T can alternatively be written as where µ H denotes the Haar measure on T, normalized to give T unit volume. Now let A be a complex abelian variety, endowed with a principal polarization λ : A ∼ − → A t . Let ϑ denote the normalized version of the complex Riemann theta function on the compact complex torus A(C), as defined in [Fal84,page 401]. Let µ denote the Haar measure on A(C), normalized to give A(C) unit volume. The I-invariant of the pair (A, λ), introduced by Autissier [Aut06], is the integral Here and below we denote by log the natural logarithm, and we set g = dim(A).
In [FRSS18] the tropical Riemann theta function Ψ is obtained as the tropicalization of a non-archimedean Riemann theta function. This suggests that one may see Ψ as the 'tropical limit' of the complex Riemann theta function, and the modified tropical Riemann theta function Ψ as the 'tropical limit' of the normalized complex Riemann theta function ϑ . This suggests, in turn, that the tropical moment of a polarized real torus may be seen as the 'tropical limit' of (two times) the I-invariant of a principally polarized complex abelian variety.
1.5. Connection with an identity of Wilms. Let C be a compact and connected Riemann surface of genus g ≥ 1. Let δ F (C) be the Faltings delta invariant of C (see [Fal84, page 402]), let ϕ(C) be the Zhang-Kawazumi invariant of C (see [Zha10, page 6]), and let I(Jac(C)) be the I-invariant of the Jacobian Jac(C) of C, seen as a principally polarized complex abelian variety. Put κ 0 = log(π √ 2). Wilms recently established the following remarkable identity.
A polarized metric graph Γ (or an abstract tropical curve) is a pair (Γ, q) consisting of a metric graph Γ and a labeling q : V (G) → Z ≥0 of the vertices in a model G of Γ. Let ε(Γ) denote the ε-invariant of Γ (see [Zha93,Mor96]), and let ϕ(Γ) denote the ϕ-invariant of Γ (see [Zha10,page 7]). The main result of [dJ15a] shows that the tropical invariant ℓ(Γ) + ε(Γ) can be seen as the 'tropical limit' of the delta invariant δ F (C), and the (partial) asymptotic results in [dJ14, dJ15b] indicate that the tropical invariant ϕ(Γ) can be seen as the 'tropical limit' of ϕ(C). In §1.4 we argued that the tropical moment should be seen as the 'tropical limit' of two times the I-invariant.
1.6. Connection with arithmetic geometry. As is well known, a metric graph may be canonically interpreted as a skeleton of a Berkovich curve, and the tropical Jacobian of a metric graph can be interpreted as the canonical skeleton of a Berkovich Jacobian variety [BR15]. More generally, one may view the canonical skeleton of any Berkovich polarized abelian variety as a polarized real torus in a canonical way, via non-archimedean uniformization. Based on this connection, our results can be applied in the study of polarized abelian varieties. For example, we have the following application concerning the computation of Arakelov heights attached to principally polarized abelian varieties defined over a number field. For more background and for terminology used in this section we refer to [dJS18a].
Let k be a number field, and let M(k) 0 and M(k) ∞ denote the set of nonarchimedean places and the set of complex embeddings of k. Let (A, λ) be a principally polarized abelian variety defined over k. Assume that A has semistable reduction over k.
Assume that v ∈ M(k) 0 is a finite place such that the canonical skeleton of the Berkovich analytification of (A, λ) at v can be realized as the tropical Jacobian of some (explicitly given) metric graph. For example (A, λ) could be the Jacobian variety of a smooth projective geometrically connected curve with semistable reduction over k. Then Theorem A or Theorem B can be applied to compute the local term I(A v , λ v ) efficiently. We shall illustrate this in §9 by discussing the case of Jacobian varieties of dimension two in some detail. We mention that by combining (1.6) with Theorem B one recovers [dJ18, Theorem 1.6]. 1.7. Structure of the paper. In §2, we review the notion of polarized real tori and define the notion of tropical moments. In §3, we review the notions of weighted graphs and of metric graphs and their models. Also we introduce the tropical Jacobian of a metric graph. In §4, we review potential theory and harmonic analysis on metric graphs, mainly from the perspective of our companion paper [dJS18b]. In §5, we study two functions that arise from the theory of random spanning trees. In §6, we introduce the notion of energy levels of rooted spanning trees, and prove that the average of energy levels has a simple expression in terms of the j-function. In §7, we study the combinatorics of the Voronoi polytopes arising from graphs, and present our suitable polytopal decomposition. In §8, we prove Theorem A. In §9, we elaborate upon (1.6) in the case of a Jacobian variety of dimension two. In §10, we introduce the tau invariant and prove a formula that allows to compute the tau invariant efficiently. In §11, we prove Theorem B.

Polarized real tori and tropical moments
The purpose of this section is to set notations and terminology related to polarized real tori and their tropical moments, and to discuss the connection with the tropical Riemann theta function as studied in [MZ08,FRSS18].
2.1. Polarized real tori. A (Euclidean) lattice is a pair (Λ, [·, ·]) consisting of a finitely generated free Z-module Λ and a symmetric bilinear form [·, ·] : Λ×Λ → R such that the induced symmetric bilinear form on Λ R = Λ ⊗ Z R (which we likewise denote by [·, ·]) is positive definite. Attached to each lattice (Λ, [·, ·]) one has a real torus T = Λ R /Λ, equipped with a natural structure of compact Riemannian manifold. We refer to the Riemannian manifold T as a polarized real torus. The tropical Jacobian of a metric graph (see Section §3.3) is an example of a polarized real torus.
Definition 2.1. The tropical moment of the polarized real torus T is set to be the value of the integral where µ L is the Lebesgue measure on Λ R , normalized to have µ L (Vor(0)) = 1.
Remark 2.2. The tropical moment of T is exactly the normalized second moment of the lattice (Λ, [·, ·]) as studied in [CS99, Chapter 21].
2.3. Tropical Riemann theta function. Let T be a polarized real torus coming from a lattice (Λ, [·, ·]) as above. We define the tropical Riemann theta function of T to be the function Ψ : Λ R → R given by (see [MZ08,FRSS18]) for z ∈ Λ R . As is easily checked we have a functional equation for all z ∈ Λ R and µ ∈ Λ. The function Ψ is piecewise affine on Λ R . The modified theta function on Λ R is Λ-invariant and hence descends to T. Explicitly, we have for all z ∈ Λ R . As is easy to check, the tropical moment (2.1) has a simple expression in terms of the modified theta function (2.2), namely Here µ H denotes the Haar measure on the compact topological group T, normalized to have µ H (T) = 1.
Remark 2.3. The corner locus of the tropical Riemann theta function Ψ (i.e. the lift of the tropical theta divisor on T to its tangent space Λ R ) consists precisely of the boundaries of the Voronoi polytopes Vor(λ).

Metric graphs, models, and tropical Jacobians
The purpose of this section is to set notations and terminology related to weighted graphs, metric graphs, and their models. We also define the tropical Jacobian of a metric graph (see §3.3). Most of the material in this section is straightforward, and we leave details to the interested reader.
3.1. Weighted graphs. By a weighted graph we mean a finite weighted connected multigraph G with no loop edges. The set of vertices of G is denoted by V (G) and the set of edges of G is denoted by E(G). We let n = |V (G)| and m = |E(G)|. An edge e is called a bridge if G\e is disconnected. The weights of edges are determined by a length function ℓ : E(G) → R >0 . We let E(G) = {e,ē : e ∈ E(G)} denote the set of oriented edges. We haveē = e. For each subset We have an obvious extension of the length function ℓ : E(G) → R >0 by requiring ℓ(e) = ℓ(ē). There is a natural map E(G) → V (G) × V (G) sending an oriented edge e to (e + , e − ), where e − is the start point of e and e + is the end point of e.
Notation. For e ∈ E(G) we sometimes refer to its endpoints by e + , e − even when an orientation is not fixed, so e = {e + , e − }. We only allow ourselves to do this if the underlying expression is symmetric with respect to e + and e − , so there is no danger of confusion. The reader is welcome to fix an orientation O and think of e + and e − in the sense explained above.
A spanning tree T of G is a maximal subset of E(G) that contains no circuit (closed simple path). Equivalently, T is a minimal subset of E(G) that connects all vertices of G.
For a fixed q ∈ V (G) and spanning tree T of G we will refer to the pair (T, q) as a spanning tree with a root at q (or just a rooted spanning tree). The choice of q imposes a preferred orientation on all edges of T . Namely, one can require that all edges are oriented away from q on the spanning tree T (see Figure 1 (c)). We denote this orientation on T by T q ⊆ E(G).
Given a commutative ring R, it is convenient to define the 1-chains with coefficients in R as the free module 3.2. Metric graphs and models. A metric graph (or metrized graph) is a pair (Γ, d) consisting of a compact connected topological graph Γ, together with an inner metric d. Equivalently, if Γ is not a one-point space, then a metric graph is a compact connected metric space Γ which has the property that every point has an open neighborhood isometric to a star-shaped set, endowed with the path metric.
The points of Γ that have valency different from 2 are called branch points of Γ. A vertex set for Γ is a finite set V of points of Γ containing all the branch points of Γ with the property that for each connected component c of Γ \ V , the closure of c in Γ is isometric with a closed interval.
A vertex set V for Γ naturally determines a weighted graph G by setting V (G) = V , and by setting E(G) to be the set of connected components of Γ \ V . We call G a model of Γ. An edge segment (based on the choice of a vertex set V ) is the closure in Γ of a connected component of Γ \ V . Note that there is a natural bijective correspondence between E(G) and the edge segments of Γ determined by V . By a small abuse of terminology we will refer to the elements of E(G) also as edge segments of Γ. Given an edge segment e ⊂ Γ (based on the choice of a vertex set V ) we denote its boundary ∂e ⊂ V by ∂e = {e − , e + }. In particular we will also use the notation {e − , e + } for the boundary set of an edge segment e if there is no (preferred) orientation present. We hope that this does not lead to confusion.
Conversely, every weighted graph G naturally determines a metric graph Γ G containing V (G) by glueing closed intervals [0, ℓ(e)] for e ∈ E(G) according to the incidence relations. Note that V (G) is naturally a vertex set of Γ G , and the associated model is precisely G. See Figure 1   The inner product [·, ·] restricts to an inner product, also denoted by [·, ·], on the homology lattice Λ = H 1 (G, Z) ⊂ C 1 (G, Z). The pair (Λ, [·, ·]) is a canonical lattice associated to Γ (independent of the choice of the model G), and we have a MZ08]), and denoted by Jac(Γ).

Potential theory on metric graphs
In this section, we closely follow [dJS18b] and review those results that are needed in this paper.
4.1. Graphs as electrical networks. Let Γ be a metric graph and G be a model of Γ. We may think of Γ (or G) as an electrical network in which each edge e ∈ E(G) is a resistor having resistance ℓ(e). See When studying the 'potential theory' on a metric graph Γ, it is convenient to always fix an (arbitrary) model G, and think of it as an electrical network.

4.2.
Laplacians and j-functions. Let Γ be a metric graph, and let G be a model of Γ. We have the distributional Laplacian operator (see [dJS18b, §3.1]) where PL(Γ) is the real vector space consisting of all continuous piecewise affine real valued functions on Γ that can change slope finitely many times on each closed edge segment, and DMeas 0 (Γ) is the real vector space of discrete measures ν on Γ with ν(Γ) = 0. We also have the combinatorial Laplacian operator (see The diagonal entries are determined by forcing the matrix to have zero-sum rows. The Laplacian matrix of G can also be expressed in terms of the incidence matrix of G. Let {v 1 , . . . , v n } be a labeling of V (G) as before. Fix an orientation A fundamental solution of the Laplacian is given by j-functions. We follow the notation of [CR93]. See [dJS18b,§4] and references therein for more details. Let Γ be a metric graph and fix two points y, z ∈ Γ. We denote by j z (· , y; Γ) the unique function in PL(Γ) satisfying: (i) ∆ (j z (· , y; Γ)) = δ y −δ z , and (ii) j z (z, y; Γ) = 0. If the metric graph Γ is clear from the context we write j z (x, y) instead of j z (x, y; Γ). The j-function exists and is unique, and satisfies the following basic properties: . The effective resistance between two points x, y ∈ Γ is r(x, y) := j y (x, x). If we want to clarify the underlying metric graph Γ, we use the notation r(x, y; Γ).
Let G be an arbitrary model of Γ. One can explicitly compute the quantities j q (p, v) ∈ R for q, p, v ∈ V (G) using linear algebra (see [BS13,§3]) as follows. Fix a labeling of V (G) as before, and let Q be the corresponding Laplacian matrix. Let Q q be the (n − 1) × (n − 1) matrix obtained from Q by deleting the row and column corresponding to q ∈ V (G) from Q. It is well-known that Q q is invertible.
Let L q be the n × n matrix obtained from Q −1 q by inserting zeros in the row and column corresponding to q. One can easily check that QL q = I + R q , where I is the n × n identity matrix and R q has all −1 entries in the row corresponding to q and has zeros elsewhere. It follows from the compatibility of the two Laplacians that L q = (j q (p, v)) p,v∈V (G) . The matrix L q is a generalized inverse of Q, in the sense that QL q Q = Q.
Remark 4.1. Computing L q takes time at most O(n ω ), where ω is the exponent for matrix multiplication (currently ω < 2.38).
It follows from ξ x (x, y, x, y) = ξ q (x, y, x, y) that Let M T be the m × m matrix whose columns are obtained from 1-chains circ(T, e) associated to fundamental circuits of T , and let N T be the m × m matrix whose columns are obtained from 1-chains cocirc(T, e) associated to fundamental cocircuits of T (see [dJS18b, §7.2.1]). Consider the following matrix averages: the sums being over all spanning trees T of G. It is a classical theorem of Kirchhoff [Kir47] that the matrix of π : Let Ξ be the m × m matrix of cross ratios: Let L be any generalized inverse of Q (i.e. QLQ = Q). Then we have Ξ = B T LB. It is shown in [dJS18b, Proposition 7.8] that the matrix of π : Clearly, F(e) = F(ē), so F(e) is also well-defined for e ∈ E(G).
Remark 4.4. (i) It follows from (4.7) that the sum being over all spanning trees T of G not containing e. (ii) It is a consequence of 'Rayleigh's monotonicity law' that 0 ≤ F(e) < 1, and the equality F(e) = 0 holds if and only if e is a bridge.
Example 4.5. The following observation will be useful for computations. Let e = {u, v} denote an edge segment in a metric graph Γ, and let p ∈ e be a point with distance x from u and distance ℓ(e) − x from v. Then, for each point q ∈ Γ, we have This follows, for example, by a direct computation using (4.8). We leave the details to the interested reader.
4.5. Generalized Rayleigh's laws. We will need the following two results from [dJS18b,§8]. Let Γ be a metric graph. Let e be an edge segment of Γ with boundary points ∂e = {e − , e + }. Let Γ/e denote the metric graph obtained by contracting e (equivalently, by setting ℓ(e) = 0). Then Note that (4.10) is, in fact, a special case of (4.9).
4.6. Contractions and models. Let G be a weighted graph and let e ∈ E(G) be an edge of G. We denote by G/e the weighted graph obtained from G by contracting the edge e and removing all loops that might be created in the process. Assume that G is a model of the metric graph Γ. In particular we may view e as an edge segment of Γ. We then observe that for x, y, z, w ∈ V (G) the cross ratio ξ(x, y, z, w; Γ/e) measured on Γ/e is equal to the cross ratio ξ(x, y, z, w; G/e) measured on (the metric graph canonically associated to) G/e. A similar remark pertains to the j-function j z (x, y; Γ/e) and the effective resistance function r(x, y; Γ/e). We leave the details to the reader.

Calculus of random spanning trees
In this section we start with the real work leading to Theorem A. ℓ(e) + 2 − 2 δ q (p) .
the sum being over all edges e ∈ E(G) incident to p.
Proof. By (4.5) we may write r(p, x) = j q (x, x) − j q (p, p) + 2 (j q (p, p) − j q (x, p)). Therefore Recall from §4.6 the weighted graph G/e obtained by contracting the edge e = {u, v} ∈ E(G) and removing all loops that might be created in the process. Let Par(e) ⊆ E(G) denote the set of all edges parallel to e (i.e. connecting u and v). We make the identification E(G/e) = E(G)\Par(e), and the two vertices u, v ∈ V (G) will be identified with a single vertex v e ∈ V (G/e) (see Figure 3), and V (G)\{u, v} = V (G/e)\{v e }.  r(x, q; G/e) − r(p, q; G/e) ℓ(f ) The sum is over all edges f ∈ E(G)\Par(e) incident to p in G.
If p ∈ {u, v} the result follows immediately from Proposition 5.3: r(x, q; G/e) − r(p, q; G/e) ℓ(e) the sum being over all edges f ∈ E(G) incident to p in G (equivalently, all edges f ∈ E(G/e) incident to p in G/e). So, by symmetry, it remains to show the equality for p = u. Recall we denote the vertex obtained by identifying u and v in G/e by v e (Figure 3). As in the proof of Proposition 5.3, we first compute: where the sums are over all edges f ∈ E(G)\Par(e) incident to u in G. Unlike in the proof of Proposition 5.3, we cannot interpret the second sum as the Laplacian of the j-function on G/e because the summation is not over all edges incident to v e in G/e (e.g. in Figure 3 only edges on the left of v e appear in the summation). We proceed by 'lifting' the problem to G using generalized Rayleigh's laws (4.9) and (4.10). We find It is easily checked that the right hand side is zero for x = v. Moreover, by the definition of cross ratios, we compute ξ(u, v, x, q; G) − ξ(u, v, u, q; G) = ξ(u, v, x, u; G) .
As in the proof of Proposition 5.3 we have By expanding with respect to the base point q, we also compute The result for p = u follows by putting together (5.3), (5.4), (5.5), (5.6).

Energy levels of rooted spanning trees
In this section, we prove a very subtle identity for cross ratios (Theorem 6.3).
6.1. Energy levels. Recall that a rooted spanning tree (T, q) of G comes with a preferred orientation T q ⊆ E(G), where all edges are oriented away from q on the spanning tree T (see §3.1).
Definition 6.1. We define the energy level of a rooted spanning tree (T, q) to be The following result is a justification for our terminology, and is useful in our later computation. Let deg T (v) denote the number of edges incident with v ∈ V (G) in the spanning tree T . Consider the canonical element ν (T,q) ∈ DMeas 0 (G) associated to the rooted spanning tree (T, q) of G defined by Lemma 6.2. We have Proof. By the definition of the preferred orientation T q ⊆ E(G) we have: This is because every vertex v = q has exactly 1 incoming edge and deg T (v) − 1 outgoing edges in T q . At q, however, there is no incoming edge in T q .
The result now follows directly from bilinearity of the energy pairing: The second equality in (6.1) follows from (4.1), because j q (·, q) = j q (q, ·) = 0.
6.2. The average of energy levels. We can now state the most technical ingredient in computing tropical moments of tropical Jacobians.
Theorem 6.3. Fix a vertex q ∈ V (G). We have the equality where the sum on the left is over all spanning trees T of G, and the sum on the right is over all edges e ∈ E(G).
Proof. The result follows by putting together Lemma 6.5, Lemma 6.6, and Lemma 6.7 below.
Lemma 6.4. Let (T, q) be a rooted spanning tree of G. We have the equality Proof. The result follows from Lemma 6.2, and an application of a (generalized) handshaking lemma: for each ψ ∈ M(G) we have Lemma 6.5. Fix a vertex q ∈ V (G). We have the equality Proof. This follows from Lemma 6.4: one only needs to change the order of summations and use (5.1) and (5.2).
To prove the next two results it is convenient to work with matrices. We fix labelings V (G) = {v 1 , . . . , v n } and E(G) = {e 1 , . . . , e m }, and we introduce the following matrices: ⋄ 1 n ∈ R n and 1 m ∈ R m denote the all-ones vectors. ⋄ δ v ∈ R n (resp. δ e ∈ R m ) denotes the characteristic vector of v ∈ V (G) (resp. e ∈ E(G)).
⋄ Z is the m × m matrix whose diagonal entries are zero, and the (i, j)-entries (i = j) are P(e i , e j ). We will also use the matrices Q, L q , R q , and I introduced in §4.2.
Lemma 6.6. We have the equality (6.2) Proof. We start by writing the left-hand side of (6.2) in terms of our matrices: By definitions we observe AY1 m = (s(v 1 ), . . . , s(v n )) T . So, by Proposition 5.3, we have AY1 m = −QX1 n + 2 (1 n − δ q ) Therefore, 1 T n L q AY1 m = −1 T n L q QX1 n + 21 T n L q 1 n − 21 T n L q δ q Note that L q δ q = 0 and L q Q = I + R T q (see §4.2). We also have R T q X = 0. Therefore, 1 T n L q AY1 m = 21 T n L q 1 n − 1 T n X1 n which is the right-hand side of (6.2).
For our next computation, it is convenient to use the notion of Hadamard-Schur products of matrices: for two k × m matrices A, B the Hadamard-Schur product, denoted by A • B, is a matrix of the same dimension as A and B with entries given by (A • B) One useful (and easy to prove) fact about Hadamard-Schur products is the following: Proof. We first write: We write the second sum in (6.4) in terms of our matrices: By (6.3), we know By definitions, one observes AZδ e = (t(v 1 , e), . . . , t(v n , e)) T . Let , P(e) = r(u, v) ℓ(e) .
Theorem 5.4 states: Here X is the n × n diagonal matrix with diagonal (i, i)-entries j q (v i , v i ; G/e) for v i ∈ {u, v}. The diagonal entries corresponding to both u and v are j q (v e , v e ; G/e). Thus we find Note that L q δ q = 0, L q Q = I + R T q , and R T q X = 0. We obtain (6.6) We now use our generalized Rayleigh's law (4.10) twice and write everything in terms of invariants of G: We also use the definition of cross ratios to compute: Putting together (6.4), (6.5), (6.6), (6.7), (6.8), with a simple computation we obtain: By Lemma 6.6, the second term in (6.9) is simplified as (6.10) e={u,v} x∈V (G) P(e) (j q (u, x) + j q (v, x)) = 2 x,y∈V (G) The third and fourth terms in (6.9) are simplified as follows: (6.11) For the first equality we used (4.5). The third equality is by a (generalized) handshaking lemma. The result now follows by putting together (6.9), (6.10), and (6.11).
6.3. Average of energy levels, a variation. For our main application, we will need the following slight variation of Theorem 6.3. Let π : C 1 (G, R) ։ H 1 (G, R) denote the orthogonal projection (as defined in §4.4).
Definition 6.8. We define the center of a rooted spanning tree (T, q) to be σ T := 1 2 e∈Tq π(e) .
Theorem 6.9. We have the equality where the sum on the left is over all spanning trees T of G, and the sum on the right is over all edges e ∈ E(G).
Let Vol (·) denote the volume measure induced by the bilinear form [·, ·] on H 1 (G, R). Let w(G) be the weight of G (as in §4.4). Put g = dim R H 1 (G, R).
Fix an orientation O on G, and fix a spanning tree T of G. It is well-known that {circ(T, e) : e ∈ O\T } is a basis for H 1 (G, R). Let C T denote the totally unimodular g × m matrix whose rows correspond to these basis elements. Then a Gram matrix for the lattice (H 1 (G, Z), The result now follows from a standard application of the Cauchy-Binet formula for determinants.
Let π : C 1 (G, R) ։ H 1 (G, R) denote the orthogonal projection (as defined in §4.4). Each finite collection of 1-chains V = {v 1 , . . . , v k } ⊂ C 1 (G, R) generates a zonotope Z(V ) defined as Now fix q ∈ V (G). Recall (see §3.1) that the rooted spanning tree (T, q) comes with a preferred orientation T q ⊆ E(G) (where edges are oriented away from q on the spanning tree T ). Let σ T := 1 2 e∈Tq π(e) be the center of (T, q) (Definition 6.8). We now state and prove the main result of this section.
is nonempty, then F is a face of both (σ T + C T ) and (σ T ′ + C T ′ ).
Proof. It follows from Proposition 7.3 that, for all spanning trees T of G, we have Moreover, by Lemma 7.1 and Lemma 7.4 (b), we know the sum being over all spanning trees T of G.
Next we describe how these parallelotopes can intersect each other. Let T = T ′ be two spanning trees. We choose an orientation O on G that agrees with T q for e ∈ T , disagrees with T ′ q for e ∈ T ′ \T , and is arbitrary outside T ∪ T ′ . We may partition O into the following (possibly empty) subsets: Consider the oriented subgraph D := S 1 ∪ S 2 ∪ S 3 . Note that the oriented subgraph D is obtained from the edge set T ∪T ′ by removing those edges in T ∩T ′ that have the same orientation in T q and in T ′ q , and by orienting the remaining edges according to O. It is easy to check that D is totally cyclic (i.e. every edge belongs to a directed circuit or, equivalently, it has no directed cocircuit). This implies that there exists a vector v ∈ H 1 (G, R) such that [v, π(e)] > 0 , if e ∈ S 1 ∪ S 2 ∪ S 3 , [v, π(e)] = 0 , if e ∈ S 4 ∪ S 5 .
To see this, consider the oriented (cographic) hyperplane arrangement with normal vectors {π(e) : e ∈ O} in the vector space H 1 (G, R). It is well known (see, e.g., [GZ83,Lemma 8.2]) that there is a one-to-one correspondence between cells of this hyperplane arrangement and totally cyclic subgraphs of G. Our desired vector v is any vector in the cell corresponding to D. Consider the function h : We compute [v, π(e)]} + 1 2 Similarly, we compute It follows that the relative interiors of σ T +C T and σ T ′ +C T ′ are disjoint. Moreover, if F = (σ T + C T ) ∩ (σ T ′ + C T ′ ) = ∅, then the intersection is contained in h −1 (0), which is a hyperplane in H 1 (G, R). The result follows from this observation, together with (7.1) and (7.2).

Tropical moments of tropical Jacobians
In this section, we prove our promised potential theoretic expression for tropical moments of tropical Jacobians.
where the sums are over all edges e ∈ E(G).

Proof. Recall
I(Jac(Γ)) = where µ L is the Lebesgue measure on H 1 (G, R), normalized to have µ L (Vor(0)) = 1. By Theorem 7.5, we obtain the sums being over all spanning trees T of G. We also have The last equality is because C T is centrally symmetric and [σ T , y] is odd. By Lemma 7.1 and Lemma 7.4 (b) we have On the other hand, α e π(e), e ∈T α e π(e)] dα [π(e), π(e)] Here dα = e ∈T dα e denotes the usual Lebesgue measure on R g . The first equality is by the change of variables theorem, and the last equality holds because α e α f is an odd function on the symmetric domain [− 1 2 , 1 2 ] g . Clearly (see §4.4): The result now follows from (8.6), (8.7), and Theorem 6.9.  Fix the minimal model G whose vertex set consists of the two branch points u and v, and let q = v. Let R denote the effective resistance between u and v: Then, for each edge e i = {u, v}, we have By Theorem 8.1 one computes: We record two other special cases for our application in §9: • If m = 2 then the metric graph Γ is just a circle, and where ℓ is the total length of the circle. • If m = 3 then we have I(Jac(Γ)) = 1 12

Heights of Jacobians in dimension two
In this section we specialize (1.6) to the case where the principally polarized abelian variety (A, λ) is a Jacobian variety of dimension two. We use (1.6) together with Example 8.3 to give a conceptual explanation of a result due to Autissier [Aut06]. For more background and for terminology used in this section we refer to [dJS18a].
Let k be a number field. Let X be a smooth projective geometrically connected curve of genus two with semistable reduction over k. Let Jac(X) be the Jacobian variety of X. As in §1.6 we denote by M(k) 0 and M(k) ∞ the set of nonarchimedean places and the set of complex embeddings of k. For each v ∈ M(k) 0 we have a metric graph Γ v canonically associated to X at v by taking the dual graph of the geometric special fiber of the stable model of X at v, see for example [Zha93]. The tropical Jacobian Jac(Γ v ) is canonically isometric with the canonical skeleton of the Berkovich analytification of Jac(X) at v.
Equation  where for each v ∈ M(k) 0 the local invariant α v is given explicitly in terms of the metric graph Γ v by means of a table. See the Remarque following the proof of [Aut06, Théorème 5.1] where, for each of the seven possible topological types of stable dual graphs in genus two, the invariant α v is given in terms of the edge lengths of a minimal model of Γ v .
A simple explicit calculation using Example 8.3 shows that for all seven topological types as listed in Autissier's table, the equality α v = I(Jac(Γ v )) is verified. For example, consider case VII in the last row of Autissier's table, corresponding to a banana graph with three edges. The table in this case gives where x 1 , x 2 , x 3 are the three edge lengths. By Example 8.3, with m = 3, we see immediately that α v = I(Jac(Γ v )) for case VII. The cases I-VI are very similar, and in fact simpler, as the irreducible components of the corresponding graphs are either bridges, which by Remark 8.2 (ii) contribute zero to I(Jac(Γ v )), or circles, which by Example 8.3 with m = 2 contribute 1/12 of their total length to I(Jac(Γ v )). We thus have a complete conceptual explanation of all entries in Autissier's table.

Tau invariant of metric graphs
Let Γ be a metric graph. The notion of Arakelov-Green's function g µ (x, y) associated to a measure µ on Γ is introduced in [CR93,Zha93]. It can be shown ([CR93, Theorem 2.11]) that there exists a unique measure µ can on Γ having total mass 1, such that g µcan (x, x) is a constant. This constant is by definition τ (Γ). Alternatively τ (Γ) can be interpreted as a certain 'capacity', with equilibrium measure µ can and with potential kernel (1/2 times) the effective resistance function r(x, y) ([BR07, Corollary 14.2]). See also [BF06,BR07,Cin11] for more background, examples, and formulas.
We will work with the following definition (see, e.g., [BR07,Lemma 14.4]) in terms of the effective resistance function.
It is elementary and well-known that the real number τ (Γ) is independent of the choice of q ∈ Γ.
The reader will notice the similarity between the right hand side in Theorem 10.2 and the right hand side in Theorem 8.1. In fact we can now prove a simple linear relation between τ (Γ), the tropical moment I(Jac(Γ)) and the total length of Γ. This will be the subject of the final section.

The linear relation
Definition 11.1. Let Γ be a metric graph, and fix a model G of Γ. The total length of Γ is defined by It is easily seen that ℓ(Γ) is independent of the choice of the model G.