Discrete Dirac Operators, Critical Embeddings and Ihara-Selberg Functions

The aim of the paper is to formulate a discrete analogue of the claim made by Alvarez-Gaume et al., realizing the partition function of the free fermion on a closed Riemann surface of genus g as a linear combination of 2^{2g} Pfaffians of Dirac operators. Let G=(V,E) be a finite graph embedded in a closed Riemann surface X of genus g, x_e the collection of independent variables associated with each edge e of G (collected in one vector variable x) and S the set of all 2^{2g} Spin-structures on X. We introduce 2^{2g} rotations rot_s and (2|E| times 2|E|) matrices D(s)(x), s in S, of the transitions between the oriented edges of G determined by rotations rot_s. We show that the generating function for the even subsets of edges of G, i.e., the Ising partition function, is a linear combination of the square roots of 2^{2g} Ihara-Selberg functions I(D(s)(x)) also called Feynman functions. By a result of Foata--Zeilberger holds I(D(s)(x))= det(I-D'(s)(x)), where D'(s)(x) is obtained from D(s)(x) by replacing some entries by 0. Thus each Feynman function is computable in polynomial time. We suggest that in the case of critical embedding of a bipartite graph G, the Feynman functions provide suitable discrete analogues for the Pfaffians of discrete Dirac operators.


Introduction
It is well known, see e.g. [m], [k] and references therein, how to formulate critical embedding of a finite graph in a closed Riemann surface in such a way that one can read off from the collection of angles of the embedding, termed discrete conformal structure, the critical values of independent variables (i.e. the edge weights or coupling constants in the physical terminology) attached to the edges of the Dimer and the Ising problems on G. It is rather attractive task to study whether some of the properties associated to the notion of criticality in statistical physics may also be derived from the collection of data attached to critical embeddings.
The main theme of this paper is the formulation of certain discrete analog of the claim made by Alvarez-Gaume et all, see [a], that the partition function of free fermion on a closed Riemann surface of genus g is a linear combination of 2 2g Pfaffians of Dirac operators. The theory of free fermion is generally accepted to be closely related to the criticality of both the Dimer and the Ising problems on graphs.
Quite recently the Dimer problem and its determinant type solution received considerable interest, see e.g. [k], [c]. The authors of [bt] study the critical Ising model by reducing it via the determinant type method to the Dimer model. The case of planar graphs is well-understood in this setting, [k]. However, as proved in [c], if one wants to obtain a discrete analog of the claim of [a] for the Dimer model in a surface of a positive genus, one has to take into account global restrictions on the graph embedded in the surface.
For the sake of completeness, we review in the Appendix the combinatorial approach used to describe determinant type reduction of the critical Dimer model on Riemann surfaces of positive genus. The obstruction emerging in this description is centered around the notion of Kasteleyn flatness.
In this paper we propose to overcome the previously mentioned limitations and obstacles for the determinanttype reasoning by replacing the determinants by so called Ihara-Selberg functions of the graph G. This in turn allows to rewrite the generating function of the even sets of edges of G (the Ising model partition function associated to the graph G) as a linear combination of 2 2g square roots of Ihara-Selberg functions which we call Feynman functions. We build the Feynman functions in a combinatorial way in order to capture the emergence of the rotations rot s for Spin structures s in the analysis of the Ising partition function, and realization of rot s via the quadratic forms on H 1 (X, F 2 ). This approach makes use of the original treatment of the Ising partition function via Ihara-Selberg functions by Sherman, see [s], [l]. Our basic notion of a g−graph G g allows convenient treatment of a planar model for the embedding of the graph G in a closed Riemann surface of genus g. The g−graphs have been successfully used recently in [lm] in a related situation. Moreover, the planar model may improve the insight into the analysis of the limiting process, which has not been done yet. The rotations are treated in a different (and perhaps more elegant) way by Johnson [j].
Finally, we show that the discrete Dirac operators appear very naturally in the context of the Feynman functions and comment on the relationship with continuous counterpart called analytic torsion, see [rs1], [rs2].
1.1. Critical embeddings of graphs into closed Riemann surfaces. For the material reviewed in this subsection, see e.g. [m] and references therein. Let us consider a triple (X, G, ϕ), where X is a closed Riemann surface, G = (V, E) a graph and ϕ : G ֒→ X an embedding. The image of ϕ defines a CW decomposition of X and X \ ϕ(G) is a disjoint union of open faces.
The metric realization of X, compatible with an atlas {U i , ϕ i : U i → C| i U i = X} covering X, looks as follows. For a finite set of points {P j } j on X there exists a flat metric with conical singularities at {P j } j such that the cone angles θ Pj fulfill the Gauss-Bonnet formula χ(X) = j (1 − θP j 2π ), and there is no other restriction on them. Because the Euler characteristic χ(X) is even, one can choose θ Pj to be odd multiples of 2π for each j, for example. Recall that the local model for a neighborhood of a conical singularity in P j is the standard cone C(θ) An embedding of a graph G in a surface X induces the dual graph G * of the embedding. We regard G * as an abstract graph with natural embedding into X, so that each vertex of G * lies on the face of the embedding of G it represents. The central notion related to the couple G, G ⋆ is of diamond graph -for simultaneous embedding of G and G * , the diamond graph G + has the vertex set equal to V (G) ∪ V (G * ) and the edges connecting the end-vertices of each dual pair of edges e, e * into a facial cycle F (e) of G + , which is a 4−gon called a diamond (see Figure 1). We say that an embedding of G is critical if it is isoradial, i.e., in any local trivialization realized by complex plane is each face of G a cyclic polygon (the face is possible to inscribe into a circle.) Moreover, the circumcenters of the facial polygons are contained in the closures of faces and all the facial polygons have the same radius. An equivalent description based on diamond graph G + looks as follows. The embedding ϕ of G + is critical if each of its faces F (e), e ∈ E, is a rhombus, i.e., the following conditions hold true (for all i) with respect to the induced conformal class of metrics on ϕ(X): (1) The diagonals of each rhombus (in Im(ϕ i • ϕ)) are perpendicular, (2) The lengths of sides of all rhombi (in Im(ϕ i • ϕ)) are the same. In particular, the first property is independent of the choice of trivialization, i.e. of the index i together with Im(ϕ i • ϕ), because the transition maps ϕ i • ϕ −1 j are conformal and so angle preserving. The second condition already depends on the choice of a metric in a given conformal class of metrics.
1.2. Dimer and Ising partition functions. We associate an independent variable x e with each edge e ∈ E of G. A subset E ′ ⊂ E of edges is called perfect matching or dimer arrangement, if the induced graph (V, E ′ ) has each vertex of degree one. Let P(G) denote the set of the perfect matchings of G. We define the dimer partition function of G by where x = (x e ) e∈E is the vector of edge weights.
A subset E ′ ⊂ E of edges is called even if the induced graph (V, E ′ ) has each vertex of even degree. We denote by E(G) the set of even subsets of edges of G.
The generating function of the even sets of edges of G is defined by It is well known (see e.g. [lm]) that E(G, x) is equivalent to the Ising partition function on G defined by where J e (e ∈ E) are the weights (coupling constants) associated with edges of the graph G and β the scale (inverse temperature), and 1.3. The aim of the article and its main results. We denote by Σ the set of Spin structures on Riemann surface X. Following the articles [l], [j], [lm], we associate the rotation to each spin structure. This enables us to define (2|E| × 2|E|) matrices ∆(s)(x), s ∈ Σ in a way that each ∆(s)(x) is the matrix of the transitions between the oriented edges determined by the rotation rot s corresponding to the spin structure s. The main result of the article is Theorem 1. Let G be a graph embedded in a closed Riemann surface X of genus g and let Σ be the set of Spin structures on X. Let us denote for each s ∈ Σ by ∆(s)(x) the matrix introduced in Definition 2.10. Let F (∆(s)(x)) be the Feynman function defined in Definition 2.12 as the square root of the Ihara-Selberg function I(∆(s)(x)). Then E(G, x) is a linear combination of 2 2g functions F (∆(s)(x)), s ∈ Σ. Moreover, each F (∆(s)(x)) is computable in a polynomial time.
Furthermore, let G be a bipartite graph critically embedded in the Riemann surface X of genus g equipped with a flat metric with conical singularities in such a way that no conical singularity is located at a vertex of the graph G. Then for each Spin structure s ∈ Σ the matrix ∆ 2 (s) introduced in Definition 2.16 is related to the discrete Dirac operator associated to s (see [c] for its definition) in a way described in Corollary 2.19.
Acknowledgements. The authors would like to thank David Cimasoni for extensive discussions about discrete Dirac operators and Gregor Masbaum for extensive discussions and suggestions about rotations and spin structures.

Ihara-Selberg functions and Feynman functions
In this section we assume the graph G is embedded in a closed Riemann surface X of genus g. We suggest to consider the Ising partition function E(G, x) instead of the Dimer partition function P(G, x), and the square root of certain Ihara-Selberg functions on the graph G (which we call the Feynman functions) instead of the determinant. Similar but much less advanced structure can be found e.g. in [sm] under the notion of Ising preholomorphic observable.
2.1. Ihara-Selberg function. Let G = (V, E) be a graph. For e ∈ E we denote by o e an orientation of e, and o −1 e the reversed directed edge to o e . As above, let x = (x e ) e∈E be the formal variables associated with edges of G. If o is any orientation of the edge e, we associate the new variable x o with it and always let We consider an equivalence relation on the set of finite-length sequences (z 1 , . . . , z n ) satisfying z 1 = z n : each such sequence is equivalent with each of its cyclic shifts. The equivalence classes will be called circular sequences.
A circular sequence We denote the set of prime reduced cycles of G by G. The Ihara-Selberg function associated to G is where the infinite product is defined by the formal power series: and the sum is over all finite subsets F of G.
where M ′ is the matrix obtained from M by letting 2.2. Combinatorial model for closed Riemann surfaces of genus g. In this section we restrict ourselves to the following standard representation of closed Riemann surface X of genus g: we regard X as a regular 4g−gon R (called the base polygon) in the plane with sides denoted anti-clockwise by z 1 , . . . , z 4g , and the pairs of sides z i , z −1 i+2 and z i+1 , z −1 i+3 , i = 1, 5, . . . , 4(g − 1) + 1, identified. This defines a flat metric on X with one conical singularity of angle 2π(2g − 1). We only consider embeddings of graphs on X which meet the boundary of R transversally. Moreover, to simplify the arguments, we only consider embeddings of graphs where each edge is represented by a straight line on X. The general embeddings may be treated analogously.
We now describe how an embedding of a graph in a Riemann surface can be used to make its planar drawing of a special kind. We follow [l], [lm].
Definition 2.2. The highway surface S g consists of the base polygon R and the bridges R 1 , .
• Each even bridge R 2i is a rectangle with vertices y(i, 1), . . . , y(i, 4) numbered anti-clockwise. It is glued with R so that its edge [y(i, 1), y(i, 2)] is identified with the edge [z 4(i−1)+2 , z 4(i−1)+3 ] and the edge [y(i, 3), y(i, 4)] is identified with the edge [z 4(i−1)+4 , z 4(i−1)+5 ] (the indexes are always considered modulo 4g.) There is an orientation-preserving immersion Φ of S g into the plane which is injective except that for each i = 1, . . . g, the images of the bridges R 2i and R 2i−1 intersect in a square (see Figure 2). Now assume the graph G is straight-lines-embedded into a closed Riemann surface X of genus g. We realize X as the union of S g and an additional disk R ∞ glued to the boundary of S g . By an isotopy of the embedding we may assume that G does not meet the disk R ∞ and moreover, all vertices of G lie in the interior of R. We may also assume that the intersection of G with any of the rectangular bridges R i consists of disjoint straight lines connecting the two sides of R i glued to the base polygon R. The composition of the embedding of G into S g with the immersion Φ yields a drawing ϕ of G in the plane, where each edge of G is represented by a piece-wise linear curve (see Figure 2). A planar drawing of G obtained in this way will be called g−graph and denoted by G g . Observe that double points of a g−graph can only come from the intersection of the images of bridges under the immersion Φ of S g into the plane. Thus every double point of a special drawing lies in one of the squares Φ(R 2i ) ∩ Φ(R 2i−1 ). Definition 2.3. Let G be embedded in S g and let e be an edge of G. By definition, the embedding of e intersects each bridge R i in disjoint straight lines. The number of these lines is denoted by r i (e). For a set A of edges of G we let r(A) be the vector of length 2g defined by r(A) i = e∈A r i (e).
Definition 2.4. If p is a prime reduced cycle of G then we denote by p g the image of p in G g .
Clearly, p → p g gives bijective correspondence between the prime reduced cycles of G and the prime reduced cycles of G g . 2.3. Rotations. Let G be a graph embedded in a closed Riemann surface X of genus g and let G g be its g−graph. We recall that each edge of G in G g is represented by a piecewise linear curve. Let p be a prime reduced cycle of G and let p g the corresponding prime reduced cycle of G g . We will introduce 4 g rotations of p g .
First of all, we denote by 0 the 0−vector of length 2g and in analogy with the usual definition of the rotation of a regular closed curve in the plane we define rot 0 by setting rot 0 (p g ) = t y 0 (t) (mod 2), where we sum over all the transitions of the linear parts of p g . If the transition t consists in passing from directed segment e to directed segment e ′ then y 0 (t) = z 0 (t)(2π) −1 , where z 0 (t) is the angle of the transition. The angle z 0 (t) is negative if the transition is clockwise, and z 0 (t) is positive if the transition is anti-clockwise (see Figure 3). Consequently, for each arithmetic vector s ∈ F 2g 2 (F 2 is the field with two elements) we let y s (t) = y 0 (t) + sr({e}) and rot s (p g ) = t y s (t) = sr(p) + rot 0 (p g ) (mod 2). Here sr denotes the scalar product of vectors s, r. Observe that for each s, (−1) rots(p g ) = (−1) rots((p g ) −1 ) .
Definition 2.5. We introduce the equivalence relation on the set of prime reduced cycles of G: we say that p 1 is equivalent to p 2 if p 1 = (p 2 ) −1 . The set of equivalence classes of this equivalence relation is denoted by [G]. Analogously, we introduce the equivalence relation on the set of prime reduced cycles of G g : we say that p g 1 is equivalent to p g 2 if p g 1 = (p g 2 ) −1 . The set of equivalence classes of this equivalence relation is denoted by The previous considerations allow to introduce the Feynman functions: where the sum is over all finite subsets [F ] g of [G] g . The following theorem appears in [l]. We assign to s ∈ F 2g 2 the sign according to sign(s) = (−1) i=1,3,...2g−1 sisi+1 . Theorem 3. Let G be a graph with each vertex of degree equal to 2 or 4, embedded into a closed Riemann surface X of genus g. Then Theorem 3 can easily be extended to general graphs.
Theorem 4. Let G be a graph embedded into a closed Riemann surface X of genus g. Then Proof. We will construct a graph G ′ along with its embedding into X so that the degree of each vertex of G ′ is equal to 2 or 4, such that there are two subsets Z, O of E(G ′ ) and a bijection f : Theorem 4 then follows from Theorem 3. We construct graph G ′ in two steps. Let OD denote the set of the vertices of G of an odd degree. We start with O = Z = ∅.
Step 1. If OD = ∅ then it is a standard observation of the graph theory that G has a set of edge-disjoint paths so that each vertex of OD is an end-vertex of exactly one of the paths, and all the end-vertices of the paths are among the elements of OD . In particular, |OD| is even. Let P denote the set of the edges of these paths. We construct graph G 1 from G by adding, for each edge {u, v} ∈ P , a path of length 3 with end-vertices u, v (see Figure 4). We further let Z be the set of all the edges of G 1 \ G. Note that G 1 has all degrees even.
Step 2. If v is a vertex of G 1 of an even degree bigger than 4 then we modify G 1 by splitting the degree of v by introducing the new splitting edge; the operation can be read off the Figure 5. We repeat this step until the resulting graph G ′ = (V, E ′ ) has all degrees equal to 2 or 4. Finally we let f be the tautological injection of E into E ′ .
It is straightforward to realize that all assumptions of the construction are satisfied after application of finite number of these steps. In order to associate rotations to quadratic forms, we first need to study self-intersections of the prime reduced cycles which traverse each edge of the graph at most once.
2.4. Self-intersections of prime reduced cycles. Let p be a prime reduced cycle of G which traverses each edge of G at most once. For each vertex v of G, let p(v) denote the set of the directed edges of p incident with v, and let P (p, v) denote the partition of p(v) into pairs which correspond to the transitions of p at v. If a prime reduced cycle p traverses each edge of G at most once then the transitions of p at v are well described by the directed chord diagram diag(p, v) (see Figure 6): Definition 2.6. Let p be a prime reduced cycle of G which traverses each edge of G at most once. The directed chord diagram diag(p, v) is obtained by taking the cyclic ordering of the edges of G incident with v and induced from the embedding of G in X, and by introducing the directed chord (e, e ′ ) for each class of P (p, v) consisting of an orientation of e followed by an orientation of e ′ . We define the number of self-intersections of p as the number of the pairs of intersecting chords of diag(p, v), v ∈ V .

Quadratic forms.
A subset of edges E ′ ⊂ E of a graph G embedded in a closed Riemann surface of genus g is called even if each degree of the graph (V, E ′ ) is even. The set of even subsets of G is denoted by E(G). Let H := H 1 (X, F 2 ) be the first homology group of X with coefficients in the field F 2 . We observe that two even subsets of edges A, B belong to the same homology class in H if and only if r(A) = r(B) (mod 2) (see Definition 2.3 for the definition of r). We have a basis a 1 , b 1 , . . . , a g , b g of H, where a i , b i correspond to the even subsets A i , B i satisfying r(A i ) 2i−1 = 1 and r(A j ) = 0 otherwise, and r(B i ) 2i = 1 and r(B j ) = 0 otherwise.
Recall that H carries a non-degenerate skew-symmetric bilinear form called (mod 2) intersection form, denoted by '·'. In the basis chosen above, it is given by a i ·a j = b i ·b j = 0 and a i ·b j = δ ij for all i, j = 1, . . . , g.
Definition 2.7. A quadratic form on (H, ·) associated to the bilinear form '·' is a function q : H → F 2 fulfilling q(x + y) = q(x) + q(y) + x · y for all (x, y ∈ H).
We denote the set of quadratic forms on H over F 2 by Q. The cardinality of Q is 4 g . Let E ′ ∈ E(G) be an even subset of edges of G. For each vertex v, let E ′ (v) denote the subset of edges of E ′ incident with v, and given the embedding of G in X, let N (E ′ , v) denote a partition of E ′ (v) into pairs which correspond to the non-crossing undirected transitions at v on X (see Figure 7). Notice that N (E ′ , v) need not be unique. We say that a prime reduced cycle p of G is consistent with Proof. The first part is straightforward. The second part is clear since no edge is traversed more than once by any of the p i 's.
We recall that E(G) denotes the set of the even subsets of edges of graph G. Let H(G) ⊂ H denote the subgroup consisting of the homology classes realized by elements of E(G).
Definition 2.9. For each s ∈ F 2g 2 , we define a function q ′ s : (1 + rot s (p g )) (mod 2), where p g is the realization of p in the g−graph G g (see Definition 2.4).
Theorem 5. For each s ∈ F 2g 2 , the function q ′ s induces a function Moreover, each q s is a quadratic form restricted to H(G).
Proof. We first show that q 0 is a quadratic form. Let W (E ′ ) = {[p 1 ], . . . , [p k ]} be as in Observation 2.8. We have, for each i, rot 0 (p g i ) = 1+ the number of the self-intersections of p g i (Observation 2.8). Moreover, by the choice of ∪ v∈V N (E ′ , v), the self-intersections of each p g i as well as the crossings of p g i with p g j , i = j, lie outside of the base polygon R. We also recall that two closed curves in the plane have always an even number of crossings. Hence . This means that, by Definition 2.7, q 0 coincides on H(G) ⊂ H with the quadratic form on H whose value on each of the basis vectors a i and b i is zero.
We recall that there is a natural bijection between the set Σ of the Spin structures of X and the quadratic forms on the F 2 −valued first homology classes of X (see [j]). Hence Theorem 5 associates a Spin structure to each rot s , s ∈ F 2g 2 , and this map is bijective. From now on we will consider the rotations rot s indexed by Spin structures on X. However, we still have rot s determined by the derived drawing of G realized by the g−graph G g .
The usefulness of quadratic forms in studying rotations rot s was suggested to us by G. Masbaum, who also suggested Theorem 6 below.
Theorem 6. Let p be a prime reduced cycle of G so that each edge of G is traversed at most once in p, and let s ∈ Σ. Then (mod 2) rot s (p g ) = 1 + the number of the self-intersections of p + q s (p), where p g is the realization of p in the g−graph G g .
Proof. By the definition of rot s it suffices to prove the statement for s = 0. We have (mod 2) rot 0 (p g ) = 1 + the number of the self-intersections of p g = 1 + the number of the self-intersections of p + g i=1 r(p) 2i−1 r(p) 2i = 1 + the number of the self-intersections of p + q 0 (p).

Feynman functions.
Definition 2.10. Let G be a graph embedded in a closed Riemann surface X of genus g. Let E o = ∪{o e , o −1 e : e ∈ E}, hence |E o | = 2|E|. To each Spin structure s ∈ Σ we associate ∆ (s) κ(o) = −3/4 if the segment of the embedding of o outside R in G g is oriented oppositely to the anti-clockwise orientation of the boundary of R (as directed edge (a, b) in Figure 2), (3) κ(o) = 3/4 if the segment of the embedding of o outside R in G g is oriented in agreement with the anti-clockwise orientation of the boundary of R (as directed edge (a, b) in Figure 2). We further define ∆ ′ (s) . We are going to introduce the Feynman functions, see Definition 2.12 below. As its first ingredient we need to extend Definition 2.6 to the number of self-intersections of general prime reduced cycles, i.e., the prime reduced cycles that can go through an edge more than once. This can be done for instance in the following way. We define the infinite graphG by replacing each edge e by an infinite sequence of edges e 1 , · · · , e i , · · · with the same end-vertex as e. We embedG in X so that we 'thicken' the embedding of each edge e of G, and embed the edges e 1 , · · · , e i , · · · to this thickened part of e so that they are piece-wise linear and internally disjoint. Next, for each prime reduced cycle p of G whose circular sequence of directed edges is (a 1 . . . , a k ), a j being an orientation of edge e(j) of G (possibly e(j) = e(l) for j = l), we define prime reduced cyclep inG by replacing each a j by the same orientation of e(j) j . It is important that the prime reduced cyclep uses each edge ofG at most once. We thus define the number of the self-intersections of a prime reduced cycle p of G as the number of the self-intersections of the prime reduced cyclep ofG (see Definition 2.6). The number of the self-intersections of a prime reduced cycle p g of G g is defined analogously.
We note that for the prime reduced cycles of G containing each edge of G at most once this is consistent with Definition 2.6. We also note that the following basic property is satisfied.
Observation 2.11. Let p be a prime reduced cycle of G. Then we have (mod 2) 1 + the number of the self-intersections of p g = rot 0 (p g ).
Definition 2.12. Let s ∈ Σ be a Spin structure. We define Proof. (of the first part of Theorem 1) We note that Hence F (∆(s)(x)) is the square root of I(∆(s)(x)). By Theorem 2, I(∆(s)(x)) = det(I − ∆ ′ (s)(x)) and each F (∆(s)(x)) is computable in polynomial time. The first part of Theorem 1 is now a corollary of Theorem 4. 2.7. The Arf-invariant formula. The linear combination appearing in Theorem 1 may be understood as the Arf-invariant formula This formula was suggested by G. Masbaum and independently by D. Cimasoni, [cc]. A proof following [s], [l] is work in progress (see [lmm]). We only indicate here the emergence of E(G, x) in the right-hand-side of the formula above. We know by Theorem 5 that for each even set E ′ ∈ E(G) and for each s ∈ Σ, (1 + rot s (p g )) (mod 2). (17) Next, the basic result about the Arf invariant (see e.g. Lemma 2.10 of [lm]) states that Hence, for each E ′ ∈ E(G), e∈E ′ x e appears in the expansion of the right-hand-side of the Arf-invariant formula. It is needed to show that the remaining terms in the expansion are equal to zero.
2.8. Discrete Dirac operators. So far we considered an arbitrary embedding of a graph G in a Riemann surface X. Now, let G = (W, B, E) be bipartite and the embedding critical. The vertices of W are called white and the vertices of B are called black. We also assume in this subsection that the conical singularities are not located at the vertices of G.
We recall the notation E o = ∪{o e , o −1 e : e ∈ E}. Let W o be the subset of E o consisting of the edges directed from its black vertices to its white vertices. Analogously, let B o = E o \ W o be the set of edges directed from its white vertex to its black vertex.
The key construction has the following structure:  The discrete Dirac operator D(s) of a bipartite graph G = (V, E), V = W ∪ B, corresponding to a Spin structure s ∈ Σ, is defined as the weighted adjacency (|V | × |V |)−matrix; [k] contains the definition for the planar graphs and [c] defines half of (or, the chiral part of) D(s), which uniquely determines D(s). We observe in this subsection that the matrix ∆ 2 (s) is closely related to D (s).
To that aim we fix the coordinate chart on the Riemann surface such that a black vertex v ∈ B lies at 0 ∈ C in this local chart. The directed edges emanating from a white vertex and terminating at v are denoted e v 1 , . . . , e v k . Similarly, we fix an edge e v w emanating from v and terminating at some white vertex w ∈ W . The (vw)-matrix element of the Dirac operator is D (vw) = l((e v w ) * )e iα , where α is the angle between the edge e v w and the real axis of the local coordinate chart. Note that the change in local coordinate chart does not preserve the real axis, but does preserve the angle α. On the other hand the (e v i , e v w )-entry of our matrix ∆ 2 (s) is equal to l((e v w ) * )e iαi , where α i is the angle between e v i , e v w measured anticlockwise, see Figure 3. In particular, in the local coordinate chart in which the edge e v i lies on the real axis, we have α = α i . Equivalently, the matrix coefficients in a given row of our matrix ∆ 2 (s) indexed by directed edge e are (constant) multiples of the row in the Dirac matrix corresponding to the terminal vertex of e. The same applies when one starts with the white vertex instead of the black one.
The basic observation about the matrices ∆ 2 (s) and D(s) can be formulated in the following way. The last part of Theorem 1 is contained in the next Corollary.
Corollary 2.19. Each matrix ∆ 2 (s), s ∈ Σ a spin structure, may be obtained from the discrete Dirac operator D(s), whose chiral part is defined in [c], by finite number of operations: (1) Adding identical copy of a row, (2) Multiplying a row by a complex number, (3) Adding 2|E| − |V | zero-entries to each row.
Remark 2.20. The properties that graph G is bipartite and critically embedded, and the condition that the conic singularities of the metric are not located at the vertices of G, are needed in [c] to show that constant functions belong to the kernel of the discrete Dirac operators.
2.9. Fermionic expansion of the Feynman functions. In the last part of the paper we rewrite each Feynman function as the alternating sum of the traces of the skew-symmetric powers of matrices ∆ ′ (s)(x). The skew-symmetric powers are closely related to the analytic torsion on Riemann surfaces. These considerations may lead to a realization of the analytic torsion as a continuous limit of the Feynman functions. Let T ′ G be the directed graph obtained from T G by deleting all directed edges of the type (o, o −1 ), where o is an orientation of an edge of G. Clearly, ∆ ′ (s)(x) is the weighted adjacency matrix of the directed graph T ′ G . We recall that each Feynman function F (∆(s)(x)) is the square root det(I − ∆ ′ (s)(x)) (Theorem 2). We first describe the directed graph T ′ G in terms of the graph G. The set of the vertices of T ′ G is W o ∪ B o . Let e = {b, w} be an edge of G between black vertex b and white vertex w. The edge e gives rise to two vertices of T ′ G , namely e b = (w, b) and e w = (b, w). If the graph G is critically embedded in a closed Riemann surface X, the vertex e b of T ′ G is represented by a point on the embedding of e 'near' the vertex b, and the vertex e w of T ′ G is represented by a point on the embedding of e 'near' the vertex w. (see Figure 8).
Let w 1 , . . . , w k be the white vertices incident to b in G and different from w, and let e i = {b, w i }. Then T ′ G contains all the directed edges (e b , e i w ). Analogously, let b 1 , . . . , b l be the black vertices incident to w in G and different from b, and let f i = {w, b i }. Then T ′ G contains all the directed edges (e w , f i b ) (see Figure 8).
Proof. The functions det, T r do not depend on the representative in the conjugacy class {A → gAg −1 |g ∈ Gl(V )}, so it is sufficient to consider the basis of V in which A has Jordan block structure. We shall stick to the generic case of semi-simple conjugacy class, i.e. all Jordan blocks have size 1. The proof in the presence of a non-trivial Jordan block follows from the generic case by continuity.
Let us mention a more general motivating geometrical and homological context for the Fermionic formula, see [rs1], [rs2]. Let (M, g) be a compact Riemannian manifold and E → M a vector bundle on M . We can associate to the spectrum of Laplace operator acting on i-forms twisted by E, defined by analytic continuation of the right hand side convergent for Re(s) ≫ 0 to the whole complex plane C. Here Spec(△ i g ) = {λ j } j . The zeta function regularized determinant of △ i g is defined by Then the analytic torsion T (E, g, △ i g ) is The logarithm of analytic torsion is then half of the weighted sum of functional determinants for Laplace operators. In particular, observe that in the case of analytic torsion on a Riemann surface (X, g) we have where △ 0,1 g is the Laplace operator acting on (0, 1)-forms of (X, g), [rs2]. The discrete analogue of 1-forms was considered by Mercat in [m], see also Lovasz [lo]. A 1-form is a function on the set of directed edges of an embedded graph. This parallels to our matrix ∆ ′ (s)(x), which is being indexed by the directed edges of the critically embedded graph G.
It is clear that the previous zeta function regularization boils down to the determinant computation in the case of an operator T acting on a finite dimensional vector space. Let {λ 1 , . . . , λ k } ⊂ Spec(T ) be the subspace of non-zero eigenvalues of T . Its spectral zeta function is In conclusion, exp − d ds ζT (s)|s=0 is equal to the regularized determinant det ′ (T ) of T .

Appendix: Pfaffian method, Dimers at criticality and Determinants
This paper studies a question whether one can define, using the geometric data provided by a critical embedding of a graph G in a Riemann surface, weights of the edges of G in a way that the matrix of these weights captures the basic properties of discrete Dirac operator and the partition function of the Dimer or Ising models with these weights may be explicitly evaluated.
For the sake of completeness we briefly review the Pfaffian method which gives a general way to enumerate these partition functions for embedded graphs.
3.1. Kasteleyn orientations. The first step in this theory is the reduction of E(G, x) to P(G δ , x), where G δ is obtained from G by local changes which do not affect genus of the Riemann surface X in which G is embedded. This construction (see e.g. [lm]) is not relevant here, so we omit it and concentrate on the Dimer partition function P(G, x).
Assume the vertices of G are numbered from 1 to n. An orientation of G is obtained by prescribing one of the two possible directions to each edge of G. If D is an orientation of G, we denote by A(G, D) the skew-symmetric adjacency matrix of D defined as follows: The diagonal entries of A(G, D) are zero, and the off-diagonal entries are where the sum is taken over all edges e connecting vertices i and j, and the sign in front of x e is 1 if e is oriented from i to j in the orientation D, and −1 otherwise. It is well known that the Pfaffian of A(G, D) counts perfect matchings P(G) of the graph G with signs: where sign(M, D) = ±1. We use this as the definition of the sign of a perfect matching M with respect to the orientation D. The following statement is the basic result in the field: Theorem 7 (Kasteleyn [ka], Galluccio-Loebl [gl], Tesler [t], Cimasoni-Reshetikhin [cr]). If G embeds into a Riemann surface of genus g, then there exist 4 g orientations D i (i = 1, . . . , 4 g ) of G such that the perfect matching polynomial P(G, x) can be expressed as a linear combination of the Pfaffian polynomials Pfaf A(G, D i )(x). Moreover, the orientations D i are Kasteleyn orientations, i.e., they satisfy the following property: if F is a facial cycle of G then F has an odd number of edges oriented in D i in agreement with the clockwise traversal of F .
The formula of Theorem 7 is called the Arf-invariant formula, as it is based on the property of the Arf invariant for quadratic forms in characteristic two. As far as we know, the relationship with the Arf invariant was first observed in [cr]. In [ku], Kuperberg introduced a generalization of the notion of Kasteleyn orientations, called Kasteleyn flatness.
3.2. Kasteleyn curvature. We recall that a graph G = (V, E) is called bipartite if the set of the vertices V may be partitioned into two sets W, B so |e ∩ W | = |e ∩ B| = 1 for each e ∈ E. In this and the next one subsection we restrict ourselves to finite bipartite graphs G = (W, B, E), where W, B are the two edge-less sets of vertices of G and V = W ∪ B. We call the vertices in W white and the vertices in B black and assume that G has at least one perfect matching. In particular, we restrict to the case of equal cardinalities |W | = |B|. By a cycle in G we mean a subset of edges C ⊂ E(G) which form a cycle. The cycle C can be decorated by one of the two possible orientations, i.e. one of the two possible ways of going around C. By an oriented cycle we mean a cycle decorated with an orientation. In this subsection we also use O to denote the orientation of G in which each edge is oriented from its black vertex to its white vertex.
Definition 3.1. Let G be given with the weights w(e), e ∈ E(G). Let C be an oriented cycle of G. We define c(C) = (−1) |C|/2+1 e∈C+ w(e) e∈C− w(e) as the Kasteleyn curvature of C. Here C + denotes the subset of edges of C whose orientation inherited from C coincides with their orientation in O, and C − = C \ C + .
Definition 3.2. Let G be a weighted graph, w(e), e ∈ E(G), embedded in X. We say that G is Kasteleyn flat if c(F ) = 1 for each face F of the embedding, arbitrarily oriented.
Let G = (W, B, E) be a bipartite graph equipped with the weights w(e), e ∈ E(G). Let us fix a linear ordering on the set B ∪ W such that the elements of B precede the elements of W . This allows to introduce D(w) as (B∪W )×(B∪W ) skew-symmetric matrix defined by D(w) uv = w(uv)x e if u ∈ B and e = uv ∈ E(G) resp. D(w) uv = −w(uv)x e if u ∈ W and e = uv ∈ E(G), D(w) uv = 0 otherwise. We further denote by D B (w) the (B × W )−block of D(w). For M a perfect matching of G we denote by t(M ) the coefficient of e∈M x e in det(D B (w)). Note that t(M ) = sign(M ) e∈M w(e), where sign(M ) is the sign of M relative to the fixed linear ordering on the set of vertices B ∪ W .
The significance of flatness of the Kasteleyn curvature rests on the following observation (see [ku]).
Proposition 3.3. Let C be a cycle of G embedded in X so that C is a symmetric difference of two perfect matchings M, N and the orientation of C coincides with the orientation of the edges of M in O. Then t(M ) t(N ) = c(C).

This result leads to
Proposition 3.4. If G is embedded in the plane and its weight-function is Kasteleyn flat then t(M ) is constant.
We are able to prove a stronger statement. Let G be embedded in a Riemann surface X of genus g. We say that the weigh-function w is simple Kasteleyn flat if it is Kasteleyn flat and moreover w(e) ∈ {1, −1} for each e ∈ E. The function w may be viewed as assigning orientation O(w) obtained from orientation O by reversing the orientation of all edges with negative weight. If w is simple Kasteleyn flat the orientation D(w) is a Kasteleyn orientation, i.e. each face has an odd number of edges oriented clockwise. The next definition is motivated by [cr].
Definition 3.5. We say that two weight-functions w, w ′ are equivalent if w can be obtained from w ′ by finite number of vertex multiplications, where a vertex multiplication consists in choosing a vertex v and a complex number c = 0 together with multiplication by c the weights of all edges incident with v.
Proposition 3.6. Let G be a graph embedded in a closed Riemann surface X of genus g and let w be a Kasteleyn flat weight function, satisfying in addition c(C) ∈ {1, −1} for each cycle C. Then w is equivalent to a simple Kasteleyn flat weight-function w ′ , i.e., to a Kasteleyn orientation.
Proof. We may assume that G is connected. Let T = (V (G), E ′ ), E ′ ⊂ E(G) be a spanning tree of G. We can clearly perform vertex multiplications (in G) in a way the resulting weight function w ′ satisfies w ′ (e) = 1 for each e ∈ E ′ . Let e ∈ E \ E ′ . Then necessarily w ′ (e) ∈ {1, −1} since e forms a cycle (say, denoted by C) with a subset of E ′ and c(C) has values in {1, −1}.
Proposition 3.6 along with Theorem 7 immediately imply Corollary 3.7. Let G be a graph embedded in a closed Riemann surface X of genus g and w be a Kasteleyn flat weight function satisfying c(C) ∈ {1, −1} for each cycle C. Then P(G, x) is a linear combination of 4 g determinants of matrices obtained from D B (w) by multiplying some entries by −1.
3.3. Kasteleyn curvature and criticality. The computation of the Dimer partition function P(G, x) for a critically embedded bipartite graph G is based on the following strategy (see [k], [c]): define the weight function w using discrete geometric information contained in the data of the critical embedding and use this information to prove that the kernel of the corresponding matrix D(w) has properties desired for a discrete analogue of the Dirac operator. Next, prove that w is Kasteleyn flat and insert it into Corollary 3.7.
This approach works for planar bipartite graphs as well ( [k]), since in this case each Kasteleyn flat weight function satisfies c(C) ∈ {1, −1} for each cycle C, see [ku]. On the other hand the assumptions of Corollary 3.7 are quite restrictive for non-planar surfaces. By Proposition 3.6, they are equivalent to w(e) ∈ {1, −1} for each edge e ∈ E. Moreover, it is shown in [c] that the theory of Kasteleyn flatness can not go beyond Corollary 3.7.