<figure><img src="image_1.png" /></figure>

HAL
open science

# Fock's dimer model on the Aztec diamond

Cédric Boutillier, Béatrice de Tilière

► To cite this version:

Cédric Boutillier, Béatrice de Tilière. Fock's dimer model on the Aztec diamond. 2024. hal-04595286

HAL Id: hal-04595286

https://hal.science/hal-04595286

Preprint submitted on 31 May 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution - ShareAlike 4.0 International License
# Fock's dimer model on the Aztec diamond

Cédric Boutillier*, Béatrice de Tilière†

May 30, 2024

## Abstract

We consider the dimer model on the Aztec diamond with Fock's weights, which is gauge equivalent to the model with any choice of positive weight function. We prove an explicit, compact formula for the inverse Kasteleyn matrix, thus extending numerous results in the case of periodic graphs. We also show an explicit product formula for the partition function; as a specific instance of the genus 0 case, we recover Stanley's formula [Pro97, Yan91]. We then use our explicit formula for the inverse Kasteleyn matrix to recover, in a simple way, limit shape results; we also obtain new ones. In doing so, we extend the correspondence between the limit shape and the amoeba of the corresponding spectral curve of [BB23] to the case of non-generic weights.

## 1 Introduction

We consider the dimer model on the Aztec diamond with Fock's weights [Foc15, BCdT23a]. Our first main result is an explicit expression for the inverse Kasteleyn matrix, which only uses theta functions, prime forms and local functions in the kernel of the associated Kasteleyn operator. We also prove that any dimer model on the Aztec diamond is gauge equivalent to a dimer model with Fock's weights, thus showing that we actually treat the dimer model on the Aztec diamond in full generality. Next, building on an idea of Propp [Pro97], we prove an induction formula for the partition function, showing that it admits a product form; as a specific case, we recover Stanley's celebrated formula [Yan91]. Finally, we use our explicit formula for the inverse Kasteleyn matrix to recover and extend, in a simple way, results on limit shapes in genus 0, 1, and higher, generalizing the geometric correspondence between the limit shape of the Aztec diamond for periodic weights and the amoeba of the corresponding spectral curve

<footnote>* Sorbonne Université, CNRS, Laboratoire de Probabilités Statistique et Modélisation, LPSM, UMR 8001, F-75005 Paris, France; Institut Universitaire de France. cedric.boutillier@sorbonne-universite.fr</footnote>

<footnote>† PSL University-Dauphine, CNRS, UMR 7534, CEREMADE, 75016 Paris, France. detiliere@ceremade.dauphine.fr</footnote>
# Fock's dimer model on the Aztec diamond

Cédric Boutillier*, Béatrice de Tilière†

May 30, 2024

## Abstract

We consider the dimer model on the Aztec diamond with Fock's weights, which is gauge equivalent to the model with any choice of positive weight function. We prove an explicit, compact formula for the inverse Kasteleyn matrix, thus extending numerous results in the case of periodic graphs. We also show an explicit product formula for the partition function; as a specific instance of the genus 0 case, we recover Stanley's formula [Pro97, Yan91]. We then use our explicit formula for the inverse Kasteleyn matrix to recover, in a simple way, limit shape results; we also obtain new ones. In doing so, we extend the correspondence between the limit shape and the amoeba of the corresponding spectral curve of [BB23] to the case of non-generic weights.

## 1 Introduction

We consider the dimer model on the Aztec diamond with Fock's weights [Foc15, BCdT23a]. Our first main result is an explicit expression for the inverse Kasteleyn matrix, which only uses theta functions, prime forms and local functions in the kernel of the associated Kasteleyn operator. We also prove that any dimer model on the Aztec diamond is gauge equivalent to a dimer model with Fock's weights, thus showing that we actually treat the dimer model on the Aztec diamond in full generality. Next, building on an idea of Propp [Pro97], we prove an induction formula for the partition function, showing that it admits a product form; as a specific case, we recover Stanley's celebrated formula [Yan91]. Finally, we use our explicit formula for the inverse Kasteleyn matrix to recover and extend, in a simple way, results on limit shapes in genus 0, 1, and higher, generalizing the geometric correspondence between the limit shape of the Aztec diamond for periodic weights and the amoeba of the corresponding spectral curve

<footnote>* Sorbonne Université, CNRS, Laboratoire de Probabilités Statistique et Modélisation, LPSM, UMR 8001, F-75005 Paris, France; Institut Universitaire de France. cedric.boutillier@sorbonne-universite.fr</footnote>

<footnote>† PSL University-Dauphine, CNRS, UMR 7534, CEREMADE, 75016 Paris, France. detiliere@ceremade.dauphine.fr</footnote>
proven by Berggren and Borodin [BB23] under some technical assumptions, which are now lifted.

Let us now be more specific, and give some historical background. This paper aims at, in some sense, closing a long history of formulas for the inverse Kasteleyn matrix of the dimer model on the Aztec diamond. This was initiated in [Hel00] in the case of uniform weights. Then, in [CJY15], Chhita, Johansson and Young consider the case where vertical and horizontal dominos have different weights, also known as 1-periodic weights; their proof consists in connecting dimer configurations to particle systems together with a direct check of their guessed formula. Next in [CY14], Chhita and Young treat the case of 1-periodic weights with a possible volume penalization, and 2-periodic weights; to prove their result, the authors use generating functions. The 1-periodic weights with volume penalization is then generalized in [BBC+17] using the connection to Schur processes. In [CJ16] Chhita and Johannsson again consider 2-periodic weights; they prove a simplification of the formula of [CY14], compute asymptotics of the inverse and limit shapes, in particular they discuss the arctic curves separating the various phases given by an algebraic curve of degree 8. In [DK21], Duits and Kuijlaars propose a different approach for the 2-periodic weights of [CY14] using non intersecting lattice paths and matrix valued orthogonal polynomials; allowing them to compute finer asymptotics using an associated Riemann-Hilbert problem. A new approach, involving block Toepliz matrices and the Wiener-Hopf factorization is proposed in [BD19]; it is then extended to $2 \times k$-periodic weights in [Ber21]; in particular, the authors give a rigorous proof of the arctic curves derived in [DFSG14]. In [BD23], Borodin and Duits introduce biased $2 \times 2$ periodic weights; two specific cases are the 1-periodic weights of [CJY15] and the 2-periodic ones of [CY14]; the method used is that of block Toepliz matrices and Wiener-Hopf factorization. This approach culminates in the paper [BB23], where the authors consider generic $k \times l$-periodic weights, where generic means that the underlying spectral curve has maximal genus. Note that weights of the above $k \times l$ and $2 \times k$ models can be specified so as to recover the 2-periodic weights of [CY14], but then the weights are not generic as assumed in the latter papers, so that the setting is actually different.

Our first main result, Theorem 13, encompasses all of the above cases. Here is the setting, see Sections 2.1, 2.2 for more details. Consider an M-curve $\Sigma$ of genus $g$, with a distinguished real component $A_0$, and a real element $t$ of the Jacobian variety $Jac(\Sigma)$. Denote by $\theta$ the associated Riemann theta function and by $E$ the prime form. Consider an Aztec diamond $A_n$ of size $n$, with its set of oriented train-tracks $\vec{J}_n$ naturally split into four, and let $\alpha = (\alpha_j)_{j=1}^n$, $\beta = (\beta_j)_{j=1}^n$, $\gamma = (\gamma_j)_{j=1}^n$, $\delta = (\delta_j)_{j=1}^n$ be the associated angles on $A_0$ satisfying the cyclic order conditions $\alpha < \gamma < \beta < \delta$. Suppose that edges of the Aztec diamond are assigned Fock's weights [Foc15, BCdT23a], meaning that, for every edge $wb$ with train-track angles $\alpha, \beta$, the corresponding coefficient of the Kasteleyn matrix $K$ is given by:

$$K_{w,b} = \frac{E(\alpha, \beta)}{\theta(t + \mathbf{d}(f))\theta(t + \mathbf{d}(f'))},$$

where $f, f'$ are the dual faces adjacent to $wb$, and $\mathbf{d}$ is the discrete Abel map. In Proposition 11, we prove that all dimer models on the Aztec diamond can be re-parameterized
proven by Berggren and Borodin [BB23] under some technical assumptions, which are now lifted.

Let us now be more specific, and give some historical background. This paper aims at, in some sense, closing a long history of formulas for the inverse Kasteleyn matrix of the dimer model on the Aztec diamond. This was initiated in [Hel00] in the case of uniform weights. Then, in [CJY15], Chhita, Johansson and Young consider the case where vertical and horizontal dominos have different weights, also known as 1-periodic weights; their proof consists in connecting dimer configurations to particle systems together with a direct check of their guessed formula. Next in [CY14], Chhita and Young treat the case of 1-periodic weights with a possible volume penalization, and 2-periodic weights; to prove their result, the authors use generating functions. The 1-periodic weights with volume penalization is then generalized in [BBC+17] using the connection to Schur processes. In [CJ16] Chhita and Johannsson again consider 2-periodic weights; they prove a simplification of the formula of [CY14], compute asymptotics of the inverse and limit shapes, in particular they discuss the arctic curves separating the various phases given by an algebraic curve of degree 8. In [DK21], Duits and Kuijlaars propose a different approach for the 2-periodic weights of [CY14] using non intersecting lattice paths and matrix valued orthogonal polynomials; allowing them to compute finer asymptotics using an associated Riemann-Hilbert problem. A new approach, involving block Toepliz matrices and the Wiener-Hopf factorization is proposed in [BD19]; it is then extended to $2 \times k$-periodic weights in [Ber21]; in particular, the authors give a rigorous proof of the arctic curves derived in [DFSG14]. In [BD23], Borodin and Duits introduce biased $2 \times 2$ periodic weights; two specific cases are the 1-periodic weights of [CJY15] and the 2-periodic ones of [CY14]; the method used is that of block Toepliz matrices and Wiener-Hopf factorization. This approach culminates in the paper [BB23], where the authors consider generic $k \times l$-periodic weights, where generic means that the underlying spectral curve has maximal genus. Note that weights of the above $k \times l$ and $2 \times k$ models can be specified so as to recover the 2-periodic weights of [CY14], but then the weights are not generic as assumed in the latter papers, so that the setting is actually different.

Our first main result, Theorem 13, encompasses all of the above cases. Here is the setting, see Sections 2.1, 2.2 for more details. Consider an M-curve $\Sigma$ of genus $g$, with a distinguished real component $A_0$, and a real element $t$ of the Jacobian variety $Jac(\Sigma)$. Denote by $\theta$ the associated Riemann theta function and by $E$ the prime form. Consider an Aztec diamond $A_n$ of size $n$, with its set of oriented train-tracks $\vec{J}_n$ naturally split into four, and let $\alpha = (\alpha_j)_{j=1}^n$, $\beta = (\beta_j)_{j=1}^n$, $\gamma = (\gamma_j)_{j=1}^n$, $\delta = (\delta_j)_{j=1}^n$ be the associated angles on $A_0$ satisfying the cyclic order conditions $\alpha < \gamma < \beta < \delta$. Suppose that edges of the Aztec diamond are assigned Fock's weights [Foc15, BCdT23a], meaning that, for every edge $wb$ with train-track angles $\alpha, \beta$, the corresponding coefficient of the Kasteleyn matrix $K$ is given by:

$$K_{w,b} = \frac{E(\alpha, \beta)}{\theta(t + \mathbf{d}(f))\theta(t + \mathbf{d}(f'))},$$

where $f, f'$ are the dual faces adjacent to $wb$, and $\mathbf{d}$ is the discrete Abel map. In Proposition 11, we prove that all dimer models on the Aztec diamond can be re-parameterized
using Fock's weights. Then, Theorem 13 can loosely be stated as follows.

**Theorem 1.** For every pair $(\mathbf{b}, \mathbf{w})$ of black and white vertices of $\mathcal{A}_n$, the coefficient $(\mathbf{b}, \mathbf{w})$ of the inverse Kasteleyn matrix is explicitly given by

$$ K_{\mathbf{b},\mathbf{w}}^{-1} = \frac{1}{(2\pi i)^2} \frac{1}{\theta(p)} \int_{C_2} \int_{C_1} \frac{\theta(p + (v-u))}{E(u,v)} g_{\mathbf{b},0}(u) g_{0,\mathbf{w}}(v) \prod_{j=1}^{n} \frac{E(\beta_j, u) E(\delta_j, v)}{E(\delta_j, u) E(\beta_j, v)} + \\ - \mathbb{I}_{\{\mathbf{b} \text{ right of } \mathbf{w}\}} \frac{1}{2\pi i} \int_{C_2} g_{\mathbf{b},\mathbf{w}}(v), \quad (1) $$

where $C_1, C_2$ are closed contours on $\Sigma$ used to integrate over $u$ and $v$, defined in Section 3.2; $p = \sum_{j=1}^n (\delta_j - \beta_j) - t - \mathbf{d}(0)$, and $g$ is the form in the kernel of the Kasteleyn matrix introduced in [BCdT23a], see also Equation (13).

Note that to recover known results on the Aztec diamond requires to identify the associated weights in Fock's form. We do this explicitly in Section 2.3 in the genus 0 case, which includes Stanley's weights [Pro97, Yan91], and in the genus 1 case, which includes the biased $2 \times 2$ periodic case of [BD23].

Our next result, Theorem 16, proves that the partition function admits a product form. Denote by $Z_n(\alpha, \beta, \gamma, \delta; d)$ the partition function of the Aztec diamond $\mathcal{A}_n$ of size $n$, with train-track angle parameters $\alpha, \beta, \gamma, \delta$, and value $d$ for the Abel map at the vertex with coordinates $(0,0)$. Then, Theorem 16 can be stated as follows.

**Theorem 2.** For every $n \ge 1$, the partition function of the Aztec diamond $\mathcal{A}_n$ with Fock's weights satisfies the following recurrence:

$$ Z_n(\alpha, \beta, \gamma, \delta; d) \cdot \prod_{f \in \text{odd}_n} \frac{\theta(t + \mathbf{d}(f))}{\theta(t + \mathbf{d}(f) + \alpha + \beta - \gamma - \delta)} \prod_{f \in \text{bry}_n} \theta(t + \mathbf{d}(f)) = \\ = Z_{n-1}((\alpha_j)_{j=1}^{n-1}, (\beta_j)_{j=2}^{n-1}, (\gamma_j)_{j=1}^{n-1}, (\delta_j)_{j=2}^{n-1}; d + \beta_1 - \delta_1) \cdot \left[ \prod_{j=1}^{n} |E(\alpha_j, \beta_j)E(\gamma_j, \delta_j)| \right], $$

with the convention that $Z_0 = 1$.

As specific instances of the genus 0 case, we re-derive that the number of domino tilings of the Aztec diamond is $2^{\frac{n(n+1)}{2}}$, see Remark 19 after Corollary 18, and Stanley's formula [Pro97, Yan91], see Corollary 20.

We then explain in Lemma 23 that the formula for $K^{-1}$ for the finite Aztec diamond can be extended in a natural way to an operator $J$ on an infinite minimal graph containing the Aztec diamond as a subgraph, introduced in [Spe07] and this formula is an inverse for the Fock Kasteleyn operator on this infinite graph. This operator $J$ does not belong to the family of inverses defined in [BCdT23a]. It nevertheless carries a probabilistic meaning and allows to define a Gibbs measure on dimer configurations of this infinite graph, as stated in Proposition 25. Here is a less formal version:
using Fock's weights. Then, Theorem 13 can loosely be stated as follows.

**Theorem 1.** For every pair $(\mathbf{b}, \mathbf{w})$ of black and white vertices of $\mathcal{A}_n$, the coefficient $(\mathbf{b}, \mathbf{w})$ of the inverse Kasteleyn matrix is explicitly given by

$$ K_{\mathbf{b},\mathbf{w}}^{-1} = \frac{1}{(2\pi i)^2} \frac{1}{\theta(p)} \int_{C_2} \int_{C_1} \frac{\theta(p + (v-u))}{E(u,v)} g_{\mathbf{b},0}(u) g_{0,\mathbf{w}}(v) \prod_{j=1}^{n} \frac{E(\beta_j, u) E(\delta_j, v)}{E(\delta_j, u) E(\beta_j, v)} + \\ - \mathbb{I}_{\{\mathbf{b} \text{ right of } \mathbf{w}\}} \frac{1}{2\pi i} \int_{C_2} g_{\mathbf{b},\mathbf{w}}(v), \quad (1) $$

where $C_1, C_2$ are closed contours on $\Sigma$ used to integrate over $u$ and $v$, defined in Section 3.2; $p = \sum_{j=1}^n (\delta_j - \beta_j) - t - \mathbf{d}(0)$, and $g$ is the form in the kernel of the Kasteleyn matrix introduced in [BCdT23a], see also Equation (13).

Note that to recover known results on the Aztec diamond requires to identify the associated weights in Fock's form. We do this explicitly in Section 2.3 in the genus 0 case, which includes Stanley's weights [Pro97, Yan91], and in the genus 1 case, which includes the biased $2 \times 2$ periodic case of [BD23].

Our next result, Theorem 16, proves that the partition function admits a product form. Denote by $Z_n(\alpha, \beta, \gamma, \delta; d)$ the partition function of the Aztec diamond $\mathcal{A}_n$ of size $n$, with train-track angle parameters $\alpha, \beta, \gamma, \delta$, and value $d$ for the Abel map at the vertex with coordinates $(0,0)$. Then, Theorem 16 can be stated as follows.

**Theorem 2.** For every $n \ge 1$, the partition function of the Aztec diamond $\mathcal{A}_n$ with Fock's weights satisfies the following recurrence:

$$ Z_n(\alpha, \beta, \gamma, \delta; d) \cdot \prod_{f \in \text{odd}_n} \frac{\theta(t + \mathbf{d}(f))}{\theta(t + \mathbf{d}(f) + \alpha + \beta - \gamma - \delta)} \prod_{f \in \text{bry}_n} \theta(t + \mathbf{d}(f)) = \\ = Z_{n-1}((\alpha_j)_{j=1}^{n-1}, (\beta_j)_{j=2}^{n-1}, (\gamma_j)_{j=1}^{n-1}, (\delta_j)_{j=2}^{n-1}; d + \beta_1 - \delta_1) \cdot \left[ \prod_{j=1}^{n} |E(\alpha_j, \beta_j)E(\gamma_j, \delta_j)| \right], $$

with the convention that $Z_0 = 1$.

As specific instances of the genus 0 case, we re-derive that the number of domino tilings of the Aztec diamond is $2^{\frac{n(n+1)}{2}}$, see Remark 19 after Corollary 18, and Stanley's formula [Pro97, Yan91], see Corollary 20.

We then explain in Lemma 23 that the formula for $K^{-1}$ for the finite Aztec diamond can be extended in a natural way to an operator $J$ on an infinite minimal graph containing the Aztec diamond as a subgraph, introduced in [Spe07] and this formula is an inverse for the Fock Kasteleyn operator on this infinite graph. This operator $J$ does not belong to the family of inverses defined in [BCdT23a]. It nevertheless carries a probabilistic meaning and allows to define a Gibbs measure on dimer configurations of this infinite graph, as stated in Proposition 25. Here is a less formal version:
**Proposition 3.** The determinantal process on edges given by $J$ defines a Gibbs measure on the dimer configurations of the infinite minimal graph, which is supported on configurations which are frozen outside the Aztec region and whose marginals on the edges of the Aztec region coincide with the Boltzmann measure given by Fock's weights.

The slope in the frozen region is not constant. The operator $J$ is the first inverse on an infinite minimal graph for which the corresponding probability measure exhibits different phases (solid/liquid/gas) depending on the location on the same infinite graph.

We end this paper with a section with application to the computation of limit shapes for the Aztec diamond with weights coming from surfaces of genus 0, 1 or higher. We give in particular a short derivation of the arctic ellipse theorem for 1-periodic weights [JPS98, Joh02]. We also explain how to extend results by Berggren and Borodin from [BB23] obtained under some technical assumption to a more general context, see also the forthcoming paper [BBS].

## Outline of the paper

* In Section 2, we recall the definition of the Aztec diamond graph, and give the necessary geometric definitions to define Fock's weights for the dimer model. We then discuss some known examples which fit this framework in genus 0 and 1. Proposition 11 establishes that Fock's weights are gauge equivalent to any choice of positive weights on the edges.

* In Section 3, we state and give a proof of Theorem 13 giving a compact, explicit formula for the inverse Kasteleyn matrix.

* Section 4 is devoted to results about the partition function of the dimer model. It contains the statement and the proof of Theorem 16 showing a product formula for the partition function. Application to the genus 0 case and Stanley's formula [Pro97, Yan91] are given.

* In Section 5, we discuss the extension of $K^{-1}$ to an infinite minimal graph. Lemma 23 gives the structure of this inverse, and Proposition 25 describes the corresponding Gibbs measure.

* Section 6 is a discussion of applications of the formula for $K^{-1}$ to derive limit shapes and limit of local statistics in the thermodynamical limit, recovering and extending several well-known results on the topic.

## Acknowledgments

We thank Tomas Berggren for interesting discussions about the dimer model on the Aztec diamond and for explaining some technical details of [BB23]. The authors are partially supported by the DIMERS project ANR-18-CE40-0033 funded by the French
**Proposition 3.** The determinantal process on edges given by $J$ defines a Gibbs measure on the dimer configurations of the infinite minimal graph, which is supported on configurations which are frozen outside the Aztec region and whose marginals on the edges of the Aztec region coincide with the Boltzmann measure given by Fock's weights.

The slope in the frozen region is not constant. The operator $J$ is the first inverse on an infinite minimal graph for which the corresponding probability measure exhibits different phases (solid/liquid/gas) depending on the location on the same infinite graph.

We end this paper with a section with application to the computation of limit shapes for the Aztec diamond with weights coming from surfaces of genus 0, 1 or higher. We give in particular a short derivation of the arctic ellipse theorem for 1-periodic weights [JPS98, Joh02]. We also explain how to extend results by Berggren and Borodin from [BB23] obtained under some technical assumption to a more general context, see also the forthcoming paper [BBS].

## Outline of the paper

* In Section 2, we recall the definition of the Aztec diamond graph, and give the necessary geometric definitions to define Fock's weights for the dimer model. We then discuss some known examples which fit this framework in genus 0 and 1. Proposition 11 establishes that Fock's weights are gauge equivalent to any choice of positive weights on the edges.

* In Section 3, we state and give a proof of Theorem 13 giving a compact, explicit formula for the inverse Kasteleyn matrix.

* Section 4 is devoted to results about the partition function of the dimer model. It contains the statement and the proof of Theorem 16 showing a product formula for the partition function. Application to the genus 0 case and Stanley's formula [Pro97, Yan91] are given.

* In Section 5, we discuss the extension of $K^{-1}$ to an infinite minimal graph. Lemma 23 gives the structure of this inverse, and Proposition 25 describes the corresponding Gibbs measure.

* Section 6 is a discussion of applications of the formula for $K^{-1}$ to derive limit shapes and limit of local statistics in the thermodynamical limit, recovering and extending several well-known results on the topic.

## Acknowledgments

We thank Tomas Berggren for interesting discussions about the dimer model on the Aztec diamond and for explaining some technical details of [BB23]. The authors are partially supported by the DIMERS project ANR-18-CE40-0033 funded by the French
National Research Agency. Part of this research was performed while the first author was visiting the Institute for Pure and Applied Mathematics (IPAM), which is supported by the National Science Foundation (Grant No. DMS-1925919).

# 2 Definitions and first result

This section is devoted to introducing and motivating the framework of this paper. In Section 2.1, we define the dimer model on the Aztec diamond, and in Section 2.2 we introduce Fock's weights [Foc15, BCdT23a]. Then, in Section 2.3 we explicitly treat the genus 0, resp. genus 1, case and prove how to recover Stanley's weights [Pro97, Yan91], resp. the biased 2 × 2 periodic weights of Borodin-Duits [BD23]. Finally, in Section 2.4, we prove that all dimer models on the Aztec diamond can be parameterized using Fock's weights, implying that we actually study the most general setting of the dimer model on the Aztec diamond.

## 2.1 Dimer model on the Aztec diamond

**Aztec diamond.** The *Aztec diamond* of size *n*, denoted by $A_n = (V_n, E_n)$, is a sub-graph of $\mathbb{Z}^2$ rotated by $\pi/4$ made of *n* rows and *n* columns, see Figure 1. This graph is bipartite and the set of vertices $V_n$ is naturally split into black and white: $V_n = B_n \cup W_n$.

<figure><img src="image_1.png" /><figcaption>Figure 1: Aztec diamond $A_n$ with $n = 4$. The diamond graph $A_n^\diamond$ is represented with light grey lines, the dual vertices with blue circles, and the four families of oriented train-tracks in red. This figure also sets the notation for the angles $\alpha = (\alpha_j)_{j=1}^n$, $\delta = (\delta_j)_{j=1}^n$ assigned to train-tracks.</figcaption></figure>

The set of faces of $A_n$, denoted by $F_n$, consists of the inner faces and the boundary faces, where the latter correspond to all faces of the rotated $\mathbb{Z}^2$ adjacent to the boundary of $A_n$. To every face of $F_n$, one assigns a vertex generically denoted by $f$; it can be seen as
National Research Agency. Part of this research was performed while the first author was visiting the Institute for Pure and Applied Mathematics (IPAM), which is supported by the National Science Foundation (Grant No. DMS-1925919).

# 2 Definitions and first result

This section is devoted to introducing and motivating the framework of this paper. In Section 2.1, we define the dimer model on the Aztec diamond, and in Section 2.2 we introduce Fock's weights [Foc15, BCdT23a]. Then, in Section 2.3 we explicitly treat the genus 0, resp. genus 1, case and prove how to recover Stanley's weights [Pro97, Yan91], resp. the biased 2 × 2 periodic weights of Borodin-Duits [BD23]. Finally, in Section 2.4, we prove that all dimer models on the Aztec diamond can be parameterized using Fock's weights, implying that we actually study the most general setting of the dimer model on the Aztec diamond.

## 2.1 Dimer model on the Aztec diamond

**Aztec diamond.** The *Aztec diamond* of size *n*, denoted by $A_n = (V_n, E_n)$, is a sub-graph of $\mathbb{Z}^2$ rotated by $\pi/4$ made of *n* rows and *n* columns, see Figure 1. This graph is bipartite and the set of vertices $V_n$ is naturally split into black and white: $V_n = B_n \cup W_n$.

<figure><img src="image_3.png" /><figcaption>Figure 1: Aztec diamond $A_n$ with $n = 4$. The diamond graph $A_n^\diamond$ is represented with light grey lines, the dual vertices with blue circles, and the four families of oriented train-tracks in red. This figure also sets the notation for the angles $\alpha = (\alpha_j)_{j=1}^n, \dots, \delta = (\delta_j)_{j=1}^n$ assigned to train-tracks.</figcaption></figure>

The set of faces of $A_n$, denoted by $F_n$, consists of the inner faces and the boundary faces, where the latter correspond to all faces of the rotated $\mathbb{Z}^2$ adjacent to the boundary of $A_n$. To every face of $F_n$, one assigns a vertex generically denoted by $f$; it can be seen as
a vertex of the dual graph of $\mathcal{A}_n$ modified along the boundary, see Figure 1 (small blue circles), hence $f$ will be referred to as *face* or *dual vertex*.

The Aztec diamond $\mathcal{A}_n$ comes with a natural coordinate system: the dual vertex on the bottom left is the origin $0 = (0,0)$, every white vertex can be written as $w = (w_x, w_y)$, with $w_x \in \{0,2,\dots,2n\}$, $w_y \in \{1,3,\dots,2n-1\}$, every black vertex can be written as $b = (b_x, b_y)$, with $b_x \in \{1,3,\dots,2n-1\}$, $b_y \in \{0,2,\dots,2n\}$, every dual vertex $f = (f_x, f_y)$ either has both even coordinates, or both odd coordinates.

The vertex set of the diamond graph $\mathcal{A}_n^\diamond$ consists of the dual vertices of $F_n$ and of the vertices of $V_n$, its edges are obtained by joining every vertex of $F_n$ to the vertices of $V_n$ on the boundary of the face it corresponds to, see Figure 1 (light grey); the diamond graph is made of quadrilaterals. A train-track of $\mathcal{A}_n$ is a maximal path crossing edges of the diamond graph so that when it enters a quadrilateral, it exits through the opposite side. Since the graph $\mathcal{A}_n$ is bipartite, each train-track has a natural orientation such that white, resp. black, vertices of $\mathcal{A}_n$, are on its left, resp. right; we let $\mathcal{J}_n$ denote the set of oriented train-tracks, see Figure 1 (red). Train-tracks of $\mathcal{J}_n$ come in four families: two sets of horizontal train-tracks with left-to-right or right-to-left orientation, and two sets of vertical train-tracks with bottom-to-top or top-to-bottom orientation.

**Dimer model.** A dimer configuration of $\mathcal{A}_n$ is a subset $\mathcal{M}$ of edges such that each vertex of $\mathcal{A}_n$ is incident to exactly one edge of $\mathcal{M}$; we let $\mathcal{M}(\mathcal{A}_n)$ denote the set of dimer configurations of $\mathcal{A}_n$. Assume a positive weight function $\nu$ is assigned to edges of $\mathcal{A}_n$. The dimer Boltzmann measure, denoted by $\mathbb{P}$, is the probability measure on $\mathcal{M}(\mathcal{A}_n)$ defined by

$$ \forall \mathcal{M} \in \mathcal{M}(\mathcal{A}_n), \quad \mathbb{P}(\mathcal{M}) = \frac{\nu(\mathcal{M})}{Z(\nu)}, $$

where $\nu(\mathcal{M}) = \prod_{e \in \mathcal{M}} \nu_e$, and $Z(\nu) = \sum_{\mathcal{M} \in \mathcal{M}(\mathcal{A}_n)} \nu(\mathcal{M})$ is the normalizing constant known as the *partition function*.

Suppose that we have two positive weight functions $\nu, \tilde{\nu}$ assigned to edges of $\mathcal{A}_n$. The corresponding dimer models are said to be *gauge equivalent* [KOS06], if there exists a function $\psi$ defined on $V_n$ such that, for every edge $wb$ of $E_n$, we have $\tilde{\nu}_{wb} = \psi(w)\nu_{wb}\psi(b)$. Two gauge equivalent dimer models yield the same dimer Boltzmann measure. An equivalent useful way of defining gauge equivalence is the following: consider an inner face $f$ of degree $2k$ of $\mathcal{A}_n$, and denote by $w_1, b_1, \dots, w_k, b_k$ its boundary vertices in counterclockwise order, then the *face weight* $W_f(\nu)$ of $f$ is defined as the alternate product of the weights:

$$ W_f(\nu) = \prod_{j=1}^{k} \frac{\nu_{w_j b_j}}{\nu_{w_j b_{j-1}}}, $$

using cyclic notation for vertices. Then, two weight functions $\nu, \tilde{\nu}$ are gauge equivalent if and only if, for every inner face $f$ of $\mathcal{A}_n$, $W_f(\nu) = W_f(\tilde{\nu})$ [KOS06]. As a consequence
a vertex of the dual graph of $A_n$ modified along the boundary, see Figure 1 (small blue circles), hence f will be referred to as *face* or *dual vertex*.

The Aztec diamond $A_n$ comes with a natural coordinate system: the dual vertex on the bottom left is the origin $0 = (0,0)$, every white vertex can be written as $w = (w_x, w_y)$, with $w_x \in \{0,2,\dots,2n\}$, $w_y \in \{1,3,\dots,2n-1\}$, every black vertex can be written as $b = (b_x, b_y)$, with $b_x \in \{1,3,\dots,2n-1\}$, $b_y \in \{0,2,\dots,2n\}$, every dual vertex $f = (f_x, f_y)$ either has both even coordinates, or both odd coordinates.

The vertex set of the diamond graph $A_n^\diamond$ consists of the dual vertices of $F_n$ and of the vertices of $V_n$, its edges are obtained by joining every vertex of $F_n$ to the vertices of $V_n$ on the boundary of the face it corresponds to, see Figure 1 (light grey); the diamond graph is made of quadrilaterals. A train-track of $A_n$ is a maximal path crossing edges of the diamond graph so that when it enters a quadrilateral, it exits through the opposite side. Since the graph $A_n$ is bipartite, each train-track has a natural orientation such that white, resp. black, vertices of $A_n$, are on its left, resp. right; we let $\tilde{J}_n$ denote the set of oriented train-tracks, see Figure 1 (red). Train-tracks of $\tilde{J}_n$ come in four families: two sets of horizontal train-tracks with left-to-right or right-to-left orientation, and two sets of vertical train-tracks with bottom-to-top or top-to-bottom orientation.

**Dimer model.** A dimer configuration of $A_n$ is a subset $M$ of edges such that each vertex of $A_n$ is incident to exactly one edge of $M$; we let $M(A_n)$ denote the set of dimer configurations of $A_n$. Assume a positive weight function $\nu$ is assigned to edges of $A_n$. The dimer Boltzmann measure, denoted by $P$, is the probability measure on $M(A_n)$ defined by

$$ \forall M \in \mathcal{M}(A_n), \quad P(M) = \frac{\nu(M)}{Z(\nu)}, $$

where $\nu(M) = \prod_{e \in M} \nu_e$, and $Z(\nu) = \sum_{M \in \mathcal{M}(A_n)} \nu(M)$ is the normalizing constant known as the *partition function*.

Suppose that we have two positive weight functions $\nu, \tilde{\nu}$ assigned to edges of $A_n$. The corresponding dimer models are said to be *gauge equivalent* [KOS06], if there exists a function $\psi$ defined on $V_n$ such that, for every edge $wb$ of $E_n$, we have $\tilde{\nu}_{wb} = \psi(w)\nu_{wb}\psi(b)$. Two gauge equivalent dimer models yield the same dimer Boltzmann measure. An equivalent useful way of defining gauge equivalence is the following: consider an inner face $f$ of degree $2k$ of $A_n$, and denote by $w_1, b_1, \dots, w_k, b_k$ its boundary vertices in counterclockwise order, then the *face weight* $W_f(\nu)$ of $f$ is defined as the alternate product of the weights:

$$ W_f(\nu) = \prod_{j=1}^{k} \frac{\nu_{w_j b_j}}{\nu_{w_j b_{j-1}}}, $$

using cyclic notation for vertices. Then, two weight functions $\nu, \tilde{\nu}$ are gauge equivalent if and only if, for every inner face $f$ of $A_n$, $W_f(\nu) = W_f(\tilde{\nu})$ [KOS06]. As a consequence
of [KOS06], we have an explicit relation between partition functions associated to gauge equivalent weight functions $\nu$ and $\tilde{\nu}$.

$$Z(\tilde{\nu}) = \frac{\tilde{\nu}(M_0)}{\nu(M_0)} Z(\nu), \qquad (2)$$

where $M_0$ is any fixed dimer configuration of $A_n$.

A key tool for studying the dimer model is the *Kasteleyn matrix* [Kas61, TF61, Per69]. Instead of defining the original Kasteleyn matrix which uses orientation of the edges, we define a modified version, introduced by Kuperberg [Kup98], that uses complex phases assigned to edges. Suppose that every edge *wb* of $E_n$ is assigned a modulus one complex number $\phi_{wb}$ such that, for every inner face *f* of degree 2k of $A_n$, the *Kasteleyn condition* is satisfied:

$$\prod_{j=1}^{k} \frac{\phi_{w_j b_j}}{\phi_{w_j b_{j-1}}} = (-1)^{k+1}. \qquad (3)$$

Then, the associated *Kasteleyn matrix* $K$ is the corresponding weighted adjacency matrix: rows, resp. columns, of $K$ are indexed by white, resp. black, vertices of $A_n$; non-zero coefficients of $K$ correspond to edges of $E_n$ and, for every edge *wb*, the coefficient $K_{w,b}$ is defined by

$$K_{w,b} = \phi_{wb} \nu_{wb}.$$

Two key results of the dimer model are the expression of the partition function and of the dimer Boltzmann measure using the determinant of the matrix $K$ and its inverse. More precisely, we have

**Theorem 4.** [Kas61, TF61, Per69, Kup98] The dimer partition function is equal to

$$Z(\nu) = |\det(K)|.$$

**Theorem 5.** [Ken97] The probability of all dimer configurations containing a fixed subset of edges $\{e_1 = w_1 b_1, \dots, e_k = w_k b_k\}$ of $E_n$ is explicitly given by

$$\mathbb{P}(e_1, \dots, e_k) = \prod_{j=1}^{k} K_{w_j, b_j} \det(K_{b_i, w_j}^{-1})_{1 \le i, j \le k}.$$

## 2.2 Fock's dimer model on the Aztec diamond

We now turn to the definition of *Fock's weights* [Foc15] underlying the dimer model of interest to this paper. We only highlight the main tools needed, more details can be found in the paper [BCdT23a] providing a thorough study of this model in the case of infinite minimal graphs. We first need some tools from Riemannian geometry.
of [KOS06], we have an explicit relation between partition functions associated to gauge equivalent weight functions $\nu$ and $\tilde{\nu}$.

$$Z(\tilde{\nu}) = \frac{\tilde{\nu}(M_0)}{\nu(M_0)} Z(\nu), \qquad (2)$$

where $M_0$ is any fixed dimer configuration of $A_n$.

A key tool for studying the dimer model is the *Kasteleyn matrix* [Kas61, TF61, Per69]. Instead of defining the original Kasteleyn matrix which uses orientation of the edges, we define a modified version, introduced by Kuperberg [Kup98], that uses complex phases assigned to edges. Suppose that every edge $wb$ of $E_n$ is assigned a modulus one complex number $\phi_{wb}$ such that, for every inner face $f$ of degree $2k$ of $A_n$, the *Kasteleyn condition* is satisfied:

$$\prod_{j=1}^{k} \frac{\phi_{w_j b_j}}{\phi_{w_j b_{j-1}}} = (-1)^{k+1}. \qquad (3)$$

Then, the associated *Kasteleyn matrix* $K$ is the corresponding weighted adjacency matrix: rows, resp. columns, of $K$ are indexed by white, resp. black, vertices of $A_n$; non-zero coefficients of $K$ correspond to edges of $E_n$ and, for every edge $wb$, the coefficient $K_{w,b}$ is defined by

$$K_{w,b} = \phi_{wb} \nu_{wb}.$$

Two key results of the dimer model are the expression of the partition function and of the dimer Boltzmann measure using the determinant of the matrix $K$ and its inverse. More precisely, we have

**Theorem 4.** [Kas61, TF61, Per69, Kup98] The dimer partition function is equal to

$$Z(\nu) = |\det(K)|.$$

**Theorem 5.** [Ken97] The probability of all dimer configurations containing a fixed subset of edges {$e_1 = w_1b_1, \dots, e_k = w_kb_k$} of $E_n$ is explicitly given by

$$\mathbb{P}(e_1, \dots, e_k) = \prod_{j=1}^{k} K_{w_j, b_j} \det(K_{b_i, w_j}^{-1})_{1 \le i, j \le k}.$$

## 2.2 Fock's dimer model on the Aztec diamond

We now turn to the definition of *Fock's weights* [Foc15] underlying the dimer model of interest to this paper. We only highlight the main tools needed, more details can be found in the paper [BCdT23a] providing a thorough study of this model in the case of infinite minimal graphs. We first need some tools from Riemannian geometry.
**M-curves.** Let $\Sigma$ be an M-curve, that is a compact Riemann surface endowed with an anti-holomorphic involution $\sigma$ whose set of fixed points is given by $g+1$ topological circles, where $g$ is the genus of $\Sigma$. Fix $x_0$ a real point of $\Sigma$ and denote by $A_0$ the corresponding real component and by $A_1, \dots, A_g$ the remaining ones. The real locus separates $\Sigma$ into two connected surfaces with boundary $\Sigma^-$, $\Sigma^+$, and we fix an orientation of the real locus so that the boundary of $\Sigma^+$ is equal to $A_0 - (A_1 + \dots + A_g)$. We use the same notation $A_j$ for the oriented cycle in $\Sigma$ and its homology class in $H_1(\Sigma; \mathbb{Z})$.

There are homology classes $B_1, \dots, B_g \in H_1(\Sigma, \mathbb{Z})$ with $\sigma_*(B_i) = -B_i$ such that $\{A_1, \dots, A_g, B_1, \dots, B_g\}$ forms a basis of $H_1(\Sigma, \mathbb{Z})$ and satisfies, for all $i, j \in \{1, \dots, g\}$,

$$A_i \wedge A_j = 0, \quad B_i \wedge B_j = 0, \quad A_i \wedge B_j = \delta_{i,j},$$

where $\wedge$ denotes the intersection form.

The complex vector space of holomorphic differential forms has dimension $g$. Denote by $\vec{\omega} = (\omega_1, \dots, \omega_g)$ the basis of this space determined by

$$\forall i, j \in \{1, \dots, g\}, \quad \int_{A_i} \omega_j = \delta_{i,j}.$$

Let $\Omega$ be the matrix with entries $\Omega_{i,j} = \int_{B_i} \omega_j$. This matrix is purely imaginary (in our case of M-curves), symmetric and its imaginary part is positive definite. The period matrix $(I_g, \Omega)$ generates the full rank lattice $\Lambda = \mathbb{Z}^g \oplus \Omega\mathbb{Z}^g$ in $\mathbb{C}^g$. The Jacobian variety of $\Sigma$ is defined to be $Jac(\Sigma) = \mathbb{C}^g/\Lambda$.

**Abel-Jacobi map.** A divisor on $\Sigma$ is a formal linear combination of points on $\Sigma$ with integer coefficients. The set of divisors is endowed with a natural grading $\mathrm{Div}(\Sigma) = \bigoplus_{n \in \mathbb{Z}} \mathrm{Div}^n(\Sigma)$, where the degree of a divisor is the sum of its integer coefficients. A divisor is said to be *principal* if it represents the zeros and the poles of a non-zero meromorphic function $f$ on $\Sigma$; it thus has degree 0. Two divisors are linearly equivalent if their difference is a principal divisor; the set of linear equivalence classes of divisors forms a $\mathbb{Z}$-graded Abelian group, denoted by $\mathrm{Pic}(\Sigma) = \bigoplus_{n \in \mathbb{Z}} \mathrm{Pic}^n(\Sigma)$. By Abel's theorem, there is an injection, the *Abel-Jacobi map*, from $\mathrm{Pic}^0(\Sigma)$ to $Jac(\Sigma)$ defined by

$$D = \sum_i (y_i - x_i) \mapsto \sum_i \int_{x_i}^{y_i} \vec{\omega}.$$

By Jacobi's inversion theorem, this map induces an isomorphism of Abelian groups $\mathrm{Pic}^0(\Sigma) \simeq \mathrm{Jac}(\Sigma)$; following standard practice, we use the same notation for the equivalence class of a degree 0 divisor and for its corresponding element in $Jac(\Sigma)$.

**Riemann theta functions.** The Riemann theta function $\theta(z|\Omega)$ associated to $\Sigma$ is defined by

$$\forall z \in \mathbb{C}^g, \quad \theta(z|\Omega) = \sum_{n \in \mathbb{Z}^g} e^{i\pi(n \cdot \Omega n + 2n \cdot z)}.$$
**M-curves.** Let $\Sigma$ be an M-curve, that is a compact Riemann surface endowed with an anti-holomorphic involution $\sigma$ whose set of fixed points is given by $g+1$ topological circles, where $g$ is the genus of $\Sigma$. Fix $x_0$ a real point of $\Sigma$ and denote by $A_0$ the corresponding real component and by $A_1, \dots, A_g$ the remaining ones. The real locus separates $\Sigma$ into two connected surfaces with boundary $\Sigma^-$, $\Sigma^+$, and we fix an orientation of the real locus so that the boundary of $\Sigma^+$ is equal to $A_0 - (A_1 + \dots + A_g)$. We use the same notation $A_j$ for the oriented cycle in $\Sigma$ and its homology class in $H_1(\Sigma; \mathbb{Z})$.

There are homology classes $B_1, \dots, B_g \in H_1(\Sigma, \mathbb{Z})$ with $\sigma_*(B_i) = -B_i$ such that $\{A_1, \dots, A_g, B_1, \dots, B_g\}$ forms a basis of $H_1(\Sigma, \mathbb{Z})$ and satisfies, for all $i, j \in \{1, \dots, g\}$,

$$A_i \wedge A_j = 0, \quad B_i \wedge B_j = 0, \quad A_i \wedge B_j = \delta_{i,j},$$

where $\wedge$ denotes the intersection form.

The complex vector space of holomorphic differential forms has dimension $g$. Denote by $\vec{\omega} = (\omega_1, \dots, \omega_g)$ the basis of this space determined by

$$\forall i, j \in \{1, \dots, g\}, \quad \int_{A_i} \omega_j = \delta_{i,j}.$$

Let $\Omega$ be the matrix with entries $\Omega_{i,j} = \int_{B_i} \omega_j$. This matrix is purely imaginary (in our case of M-curves), symmetric and its imaginary part is positive definite. The period matrix $(I_g \ \Omega)$ generates the full rank lattice $\Lambda = \mathbb{Z}^g \oplus \Omega\mathbb{Z}^g$ in $\mathbb{C}^g$. The Jacobian variety of $\Sigma$ is defined to be $Jac(\Sigma) = \mathbb{C}^g/\Lambda$.

**Abel-Jacobi map.** A divisor on $\Sigma$ is a formal linear combination of points on $\Sigma$ with integer coefficients. The set of divisors is endowed with a natural grading $\mathrm{Div}(\Sigma) = \bigoplus_{n \in \mathbb{Z}} \mathrm{Div}^n(\Sigma)$, where the degree of a divisor is the sum of its integer coefficients. A divisor is said to be *principal* if it represents the zeros and the poles of a non-zero meromorphic function $f$ on $\Sigma$; it thus has degree 0. Two divisors are linearly equivalent if their difference is a principal divisor; the set of linear equivalence classes of divisors forms a $\mathbb{Z}$-graded Abelian group, denoted by $\mathrm{Pic}(\Sigma) = \bigoplus_{n \in \mathbb{Z}} \mathrm{Pic}^n(\Sigma)$. By Abel's theorem, there is an injection, the *Abel-Jacobi map*, from $\mathrm{Pic}^0(\Sigma)$ to $Jac(\Sigma)$ defined by

$$D = \sum_i (y_i - x_i) \mapsto \sum_i \int_{x_i}^{y_i} \vec{\omega}.$$

By Jacobi's inversion theorem, this map induces an isomorphism of Abelian groups $\mathrm{Pic}^0(\Sigma) \simeq Jac(\Sigma)$; following standard practice, we use the same notation for the equivalence class of a degree 0 divisor and for its corresponding element in $Jac(\Sigma)$.

**Riemann theta functions.** The Riemann theta function $\theta(z|\Omega)$ associated to $\Sigma$ is defined by

$$\forall z \in \mathbb{C}^g, \quad \theta(z|\Omega) = \sum_{n \in \mathbb{Z}^g} e^{i\pi(n \cdot \Omega n + 2n \cdot z)}.$$
For $(\delta') \in (\frac{1}{2}\mathbb{Z})^{2g}$, the theta function with characteristic $(\delta')$, is defined by

$$ \theta[\delta'](z|\Omega) = \sum_{n \in \mathbb{Z}^g} e^{i\pi[(n+\delta') \cdot \Omega(n+\delta') + 2(n+\delta') \cdot (z+\delta'')]} $$

so that the theta function with $(0)$ characteristic is the Riemann theta function. A characteristic $(\delta')$ is said to be even (odd) if $2\delta \cdot 2\delta'$ is even (odd). A theta function with even (odd) characteristic is an even (odd) function.

**Prime form.** The prime form is the building block for meromorphic functions on $\Sigma$. We outline the definition and refer to [Mum07] for more details. Consider a non-degenerate theta characteristic, that is a characteristic $(\delta')$ such that $d_z\theta[\delta'](0) \neq 0$, this implies in particular that it must be odd. Consider also $\xi[\delta']$ the square root of the holomorphic form $d_z\theta[\delta'](0) \cdot \vec{\omega}$. Then, the prime form is defined to be:

$$ \forall x, y \in \Sigma, \quad E(x, y) = \frac{\theta[\delta'](y-x)}{\xi[\delta'](x)\xi[\delta'](y)}, $$

where $\theta[\delta'](y-x) := \theta[\delta'](\int_x^y \vec{\omega})$. The prime form is independent of the choice of non-degenerate theta characteristic. Note that, as a function, it is only well defined on the universal cover $\tilde{\Sigma}$ of $\Sigma$: it has well identified quasi-periods along lifts of the cycles $(A_j)$ and $(B_j)$. Its main properties are that it is equal to 0 if and only if $x = y$, it is skew symmetric and has first order zeros, [Mum07, p. 3.210].

**Angles and discrete Abel map.** In order to define Fock's weights, we need another type of data related to graph properties of the Aztec diamond. A bipartite graph is said to be minimal [Thu17, GK13] if oriented train-tracks of $\vec{\mathcal{T}}$ do not self intersect and do not form parallel bigons, where a parallel bigon is a pair of train-tracks intersecting more than once in the same direction; the Aztec diamond is of course a minimal graph.

To every train-track $T$ of $\vec{\mathcal{T}}_n$, we assign an element $\alpha_T$ of $A_0$, referred to as its angle. Let us introduce some notation related to the fact that our set of train-tracks is naturally split into four: $\alpha = (\alpha_j)_j^n$, resp. $\beta = (\beta_j)_j^n$ are the angles of the left-to-right, resp. right-to-left, horizontal train-tracks starting from the bottom; and $\gamma = (\gamma_j)_j^n$, $\delta = (\delta_j)_j^n$ are the angles of the bottom-to-top, resp. top-to-bottom, vertical train-tracks starting from the left, see Figure 1. From now on, we suppose that the angles satisfy the following condition: for all $i, j, k, \ell \in \{1, \dots, n\}$, the cyclic order $\alpha_i < \gamma_j < \beta_k < \delta_\ell$ is satisfied on $A_0$. Note that there is no ordering condition on the angles within one of these subsets. By [BCdT22, Corollary 29], this is a necessary and sufficient condition for the angles $\alpha, \beta, \gamma, \delta$ to define a minimal immersion of the natural periodic extension of the Aztec diamond. We introduce the short notation

$$ \alpha < \gamma < \beta < \delta, \qquad (4) $$

for angles $\alpha, \beta, \gamma, \delta$ satisfying the above cyclic ordering on $A_0$.
For $(\delta') \in (\frac{1}{2}\mathbb{Z})^{2g}$, the theta function with characteristic $(\delta')$, is defined by

$$ \theta[\delta'](z|\Omega) = \sum_{n \in \mathbb{Z}^g} e^{i\pi[(n+\delta') \cdot \Omega(n+\delta') + 2(n+\delta') \cdot (z+\delta'')]} $$

so that the theta function with $(0)$ characteristic is the Riemann theta function. A characteristic $(\delta')$ is said to be even (odd) if $2\delta \cdot 2\delta'$ is even (odd). A theta function with even (odd) characteristic is an even (odd) function.

**Prime form.** The prime form is the building block for meromorphic functions on $\Sigma$. We outline the definition and refer to [Mum07] for more details. Consider a non-degenerate theta characteristic, that is a characteristic $(\delta')$ such that $d_z\theta[\delta'](0) \neq 0$, this implies in particular that it must be odd. Consider also $\xi[\delta']$ the square root of the holomorphic form $d_z\theta[\delta'](0) \cdot \bar{\omega}$. Then, the prime form is defined to be:

$$ \forall x, y \in \Sigma, \quad E(x, y) = \frac{\theta[\delta'](y-x)}{\xi[\delta'](x)\xi[\delta'](y)}, $$

where $\theta[\delta'](y-x) := \theta[\delta'](\int_x^y \bar{\omega})$. The prime form is independent of the choice of non-degenerate theta characteristic. Note that, as a function, it is only well defined on the universal cover $\tilde{\Sigma}$ of $\Sigma$: it has well identified quasi-periods along lifts of the cycles $(A_j)$ and $(B_j)$. Its main properties are that it is equal to 0 if and only if $x = y$, it is skew symmetric and has first order zeros, [Mum07, p. 3.210].

**Angles and discrete Abel map.** In order to define Fock's weights, we need another type of data related to graph properties of the Aztec diamond. A bipartite graph is said to be minimal [Thu17, GK13] if oriented train-tracks of $\vec{\mathcal{T}}$ do not self intersect and do not form parallel bigons, where a parallel bigon is a pair of train-tracks intersecting more than once in the same direction; the Aztec diamond is of course a minimal graph.

To every train-track $T$ of $\vec{\mathcal{T}}_n$, we assign an element $\alpha_T$ of $A_0$, referred to as its angle. Let us introduce some notation related to the fact that our set of train-tracks is naturally split into four: $\alpha = (\alpha_j)_j^n$, resp. $\beta = (\beta_j)_j^n$ are the angles of the left-to-right, resp. right-to-left, horizontal train-tracks starting from the bottom; and $\gamma = (\gamma_j)_j^n$, $\delta = (\delta_j)_j^n$ are the angles of the bottom-to-top, resp. top-to-bottom, vertical train-tracks starting from the left, see Figure 1. From now on, we suppose that the angles satisfy the following condition: for all $i, j, k, \ell \in \{1, \dots, n\}$, the cyclic order $\alpha_i < \gamma_j < \beta_k < \delta_\ell$ is satisfied on $A_0$. Note that there is no ordering condition on the angles within one of these subsets. By [BCdT22, Corollary 29], this is a necessary and sufficient condition for the angles $\alpha, \beta, \gamma, \delta$ to define a minimal immersion of the natural periodic extension of the Aztec diamond. We introduce the short notation

$$ \alpha < \gamma < \beta < \delta, \qquad (4) $$

for angles $\alpha, \beta, \gamma, \delta$ satisfying the above cyclic ordering on $A_0$.
Following Fock [Foc15], the discrete Abel map, denoted by $d$, is a map from the vertices of $A_n^\diamond$ (that is, the dual vertices of $F_n$ and the vertices of $V_n$) to $\mathrm{Pic}(\Sigma)$, defined as follows: take as reference dual vertex the origin $0 = (0,0)$ and set $d(0) = d$, for some $d \in \mathrm{Pic}^0(\Sigma)$. Then, the discrete Abel map is defined inductively along edges and is such that along a directed edge of $A_n^\diamond$ crossing a train-track $T$, the value of $d$ formally increases, resp. decreases, by $\alpha_T$ if one arrives at a black vertex or leaves a white vertex, resp. leaves a black vertex of arrives at a white vertex. This map is well defined [Foc15], and for every vertex $x$ of $A_n^\diamond$, the degree $d(x) \in \mathrm{Pic}(\Sigma)$ is equal to 1, resp. 0, resp. $-1$, at every black, resp. dual, resp. white vertex of $A_n^\diamond$. In particular, for every dual vertex $f$, the divisor $d(f)$ belongs to $\mathrm{Pic}^0(\Sigma)$, and by [BCdT23a, Lemma 15], its image through the Abel-Jacobi map belongs to $(\mathbb{R}/\mathbb{Z})^g \subset \mathrm{Jac}(\Sigma)$. An example of computation of the discrete Abel map is given in Figure 4 (right).

**Fock's Kasteleyn matrix.** Consider a maximal curve $\Sigma$, and angles $\alpha, \beta, \gamma, \delta$ in $A_0$ assigned to train-tracks of $A_n$ satisfying the cyclic condition $\alpha < \gamma < \beta < \delta$; consider an additional parameter $t \in (\mathbb{R}/\mathbb{Z})^g \subset \mathrm{Jac}(\Sigma)$. Then, Fock's Kasteleyn matrix, denoted by $K$, has rows indexed by white vertices, columns by black ones, and non-zero coefficients defined by, for every edge $wb$ of $A_n$ crossed by two train-tracks with angles $\alpha, \beta$,

$$ K_{w,b} = \frac{E(\alpha, \beta)}{\theta(t + d(f))\theta(t + d(f'))}, \qquad (5) $$

where $f, f'$ are the dual faces adjacent to $wb$, see Figure 2.

<figure><img src="image_2.png" /><figcaption>Figure 2: Notation used in the definition of Fock's Kasteleyn matrix.</figcaption></figure>

Entries of this matrix are complex, but we prove in [BCdT23a, Proposition 31] that it is a Kasteleyn matrix, where recall that this means that it corresponds to a positive weight function $\nu$ multiplied by a complex phase $\phi$ satisfying the Kasteleyn condition (3).

*Remark 6.* We have noted that, seen as a function, the prime form $E$ is only defined on the universal cover $\tilde{\Sigma}$ of $\Sigma$. Nevertheless, in [BCdT23a, Remark 30], we prove that for any choice of lifts of the angles $\alpha, \beta$ in the universal cover $\tilde{A}_0$, the corresponding Kasteleyn operators are gauge equivalent. As a consequence, in the sequel, whenever results are true up to gauge equivalence, the choice of lifts does not matter; and whenever results are not of this type, one should keep in mind that a specific choice of lift has to be made, and that the result is true for any choice of lift. Since these subtle questions
Following Fock [Foc15], the discrete Abel map, denoted by $d$, is a map from the vertices of $A_n^\diamond$ (that is, the dual vertices of $F_n$ and the vertices of $V_n$) to $\mathrm{Pic}(\Sigma)$, defined as follows: take as reference dual vertex the origin $0 = (0,0)$ and set $d(0) = d$, for some $d \in \mathrm{Pic}^0(\Sigma)$. Then, the discrete Abel map is defined inductively along edges and is such that along a directed edge of $A_n^\diamond$ crossing a train-track $T$, the value of $d$ formally increases, resp. decreases, by $\alpha_T$ if one arrives at a black vertex or leaves a white vertex, resp. leaves a black vertex of arrives at a white vertex. This map is well defined [Foc15], and for every vertex $x$ of $A_n^\diamond$, the degree $d(x) \in \mathrm{Pic}(\Sigma)$ is equal to 1, resp. 0, resp. $-1$, at every black, resp. dual, resp. white vertex of $A_n^\diamond$. In particular, for every dual vertex $f$, the divisor $d(f)$ belongs to $\mathrm{Pic}^0(\Sigma)$, and by [BCdT23a, Lemma 15], its image through the Abel-Jacobi map belongs to $(\mathbb{R}/\mathbb{Z})^g \subset \mathrm{Jac}(\Sigma)$. An example of computation of the discrete Abel map is given in Figure 4 (right).

**Fock's Kasteleyn matrix.** Consider a maximal curve $\Sigma$, and angles $\alpha, \beta, \gamma, \delta$ in $A_0$ assigned to train-tracks of $A_n$ satisfying the cyclic condition $\alpha < \gamma < \beta < \delta$; consider an additional parameter $t \in (\mathbb{R}/\mathbb{Z})^g \subset \mathrm{Jac}(\Sigma)$. Then, Fock's Kasteleyn matrix, denoted by $K$, has rows indexed by white vertices, columns by black ones, and non-zero coefficients defined by, for every edge $wb$ of $A_n$ crossed by two train-tracks with angles $\alpha, \beta$,

$$K_{w,b} = \frac{E(\alpha, \beta)}{\theta(t + d(f))\theta(t + d(f'))}, \qquad (5)$$

where $f, f'$ are the dual faces adjacent to $wb$, see Figure 2.

<figure><img src="image_4.png" /><figcaption>Figure 2: Notation used in the definition of Fock's Kasteleyn matrix.</figcaption></figure>

Entries of this matrix are complex, but we prove in [BCdT23a, Proposition 31] that it is a Kasteleyn matrix, where recall that this means that it corresponds to a positive weight function $\nu$ multiplied by a complex phase $\phi$ satisfying the Kasteleyn condition (3).

*Remark 6.* We have noted that, seen as a function, the prime form $E$ is only defined on the universal cover $\tilde{\Sigma}$ of $\Sigma$. Nevertheless, in [BCdT23a, Remark 30], we prove that for any choice of lifts of the angles $\alpha, \beta$ in the universal cover $\tilde{A}_0$, the corresponding Kasteleyn operators are gauge equivalent. As a consequence, in the sequel, whenever results are true up to gauge equivalence, the choice of lifts does not matter; and whenever results are not of this type, one should keep in mind that a specific choice of lift has to be made, and that the result is true for any choice of lift. Since these subtle questions
have been treated in great detail in [BCdT23a], we choose not to re-address them here and to consider the Kasteleyn operator as directly defined with parameters on the base surface Σ.

## 2.3 Examples: genus 0 and genus 1 cases

By way of example, we make the genus 0 and 1 cases explicit and prove that we recover as specific cases well known models, namely the Aztec diamond with Stanley's weights (genus 0) [Pro97, Yan91], and Borodin-Duits' biased 2 × 2 periodic weights (genus 1) [BD23], see also Figures 3 and 4 below.

<figure><img src="image_3.png" /><figcaption>Figure 3: Aztec diamond with Stanley's weights, and choice of reference dimer configuration $M_0$.</figcaption></figure>

<figure><img src="image_4.png" /><figcaption>Figure 4: Aztec diamond with biased 2 × 2 periodic weights [BD23], and the discrete Abel map.</figcaption></figure>

**Genus 0.** The underlying M-curve $\Sigma$ is the Riemann sphere $\hat{\mathbb{C}}$, with involution $z \mapsto \frac{1}{z}$ and $A_0 = S^1 = \{z \in \hat{\mathbb{C}} : |z| = 1\}$. The prime form $E(u, v)$ is equal to $v - u$, and the Riemann theta function is the constant function 1, so that the discrete Abel map is not needed. To a point $\alpha \in A_0 = S^1$ is assigned in a bijective way an angle $\bar{\alpha} \in \bar{A}_0 := \mathbb{R}/\pi\mathbb{Z}$ defined by $\alpha = e^{2i\bar{\alpha}}$; observe that this bijection preserves the cyclic orders on $A_0$ and $\bar{A}_0$. For $\alpha, \beta \in A_0$, we have $E(\alpha, \beta) = e^{2i\bar{\beta}} - e^{2i\bar{\alpha}}$, and Fock's Kasteleyn weights are equal to:

$$ K_{w,b} = \beta - \alpha = e^{2i\bar{\beta}} - e^{2i\bar{\alpha}} = 2ie^{i(\bar{\alpha}+\bar{\beta})} \sin(\bar{\beta} - \bar{\alpha}). \qquad (6) $$

Up to a factor $i$, these are Kenyon's critical weights on isoradial graphs introduced in [Ken02].

Let us now prove that, as a specific case, one recovers the dimer model with Stanley's weights [Pro97, Yan91] defined as follows: edges are assigned positive weights $x = (x_j)_{j=1}^n$, $y = (y_j)_{j=1}^n$, $w = (w_j)_{j=1}^n$, $z = (z_j)_{j=1}^n$ as in Figure 3 (left). On Fock's weights side, impose the following condition: choose $\alpha_1, \gamma, \delta \in A_0 = S^1$ satisfying the cyclic order $\alpha_1 < \gamma < \delta$, and for all $j \in \{1, \dots, n\}$, set $\gamma_j = \gamma, \delta_j = \delta$.
have been treated in great detail in [BCdT23a], we choose not to re-address them here and to consider the Kasteleyn operator as directly defined with parameters on the base surface Σ.

## 2.3 Examples: genus 0 and genus 1 cases

By way of example, we make the genus 0 and 1 cases explicit and prove that we recover as specific cases well known models, namely the Aztec diamond with Stanley's weights (genus 0) [Pro97, Yan91], and Borodin-Duits' biased 2 × 2 periodic weights (genus 1) [BD23], see also Figures 3 and 4 below.

<figure><img src="image_5.png" /><figcaption>Figure 3: Aztec diamond with Stanley's weights, and choice of reference dimer configuration $M_0$.</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>Figure 4: Aztec diamond with biased 2 × 2 periodic weights [BD23], and the discrete Abel map.</figcaption></figure>

**Genus 0.** The underlying M-curve $\Sigma$ is the Riemann sphere $\hat{\mathbb{C}}$, with involution $z \mapsto \frac{1}{z}$ and $A_0 = S^1 = \{z \in \hat{\mathbb{C}} : |z| = 1\}$. The prime form $E(u, v)$ is equal to $v - u$, and the Riemann theta function is the constant function 1, so that the discrete Abel map is not needed. To a point $\alpha \in A_0 = S^1$ is assigned in a bijective way an angle $\bar{\alpha} \in \bar{A}_0 := \mathbb{R}/\pi\mathbb{Z}$ defined by $\alpha = e^{2i\bar{\alpha}}$; observe that this bijection preserves the cyclic orders on $A_0$ and $\bar{A}_0$. For $\alpha, \beta \in A_0$, we have $E(\alpha, \beta) = e^{2i\bar{\beta}} - e^{2i\bar{\alpha}}$, and Fock's Kasteleyn weights are equal to:

$$K_{w,b} = \beta - \alpha = e^{2i\bar{\beta}} - e^{2i\bar{\alpha}} = 2ie^{i(\bar{\alpha}+\bar{\beta})} \sin(\bar{\beta} - \bar{\alpha}). \qquad (6)$$

Up to a factor $i$, these are Kenyon's critical weights on isoradial graphs introduced in [Ken02].

Let us now prove that, as a specific case, one recovers the dimer model with Stanley's weights [Pro97, Yan91] defined as follows: edges are assigned positive weights $x = (x_j)_{j=1}^n$, $y = (y_j)_{j=1}^n$, $w = (w_j)_{j=1}^n$, $z = (z_j)_{j=1}^n$ as in Figure 3 (left). On Fock's weights side, impose the following condition: choose $\alpha_1, \gamma, \delta \in A_0 = S^1$ satisfying the cyclic order $\alpha_1 < \gamma < \delta$, and for all $j \in \{1, \dots, n\}$, set $\gamma_j = \gamma, \delta_j = \delta$.
**Proposition 7.** Suppose that we are given $\mathbf{x}, \mathbf{y}, \mathbf{z}, \mathbf{w}$ defining Stanley's weights, and consider $\alpha_1, \gamma, \delta \in A_0$ as above. Then, there exists $(\alpha_j)_{j=2}^n, (\beta_j)_{j=1}^n$ such that $\alpha < \gamma < \beta < \delta$ and such that the dimer model with Fock's weights $\alpha, \beta, \gamma \equiv \gamma, \delta \equiv \delta$ in genus 0 is gauge equivalent to the dimer model with Stanley's weights.

*Proof.* For the purpose of this proof, let us denote by $\nu$ Fock's weight function and by $\tilde{\nu}$ Stanley's one. We are given $\tilde{\nu}$, that is $\mathbf{x}, \mathbf{y}, \mathbf{z}, \mathbf{w}$, and on Fock's side we are given $\alpha_1, \gamma, \delta \in A_0$ such that $\alpha_1 < \gamma < \delta$. We need to prove that there exist $(\alpha_j)_{j=2}^n, (\beta_j)_{j=1}^n$ such that $\alpha < \gamma < \beta < \delta$, and such that $\nu$ and $\tilde{\nu}$ are gauge equivalent. Returning to Section 2.1, this means that all face weights have to be equal.

For the weight function $\tilde{\nu}$, there are two kinds of face weights corresponding to inner faces with both odd coordinates, resp. both even coordinates

$$ \forall j \in \{1, \dots, n\}, \quad \frac{x_j w_j}{y_j z_j}, \quad \text{resp.} \quad \forall j \in \{1, \dots, n-1\}, \quad \frac{y_{j+1} z_j}{x_{j+1} w_j}. $$

Note that all face weights along a given row are equal.

Returning to the definition of Fock's weights with the above specification in the genus 0 case, see Equation (6), we want to have the following equalities

$$ \begin{align} \forall j \in \{1, \dots, n\}, \quad \frac{x_j w_j}{y_j z_j} &= \frac{|\sin(\bar{\gamma} - \bar{\alpha}_j)|}{|\sin(\bar{\delta} - \bar{\alpha}_j)|} \frac{|\sin(\bar{\delta} - \bar{\beta}_j)|}{|\sin(\bar{\beta}_j - \bar{\gamma})|} \tag{7} \\ \forall j \in \{1, \dots, n-1\}, \quad \frac{y_{j+1} z_j}{x_{j+1} w_j} &= \frac{|\sin(\bar{\delta} - \bar{\alpha}_{j+1})|}{|\sin(\bar{\gamma} - \bar{\alpha}_{j+1})|} \frac{|\sin(\bar{\beta}_j - \bar{\gamma})|}{|\sin(\bar{\delta} - \bar{\beta}_j)|}. \end{align} $$

The main tool we use is that, for all $\bar{u}, \bar{v} \in \bar{A}_0$, the function $\bar{x} \in \bar{A}_0 \mapsto \frac{|\sin(\bar{x} - \bar{u})|}{|\sin(\bar{x} - \bar{v})|}$ is non-negative, has a zero at $\bar{x} = \bar{u}$, a pole at $\bar{x} = \bar{v}$, is continuous except at $\bar{x} = \bar{v}$, and takes all values in $[0, \infty)$ on the intervals $[\bar{u}, \bar{v})$, $(\bar{v}, \bar{u}]$ of $\bar{A}_0$.

Fix any $\alpha_1, \gamma, \delta$ satisfying $\alpha_1 < \gamma < \delta$. Then, by the above there exists $\beta_1 \in (\gamma, \delta)$ such that $\frac{x_1 w_1}{y_1 z_1} = \frac{|\sin(\bar{\gamma} - \bar{\alpha}_1)|}{|\sin(\bar{\delta} - \bar{\alpha}_1)|} \frac{|\sin(\bar{\delta} - \bar{\beta}_1)|}{|\sin(\bar{\beta}_1 - \bar{\gamma})|}$. Using the same argument, there exists $\alpha_2 \in (\delta, \gamma)$ such that $\frac{y_2 z_1}{x_2 w_1} = \frac{|\sin(\bar{\delta} - \bar{\alpha}_2)|}{|\sin(\bar{\gamma} - \bar{\alpha}_2)|} \frac{|\sin(\bar{\beta}_1 - \bar{\gamma})|}{|\sin(\bar{\delta} - \bar{\beta}_1)|}$. Again, using this argument, there exists $\beta_2 \in (\gamma, \delta)$ such that $\frac{x_2 w_2}{y_2 z_2} = \frac{|\sin(\bar{\gamma} - \bar{\alpha}_2)|}{|\sin(\bar{\delta} - \bar{\alpha}_2)|} \frac{|\sin(\bar{\delta} - \bar{\beta}_2)|}{|\sin(\bar{\beta}_2 - \bar{\gamma})|}$, and we continue determining $\alpha_3$ using the second equation, etc. To solve these equations we need $2n-1$ parameters $(\alpha_j)_{j=2}^n, (\beta_j)_{j=1}^n$, and we can choose them so that $\alpha < \gamma < \beta < \delta$. $\square$

**Remark 8.** The fact that there are three parameters (we chose here $\alpha_1, \gamma$ and $\delta$) that we can fix to arbitrary values is a consequence of the fact that the probability measure is invariant if we apply to all parameters a Möbius transform preserving the unit circle, and such Möbius transformations are transitives on triple of points. See e.g. [KO06, Section 5], and Section 6.1 of the present article.
**Proposition 7.** Suppose that we are given $x, y, z, w$ defining Stanley's weights, and consider $\alpha_1, \gamma, \delta \in A_0$ as above. Then, there exists $(\alpha_j)_{j=2}^n, (\beta_j)_{j=1}^n$ such that $\alpha < \gamma < \beta < \delta$ and such that the dimer model with Fock's weights $\alpha, \beta, \gamma \equiv \gamma, \delta \equiv \delta$ in genus 0 is gauge equivalent to the dimer model with Stanley's weights.

*Proof.* For the purpose of this proof, let us denote by $\nu$ Fock's weight function and by $\tilde{\nu}$ Stanley's one. We are given $\tilde{\nu}$, that is $x, y, z, w$, and on Fock's side we are given $\alpha_1, \gamma, \delta \in A_0$ such that $\alpha_1 < \gamma < \delta$. We need to prove that there exist $(\alpha_j)_{j=2}^n, (\beta_j)_{j=1}^n$ such that $\alpha < \gamma < \beta < \delta$, and such that $\nu$ and $\tilde{\nu}$ are gauge equivalent. Returning to Section 2.1, this means that all face weights have to be equal.

For the weight function $\tilde{\nu}$, there are two kinds of face weights corresponding to inner faces with both odd coordinates, resp. both even coordinates

$$ \forall j \in \{1, \dots, n\}, \quad \frac{x_j w_j}{y_j z_j}, \quad \text{resp.} \quad \forall j \in \{1, \dots, n-1\}, \quad \frac{y_{j+1} z_j}{x_{j+1} w_j}. $$

Note that all face weights along a given row are equal.

Returning to the definition of Fock's weights with the above specification in the genus 0 case, see Equation (6), we want to have the following equalities

$$ \begin{gathered} \forall j \in \{1, \dots, n\}, \quad \frac{x_j w_j}{y_j z_j} = \frac{|\sin(\bar{\gamma} - \bar{\alpha}_j)|}{|\sin(\bar{\delta} - \bar{\alpha}_j)|} \frac{|\sin(\bar{\delta} - \bar{\beta}_j)|}{|\sin(\bar{\beta}_j - \bar{\gamma})|} \\ \forall j \in \{1, \dots, n-1\}, \quad \frac{y_{j+1} z_j}{x_{j+1} w_j} = \frac{|\sin(\bar{\delta} - \bar{\alpha}_{j+1})|}{|\sin(\bar{\gamma} - \bar{\alpha}_{j+1})|} \frac{|\sin(\bar{\beta}_j - \bar{\gamma})|}{|\sin(\bar{\delta} - \bar{\beta}_j)|}. \end{gathered} \tag{7} $$

The main tool we use is that, for all $\bar{u}, \bar{v} \in \bar{A}_0$, the function $\bar{x} \in \bar{A}_0 \mapsto \frac{|\sin(\bar{x}-\bar{u})|}{|\sin(\bar{x}-\bar{v})|}$ is non-negative, has a zero at $\bar{x} = \bar{u}$, a pole at $\bar{x} = \bar{v}$, is continuous except at $\bar{x} = \bar{v}$, and takes all values in $[0, \infty)$ on the intervals $[\bar{u}, \bar{v})$, $(\bar{v}, \bar{u}]$ of $\bar{A}_0$.

Fix any $\alpha_1, \gamma, \delta$ satisfying $\alpha_1 < \gamma < \delta$. Then, by the above there exists $\beta_1 \in (\gamma, \delta)$ such that $\frac{x_1 w_1}{y_1 z_1} = \frac{|\sin(\bar{\gamma} - \bar{\alpha}_1)|}{|\sin(\bar{\delta} - \bar{\alpha}_1)|} \frac{|\sin(\bar{\delta} - \bar{\beta}_1)|}{|\sin(\bar{\beta}_1 - \bar{\gamma})|}$. Using the same argument, there exists $\alpha_2 \in (\delta, \gamma)$ such that $\frac{y_2 z_1}{x_2 w_1} = \frac{|\sin(\bar{\delta} - \bar{\alpha}_2)|}{|\sin(\bar{\gamma} - \bar{\alpha}_2)|} \frac{|\sin(\bar{\beta}_1 - \bar{\gamma})|}{|\sin(\bar{\delta} - \bar{\beta}_1)|}$. Again, using this argument, there exists $\beta_2 \in (\gamma, \delta)$ such that $\frac{x_2 w_2}{y_2 z_2} = \frac{|\sin(\bar{\gamma} - \bar{\alpha}_2)|}{|\sin(\bar{\delta} - \bar{\alpha}_2)|} \frac{|\sin(\bar{\delta} - \bar{\beta}_2)|}{|\sin(\bar{\beta}_2 - \bar{\gamma})|}$, and we continue determining $\alpha_3$ using the second equation, etc. To solve these equations we need $2n-1$ parameters $(\alpha_j)_{j=2}^n, (\beta_j)_{j=1}^n$, and we can choose them so that $\alpha < \gamma < \beta < \delta$. $\square$

**Remark 8.** The fact that there are three parameters (we chose here $\alpha_1, \gamma$ and $\delta$) that we can fix to arbitrary values is a consequence of the fact that the probability measure is invariant if we apply to all parameters a Möbius transform preserving the unit circle, and such Möbius transformations are transitives on triple of points. See e.g. [KO06, Section 5], and Section 6.1 of the present article.
**Genus 1.** The M-curve $\Sigma$ is the complex torus $T(\tau) = \mathbb{C}/(\mathbb{Z} + \tau\mathbb{Z})$, for some modular parameter $\tau \in i\mathbb{R}^+$, where the involution is given by the complex conjugation and $A_0 = \mathbb{R}/\mathbb{Z}$. The theta function $\theta(u|\Omega)$ is the Jacobi theta function $\theta_3(\pi u|\tau)$, see [Law89, Equation (1.2.13)], and the prime form $E(u, v)$ is equal to $\frac{\theta_1(\pi(v-u)|\tau)}{\pi\theta'_1(0)}$, where $\theta_1$ is the rescaled version of the theta function with characteristic $(1/2)$. Whenever no confusion occurs, the reference to $\tau$ is omitted in the notation of the theta functions. As a consequence, Fock's Kasteleyn weights are equal to

$$ K_{w,b} = \frac{\theta_1(\pi(\beta - \alpha))}{\pi\theta'_1(0)\theta_3(\pi(t + \mathbf{d}(f)))\theta_3(\pi(t + \mathbf{d}(f')))} \quad (8) $$

We now prove that as a specific case one recovers the biased 2 × 2 periodic dimer model studied by Borodin and Duits [BD23], defined as follows. Consider two parameters $a > 0, b \in (0, 1]$; the Aztec diamond is naturally made of $2n$ rows of edges. Row weights repeat each four rows; a pattern of four rows is given by: $(\frac{1}{b}, a, b, a + \text{horiz. repetitions}), (\frac{a}{b}, 1, ab, 1 + \text{horiz. repetitions}), (b, a, \frac{1}{b}, a + \text{horiz. repetitions}), (ab, 1, \frac{a}{b}, 1 + \text{horiz. repetitions})$, see Figure 4 (right). Note that if the Aztec diamond has odd size, the last two columns and rows contain only half of the pattern; note also that the weights come in periods of 2 × 2, circled in magenta in Figure 4 (right), hence the name. For Fock's weights, impose the following preliminary conditions: for all $j \in \{1, \dots, n\}$, set $\alpha_j = \alpha, \beta_j = \beta, \gamma_j = \gamma, \delta_j = \delta$, where $\alpha, \beta, \gamma, \delta \in A_0 = \mathbb{R}/\mathbb{Z}$ are such that $\alpha < \gamma < \beta < \delta$; moreover suppose that $\beta - \alpha = \delta - \gamma = \frac{1}{2}$, implying that we have $\gamma - \alpha = \delta - \beta := \rho \in (0, \frac{1}{2})$, and $\beta - \gamma = \alpha - \delta = \frac{1}{2} - \rho \in (0, \frac{1}{2})$, so that we have one free angle parameter $\rho \in (0, \frac{1}{2})$.

**Proposition 9.** Suppose that we are given $a > 0, b \in (0, 1)$ defining biased 2 × 2 periodic weights, and consider $\alpha, \beta, \gamma, \delta \in A_0$ and $\rho \in (0, \frac{1}{2})$ as specified above. Then, there exists $\rho \in (0, \frac{1}{2})$ and $\tau \in i\mathbb{R}_+$ such that the dimer model with Fock's weights in genus 1 for $t = \frac{1}{4}$ is gauge equivalent to the dimer model with biased 2 × 2 periodic weights.

*Proof.* We are given $a > 0$ and $b \in (0, 1)$ and need to prove that there exists $\rho \in (0, \frac{1}{2})$, $\tau \in i\mathbb{R}_+$, such that for a good choice of $t$, the face weight of each face is the same in both settings.

The computation of the discrete Abel map is illustrated in Figure 4 (right, blue), taking into account that the theta function $\theta_3$ is $\pi$-periodic. Computing the face weights similarly to the genus 0 case, for each of the weight functions there are four distinct face weights, which can for instance be computed from the four faces surrounded by the magenta line of Figure 4. We are looking for $\rho, \tau, t$ satisfying the following four equalities:

$$ \frac{1}{a^2} = \frac{\theta_3(\pi(t + \frac{1}{2}))^2}{\theta_3(\pi t)^2} \frac{\theta_1(\pi\rho)^2}{\theta_1(\pi(\frac{1}{2} - \rho))^2}, \quad \frac{1}{a^2} = \frac{\theta_3(\pi t)^2}{\theta_3(\pi(t + \frac{1}{2}))^2} \frac{\theta_1(\pi\rho)^2}{\theta_1(\pi(\frac{1}{2} - \rho))^2}, \\ (ab)^2 = \frac{\theta_3(\pi(t + \rho))^2}{\theta_3(\pi(t + \frac{1}{2} + \rho))^2} \frac{\theta_1(\pi(\frac{1}{2} - \rho))^2}{\theta_1(\pi\rho)^2}, \quad \frac{a^2}{b^2} = \frac{\theta_3(\pi(t + \frac{1}{2} + \rho))^2}{\theta_3(\pi(t + \rho))^2} \frac{\theta_1(\pi(\frac{1}{2} - \rho))^2}{\theta_1(\pi\rho)^2}. $$

Since all the quantities involved are positive, we can remove the squares.
**Genus 1.** The M-curve $\Sigma$ is the complex torus $T(\tau) = \mathbb{C}/(\mathbb{Z} + \tau\mathbb{Z})$, for some modular parameter $\tau \in i\mathbb{R}^+$, where the involution is given by the complex conjugation and $A_0 = \mathbb{R}/\mathbb{Z}$. The theta function $\theta(u|\Omega)$ is the Jacobi theta function $\theta_3(\pi u|\tau)$, see [Law89, Equation (1.2.13)], and the prime form $E(u, v)$ is equal to $\frac{\theta_1(\pi(v-u)|\tau)}{\pi\theta'_1(0)}$, where $\theta_1$ is the rescaled version of the theta function with characteristic $(1/2)$. Whenever no confusion occurs, the reference to $\tau$ is omitted in the notation of the theta functions. As a consequence, Fock's Kasteleyn weights are equal to

$$ K_{w,b} = \frac{\theta_1(\pi(\beta - \alpha))}{\pi\theta'_1(0)\theta_3(\pi(t + \mathbf{d}(f)))\theta_3(\pi(t + \mathbf{d}(f')))} \quad (8) $$

We now prove that as a specific case one recovers the biased 2 × 2 periodic dimer model studied by Borodin and Duits [BD23], defined as follows. Consider two parameters $a > 0, b \in (0, 1]$; the Aztec diamond is naturally made of $2n$ rows of edges. Row weights repeat each four rows; a pattern of four rows is given by: $(\frac{1}{b}, a, b, a + \text{horiz. repetitions}), (\frac{a}{b}, 1, ab, 1 + \text{horiz. repetitions}), (b, a, \frac{1}{b}, a + \text{horiz. repetitions}), (ab, 1, \frac{a}{b}, 1 + \text{horiz. repetitions})$, see Figure 4 (right). Note that if the Aztec diamond has odd size, the last two columns and rows contain only half of the pattern; note also that the weights come in periods of 2 × 2, circled in magenta in Figure 4 (right), hence the name. For Fock's weights, impose the following preliminary conditions: for all $j \in \{1, \dots, n\}$, set $\alpha_j = \alpha, \beta_j = \beta, \gamma_j = \gamma, \delta_j = \delta$, where $\alpha, \beta, \gamma, \delta \in A_0 = \mathbb{R}/\mathbb{Z}$ are such that $\alpha < \gamma < \beta < \delta$; moreover suppose that $\beta - \alpha = \delta - \gamma = \frac{1}{2}$, implying that we have $\gamma - \alpha = \delta - \beta := \rho \in (0, \frac{1}{2})$, and $\beta - \gamma = \alpha - \delta = \frac{1}{2} - \rho \in (0, \frac{1}{2})$, so that we have one free angle parameter $\rho \in (0, \frac{1}{2})$.

**Proposition 9.** Suppose that we are given $a > 0, b \in (0, 1)$ defining biased 2 × 2 periodic weights, and consider $\alpha, \beta, \gamma, \delta \in A_0$ and $\rho \in (0, \frac{1}{2})$ as specified above. Then, there exists $\rho \in (0, \frac{1}{2})$ and $\tau \in i\mathbb{R}_+$ such that the dimer model with Fock's weights in genus 1 for $t = \frac{1}{4}$ is gauge equivalent to the dimer model with biased 2 × 2 periodic weights.

*Proof.* We are given $a > 0$ and $b \in (0, 1)$ and need to prove that there exists $\rho \in (0, \frac{1}{2})$, $\tau \in i\mathbb{R}_+$, such that for a good choice of $t$, the face weight of each face is the same in both settings.

The computation of the discrete Abel map is illustrated in Figure 4 (right, blue), taking into account that the theta function $\theta_3$ is $\pi$-periodic. Computing the face weights similarly to the genus 0 case, for each of the weight functions there are four distinct face weights, which can for instance be computed from the four faces surrounded by the magenta line of Figure 4. We are looking for $\rho, \tau, t$ satisfying the following four equalities:

$$ \begin{aligned} \frac{1}{a^2} &= \frac{\theta_3(\pi(t + \frac{1}{2}))^2}{\theta_3(\pi t)^2} \frac{\theta_1(\pi\rho)^2}{\theta_1(\pi(\frac{1}{2} - \rho))^2}, & \frac{1}{a^2} &= \frac{\theta_3(\pi t)^2}{\theta_3(\pi(t + \frac{1}{2}))^2} \frac{\theta_1(\pi\rho)^2}{\theta_1(\pi(\frac{1}{2} - \rho))^2}, \\ (ab)^2 &= \frac{\theta_3(\pi(t + \rho))^2}{\theta_3(\pi(t + \frac{1}{2} + \rho))^2} \frac{\theta_1(\pi(\frac{1}{2} - \rho))^2}{\theta_1(\pi\rho)^2}, & \frac{a^2}{b^2} &= \frac{\theta_3(\pi(t + \frac{1}{2} + \rho))^2}{\theta_3(\pi(t + \rho))^2} \frac{\theta_1(\pi(\frac{1}{2} - \rho))^2}{\theta_1(\pi\rho)^2}. \end{aligned} $$

Since all the quantities involved are positive, we can remove the squares.
The two equalities on the first line imply that $\theta_3(\pi(t + \frac{1}{2})) = \theta_3(\pi t)$, so $t = \pm \frac{1}{4}$. Taking the product of the first two equalities of both lines yields $b = \theta_3(\pi(t+\rho))/\theta_3(\pi(t+\frac{1}{2}+\rho))$, which is strictly less than 1 for $\rho \in (0, \frac{1}{2})$ only if we choose the plus sign, and set $t = +\frac{1}{4}$. Using that the function $\theta_3$ is even, we are looking for $\rho, \tau$ satisfying

$$a = \frac{\theta_1(\frac{\pi}{2} - \pi\rho)}{\theta_1(\pi\rho)} = \frac{\theta_2(\pi\rho)}{\theta_1(\pi\rho)}, \quad b = \frac{\theta_3(\pi(\rho + \frac{1}{4}))}{\theta_3(\pi(\rho - \frac{1}{4}))} = \frac{\theta_3(\pi(\rho + \frac{1}{4}))}{\theta_4(\pi(\rho - \frac{1}{4}))},$$

where in both second equalities, we used [Law89, Eq. (1.3.2,1.3.4)]. Let us now express these functions using Jacobi trigonometric functions sc, dn and their inverses cs, nd, see [Law89, Chap. 2] for details. Recall the following relations between the parameters of Jacobi's trigonometric and theta functions: $k = \frac{\theta_2(0)^2}{\theta_3(0)^2}$, $k' = \sqrt{1-k^2} = \frac{\theta_4(0)^2}{\theta_3(0)^2}$, $K = \frac{\pi}{2}\theta_3(0)^2$, $iK' = \tau K$, and let us write $\tilde{\rho} = 2K\rho$. We have, see [Law89, 2.1.1-2.1.3],

$$\mathrm{sc}(\tilde{\rho}|k) = \frac{\theta_3(0|\tau) \theta_1(\pi\rho|\tau)}{\theta_4(0|\tau) \theta_2(\pi\rho|\tau)}, \quad \mathrm{dn}(\tilde{\rho}|k) = \frac{\theta_4(0|\tau) \theta_3(\pi\rho|\tau)}{\theta_3(0|\tau) \theta_4(\pi\rho|\tau)}.$$

When working with Jacobi's trigonometric functions, the elliptic modulus $k$ (or $k'$) is considered as given; then $q = e^{i\pi\tau}$ can be derived from $k$ and $k'$, see [Law89, 2.1.12, 2.1.23]. As $k$ decreases from 1 to 0 (or $k'$ increases from 0 to 1), $\tau$ goes from $i0$ to $i\infty$. Again, whenever no confusion occurs, we remove $k$, resp. $\tau$, from the argument of the Jacobi trigonometric functions, resp. theta functions. As a consequence of the above discussion, we are looking for $\rho$ and $k$, or equivalently $k'$, satisfying

$$a = (k')^{-\frac{1}{2}} \mathrm{cs}(\tilde{\rho}) \qquad (9)$$

$$b = (k')^{-\frac{1}{2}} \mathrm{dn}(\tilde{\rho} + \frac{K}{2}). \qquad (10)$$

We first use the addition formula [DLMF, 22.8.17], in Equation (10), divide numerator and denominator by $\mathrm{sn}(\tilde{\rho})\mathrm{sn}(\frac{K}{2})$, giving

$$b = (k')^{-\frac{1}{2}} \frac{\mathrm{cs}(\tilde{\rho}) \mathrm{dn}(\frac{K}{2}) - \mathrm{dn}(\tilde{\rho}) \mathrm{cs}(\frac{K}{2})}{\mathrm{cs}(\tilde{\rho}) \mathrm{dn}(\tilde{\rho}) - \mathrm{dn}(\frac{K}{2}) \mathrm{cs}(\frac{K}{2})}. \qquad (11)$$

We then, use the identities [DLMF, 22.6.1-22.6.2] to express dn using the function cs

$$\mathrm{dn}(\tilde{\rho}) = \sqrt{\frac{k'^2 + \mathrm{cs}^2(\tilde{\rho})}{1 + \mathrm{cs}^2(\tilde{\rho})}},$$

and the special values $\mathrm{dn}(\frac{K}{2}) = \mathrm{cs}(\frac{K}{2}) = (k')^{\frac{1}{2}}$ found for example in [DLMF, Table 22.5.2] to obtain

$$b = \frac{\mathrm{cs}(\tilde{\rho}) - \mathrm{dn}(\tilde{\rho})}{\mathrm{cs}(\tilde{\rho}) \mathrm{dn}(\tilde{\rho}) - k'} = \frac{\sqrt{k'^{-1} + a^2} - \sqrt{k'^{-1} + a^{-2}}}{\sqrt{k' + a^2} - \sqrt{k' + a^{-2}}}. \qquad (12)$$
The two equalities on the first line imply that $\theta_3(\pi(t + \frac{1}{2})) = \theta_3(\pi t)$, so $t = \pm \frac{1}{4}$. Taking the product of the first two equalities of both lines yields $b = \theta_3(\pi(t+\rho))/\theta_3(\pi(t+\frac{1}{2}+\rho))$, which is strictly less than 1 for $\rho \in (0, \frac{1}{2})$ only if we choose the plus sign, and set $t = +\frac{1}{4}$. Using that the function $\theta_3$ is even, we are looking for $\rho, \tau$ satisfying

$$a = \frac{\theta_1(\frac{\pi}{2} - \pi\rho)}{\theta_1(\pi\rho)} = \frac{\theta_2(\pi\rho)}{\theta_1(\pi\rho)}, \quad b = \frac{\theta_3(\pi(\rho + \frac{1}{4}))}{\theta_3(\pi(\rho - \frac{1}{4}))} = \frac{\theta_3(\pi(\rho + \frac{1}{4}))}{\theta_4(\pi(\rho - \frac{1}{4}))},$$

where in both second equalities, we used [Law89, Eq. (1.3.2,1.3.4)]. Let us now express these functions using Jacobi trigonometric functions sc, dn and their inverses cs, nd, see [Law89, Chap. 2] for details. Recall the following relations between the parameters of Jacobi's trigonometric and theta functions: $k = \frac{\theta_2(0)^2}{\theta_3(0)^2}$, $k' = \sqrt{1-k^2} = \frac{\theta_4(0)^2}{\theta_3(0)^2}$, $K = \frac{\pi}{2}\theta_3(0)^2$, $iK' = \tau K$, and let us write $\tilde{\rho} = 2K\rho$. We have, see [Law89, 2.1.1-2.1.3],

$$\mathrm{sc}(\tilde{\rho}|k) = \frac{\theta_3(0|\tau) \theta_1(\pi\rho|\tau)}{\theta_4(0|\tau) \theta_2(\pi\rho|\tau)}, \quad \mathrm{dn}(\tilde{\rho}|k) = \frac{\theta_4(0|\tau) \theta_3(\pi\rho|\tau)}{\theta_3(0|\tau) \theta_4(\pi\rho|\tau)}.$$

When working with Jacobi's trigonometric functions, the elliptic modulus $k$ (or $k'$) is considered as given; then $q = e^{i\pi\tau}$ can be derived from $k$ and $k'$, see [Law89, 2.1.12, 2.1.23]. As $k$ decreases from 1 to 0 (or $k'$ increases from 0 to 1), $\tau$ goes from $i0$ to $i\infty$. Again, whenever no confusion occurs, we remove $k$, resp. $\tau$, from the argument of the Jacobi trigonometric functions, resp. theta functions. As a consequence of the above discussion, we are looking for $\rho$ and $k$, or equivalently $k'$, satisfying

$$a = (k')^{-\frac{1}{2}} \mathrm{cs}(\tilde{\rho}) \qquad (9)$$

$$b = (k')^{-\frac{1}{2}} \mathrm{dn}(\tilde{\rho} + \frac{K}{2}). \qquad (10)$$

We first use the addition formula [DLMF, 22.8.17], in Equation (10), divide numerator and denominator by $\mathrm{sn}(\tilde{\rho})\mathrm{sn}(\frac{K}{2})$, giving

$$b = (k')^{-\frac{1}{2}} \frac{\mathrm{cs}(\tilde{\rho}) \mathrm{dn}(\frac{K}{2}) - \mathrm{dn}(\tilde{\rho}) \mathrm{cs}(\frac{K}{2})}{\mathrm{cs}(\tilde{\rho}) \mathrm{dn}(\tilde{\rho}) - \mathrm{dn}(\frac{K}{2}) \mathrm{cs}(\frac{K}{2})}. \qquad (11)$$

We then, use the identities [DLMF, 22.6.1-22.6.2] to express dn using the function cs

$$\mathrm{dn}(\tilde{\rho}) = \sqrt{\frac{k'^2 + \mathrm{cs}^2(\tilde{\rho})}{1 + \mathrm{cs}^2(\tilde{\rho})}},$$

and the special values $\mathrm{dn}(\frac{K}{2}) = \mathrm{cs}(\frac{K}{2}) = (k')^{\frac{1}{2}}$ found for example in [DLMF, Table 22.5.2] to obtain

$$b = \frac{\mathrm{cs}(\tilde{\rho}) - \mathrm{dn}(\tilde{\rho})}{\mathrm{cs}(\tilde{\rho}) \mathrm{dn}(\tilde{\rho}) - k'} = \frac{\sqrt{k'^{-1} + a^2} - \sqrt{k'^{-1} + a^{-2}}}{\sqrt{k' + a^2} - \sqrt{k' + a^{-2}}}. \qquad (12)$$
<figure><img src="image_5.png" /><figcaption>Figure 5: Left: the plot of $\rho$ as a function of $k' = \sqrt{1-k^2}$ satisfying Equation (9), for various values of $a$ (of the form $2^{j/3}$, with $-7 \le j \le 7$). Smaller values of $a$ correspond to higher curves. Right: the plot of $b$ as a function of $k'$ for several values of $a$ (of the form $2^{j/3}$, $0 \le j \le 10$). The plot for $a < 1$ is the same as for $1/a$.</figcaption></figure>

This formula, valid for $a \ne 1$ tends to $b = \sqrt{k'}$ for $a \to 1$, and can thus be extended in the case $a=1$. For a fixed value of $a$, the formula for $b$ in Equation 12 is a continuous, increasing function of $k'$, ranging from 0 to 1 as $k'$ varies in $(0,1)$, see the plots on the right of Figure 5. Thus, for every $a>0$, there exists a unique $k'$ solving this equation. Let us fix this $k'$, then we are looking for $\tilde{\rho}$ such that $a = (k')^{-\frac{1}{2}} \text{cs}(\tilde{\rho}) = (k')^{\frac{1}{2}} \text{cs}(2K\rho)$. The right hand side, seen as a function of $\rho$, is monotone and takes all values from 0 to $\infty$ so that, for this fixed $k'$, such a $\rho$ exists and is unique, see the plots on the left of Figure 5 to see how $\rho$ varies with $k'$ for different values of $a$. Hence, we have proved that $\rho$ and $k'$ (thus $\tau$) are determined uniquely from $a$ and $b$ if we want the two models to give the same face weights. $\square$

Remark 10.

* Assuming that the train-track angles are given by $\alpha, \beta, \gamma, \delta$ (independently of $j$) and supposing that $\beta - \alpha = \delta - \gamma = \frac{1}{2}$ imply that Fock's weights have a period of size $2 \times 2$. As a consequence, in the genus 1 case, for general $2 \times 2$ periodic weights, on top of the angle parameter $\rho$ and the modular parameter $\tau$, we have one additional parameter $t \in \mathbb{R}/\mathbb{Z}$. This parameter is fixed to the value $+\frac{1}{4}$ in the case of the biased $2 \times 2$ periodic weights of [BD23].

* Using the notation of the proof of Proposition 9, for every $\rho \in (0, \frac{1}{2})$, setting $k=0$ (or equivalently $k'=1$), amounting to considering the limit $\tau \to i\mathbb{R}_+^*$, we obtain $b=1, a = \cot(\pi\rho) \in (0, \infty)$. The genus 1 case degenerates to a genus 0 case, and we recover a parameterization of the 1-periodic weights of [CJY15].
<figure><img src="image_7.png" /><figcaption>Figure 5: Left: the plot of $\rho$ as a function of $k' = \sqrt{1-k^2}$ satisfying Equation (9), for various values of $a$ (of the form $2^{j/3}$, with $-7 \le j \le 7$). Smaller values of $a$ correspond to higher curves. Right: the plot of $b$ as a function of $k'$ for several values of $a$ (of the form $2^{j/3}$, $0 \le j \le 10$). The plot for $a < 1$ is the same as for $1/a$.</figcaption></figure>

This formula, valid for $a \ne 1$ tends to $b = \sqrt{k'}$ for $a \to 1$, and can thus be extended in the case $a = 1$. For a fixed value of $a$, the formula for $b$ in Equation 12 is a continuous, increasing function of $k'$, ranging from 0 to 1 as $k'$ varies in (0, 1), see the plots on the right of Figure 5. Thus, for every $a > 0$, there exists a unique $k'$ solving this equation. Let us fix this $k'$, then we are looking for $\tilde{\rho}$ such that $a = (k')^{-\frac{1}{2}} \text{cs}(\tilde{\rho}) = (k')^{\frac{1}{2}} \text{cs}(2K\rho)$. The right hand side, seen as a function of $\rho$, is monotone and takes all values from 0 to $\infty$ so that, for this fixed $k'$, such a $\rho$ exists and is unique, see the plots on the left of Figure 5 to see how $\rho$ varies with $k'$ for different values of $a$. Hence, we have proved that $\rho$ and $k'$ (thus $\tau$) are determined uniquely from $a$ and $b$ if we want the two models to give the same face weights. $\square$

Remark 10.

* Assuming that the train-track angles are given by $\alpha, \beta, \gamma, \delta$ (independently of $j$) and supposing that $\beta - \alpha = \delta - \gamma = \frac{1}{2}$ imply that Fock's weights have a period of size $2 \times 2$. As a consequence, in the genus 1 case, for general $2 \times 2$ periodic weights, on top of the angle parameter $\rho$ and the modular parameter $\tau$, we have one additional parameter $t \in \mathbb{R}/\mathbb{Z}$. This parameter is fixed to the value $+\frac{1}{4}$ in the case of the biased $2 \times 2$ periodic weights of [BD23].

* Using the notation of the proof of Proposition 9, for every $\rho \in (0, \frac{1}{2})$, setting $k=0$ (or equivalently $k'=1$), amounting to considering the limit $\tau \to i\mathbb{R}_+^*$, we obtain $b=1, a = \cot(\pi\rho) \in (0, \infty)$. The genus 1 case degenerates to a genus 0 case, and we recover a parameterization of the 1-periodic weights of [CJY15].
* Returning to the proof of Proposition 9, for every $k' \in (0,1)$, choosing $a = 1$ corresponds to taking $\rho = \frac{1}{4}$, and according to Equation (12), $b = \sqrt{k'}$. We recover a parameterization of the 2-periodic weights of [CY14].

## 2.4 Space of parameters

The special form of Fock's weights, see Equation (5), may seem to be restrictive; we explain here that this is not the case. More precisely, we prove that given a dimer model on the Aztec diamond with any positive weight function, it is gauge equivalent to a dimer model with Fock's weights. Recall from Section 2.1 that the two dimer models then yield the same dimer Boltzmann measure.

**Proposition 11.** For any $n \in \mathbb{N}^*$, and any choice of positive edge weights $\nu$ on $A_n$, there exists an M-curve $\Sigma$ of genus $g$, a parameter $t \in (\mathbb{R}/\mathbb{Z})^g$, and angles $\alpha, \beta, \gamma, \delta \in A_0$ assigned to oriented train-tracks of $A_n$ satisfying $\alpha < \gamma < \beta < \delta$ on $A_0$, such that the dimer models with Fock's weights and weight function $\nu$ are gauge equivalent.

*Proof.* Consider for a moment $A_n$ as a subgraph of the infinite square lattice $\mathbb{Z}^2$, and extend the edge weights $\nu$ in a periodic system of weights $\bar{\nu}$ for the whole square lattice. Following [KOS06], we can construct the spectral curve $\mathcal{C}$ associated to the periodic weights $\bar{\nu}$ as the set of zeros of the characteristic polynomial, see [KOS06, Sections 3.1.3, 3.2.3] for definitions. This algebraic curve is a Harnack curve. Moreover, if a vertex is distinguished, there is a natural associated standard divisor, where a *standard divisor* corresponds to a collection of $g$ points on each oval of $\mathcal{C}$ if $\mathcal{C}$ has genus $g$ [KO06]; this defines the spectral data of the model. The dimer spectral theorem by Kenyon and Okounkov implies that that $\mathcal{C}$ together with its standard divisor (the spectral data) characterize the periodic weights up to gauge transformation. By Remark [BCdT23a, 50.2], which relies on [BCdT23a, Theorem 49] and [GK13, Theorem 7.3], it follows that there is a $t \in (\mathbb{R}/\mathbb{Z})^g$ and a periodic assignment of angle parameters to the train-tracks, satisfying the cyclic order condition, such that the corresponding dimer model with periodic Fock's weights is gauge equivalent to the original one. When restricting back to the subgraph $A_n$, we get weights of the form (5) which are gauge-equivalent to the initial weights $\nu$. $\square$

*Remark 12.*

* In Section 2.3, we prove two explicit realizations of Proposition 11 in the case of Stanley's weights and of the biased 2 × 2 periodic weights. In general, making the content of Proposition 11 explicit is not easy because the argument underlying the proof is a general parameterization theorem. The idea to proceed would be to compute the associated characteristic polynomial using the weight function $\nu$, and the associated spectral curve, Newton polygon and amoeba. The genus $g$ is given by the number of holes in the amoeba, and from the tentacles one can recover the angles of the train-tracks. However the parameter $t$ is encoded by a standard divisor on the curve, which is some additional information that needs to be given.
• Returning to the proof of Proposition 9, for every $k' \in (0,1)$, choosing $a = 1$ corresponds to taking $\rho = \frac{1}{4}$, and according to Equation (12), $b = \sqrt{k'}$. We recover a parameterization of the 2-periodic weights of [CY14].

## 2.4 Space of parameters

The special form of Fock's weights, see Equation (5), may seem to be restrictive; we explain here that this is not the case. More precisely, we prove that given a dimer model on the Aztec diamond with any positive weight function, it is gauge equivalent to a dimer model with Fock's weights. Recall from Section 2.1 that the two dimer models then yield the same dimer Boltzmann measure.

**Proposition 11.** For any $n \in \mathbb{N}^*$, and any choice of positive edge weights $\nu$ on $A_n$, there exists an M-curve $\Sigma$ of genus $g$, a parameter $t \in (\mathbb{R}/\mathbb{Z})^g$, and angles $\alpha, \beta, \gamma, \delta \in A_0$ assigned to oriented train-tracks of $A_n$ satisfying $\alpha < \gamma < \beta < \delta$ on $A_0$, such that the dimer models with Fock's weights and weight function $\nu$ are gauge equivalent.

*Proof.* Consider for a moment $A_n$ as a subgraph of the infinite square lattice $\mathbb{Z}^2$, and extend the edge weights $\nu$ in a periodic system of weights $\bar{\nu}$ for the whole square lattice. Following [KOS06], we can construct the spectral curve $\mathcal{C}$ associated to the periodic weights $\bar{\nu}$ as the set of zeros of the characteristic polynomial, see [KOS06, Sections 3.1.3, 3.2.3] for definitions. This algebraic curve is a Harnack curve. Moreover, if a vertex is distinguished, there is a natural associated standard divisor, where a *standard divisor* corresponds to a collection of $g$ points on each oval of $\mathcal{C}$ if $\mathcal{C}$ has genus $g$ [KO06]; this defines the spectral data of the model. The dimer spectral theorem by Kenyon and Okounkov implies that that $\mathcal{C}$ together with its standard divisor (the spectral data) characterize the periodic weights up to gauge transformation. By Remark [BCdT23a, 50.2], which relies on [BCdT23a, Theorem 49] and [GK13, Theorem 7.3], it follows that there is a $t \in (\mathbb{R}/\mathbb{Z})^g$ and a periodic assignment of angle parameters to the train-tracks, satisfying the cyclic order condition, such that the corresponding dimer model with periodic Fock's weights is gauge equivalent to the original one. When restricting back to the subgraph $A_n$, we get weights of the form (5) which are gauge-equivalent to the initial weights $\nu$. $\square$

*Remark 12.*

• In Section 2.3, we prove two explicit realizations of Proposition 11 in the case of Stanley's weights and of the biased 2 × 2 periodic weights. In general, making the content of Proposition 11 explicit is not easy because the argument underlying the proof is a general parameterization theorem. The idea to proceed would be to compute the associated characteristic polynomial using the weight function $\nu$, and the associated spectral curve, Newton polygon and amoeba. The genus $g$ is given by the number of holes in the amoeba, and from the tentacles one can recover the angles of the train-tracks. However the parameter $t$ is encoded by a standard divisor on the curve, which is some additional information that needs to be given.
* Note that, generically, holes in the amoeba are in correspondence with integer points in the interior of the Newton polygon; a lower number of holes means that there are isolated singularities on the curve. As a consequence, generically, the genus *g* of Proposition 11 increases with *n*, the size of the Aztec diamond.

# 3 Explicit formula for the inverse Kasteleyn matrix

The setting is that of Section 2.2: we consider an M-curve $\Sigma$ of genus $g$, the associated Riemann theta function $\theta$ and prime form $E$, and fix a parameter $t \in (\mathbb{R}/\mathbb{Z})^g$; we suppose that oriented train-tracks are assigned angles in $A_0$ satisfying condition (4), and consider the associated discrete Abel map $\mathbf{d}$. In this section we state and prove one of the main results of this paper, Theorem 13, consisting of an explicit expression for the inverse of the Kasteleyn matrix with Fock's weights. Recalling Theorem 5, an immediate consequence of Theorem 13 is an explicit formula for the dimer Boltzmann measure in the very general framework of Fock's weights. As explained in the introduction, Theorem 13 aims at, in some sense, closing a long history of explicit expressions for the inverse Kasteleyn matrix of the Aztec diamond; refer to Section 1 for historical background.

This section is organised as follows: in Section 3.1, we give some prerequisites, that is, the definition of the forms $g$ in the kernel of the Kasteleyn matrix $K$ [BCdT23a], and Fay's identity [Fay73]; then in Section 3.2 we state and prove Theorem 13.

## 3.1 Prerequisites

**Forms in the kernel of K.** We need the following ingredient from [BCdT23a], namely forms in the kernel of the Kasteleyn matrix $K$, defined as follows. Every edge of $A_n^\diamond$ consists of a dual vertex $f$, and a white or black vertex of $A_n$. For every edge of $A_n^\diamond$, and every $u \in \Sigma$, define:

$$g_{f,w}(u) = g_{w,f}(u)^{-1} = \frac{\theta(t + u + \mathbf{d}(w))}{E(\beta, u)} \qquad (13)$$

$$g_{b,f}(u) = g_{f,b}(u)^{-1} = \frac{\theta(-t + u - \mathbf{d}(b))}{E(\alpha, u)}, \qquad (14)$$

where $\alpha$, resp. $\beta$, is the angle of the oriented train-track crossing the edge $wf$, resp. $bf$, see Figure 2. When $x, y$ are two vertices of $A_n^\diamond$, consider a path $x = x_1, \dots, x_n = y$ of $A_n^\diamond$, and set

$$g_{x,y}(u) = \prod_{j=1}^{n-1} g_{x_j, x_{j+1}}(u).$$

This quantity is well defined, i.e., independent of the choice of path in $A_n^\diamond$ from $x$ to $y$. By [BCdT23a, Lemma 33], see also [Foc15] we know that the forms $g$ are in the kernel of $K$ for vertices that are not on the boundary; written explicitly we have that, for every
* Note that, generically, holes in the amoeba are in correspondence with integer points in the interior of the Newton polygon; a lower number of holes means that there are isolated singularities on the curve. As a consequence, generically, the genus *g* of Proposition 11 increases with *n*, the size of the Aztec diamond.

## 3 Explicit formula for the inverse Kasteleyn matrix

The setting is that of Section 2.2: we consider an M-curve $\Sigma$ of genus $g$, the associated Riemann theta function $\theta$ and prime form $E$, and fix a parameter $t \in (\mathbb{R}/\mathbb{Z})^g$; we suppose that oriented train-tracks are assigned angles in $A_0$ satisfying condition (4), and consider the associated discrete Abel map $\mathbf{d}$. In this section we state and prove one of the main results of this paper, Theorem 13, consisting of an explicit expression for the inverse of the Kasteleyn matrix with Fock's weights. Recalling Theorem 5, an immediate consequence of Theorem 13 is an explicit formula for the dimer Boltzmann measure in the very general framework of Fock's weights. As explained in the introduction, Theorem 13 aims at, in some sense, closing a long history of explicit expressions for the inverse Kasteleyn matrix of the Aztec diamond; refer to Section 1 for historical background.

This section is organised as follows: in Section 3.1, we give some prerequisites, that is, the definition of the forms $g$ in the kernel of the Kasteleyn matrix $K$ [BCdT23a], and Fay's identity [Fay73]; then in Section 3.2 we state and prove Theorem 13.

### 3.1 Prerequisites

**Forms in the kernel of K.** We need the following ingredient from [BCdT23a], namely forms in the kernel of the Kasteleyn matrix $K$, defined as follows. Every edge of $A_n^\diamond$ consists of a dual vertex $f$, and a white or black vertex of $A_n$. For every edge of $A_n^\diamond$, and every $u \in \Sigma$, define:

$$g_{f,w}(u) = g_{w,f}(u)^{-1} = \frac{\theta(t + u + \mathbf{d}(w))}{E(\beta, u)} \quad (13)$$

$$g_{b,f}(u) = g_{f,b}(u)^{-1} = \frac{\theta(-t + u - \mathbf{d}(b))}{E(\alpha, u)}, \quad (14)$$

where $\alpha$, resp. $\beta$, is the angle of the oriented train-track crossing the edge $wf$, resp. $bf$, see Figure 2. When $x, y$ are two vertices of $A_n^\diamond$, consider a path $x = x_1, \dots, x_n = y$ of $A_n^\diamond$, and set

$$g_{x,y}(u) = \prod_{j=1}^{n-1} g_{x_j, x_{j+1}}(u).$$

This quantity is well defined, i.e., independent of the choice of path in $A_n^\diamond$ from $x$ to $y$. By [BCdT23a, Lemma 33], see also [Foc15] we know that the forms $g$ are in the kernel of $K$ for vertices that are not on the boundary; written explicitly we have that, for every
$u \in \Sigma$, for every vertex $x$ of $A_n^\diamond$, and every white vertex in the bulk of $A_n$,

$$ \sum_{b \sim w} K_{w,b} g_{b,x}(u) = 0. \qquad (15) $$

**Fays' identity.** In the course of the proof of Theorem 13, we will need the following variant of Fay's identity [Fay73, Proposition 2.10] to expand the product $K_{w,b}g_{b,w}(u)$, see also [BCdT23a, Equation (9)],

$$ \begin{aligned} K_{w,b} g_{b,w}(u) &= \frac{E(\alpha, \beta)}{\theta(t + \mathbf{d}(\mathbf{f}))\theta(t + \mathbf{d}(\mathbf{f}'))} \frac{\theta(t + u + \mathbf{d}(\mathbf{w}))\theta(-t + u - \mathbf{d}(\mathbf{b}))}{E(\alpha, u)E(\beta, u)} \\ &= \omega_{\beta-\alpha} + \sum_{\ell=1}^{g} \left( \frac{\partial \theta}{\partial z_{\ell}}(t + \mathbf{d}(\mathbf{f})) - \frac{\partial \theta}{\partial z_{\ell}}(t + \mathbf{d}(\mathbf{f}')) \right) \omega_{j}, \end{aligned} \qquad (16) $$

where $\omega_{\beta-\alpha} = d_u \log \frac{E(u, \alpha)}{E(u, \beta)}$ is the unique meromorphic 1-form with 0 integral along A-cycles, and two simple poles at $\beta$, resp. $\alpha$, with residue 1, resp. $-1$.

## 3.2 Explicit formula for the inverse Kasteleyn operator

We consider the Kasteleyn matrix $K$ with Fock's weights, see Equation (5). In order to state our explicit formula for the inverse matrix, we first define contours of integration. By assumption, the angles assigned to oriented train-tracks satisfy the cyclic condition (4): $\alpha < \gamma < \beta < \delta$. This implies that the real component $A_0$ of $\Sigma$ can naturally be split into four disjoint connected subsets containing all of the angles of one type and none of the other types. We let $C_1$ be a trivial contour on $\Sigma$, oriented counterclockwise, containing in its interior all of the angles $\gamma = (\gamma_j)_{j=1}^n$ and none of the angles $\alpha, \beta, \delta$.

Similarly $C_2$ is a trivial contour on $\Sigma$, oriented counterclockwise, containing in its interior all of the angles $\alpha = (\alpha_j)_{j=1}^n$ and none of the others.

**Theorem 13.** For every pair $(b, w)$ of black and white vertices of $A_n$, the coefficient $(b, w)$ of the inverse Kasteleyn matrix is explicitly given by

$$ K_{b,w}^{-1} = \frac{1}{(2\pi i)^2} \frac{1}{\theta(p)} \int_{C_2} \int_{C_1} \frac{\theta(p + (v-u))}{E(u,v)} g_{b,0}(u) g_{0,w}(v) \prod_{j=1}^{n} \frac{E(\beta_j, u)}{E(\delta_j, u)} \frac{E(\delta_j, v)}{E(\beta_j, v)} + \\ - \mathbb{I}_{\{b \text{ right of } w\}} \frac{1}{2\pi i} \int_{C_2} g_{b,w}(v), \quad (17) $$

where $C_1$, resp. $C_2$, is the closed contour defined above used to integrate over $u$, resp. $v$, and $p = \sum_{j=1}^n (\delta_j - \beta_j) - t - \mathbf{d}(0)$.

Before turning to the proof, let us make a few remarks.
$u \in \Sigma$, for every vertex $x$ of $A_n^\diamond$, and every white vertex in the bulk of $A_n$,

$$ \sum_{b \sim w} K_{w,b} g_{b,x}(u) = 0. \qquad (15) $$

**Fays' identity.** In the course of the proof of Theorem 13, we will need the following variant of Fay's identity [Fay73, Proposition 2.10] to expand the product $K_{w,b}g_{b,w}(u)$, see also [BCdT23a, Equation (9)],

$$ \begin{aligned} K_{w,b} g_{b,w}(u) &= \frac{E(\alpha, \beta)}{\theta(t + \mathbf{d}(f))\theta(t + \mathbf{d}(f'))} \frac{\theta(t + u + \mathbf{d}(w))\theta(-t + u - \mathbf{d}(b))}{E(\alpha, u)E(\beta, u)} \\ &= \omega_{\beta-\alpha} + \sum_{\ell=1}^{g} \left( \frac{\partial \theta}{\partial z_{\ell}}(t + \mathbf{d}(f)) - \frac{\partial \theta}{\partial z_{\ell}}(t + \mathbf{d}(f')) \right) \omega_{j}, \end{aligned} \qquad (16) $$

where $\omega_{\beta-\alpha} = d_u \log \frac{E(u, \alpha)}{E(u, \beta)}$ is the unique meromorphic 1-form with 0 integral along $A$-cycles, and two simple poles at $\beta$, resp. $\alpha$, with residue 1, resp. $-1$.

## 3.2 Explicit formula for the inverse Kasteleyn operator

We consider the Kasteleyn matrix $K$ with Fock's weights, see Equation (5). In order to state our explicit formula for the inverse matrix, we first define contours of integration. By assumption, the angles assigned to oriented train-tracks satisfy the cyclic condition (4): $\alpha < \gamma < \beta < \delta$. This implies that the real component $A_0$ of $\Sigma$ can naturally be split into four disjoint connected subsets containing all of the angles of one type and none of the other types. We let $C_1$ be a trivial contour on $\Sigma$, oriented counterclockwise, containing in its interior all of the angles $\gamma = (\gamma_j)_{j=1}^n$ and none of the angles $\alpha, \beta, \delta$.

Similarly $C_2$ is a trivial contour on $\Sigma$, oriented counterclockwise, containing in its interior all of the angles $\alpha = (\alpha_j)_{j=1}^n$ and none of the others.

**Theorem 13.** For every pair $(b, w)$ of black and white vertices of $A_n$, the coefficient $(b, w)$ of the inverse Kasteleyn matrix is explicitly given by

$$ K_{b,w}^{-1} = \frac{1}{(2\pi i)^2} \frac{1}{\theta(p)} \int_{C_2} \int_{C_1} \frac{\theta(p + (v-u))}{E(u,v)} g_{b,0}(u) g_{0,w}(v) \prod_{j=1}^{n} \frac{E(\beta_j, u)}{E(\delta_j, u)} \frac{E(\delta_j, v)}{E(\beta_j, v)} + \\ - \mathbb{I}_{\{b \text{ right of } w\}} \frac{1}{2\pi i} \int_{C_2} g_{b,w}(v), \qquad (17) $$

where $C_1$, resp. $C_2$, is the closed contour defined above used to integrate over $u$, resp. $v$, and $p = \sum_{j=1}^n (\delta_j - \beta_j) - t - \mathbf{d}(0)$.

Before turning to the proof, let us make a few remarks.
Remark 14.

• The integrand, seen as function of $u$, resp. $v$, is a meromorphic 1-form. Indeed, looking at terms involving prime forms and recalling that the prime form is a $(-\frac{1}{2}, -\frac{1}{2})$ form, we have that the integrand is a 1-form. Moreover, an explicit computation shows that this 1-form has no period when $u$, resp. $v$, is translated by a horizontal/vertical period of the lattice $\Lambda$, implying that it is meromorphic.

• In the double integral of (17) the factor $g_{b,0}(u) \prod_j \frac{E(\beta_j, u)}{E(\delta_j, u)}$ has poles at every $\gamma_j$ on the left of $b$ and every $\delta_j$ on the right of $b$, and zeros at every $\alpha_j$ below $b$ and every $\beta_j$ above $b$; similarly for $g_{0,w}(v) \prod_j \frac{E(\delta_j, v)}{E(\beta_j, v)}$, where the role of poles and zeros are exchanged. As a consequence, we can deform the contours of integration without changing the value of the integral if we do not cross poles. For example, one could move $\mathcal{C}_1$ into another contour $\mathcal{C}'_1$ to also include the $\beta_j$'s in its interior, and replace $\mathcal{C}_2$ by $\mathcal{C}'_2$ depicted on Figure 6, which is now oriented clockwise, and contains on its right the points from $\gamma$ and $\beta$ (but not those from $\alpha$). The relative position of $\mathcal{C}_1$ and $\mathcal{C}_2$ is important because of the presence of $E(u, v)$ in the denominator of the integrand. The contribution of the residue at $u=v$ is exactly given by the single contour integral in front of the indicator function. We can therefore absorb this second term inside the double contour integral by indicating that when $b$ is on the right of $w$, we require that $\mathcal{C}'_1$ is inside $\mathcal{C}'_2$ (instead of outside).

<figure><img src="image_6.png" /><figcaption>Figure 6: A possible deformation of integration contours for Formula (17).</figcaption></figure>

• The point $0 = (0,0)$ seems to play a particular role in the formula: in the definition of $p$ and in the arguments of the functions $g$. This is actually not the case, one could express $p$ and the product $g$ times the terms involving the prim forms using another reference point and the geometry of the Aztec diamond.

• Examples of Theorem 13 in specific cases are given after the proof.

*Proof.* Although our setting is much more general than the paper [CJY15], our inspiration for this proof and choice of notation is inspired by the latter. Consider two white vertices $w, w'$; the proof consists in showing that

$$ (KK^{-1})_{w,w'} = \sum_{b \sim w} K_{w,b} K_{b,w'}^{-1} = \mathbb{I}_{\{w=w'\}}. $$
Remark 14.

• The integrand, seen as function of $u$, resp. $v$, is a meromorphic 1-form. Indeed, looking at terms involving prime forms and recalling that the prime form is a $(-\frac{1}{2}, -\frac{1}{2})$ form, we have that the integrand is a 1-form. Moreover, an explicit computation shows that this 1-form has no period when $u$, resp. $v$, is translated by a horizontal/vertical period of the lattice $\Lambda$, implying that it is meromorphic.

• In the double integral of (17) the factor $g_{b,0}(u) \prod_j \frac{E(\beta_j, u)}{E(\delta_j, u)}$ has poles at every $\gamma_j$ on the left of $b$ and every $\delta_j$ on the right of $b$, and zeros at every $\alpha_j$ below $b$ and every $\beta_j$ above $b$; similarly for $g_{0,w}(v) \prod_j \frac{E(\delta_j, v)}{E(\beta_j, v)}$, where the role of poles and zeros are exchanged. As a consequence, we can deform the contours of integration without changing the value of the integral if we do not cross poles. For example, one could move $\mathcal{C}_1$ into another contour $\mathcal{C}'_1$ to also include the $\beta_j$'s in its interior, and replace $\mathcal{C}_2$ by $\mathcal{C}'_2$ depicted on Figure 6, which is now oriented clockwise, and contains on its right the points from $\gamma$ and $\beta$ (but not those from $\alpha$). The relative position of $\mathcal{C}_1$ and $\mathcal{C}_2$ is important because of the presence of $E(u, v)$ in the denominator of the integrand. The contribution of the residue at $u=v$ is exactly given by the single contour integral in front of the indicator function. We can therefore absorb this second term inside the double contour integral by indicating that when $b$ is on the right of $w$, we require that $\mathcal{C}'_1$ is inside $\mathcal{C}'_2$ (instead of outside).

<figure><img src="image_8.png" /><figcaption>Figure 6: A possible deformation of integration contours for Formula (17).</figcaption></figure>

• The point $0 = (0,0)$ seems to play a particular role in the formula: in the definition of $p$ and in the arguments of the functions $g$. This is actually not the case, one could express $p$ and the product $g$ times the terms involving the prim forms using another reference point and the geometry of the Aztec diamond.

• Examples of Theorem 13 in specific cases are given after the proof.

*Proof.* Although our setting is much more general than the paper [CJY15], our inspiration for this proof and choice of notation is inspired by the latter. Consider two white vertices $w, w'$; the proof consists in showing that

$$ (KK^{-1})_{w,w'} = \sum_{b \sim w} K_{w,b} K_{b,w'}^{-1} = \mathbb{I}_{\{w=w'\}}. $$
Let us denote by $f^1$, resp. $f^2$, the first, resp. second term of Equation (17):

$$f_{b,w}^1 = \frac{1}{(2\pi i)^2} \frac{1}{\theta(p)} \int_{C_2} \int_{C_1} \frac{\theta(p + (v - u))}{E(u, v)} g_{b,0}(u) g_{0,w}(v) \prod_{j=1}^{n} \frac{E(\beta_j, u) E(\delta_j, v)}{E(\delta_j, u) E(\beta_j, v)} \quad (18)$$

$$f_{b,w}^2 = \mathbb{I}_{\{b \text{ right of } w\}} \frac{1}{2\pi i} \int_{C_2} g_{b,w}(v). \quad (19)$$

The proof requires the following 5 steps. If $w, w'$ are such that

1. $w_x \neq 2n$ and $w_x \neq w'_x$, or $w_x = w'_x = 2n$, then $(Kf^2)_{w,w'} = 0$.

2. $w_x \neq 2n$ and $w_x = w'_x$, then $(Kf^2)_{w,w'} = -\mathbb{I}_{\{w=w'\}}$.

3. $w_x \neq 2n$, then $(Kf^1)_{w,w'} = 0$.

4. $w_x = 2n$ and $w_x \neq w'_x$, then $(Kf^1)_{w,w'} = (Kf^2)_{w,w'}$.

5. $w_x = 2n$ and $w_x = w'_x$, then $(Kf^1)_{w,w'} = \mathbb{I}_{\{w=w'\}}$.

Before proving each of the steps, let us show that they indeed allow to end the proof. If $w$ is such that:

* $w_x \in \{0, 2, \dots, 2n-2\}$, and $w_x \neq w'_x$, then by Point 1. we have $(Kf^2)_{w,w'} = 0$, and by Point 3. $(Kf^1)_{w,w'} = 0$, implying that $(KK^{-1})_{w,w'} = 0$.

* $w_x \in \{0, 2, \dots, 2n-2\}$, and $w_x = w'_x$, then by Point 2. we have $(Kf^2)_{w,w'} = -\mathbb{I}_{\{w=w'\}}$, and by Point 3. $(Kf^1)_{w,w'} = 0$, implying that $(KK^{-1})_{w,w'} = \mathbb{I}_{\{w=w'\}}$.

* $w_x = 2n$ and $w_x \neq w'_x$, then by Point 4, $(Kf^1)_{w,w'} = (Kf^2)_{w,w'}$, implying that $(KK^{-1})_{w,w'} = 0$.

* $w_x = 2n$ and $w_x = w'_x$ then by Point 1. we have $(Kf^2)_{w,w'} = 0$, and by Point 5. $(Kf^1)_{w,w'} = \mathbb{I}_{\{w=w'\}}$, implying that $(KK^{-1})_{w,w'} = \mathbb{I}_{\{w=w'\}}$.

We now turn to the proof of Points 1. to 5.

1. When $w'_x > w_x$, all b-neighbors of $w$ are on the left of $w'$, so that all terms of type $f_2$ are equal to 0 and $(Kf^2)_{w,w'}$ is trivially equal to 0 (note that there are four neighbors if $w_x \neq 0$ and two neighbors if $w_x = 0$). If $w_x = w'_x = 2n$, the same holds since then the two b-neighbors of $w$ are on the left of $w'$ and there are no right neighbors. When $w'_x < w_x$ and $w_x \neq 2n$, the four b-neighbors of $w$ are now on the right, and there are four contributions of type $f_2$. We have

$$(Kf^2)_{w,w'} = \frac{1}{2\pi i} \sum_{b \sim w} \int_{C_2} K_{w,b} g_{b,w'}.$$

Since the contour $C_2$ in independent of $b, w'$, the sum can be moved inside the integral, and we have that $(Kf^2)_{w,w'}$ is equal to 0 by Equation (15).
Let us denote by $f^1$, resp. $f^2$, the first, resp. second term of Equation (17):

$$f_{b,w}^1 = \frac{1}{(2\pi i)^2} \frac{1}{\theta(p)} \int_{C_2} \int_{C_1} \frac{\theta(p + (v - u))}{E(u, v)} g_{b,0}(u) g_{0,w}(v) \prod_{j=1}^{n} \frac{E(\beta_j, u) E(\delta_j, v)}{E(\delta_j, u) E(\beta_j, v)} \quad (18)$$

$$f_{b,w}^2 = \mathbb{I}_{\{b \text{ right of } w\}} \frac{1}{2\pi i} \int_{C_2} g_{b,w}(v). \quad (19)$$

The proof requires the following 5 steps. If $w, w'$ are such that

1. $w_x \neq 2n$ and $w_x \neq w'_x$, or $w_x = w'_x = 2n$, then $(Kf^2)_{w,w'} = 0$.

2. $w_x \neq 2n$ and $w_x = w'_x$, then $(Kf^2)_{w,w'} = -\mathbb{I}_{\{w=w'\}}$.

3. $w_x \neq 2n$, then $(Kf^1)_{w,w'} = 0$.

4. $w_x = 2n$ and $w_x \neq w'_x$, then $(Kf^1)_{w,w'} = (Kf^2)_{w,w'}$.

5. $w_x = 2n$ and $w_x = w'_x$, then $(Kf^1)_{w,w'} = \mathbb{I}_{\{w=w'\}}$.

Before proving each of the steps, let us show that they indeed allow to end the proof. If $w$ is such that:

* $w_x \in \{0, 2, \dots, 2n-2\}$, and $w_x \neq w'_x$, then by Point 1. we have $(Kf^2)_{w,w'} = 0$, and by Point 3. $(Kf^1)_{w,w'} = 0$, implying that $(KK^{-1})_{w,w'} = 0$.

* $w_x \in \{0, 2, \dots, 2n-2\}$, and $w_x = w'_x$, then by Point 2. we have $(Kf^2)_{w,w'} = -\mathbb{I}_{\{w=w'\}}$, and by Point 3. $(Kf^1)_{w,w'} = 0$, implying that $(KK^{-1})_{w,w'} = \mathbb{I}_{\{w=w'\}}$.

* $w_x = 2n$ and $w_x \neq w'_x$, then by Point 4, $(Kf^1)_{w,w'} = (Kf^2)_{w,w'}$, implying that $(KK^{-1})_{w,w'} = 0$.

* $w_x = 2n$ and $w_x = w'_x$ then by Point 1. we have $(Kf^2)_{w,w'} = 0$, and by Point 5. $(Kf^1)_{w,w'} = \mathbb{I}_{\{w=w'\}}$, implying that $(KK^{-1})_{w,w'} = \mathbb{I}_{\{w=w'\}}$.

We now turn to the proof of Points 1. to 5.

1. When $w'_x > w_x$, all b-neighbors of $w$ are on the left of $w'$, so that all terms of type $f_2$ are equal to 0 and $(Kf^2)_{w,w'}$ is trivially equal to 0 (note that there are four neighbors if $w_x \neq 0$ and two neighbors if $w_x = 0$). If $w_x = w'_x = 2n$, the same holds since then the two b-neighbors of $w$ are on the left of $w'$ and there are no right neighbors. When $w'_x < w_x$ and $w_x \neq 2n$, the four b-neighbors of $w$ are now on the right, and there are four contributions of type $f_2$. We have

$$(Kf^2)_{w,w'} = \frac{1}{2\pi i} \sum_{b \sim w} \int_{C_2} K_{w,b} g_{b,w'}.$$

Since the contour $C_2$ in independent of $b, w'$, the sum can be moved inside the integral, and we have that $(Kf^2)_{w,w'}$ is equal to 0 by Equation (15).
2. Suppose that $w_x = w'_x$ and $w_x \neq 2n$. Let $b_1, b_2$ be the two neighbors of $w$ on the right, from bottom to top, and $f_1, f_2, f_3$ be the dual vertices as in Figure 7.

<figure><img src="image_7.png" /><figcaption>Figure 7: Zeros and poles of $g_{w,w'}(v)$ when $w_x = w'_x$, $w_x \neq 2n$. Left: $w'$ is above $w$. Right: $w'$ is below $w$. Angles corresponding to zeros, resp. poles, are pictured in green, resp. magenta.</figcaption></figure>

Using that the contour of integration $C_2$ is independent of $b_1, b_2, w'$, and using the product structure of the meromorphic form $g$, we obtain

$$ (Kf^2)_{w,w'} = \frac{1}{2\pi i} \int_{C_2} \left[ \sum_{i=1}^{2} K_{w,b_i} g_{b_i,w}(v) \right] g_{w,w'}(v). $$

To simplify notation, we write the four angles around $w$ as $\alpha, \gamma, \beta, \delta$ going cclw starting from the bottom (omitting indices). From Fay's identity (16) we have

$$ \begin{aligned} \sum_{i=1}^{2} K_{w,b_i} g_{b_i,w}(v) &= \omega_{\gamma-\alpha} + \sum_{\ell=1}^{g} \left( \frac{\partial \log \theta}{\partial z_{\ell}} (t + \mathbf{d}(f_3)) - \frac{\partial \log \theta}{\partial z_{\ell}} (t + \mathbf{d}(f_2)) \right) \omega_{\ell} \\ &\quad + \omega_{\beta-\gamma} + \sum_{\ell=1}^{g} \left( \frac{\partial \log \theta}{\partial z_{\ell}} (t + \mathbf{d}(f_2)) - \frac{\partial \log \theta}{\partial z_{\ell}} (t + \mathbf{d}(f_1)) \right) \omega_{\ell} \\ &= \omega_{\beta-\alpha} + \sum_{\ell=1}^{g} \left( \frac{\partial \log \theta}{\partial z_{\ell}} (t + \mathbf{d}(f_3)) - \frac{\partial \log \theta}{\partial z_{\ell}} (t + \mathbf{d}(f_1)) \right) \omega_{\ell}. \end{aligned} \quad (20) $$

As a consequence,

$$ (Kf^2)_{w,w'} = \frac{1}{2\pi i} \left( \int_{C_2} g_{w,w'}(v) \omega_{\beta-\alpha} + \sum_{\ell=1}^{g} \left( \frac{\partial \log \theta}{\partial z_{\ell}} (t + \mathbf{d}(f_3)) - \frac{\partial \log \theta}{\partial z_{\ell}} (t + \mathbf{d}(f_1)) \right) \int_{C_2} g_{w,w'}(v) \omega_{\ell} \right). $$

Returning to the definition of the form $g$, we know that the zeros, resp. poles, of $g_{w,w'}(v)$ in $C_2$ are the angles between $w$ and $w'$ of type
2. Suppose that $w_x = w'_x$ and $w_x \neq 2n$. Let $b_1, b_2$ be the two neighbors of $w$ on the right, from bottom to top, and $f_1, f_2, f_3$ be the dual vertices as in Figure 7.

<figure><img src="image_9.png" /><figcaption>Figure 7: Zeros and poles of $g_{w,w'}(v)$ when $w_x = w'_x$, $w_x \neq 2n$. Left: $w'$ is above $w$. Right: $w'$ is below $w$. Angles corresponding to zeros, resp. poles, are pictured in green, resp. magenta.</figcaption></figure>

Using that the contour of integration $C_2$ is independent of $b_1, b_2, w'$, and using the product structure of the meromorphic form $g$, we obtain

$$ (Kf^2)_{w,w'} = \frac{1}{2\pi i} \int_{C_2} \left[ \sum_{i=1}^{2} K_{w,b_i} g_{b_i,w}(v) \right] g_{w,w'}(v). $$

To simplify notation, we write the four angles around $w$ as $\alpha, \gamma, \beta, \delta$ going cclw starting from the bottom (omitting indices). From Fay's identity (16) we have

$$ \begin{aligned} \sum_{i=1}^{2} K_{w,b_i} g_{b_i,w}(v) &= \omega_{\gamma-\alpha} + \sum_{\ell=1}^{g} \left( \frac{\partial \log \theta}{\partial z_{\ell}} (t + \mathbf{d}(f_3)) - \frac{\partial \log \theta}{\partial z_{\ell}} (t + \mathbf{d}(f_2)) \right) \omega_{\ell} \\ &\quad + \omega_{\beta-\gamma} + \sum_{\ell=1}^{g} \left( \frac{\partial \log \theta}{\partial z_{\ell}} (t + \mathbf{d}(f_2)) - \frac{\partial \log \theta}{\partial z_{\ell}} (t + \mathbf{d}(f_1)) \right) \omega_{\ell} \\ &= \omega_{\beta-\alpha} + \sum_{\ell=1}^{g} \left( \frac{\partial \log \theta}{\partial z_{\ell}} (t + \mathbf{d}(f_3)) - \frac{\partial \log \theta}{\partial z_{\ell}} (t + \mathbf{d}(f_1)) \right) \omega_{\ell}. \end{aligned} \quad (20) $$

As a consequence,

$$ (Kf^2)_{w,w'} = \frac{1}{2\pi i} \left( \int_{C_2} g_{w,w'}(v) \omega_{\beta-\alpha} + \sum_{\ell=1}^{g} \left( \frac{\partial \log \theta}{\partial z_{\ell}} (t + \mathbf{d}(f_3)) - \frac{\partial \log \theta}{\partial z_{\ell}} (t + \mathbf{d}(f_1)) \right) \int_{C_2} g_{w,w'}(v) \omega_{\ell} \right). $$

Returning to the definition of the form $g$, we know that the zeros, resp. poles, of $g_{w,w'}(v)$ in $C_2$ are the angles between $w$ and $w'$ of type
• $(\beta_j)$ (including $\beta$), resp. $(\alpha_j)$ (excluding $\alpha$), when $w'$ is above $w$, see Figure 7 (left),

• $(\alpha_j)$ (including $\alpha$), resp. $(\beta_j)$ (excluding $\beta$), when $w'$ is below $w$, see Figure 7 (right).

Let us first consider the term $\frac{1}{2\pi i} \int_{C_2} g_{w,w'}(v) \omega_{\beta-\alpha}$.

• when $w'$ is above $w$, the pole at $\beta$ of $\omega_{\beta-\alpha}$ is cancelled by the zero at $\beta$ of $g_{w,w'}(v)$, and the integrand $\omega_{\beta-\alpha} g_{w,w'}(v)$ has as poles a subset of $\{\alpha_1, \dots, \alpha_n\}$. Since the contour $C_2$ contains all the angles $\{\alpha_1, \dots, \alpha_n\}$, we obtain 0.

• when $w'$ is below $w$, the pole at $\alpha$ of $\omega_{\beta-\alpha}$ is cancelled by the zero at $\alpha$ of $g_{w,w'}(v)$, and the integrand has as poles a subset of $\{\beta_1, \dots, \beta_n\}$. Since the contour $C_2$ contains none of these poles, we also obtain 0.

• when $w = w'$, then $g_{w,w}(v) = 1$, and the contour $C_2$ contains the pole $\alpha$ of $\omega_{\beta-\alpha}$, which yields that $\frac{1}{2\pi i} \int_{C_2} \omega_{\beta-\alpha} = -1$.

Let us now consider the term $\int_{C_2} g_{w,w'}(v) \omega_\ell$. The contour $C_2$ either contains all poles of $g_{w,w'}$ (when $w'$ is above $w$) or none of them (if $w'$ is below or equal to $w$), and the integral of the form $\omega_\ell$ around any trivial closed contour is 0, so that the second term is always equal to 0. Summarizing, we have proved Point 2.

$$ (Kf^2)_{w,w'} = \frac{1}{2\pi i} \int_{C_2} \left[ \sum_{i=1}^{2} K_{w,b_i} g_{b_i,w'}(v) \right] = -\mathbb{I}_{\{w=w'\}}. \quad (21) $$

3. Using that the contours of integration $C_1, C_2$ are independent of $b, w'$, we have, for every pair of white vertices $(w, w')$,

$$ \begin{aligned} (Kf^1)_{w,w'} &= \frac{1}{(2\pi i)^2} \frac{1}{\theta(p)} \sum_{b \sim w} K_{w,b} \int_{C_2} \int_{C_1} \frac{\theta(p + (v-u))}{E(u,v)} g_{b,0}(u) g_{0,w'}(v) \prod_{j=1}^{n} \frac{E(\beta_j, u)}{E(\delta_j, u)} \frac{E(\delta_j, v)}{E(\beta_j, v)} \\ &= \frac{1}{(2\pi i)^2} \frac{1}{\theta(p)} \int_{C_2} g_{0,w'}(v) \prod_{j=1}^{n} \frac{E(\delta_j, v)}{E(\beta_j, v)} \\ & \qquad \cdot \int_{C_1} \frac{\theta(p + (v-u))}{E(u,v)} \prod_{j=1}^{n} \frac{E(\beta_j, u)}{E(\delta_j, u)} \left[ \sum_{b \sim w} K_{w,b} g_{b,0}(u) \right]. \end{aligned} \quad (22) $$

As a consequence, when $w_x \notin \{0, 2n\}$, this is equal to 0 by Equation (15). When $w_x = 0$, one can insert a column of black vertices on the left, and an angle $\delta_0$ (in the sector containing $\{\delta_1, \dots, \delta_n\}$). In this way, the white vertex $w$ has its four $b$-neighbors: $b_1, b_2$ present in the original Aztec diamond, and $b_3, b_4$ the two additional ones. Note that defining
• $(\beta_j)$ (including $\beta$), resp. $(\alpha_j)$ (excluding $\alpha$), when $w'$ is above $w$, see Figure 7 (left),

• $(\alpha_j)$ (including $\alpha$), resp. $(\beta_j)$ (excluding $\beta$), when $w'$ is below $w$, see Figure 7 (right).

Let us first consider the term $\frac{1}{2\pi i} \int_{\mathcal{C}_2} g_{w,w'}(v) \omega_{\beta-\alpha}$.

• when $w'$ is above $w$, the pole at $\beta$ of $\omega_{\beta-\alpha}$ is cancelled by the zero at $\beta$ of $g_{w,w'}(v)$, and the integrand $\omega_{\beta-\alpha} g_{w,w'}(v)$ has as poles a subset of $\{\alpha_1, \dots, \alpha_n\}$. Since the contour $\mathcal{C}_2$ contains all the angles $\{\alpha_1, \dots, \alpha_n\}$, we obtain 0.

• when $w'$ is below $w$, the pole at $\alpha$ of $\omega_{\beta-\alpha}$ is cancelled by the zero at $\alpha$ of $g_{w,w'}(v)$, and the integrand has as poles a subset of $\{\beta_1, \dots, \beta_n\}$. Since the contour $\mathcal{C}_2$ contains none of these poles, we also obtain 0.

• when $w = w'$, then $g_{w,w}(v) = 1$, and the contour $\mathcal{C}_2$ contains the pole $\alpha$ of $\omega_{\beta-\alpha}$, which yields that $\frac{1}{2\pi i} \int_{\mathcal{C}_2} \omega_{\beta-\alpha} = -1$.

Let us now consider the term $\int_{\mathcal{C}_2} g_{w,w'}(v) \omega_\ell$. The contour $\mathcal{C}_2$ either contains all poles of $g_{w,w'}$ (when $w'$ is above $w$) or none of them (if $w'$ is below or equal to $w$), and the integral of the form $\omega_\ell$ around any trivial closed contour is 0, so that the second term is always equal to 0. Summarizing, we have proved Point 2.

$$ (Kf^2)_{w,w'} = \frac{1}{2\pi i} \int_{\mathcal{C}_2} \left[ \sum_{i=1}^{2} K_{w,b_i} g_{b_i,w'}(v) \right] = -\mathbb{I}_{\{w=w'\}}. \quad (21) $$

3. Using that the contours of integration $\mathcal{C}_1, \mathcal{C}_2$ are independent of $b, w'$, we have, for every pair of white vertices $(w, w')$,

$$ \begin{aligned} (Kf^1)_{w,w'} &= \frac{1}{(2\pi i)^2} \frac{1}{\theta(p)} \sum_{b \sim w} K_{w,b} \int_{\mathcal{C}_2} \int_{\mathcal{C}_1} \frac{\theta(p + (v-u))}{E(u,v)} g_{b,0}(u) g_{0,w'}(v) \prod_{j=1}^{n} \frac{E(\beta_j, u)}{E(\delta_j, u)} \frac{E(\delta_j, v)}{E(\beta_j, v)} \\ &= \frac{1}{(2\pi i)^2} \frac{1}{\theta(p)} \int_{\mathcal{C}_2} g_{0,w'}(v) \prod_{j=1}^{n} \frac{E(\delta_j, v)}{E(\beta_j, v)} \\ & \qquad \cdot \int_{\mathcal{C}_1} \frac{\theta(p + (v-u))}{E(u,v)} \prod_{j=1}^{n} \frac{E(\beta_j, u)}{E(\delta_j, u)} \left[ \sum_{b \sim w} K_{w,b} g_{b,0}(u) \right]. \end{aligned} \quad (22) $$

As a consequence, when $w_x \notin \{0, 2n\}$, this is equal to 0 by Equation (15). When $w_x = 0$, one can insert a column of black vertices on the left, and an angle $\delta_0$ (in the sector containing $\{\delta_1, \dots, \delta_n\}$). In this way, the white vertex $w$ has its four $b$-neighbors: $b_1, b_2$ present in the original Aztec diamond, and $b_3, b_4$ the two additional ones. Note that defining
$f_{b_i,w}^1$ ($i \in \{3,4\}$) using Formula (18) gives 0 in this case. Indeed, $g_{b_i,0}(u)$ has as poles $\delta_0$ and a subset of the angles $(\beta_j)$, implying that the contour $C_1$ (which contains all of the angles $\{\gamma_1, \dots, \gamma_n\}$) contains no pole of the integrand $g_{b_i,0}(u) \frac{\theta(p+(v-u))}{E(u,v)} \prod_{j=1}^n \frac{E(u,\beta_j)}{E(u,\delta_j)}$, yielding 0. The proof can then be concluded using Equation (15) again.

4. Suppose $w_x = 2n$, and let $b_3, b_4$ be the two neighbors of $w$ on the left, from bottom to top, and $f_1, f_3, f_4$ be the dual vertices as in Figure 8.

<figure><img src="image_8.png" /><figcaption>Figure 8: Zeros and poles of $g_{w,w'}(v)$ when $w_x = w'_x$, $w_x \neq 2n$. Left: $w'$ is above $w$. Right: $w'$ is below $w$. Angles corresponding to zeros, resp. poles, are pictured in green, resp. magenta.</figcaption></figure>

To simplify notation, let us denote by $\alpha, \delta_n, \beta$ the angles around $w$ in clockwise order (omitting the indices for $\alpha, \beta$). Writing $(Kf^1)_{w,w'}$ as in Equation (22), we first consider the part containing the integral over $C_1$.

$$ \int_{C_1} \frac{\theta(p + (v - u))}{E(u, v)} \left[ \sum_{i=3}^{4} K_{w,b_i} g_{b_i,w}(u) \right] g_{w,0}(u) \prod_{j=1}^{n} \frac{E(\beta_j, u)}{E(\delta_j, u)} \quad (23) $$

Similarly to Equation (20), using Fay's identity (16) gives

$$ \sum_{i=3}^{4} K_{w,b_i} g_{b_i,w}(v) = \omega_{\alpha-\beta} + \sum_{\ell=1}^{g} \left( \frac{\partial \log \theta}{\partial z_{\ell}} (t + d(f_1)) - \frac{\partial \log \theta}{\partial z_{\ell}} (t + d(f_3)) \right) \omega_{\ell}. $$

Note that by definition of $g$, all poles of $g_{b_i,0}(u)$ are on $A_0$. Now, the term $g_{w,0}(u)$ contains

* as poles on $A_0$: all the angles $\gamma_1, \dots, \gamma_n$ and the angles of type $(\beta_j)$ from $w$ to the bottom boundary (and in particular not the angle $\beta$),

* as zeros on $A_0$: the angles $\delta_1, \dots, \delta_n$ and the angles of type $(\alpha_j)$ from $w$ to the bottom boundary (and in particular the angle $\alpha$),
$f_{b_i,w}^1$ ($i \in \{3,4\}$) using Formula (18) gives 0 in this case. Indeed, $g_{b_i,0}(u)$ has as poles $\delta_0$ and a subset of the angles ($\beta_j$), implying that the contour $C_1$ (which contains all of the angles $\{\gamma_1, \dots, \gamma_n\}$) contains no pole of the integrand $g_{b_i,0}(u) \frac{\theta(p+(v-u))}{E(u,v)} \prod_{j=1}^n \frac{E(u,\beta_j)}{E(u,\delta_j)}$, yielding 0. The proof can then be concluded using Equation (15) again.

4. Suppose $w_x = 2n$, and let $b_3, b_4$ be the two neighbors of $w$ on the left, from bottom to top, and $f_1, f_3, f_4$ be the dual vertices as in Figure 8.

<figure><img src="image_10.png" /><figcaption>Figure 8: Zeros and poles of $g_{w,w'}(v)$ when $w_x = w'_x$, $w_x \neq 2n$. Left: $w'$ is above $w$. Right: $w'$ is below $w$. Angles corresponding to zeros, resp. poles, are pictured in green, resp. magenta.</figcaption></figure>

To simplify notation, let us denote by $\alpha, \delta_n, \beta$ the angles around $w$ in clockwise order (omitting the indices for $\alpha, \beta$). Writing $(Kf^1)_{w,w'}$ as in Equation (22), we first consider the part containing the integral over $C_1$.

$$ \int_{C_1} \frac{\theta(p + (v-u))}{E(u, v)} \left[ \sum_{i=3}^{4} K_{w,b_i} g_{b_i,w}(u) \right] g_{w,0}(u) \prod_{j=1}^{n} \frac{E(\beta_j, u)}{E(\delta_j, u)}. \quad (23) $$

Similarly to Equation (20), using Fay's identity (16) gives

$$ \sum_{i=3}^{4} K_{w,b_i} g_{b_i,w}(v) = \omega_{\alpha-\beta} + \sum_{\ell=1}^{g} \left( \frac{\partial \log \theta}{\partial z_{\ell}} (t + \mathbf{d}(f_1)) - \frac{\partial \log \theta}{\partial z_{\ell}} (t + \mathbf{d}(f_3)) \right) \omega_{\ell}. $$

Note that by definition of $g$, all poles of $g_{b_i,0}(u)$ are on $A_0$. Now, the term $g_{w,0}(u)$ contains

* as poles on $A_0$: all the angles $\gamma_1, \dots, \gamma_n$ and the angles of type $(\beta_j)$ from $w$ to the bottom boundary (and in particular not the angle $\beta$),

* as zeros on $A_0$: the angles $\delta_1, \dots, \delta_n$ and the angles of type $(\alpha_j)$ from $w$ to the bottom boundary (and in particular the angle $\alpha$),
so the product $g_{w,0}(u) \omega_{\alpha-\beta}$ contains as poles on $A_0$: a subset of the angles of type $(\beta_j)$, no angle of type $(\alpha_j)$ (since the pole $\alpha$ of $\omega_{\alpha-\beta}$ is cancelled by the zero $\alpha$ of $g_{w,0}(u)$), all the angles $\gamma_1, \dots, \gamma_n$; note that the set of poles of $g_{w,0}(u)\omega_\ell$ has the same property. As a consequence when each of these terms gets multiplied by $\frac{\theta(p+(v-u))}{E(u,v)} \prod_{j=1}^n \frac{E(\beta_j, u)}{E(\delta_j, u)}$; all the poles involving angles $(\beta_j)$ are cancelled, and moreover, the new poles involving $\delta_1, \dots, \delta_n$ are cancelled by the same zeros in $g_{w,0}(u)$. Summarizing, in the integrand

$$ \frac{\theta(p + (v - u))}{E(u, v)} \left[ \sum_{i=3}^{4} K_{w,b_i} g_{b_i,w}(u) \right] g_{w,0}(u) \prod_{j=1}^{n} \frac{E(\beta_j, u)}{E(\delta_j, u)}, $$

there remains as poles on $\Sigma$: all the angles $\gamma_1, \dots, \gamma_n$ and the pole at $u = v$. By definition, the contour of integration $C_1$ contains all of the angles $\{\gamma_1, \dots, \gamma_n\}$, and the pole $v$ (which lives on $C_2$) is outside of $C_1$. Since we are integrating a meromorphic form on a compact surface (implying that the sum of the residues is equal to 0), the integral (23) is equal to $-2\pi i$ times the residue at $u = v$. Noting that the residue at $u = v$ of $\frac{1}{E(u,v)}$ is equal to $-1$, we obtain:

$$ \frac{1}{2\pi i} \frac{1}{\theta(p)} \int_{C_1} \frac{\theta(p + (v-u))}{E(u, v)} \left[ \sum_{i=3}^{4} K_{w,b_i} g_{b_i,w}(u) \right] g_{w,0}(u) \prod_{j=1}^{n} \frac{E(\beta_j, u)}{E(\delta_j, u)} \\ = \left[ \sum_{i=3}^{4} K_{w,b_i} g_{b_i,w}(v) \right] g_{w,0}(v) \prod_{j=1}^{n} \frac{E(\beta_j, v)}{E(\delta_j, v)} = \sum_{i=3}^{4} K_{w,b_i} g_{b_i,0}(v) \prod_{j=1}^{n} \frac{E(\beta_j, v)}{E(\delta_j, v)}. $$

Plugging this back into (22) yields,

$$ (Kf^1)_{w,w'} = \frac{1}{2\pi i} \int_{C_2} g_{0,w'}(v) \prod_{j=1}^{n} \frac{E(\delta_j, v)}{E(\beta_j, v)} \sum_{i=3}^{4} K_{w,b_i} g_{b_i,0}(v) \prod_{j=1}^{n} \frac{E(\beta_j, v)}{E(\delta_j, v)} \\ = \frac{1}{2\pi i} \int_{C_2} \sum_{i=3}^{4} K_{w,b_i} g_{b_i,w'}(v). \qquad (24) $$

Now, suppose moreover that $w_x \neq w_x'$, then the two b-neighbors of $w$ are on the right of $w$, and we have that

$$ (Kf^1)_{w,w'} = (Kf^2)_{w,w'}. $$

5. Suppose that $w_x = 2n$ and $w_x = w_x'$. Then, by Equation (24), we have

$$ (Kf^1)_{w,w'} = \frac{1}{2\pi i} \int_{C_2} \sum_{i=3}^{4} K_{w,b_i} g_{b_i,w'}(v). $$

Using the argument of Point 2. with black vertices on the left rather than on the right allows us to conclude that $(Kf^1)_{w,w'} = \mathbb{I}_{\{w=w'\}}$. $\square$
so the product $g_{w,0}(u) \omega_{\alpha-\beta}$ contains as poles on $A_0$: a subset of the angles of type $(\beta_j)$, no angle of type $(\alpha_j)$ (since the pole $\alpha$ of $\omega_{\alpha-\beta}$ is cancelled by the zero $\alpha$ of $g_{w,0}(u)$), all the angles $\gamma_1, \dots, \gamma_n$; note that the set of poles of $g_{w,0}(u)\omega_\ell$ has the same property. As a consequence when each of these terms gets multiplied by $\frac{\theta(p+(v-u))}{E(u,v)} \prod_{j=1}^n \frac{E(\beta_j, u)}{E(\delta_j, u)}$; all the poles involving angles $(\beta_j)$ are cancelled, and moreover, the new poles involving $\delta_1, \dots, \delta_n$ are cancelled by the same zeros in $g_{w,0}(u)$. Summarizing, in the integrand

$$ \frac{\theta(p + (v - u))}{E(u, v)} \left[ \sum_{i=3}^{4} K_{w,b_i} g_{b_i,w}(u) \right] g_{w,0}(u) \prod_{j=1}^{n} \frac{E(\beta_j, u)}{E(\delta_j, u)}, $$

there remains as poles on $\Sigma$: all the angles $\gamma_1, \dots, \gamma_n$ and the pole at $u = v$. By definition, the contour of integration $C_1$ contains all of the angles $\{\gamma_1, \dots, \gamma_n\}$, and the pole $v$ (which lives on $C_2$) is outside of $C_1$. Since we are integrating a meromorphic form on a compact surface (implying that the sum of the residues is equal to 0), the integral (23) is equal to $-2\pi i$ times the residue at $u = v$. Noting that the residue at $u = v$ of $\frac{1}{E(u,v)}$ is equal to $-1$, we obtain:

$$ \frac{1}{2\pi i} \frac{1}{\theta(p)} \int_{C_1} \frac{\theta(p + (v-u))}{E(u, v)} \left[ \sum_{i=3}^{4} K_{w,b_i} g_{b_i,w}(u) \right] g_{w,0}(u) \prod_{j=1}^{n} \frac{E(\beta_j, u)}{E(\delta_j, u)} \\ = \left[ \sum_{i=3}^{4} K_{w,b_i} g_{b_i,w}(v) \right] g_{w,0}(v) \prod_{j=1}^{n} \frac{E(\beta_j, v)}{E(\delta_j, v)} = \sum_{i=3}^{4} K_{w,b_i} g_{b_i,0}(v) \prod_{j=1}^{n} \frac{E(\beta_j, v)}{E(\delta_j, v)}. $$

Plugging this back into (22) yields,

$$ (Kf^1)_{w,w'} = \frac{1}{2\pi i} \int_{C_2} g_{0,w'}(v) \prod_{j=1}^{n} \frac{E(\delta_j, v)}{E(\beta_j, v)} \sum_{i=3}^{4} K_{w,b_i} g_{b_i,0}(v) \prod_{j=1}^{n} \frac{E(\beta_j, v)}{E(\delta_j, v)} \\ = \frac{1}{2\pi i} \int_{C_2} \sum_{i=3}^{4} K_{w,b_i} g_{b_i,w'}(v). \qquad (24) $$

Now, suppose moreover that $w_x \neq w'_x$, then the two b-neighbors of $w$ are on the right of $w$, and we have that

$$ (Kf^1)_{w,w'} = (Kf^2)_{w,w'}. $$

5. Suppose that $w_x = 2n$ and $w_x = w'_x$. Then, by Equation (24), we have

$$ (Kf^1)_{w,w'} = \frac{1}{2\pi i} \int_{C_2} \sum_{i=3}^{4} K_{w,b_i} g_{b_i,w'}(v). $$

Using the argument of Point 2. with black vertices on the left rather than on the right allows us to conclude that $(Kf^1)_{w,w'} = \mathbb{I}_{\{w=w'\}}$. $\square$
**Example 15.** As an example of application, let us make explicit the case where angles in each family are constant, i.e., suppose that $\alpha \equiv \alpha, \beta = \beta, \gamma = \gamma, \delta = \delta$, for some angles $\alpha, \beta, \gamma, \delta \in A_0$ satisfying the cyclic order $\alpha < \gamma < \beta < \delta$. Recalling the coordinate notation $\mathbf{w} = (\mathbf{w}_x, \mathbf{w}_y)$, $\mathbf{b} = (\mathbf{b}_x, \mathbf{b}_y)$, we obtain

$$ 
\begin{aligned}
K_{\mathbf{b},\mathbf{w}}^{-1} &= \frac{1}{(2\pi i)^2} \frac{1}{\theta(p)} \int_{C_2} \int_{C_1} \frac{\theta(p + (v-u))}{E(u,v)} \\
&\quad \cdot \theta(-t+u-\mathbf{d}(\mathbf{b})) \frac{E(\alpha, u)^{\frac{b_y}{2}} E(\beta, u)^{n-\frac{b_y}{2}}}{E(\gamma, u)^{\frac{b_x+1}{2}} E(\delta, u)^{n-\frac{b_x-1}{2}}} \theta(t+v+\mathbf{d}(\mathbf{w})) \frac{E(\gamma, v)^{\frac{w_x}{2}} E(\delta, v)^{n-\frac{w_x}{2}}}{E(\beta, v)^{n-\frac{w_y-1}{2}} E(\alpha, v)^{\frac{w_y+1}{2}}} \\
&\quad - \mathbb{I}_{\{\mathbf{b} \text{ right of } \mathbf{w}\}} \frac{1}{2\pi i} \int_{C_2} \theta(-t+v-\mathbf{d}(\mathbf{b})) \theta(t+v+\mathbf{d}(\mathbf{w})) \frac{E(\alpha, v)^{\frac{b_y-w_y-1}{2}} E(\delta, v)^{\frac{b_x-w_x-1}{2}}}{E(\beta, v)^{\frac{b_y-w_y+1}{2}} E(\gamma, v)^{\frac{b_x-w_x+1}{2}}},
\end{aligned} 
\quad (25) $$

where $p = n(\delta - \beta) - t - \mathbf{d}(0)$, and

$$ \mathbf{d}(\mathbf{b}) = \frac{b_y}{2}(\beta - \alpha) + \frac{b_x + 1}{2}\gamma - \frac{b_x - 1}{2}\delta, \quad \mathbf{d}(\mathbf{w}) = \frac{w_x}{2}(\gamma - \delta) - \frac{w_y + 1}{2}\alpha + \frac{w_y - 1}{2}\beta. $$

In particular, if $\mathbf{b}$ is the south-west neighbor of $\mathbf{w}$, meaning that $(\mathbf{w}_x, \mathbf{w}_y) = (2i, 2j + 1)$ and $(\mathbf{b}_x, \mathbf{b}_y) = (2i - 1, 2j)$ for some $1 \le i \le n$ and $0 \le j \le n - 1$, Formula (25) reduces further to

$$ 
\begin{aligned}
K_{\mathbf{b},\mathbf{w}}^{-1} &= \frac{1}{(2\pi i)^2} \frac{1}{\theta(p)} \int_{C_2} \int_{C_1} \frac{\theta(p + (v-u))}{E(u,v)} \cdot \theta(-t+u-\mathbf{d}(\mathbf{b}))\theta(t+v+\mathbf{d}(\mathbf{w})) \\
&\quad \cdot \frac{E(\alpha, u)^j E(\beta, u)^{n-j}}{E(\gamma, u)^i E(\delta, u)^{n-i+1}} \frac{E(\gamma, v)^i E(\delta, v)^{n-i}}{E(\beta, v)^{n-j} E(\alpha, v)^{j+1}}
\end{aligned} 
\quad (26) $$

where $\mathbf{d}(\mathbf{b}) = j(\beta - \alpha) + i(\gamma - \delta) + \delta$ and $\mathbf{d}(\mathbf{w}) = j(\beta - \alpha) + i(\gamma - \delta) - \alpha$.

# 4 Partition function

The main result of this section is Theorem 16 consisting of an induction formula for the partition function of the Aztec diamond with Fock's weights, thus proving that the partition function can always be expressed in product form; this is quite a surprising fact since, a priori, it is defined as the determinant of a matrix. As specific cases of the genus 0 case, we recover Stanley's celebrated formula [Pro97, Yan91] as well as the fact that the number of dimer configurations of an Aztec diamond of size $n$ is equal to $2^{\frac{n(n+1)}{2}}$ [EKLP92]. Our proof is inspired from one of the inductive arguments used to establish the formula $2^{\frac{n(n+1)}{2}}$ [Pro97]; it goes through in this very general setting because Fock's weights are invariant under spider moves, and contraction/expansion of a degree 2 vertex [Foc15, BCdT23b, BCdT23a].
**Example 15.** As an example of application, let us make explicit the case where angles in each family are constant, i.e., suppose that $\alpha \equiv \alpha, \beta = \beta, \gamma = \gamma, \delta = \delta$, for some angles $\alpha, \beta, \gamma, \delta \in A_0$ satisfying the cyclic order $\alpha < \gamma < \beta < \delta$. Recalling the coordinate notation $\mathbf{w} = (\mathbf{w}_x, \mathbf{w}_y)$, $\mathbf{b} = (\mathbf{b}_x, \mathbf{b}_y)$, we obtain

$$ 
\begin{aligned}
K_{\mathbf{b},\mathbf{w}}^{-1} &= \frac{1}{(2\pi i)^2} \frac{1}{\theta(p)} \int_{C_2} \int_{C_1} \frac{\theta(p + (v-u))}{E(u,v)} \\
&\quad \cdot \theta(-t+u-\mathbf{d}(\mathbf{b})) \frac{E(\alpha, u)^{\frac{b_y}{2}} E(\beta, u)^{n-\frac{b_y}{2}}}{E(\gamma, u)^{\frac{b_x+1}{2}} E(\delta, u)^{n-\frac{b_x-1}{2}}} \theta(t+v+\mathbf{d}(\mathbf{w})) \frac{E(\gamma, v)^{\frac{w_x}{2}} E(\delta, v)^{n-\frac{w_x}{2}}}{E(\beta, v)^{n-\frac{w_y-1}{2}} E(\alpha, v)^{\frac{w_y+1}{2}}} \\
&\quad - \mathbb{I}_{\{\mathbf{b} \text{ right of } \mathbf{w}\}} \frac{1}{2\pi i} \int_{C_2} \theta(-t+v-\mathbf{d}(\mathbf{b})) \theta(t+v+\mathbf{d}(\mathbf{w})) \frac{E(\alpha, v)^{\frac{b_y-w_y-1}{2}} E(\delta, v)^{\frac{b_x-w_x-1}{2}}}{E(\beta, v)^{\frac{b_y-w_y+1}{2}} E(\gamma, v)^{\frac{b_x-w_x+1}{2}}},
\end{aligned} 
\quad (25) $$

where $p = n(\delta - \beta) - t - \mathbf{d}(0)$, and

$$ \mathbf{d}(\mathbf{b}) = \frac{b_y}{2}(\beta - \alpha) + \frac{b_x + 1}{2}\gamma - \frac{b_x - 1}{2}\delta, \quad \mathbf{d}(\mathbf{w}) = \frac{w_x}{2}(\gamma - \delta) - \frac{w_y + 1}{2}\alpha + \frac{w_y - 1}{2}\beta. $$

In particular, if $\mathbf{b}$ is the south-west neighbor of $\mathbf{w}$, meaning that $(\mathbf{w}_x, \mathbf{w}_y) = (2i, 2j + 1)$ and $(\mathbf{b}_x, \mathbf{b}_y) = (2i - 1, 2j)$ for some $1 \le i \le n$ and $0 \le j \le n - 1$, Formula (25) reduces further to

$$ 
\begin{aligned}
K_{\mathbf{b},\mathbf{w}}^{-1} &= \frac{1}{(2\pi i)^2} \frac{1}{\theta(p)} \int_{C_2} \int_{C_1} \frac{\theta(p + (v-u))}{E(u,v)} \cdot \theta(-t+u-\mathbf{d}(\mathbf{b}))\theta(t+v+\mathbf{d}(\mathbf{w})) \\
&\quad \cdot \frac{E(\alpha, u)^j E(\beta, u)^{n-j}}{E(\gamma, u)^i E(\delta, u)^{n-i+1}} \frac{E(\gamma, v)^i E(\delta, v)^{n-i}}{E(\beta, v)^{n-j} E(\alpha, v)^{j+1}}
\end{aligned} 
\quad (26) $$

where $\mathbf{d}(\mathbf{b}) = j(\beta - \alpha) + i(\gamma - \delta) + \delta$ and $\mathbf{d}(\mathbf{w}) = j(\beta - \alpha) + i(\gamma - \delta) - \alpha$.

# 4 Partition function

The main result of this section is Theorem 16 consisting of an induction formula for the partition function of the Aztec diamond with Fock's weights, thus proving that the partition function can always be expressed in product form; this is quite a surprising fact since, a priori, it is defined as the determinant of a matrix. As specific cases of the genus 0 case, we recover Stanley's celebrated formula [Pro97, Yan91] as well as the fact that the number of dimer configurations of an Aztec diamond of size $n$ is equal to $2^{\frac{n(n+1)}{2}}$ [EKLP92]. Our proof is inspired from one of the inductive arguments used to establish the formula $2^{\frac{n(n+1)}{2}}$ [Pro97]; it goes through in this very general setting because Fock's weights are invariant under spider moves, and contraction/expansion of a degree 2 vertex [Foc15, BCdT23b, BCdT23a].
This section is organised as follows. In Section 4.1, we state Theorem 16 giving the product formula for the partition function, then we state and prove Corollary 18 specifying Theorem 16 to the case of genus 0; finally, in Corollary 20, we explain how it allows to recover Stanley's formula [Pro97, Yan91]. Section 4.2 contains the proof Theorem 16.

## 4.1 Partition function formula

Consider the Aztec diamond $A_n$ with angles $\alpha, \beta, \gamma, \delta \in A_0$ assigned to oriented train-tracks, satisfying the cyclic order $\alpha < \gamma < \beta < \delta$. Consider the dimer model on $A_n$ with Fock's weight function defined in Equation (5). Suppose that the value of the discrete Abel map at the origin $0 = (0,0)$ is $\mathbf{d}(0) = d$, for some $d \in \mathrm{Pic}^0(\Sigma)$. Let us denote the corresponding partition function by

$$Z_n(\alpha, \beta, \gamma, \delta; d) = Z_n((\alpha_j)^n_{j=1}, (\beta_j)^n_{j=1}, (\gamma_j)^n_{j=1}, (\delta_j)^n_{j=1}; d) = \sum_{M \in \mathcal{M}(A_n)} \prod_{e \in M} |K_{w,b}|. \quad (27)$$

Recall from Section (2.1) that coordinates of dual vertices of $F_n$ are either both odd or both even. This implies that the set $F_n$ can naturally split into:

$$\text{odd}_n, \text{ and even}_n = \text{int. } \text{even}_n \sqcup (\text{bry}_n \setminus \text{corner}_n) \sqcup \text{corner}_n,$$

where even vertices are furthermore split according to whether they are interior, boundary or corner vertices.

Note that an odd face $f$ of $F_n$ is surrounded by angles $\alpha_i, \beta_i, \gamma_j, \delta_j$ for some $i, j \in \{1, \dots, n\}$. In order to simplify notation, in Theorem 16 below we denote them generically by $\alpha, \beta, \gamma, \delta$, see Figure 9. We are now ready to state the main result of this section.

<figure><img src="image_9.png" /><figcaption>Figure 9: Generic notation $\alpha, \beta, \gamma, \delta$ for angles around a face $f$ corresponding to a dual vertex with both odd coordinates.</figcaption></figure>

**Theorem 16.** For every $n \ge 1$, the partition function of the Aztec diamond $A_n$ with Fock's weights satisfies the following recurrence:

$$Z_n(\alpha, \beta, \gamma, \delta; d) \cdot \prod_{f \in \text{odd}_n} \frac{\theta(t + \mathbf{d}(f))}{\theta(t + \mathbf{d}(f) + \alpha + \beta - \gamma - \delta)} \prod_{f \in \text{bry}_n} \theta(t + \mathbf{d}(f)) = \\ = Z_{n-1}((\alpha_j)^{n-1}_{j=1}, (\beta_j)^{n-1}_{j=2}, (\gamma_j)^{n-1}_{j=1}, (\delta_j)^{n-1}_{j=2}; d + \beta_1 - \delta_1) \cdot \left[ \prod_{j=1}^{n} |E(\alpha_j, \beta_j)E(\gamma_j, \delta_j)| \right],$$

with the convention that $Z_0 = 1$.
This section is organised as follows. In Section 4.1, we state Theorem 16 giving the product formula for the partition function, then we state and prove Corollary 18 specifying Theorem 16 to the case of genus 0; finally, in Corollary 20, we explain how it allows to recover Stanley's formula [Pro97, Yan91]. Section 4.2 contains the proof Theorem 16.

## 4.1 Partition function formula

Consider the Aztec diamond $A_n$ with angles $\alpha, \beta, \gamma, \delta \in A_0$ assigned to oriented train-tracks, satisfying the cyclic order $\alpha < \gamma < \beta < \delta$. Consider the dimer model on $A_n$ with Fock's weight function defined in Equation (5). Suppose that the value of the discrete Abel map at the origin $0 = (0,0)$ is $\mathbf{d}(0) = d$, for some $d \in \text{Pic}^0(\Sigma)$. Let us denote the corresponding partition function by

$$Z_n(\alpha, \beta, \gamma, \delta; d) = Z_n((\alpha_j)^n_{j=1}, (\beta_j)^n_{j=1}, (\gamma_j)^n_{j=1}, (\delta_j)^n_{j=1}; d) = \sum_{M \in \mathcal{M}(A_n)} \prod_{e \in M} |K_{w,b}|. \quad (27)$$

Recall from Section (2.1) that coordinates of dual vertices of $F_n$ are either both odd or both even. This implies that the set $F_n$ can naturally split into:

$$\text{odd}_n, \text{ and even}_n = \text{int. } \text{even}_n \sqcup (\text{bry}_n \setminus \text{corner}_n) \sqcup \text{corner}_n,$$

where even vertices are furthermore split according to whether they are interior, boundary or corner vertices.

Note that an odd face $f$ of $F_n$ is surrounded by angles $\alpha_i, \beta_i, \gamma_j, \delta_j$ for some $i, j \in \{1, \dots, n\}$. In order to simplify notation, in Theorem 16 below we denote them generically by $\alpha, \beta, \gamma, \delta$, see Figure 9. We are now ready to state the main result of this section.

<figure><img src="image_11.png" /><figcaption>Figure 9: Generic notation $\alpha, \beta, \gamma, \delta$ for angles around a face $f$ corresponding to a dual vertex with both odd coordinates.</figcaption></figure>

**Theorem 16.** For every $n \ge 1$, the partition function of the Aztec diamond $A_n$ with Fock's weights satisfies the following recurrence:

$$Z_n(\alpha, \beta, \gamma, \delta; d) \cdot \prod_{f \in \text{odd}_n} \frac{\theta(t + \mathbf{d}(f))}{\theta(t + \mathbf{d}(f) + \alpha + \beta - \gamma - \delta)} \prod_{f \in \text{bry}_n} \theta(t + \mathbf{d}(f)) = \\ = Z_{n-1}((\alpha_j)^{n-1}_{j=1}, (\beta_j)^{n-1}_{j=2}, (\gamma_j)^{n-1}_{j=1}, (\delta_j)^{n-1}_{j=2}; d + \beta_1 - \delta_1) \cdot \left[ \prod_{j=1}^{n} |E(\alpha_j, \beta_j)E(\gamma_j, \delta_j)| \right],$$

with the convention that $Z_0 = 1$.
Remark 17.

• On the right-hand-side we have not used the compact notation $Z_{n-1}(\alpha, \beta, \gamma, \delta; d+\beta_1 - \delta_1)$ because not all angles are indexed by $1, \dots, n-1$: it alternates between $1, \dots, n-1$ and $2, \dots, n$.

• A consequence of Theorem 16 is that the partition function admits a product form; we do not make this explicit since it would involve heavy indices notation. Another remark is that having a product form, and assuming the weights to be periodic for example, allows to have an explicit formula for the free energy of the model, defined as minus the exponential growth rate of the partition function.

The proof of Theorem 16 relies on the evolution of the partition function under local moves, it is postponed until Section 4.2. We first turn to interesting corollaries; the first one is the specification of Theorem 16 to the genus 0 case.

**Corollary 18 (Genus 0 case).** Assume that the underlying M-curve $\Sigma$ is the Riemann sphere $\hat{\mathbb{C}}$, implying that the weights are given by Kenyon's critical weights (6). Then, the partition function of the Aztec diamond is equal to

$$Z_n(\alpha, \beta, \gamma, \delta) = 2^{n(n+1)} \prod_{\ell=0}^{n-1} \prod_{j=1}^{n-\ell} |\sin(\bar{\beta}_{j+\ell} - \bar{\alpha}_j) \sin(\bar{\delta}_{j+\ell} - \bar{\gamma}_j)| \quad (28)$$

$$=2^{n(n+1)} \prod_{\ell=0}^{n-1} \prod_{j=1}^{n-\ell} |\sin(\bar{\delta}_{j+\ell} - \bar{\beta}_{j+\ell}) \sin(\bar{\gamma}_j - \bar{\alpha}_j) + \sin(\bar{\beta}_{j+\ell} - \bar{\gamma}_j) \sin(\bar{\delta}_{j+\ell} - \bar{\alpha}_j)|. \quad (29)$$

• If furthermore, for all $\alpha \equiv \alpha, \beta \equiv \beta, \gamma \equiv \gamma, \delta \equiv \delta$ for some $\alpha < \gamma < \beta < \delta \in A_0 = S^1$, then

$$Z_n(\alpha, \beta, \gamma, \delta) = 2^{n(n+1)} |\sin(\bar{\beta} - \bar{\alpha}) \sin(\bar{\delta} - \bar{\gamma})|^{\frac{n(n+1)}{2}}.$$

• If furthermore, $\bar{\beta} - \bar{\alpha} = \bar{\gamma} - \bar{\delta} = \frac{1}{2}$, then $\bar{\gamma} - \bar{\alpha} = \bar{\delta} - \bar{\beta} := \rho \in (0, \frac{1}{2})$, $\bar{\beta} - \bar{\gamma} = \bar{\alpha} + 1 - \bar{\delta} = \frac{1}{2} - \rho \in (0, \frac{\pi}{2})$, and

$$Z_n(\alpha, \beta, \gamma, \delta) = 2^{n(n+1)}. \quad (30)$$

Remark 19.

• Recall that the Riemann theta function is equal to 1 in the genus 0 case, so that there is no discrete Abel map.

• Formula (29) can be seen as a generalization of Stanley's formula [Yan91, Pro97] when more parameters are allowed, see also the proof of Corollary 20 below.
Remark 17.

• On the right-hand-side we have not used the compact notation $Z_{n-1}(\alpha, \beta, \gamma, \delta; d+\beta_1 - \delta_1)$ because not all angles are indexed by $1, \dots, n-1$: it alternates between $1, \dots, n-1$ and $2, \dots, n$.

• A consequence of Theorem 16 is that the partition function admits a product form; we do not make this explicit since it would involve heavy indices notation. Another remark is that having a product form, and assuming the weights to be periodic for example, allows to have an explicit formula for the free energy of the model, defined as minus the exponential growth rate of the partition function.

The proof of Theorem 16 relies on the evolution of the partition function under local moves, it is postponed until Section 4.2. We first turn to interesting corollaries; the first one is the specification of Theorem 16 to the genus 0 case.

**Corollary 18 (Genus 0 case).** Assume that the underlying M-curve $\Sigma$ is the Riemann sphere $\hat{\mathbb{C}}$, implying that the weights are given by Kenyon's critical weights (6). Then, the partition function of the Aztec diamond is equal to

$$Z_n(\alpha, \beta, \gamma, \delta) = 2^{n(n+1)} \prod_{\ell=0}^{n-1} \prod_{j=1}^{n-\ell} |\sin(\bar{\beta}_{j+\ell} - \bar{\alpha}_j) \sin(\bar{\delta}_{j+\ell} - \bar{\gamma}_j)| \quad (28)$$

$$=2^{n(n+1)} \prod_{\ell=0}^{n-1} \prod_{j=1}^{n-\ell} |\sin(\bar{\delta}_{j+\ell} - \bar{\beta}_{j+\ell}) \sin(\bar{\gamma}_j - \bar{\alpha}_j) + \sin(\bar{\beta}_{j+\ell} - \bar{\gamma}_j) \sin(\bar{\delta}_{j+\ell} - \bar{\alpha}_j)|. \quad (29)$$

• If furthermore, for all $\alpha \equiv \alpha, \beta \equiv \beta, \gamma \equiv \gamma, \delta \equiv \delta$ for some $\alpha < \gamma < \beta < \delta \in A_0 = S^1$, then

$$Z_n(\alpha, \beta, \gamma, \delta) = 2^{n(n+1)} |\sin(\bar{\beta} - \bar{\alpha}) \sin(\bar{\delta} - \bar{\gamma})|^{\frac{n(n+1)}{2}}.$$

• If furthermore, $\bar{\beta} - \bar{\alpha} = \bar{\gamma} - \bar{\delta} = \frac{1}{2}$, then $\bar{\gamma} - \bar{\alpha} = \bar{\delta} - \bar{\beta} := \rho \in (0, \frac{1}{2})$, $\bar{\beta} - \bar{\gamma} = \bar{\alpha} + 1 - \bar{\delta} = \frac{1}{2} - \rho \in (0, \frac{\pi}{2})$, and

$$Z_n(\alpha, \beta, \gamma, \delta) = 2^{n(n+1)}. \quad (30)$$

Remark 19.

• Recall that the Riemann theta function is equal to 1 in the genus 0 case, so that there is no discrete Abel map.

• Formula (29) can be seen as a generalization of Stanley's formula [Yan91, Pro97] when more parameters are allowed, see also the proof of Corollary 20 below.
• In the last case, if we suppose moreover that $\rho = \frac{1}{4}$, all edge weights are equal to $2\sin(\frac{\pi}{4}) = \sqrt{2}$. Since the number of edges in a dimer configuration is equal to the number of white vertices, that is $n(n+1)$; dividing (30) by $(\sqrt{2})^{n(n+1)}$, one recovers the celebrated result of [EKLP92], which states that the number of domino tilings of the Aztec diamond is equal to $2^{\frac{n(n+1)}{2}}$. It is interesting to note that this same formula also holds in some cases of non-uniform weights.

*Proof.* Returning to the definition of the weights in the genus 0 case, see Equation (6), we have that all terms involving the Riemann theta function $\theta$ are equal to 1 and that the modulus $|E(\alpha, \beta)|$ of the prime form is equal to $|2\sin(\bar{\beta} - \bar{\alpha})|$. As a consequence, the recurrence formula of Theorem 16 gives

$$Z_n(\alpha, \beta, \gamma, \delta) = \\ = 2^{2n} \cdot \left[ \prod_{j=1}^{n} \left| \sin(\bar{\beta}_j - \bar{\alpha}_j) \sin(\bar{\delta}_j - \bar{\gamma}_j) \right| \right] \cdot Z_{n-1}((\alpha_j)_{j=1}^{n-1}, (\beta_j)_{j=2}^{n}, (\gamma_j)_{j=1}^{n-1}, (\delta_j)_{j=2}^{n}).$$

Iterating this induction and using that the initial condition is $Z_0 = 1$, we obtain Formula (28). Formula (29) is obtained using classical trigonometric identities: for all $\alpha, \beta, \gamma, \delta$,

$$\begin{aligned} \sin(\bar{\beta} - \bar{\alpha}) \sin(\bar{\delta} - \bar{\gamma}) &= \\ &= \frac{1}{2}[\cos(\bar{\beta} - \bar{\alpha} - \bar{\delta} + \bar{\gamma}) - \cos(\bar{\beta} - \bar{\alpha} + \bar{\delta} - \bar{\gamma})] \\ &= \frac{1}{2}[\cos(\bar{\beta} - \bar{\alpha} - \bar{\delta} + \bar{\gamma}) - \cos(\bar{\beta} - \bar{\gamma} + \bar{\alpha} - \bar{\delta}) + \cos(\bar{\beta} - \bar{\gamma} + \bar{\alpha} - \bar{\delta}) - \cos(\bar{\beta} - \bar{\alpha} + \bar{\delta} - \bar{\gamma})] \\ &= \sin(\bar{\delta} - \bar{\beta}) \sin(\bar{\gamma} - \bar{\alpha}) + \sin(\bar{\beta} - \bar{\gamma}) \sin(\bar{\delta} - \bar{\alpha}), \end{aligned}$$

where in the third line, we have subtracted and added $\cos(\bar{\beta} - \bar{\gamma} + \bar{\alpha} - \bar{\delta})$. $\square$

As a consequence of Corollary 18, we also recover Stanley's celebrated formula [Pro97, Yan91], see also [BBC+17, Section 6]. Suppose that edges are assigned weights $x = (x_j)_{j=1}^n$, $y = (y_j)_{j=1}^n$, $w = (w_j)_{j=1}^n$, $z = (z_j)_{j=1}^n$ as in Figure 3. Let us denote by $Z(x, y, z, w)$ the corresponding partition function, keeping in mind that the notation $x, y, z, w$ is used for Stanley's weights and that the notation $\alpha, \beta, \gamma, \delta$ is used for Fock's weights.

**Corollary 20 (Stanley's formula).** *The partition function of the Aztec diamond with weights $x, y, z, w$ as in Figure 3 is equal to*

$$Z(x, y, z, w) = \prod_{\ell=0}^{n-1} \prod_{j=1}^{n-\ell} (x_j w_{j+\ell} + y_j z_{j+\ell}).$$

*Proof.* For the purpose of this proof, let us denote by $\nu$ Fock's weight function and by $\tilde{\nu}$ Stanley's one. Recall from Proposition 7 that, for every $\alpha_1 < \gamma < \delta \in A_0 = S^1$, there
• In the last case, if we suppose moreover that $\rho = \frac{1}{4}$, all edge weights are equal to $2\sin(\frac{\pi}{4}) = \sqrt{2}$. Since the number of edges in a dimer configuration is equal to the number of white vertices, that is $n(n+1)$; dividing (30) by $(\sqrt{2})^{n(n+1)}$, one recovers the celebrated result of [EKLP92], which states that the number of domino tilings of the Aztec diamond is equal to $2^{\frac{n(n+1)}{2}}$. It is interesting to note that this same formula also holds in some cases of non-uniform weights.

*Proof.* Returning to the definition of the weights in the genus 0 case, see Equation (6), we have that all terms involving the Riemann theta function $\theta$ are equal to 1 and that the modulus $|E(\alpha, \beta)|$ of the prime form is equal to $|2\sin(\bar{\beta} - \bar{\alpha})|$. As a consequence, the recurrence formula of Theorem 16 gives

$$Z_n(\alpha, \beta, \gamma, \delta) = \\ = 2^{2n} \cdot \left[ \prod_{j=1}^{n} \left| \sin(\bar{\beta}_j - \bar{\alpha}_j) \sin(\bar{\delta}_j - \bar{\gamma}_j) \right| \right] \cdot Z_{n-1}((\alpha_j)_{j=1}^{n-1}, (\beta_j)_{j=2}^{n}, (\gamma_j)_{j=1}^{n-1}, (\delta_j)_{j=2}^{n}).$$

Iterating this induction and using that the initial condition is $Z_0 = 1$, we obtain Formula (28). Formula (29) is obtained using classical trigonometric identities: for all $\alpha, \beta, \gamma, \delta$,

$$\begin{aligned}
\sin(\bar{\beta} - \bar{\alpha}) \sin(\bar{\delta} - \bar{\gamma}) &= \\
&= \frac{1}{2}[\cos(\bar{\beta} - \bar{\alpha} - \bar{\delta} + \bar{\gamma}) - \cos(\bar{\beta} - \bar{\alpha} + \bar{\delta} - \bar{\gamma})] \\
&= \frac{1}{2}[\cos(\bar{\beta} - \bar{\alpha} - \bar{\delta} + \bar{\gamma}) - \cos(\bar{\beta} - \bar{\gamma} + \bar{\alpha} - \bar{\delta}) + \cos(\bar{\beta} - \bar{\gamma} + \bar{\alpha} - \bar{\delta}) - \cos(\bar{\beta} - \bar{\alpha} + \bar{\delta} - \bar{\gamma})] \\
&= \sin(\bar{\delta} - \bar{\beta}) \sin(\bar{\gamma} - \bar{\alpha}) + \sin(\bar{\beta} - \bar{\gamma}) \sin(\bar{\delta} - \bar{\alpha}),
\end{aligned}$$

where in the third line, we have subtracted and added $\cos(\bar{\beta} - \bar{\gamma} + \bar{\alpha} - \bar{\delta})$. $\square$

As a consequence of Corollary 18, we also recover Stanley's celebrated formula [Pro97, Yan91], see also [BBC+17, Section 6]. Suppose that edges are assigned weights $x = (x_j)_{j=1}^n$, $y = (y_j)_{j=1}^n$, $w = (w_j)_{j=1}^n$, $z = (z_j)_{j=1}^n$ as in Figure 3. Let us denote by $Z(x, y, z, w)$ the corresponding partition function, keeping in mind that the notation $x, y, z, w$ is used for Stanley's weights and that the notation $\alpha, \beta, \gamma, \delta$ is used for Fock's weights.

**Corollary 20 (Stanley's formula).** *The partition function of the Aztec diamond with weights $x, y, z, w$ as in Figure 3 is equal to*

$$Z(x, y, z, w) = \prod_{\ell=0}^{n-1} \prod_{j=1}^{n-\ell} (x_j w_{j+\ell} + y_j z_{j+\ell}).$$

*Proof.* For the purpose of this proof, let us denote by $\nu$ Fock's weight function and by $\tilde{\nu}$ Stanley's one. Recall from Proposition 7 that, for every $\alpha_1 < \gamma < \delta \in A_0 = S^1$, there
exists $(\alpha_j)_{j=2}^n, (\beta_j)_{j=1}^n$ such that $\alpha < \gamma < \beta < \gamma$ and such that the weight functions $\nu$ and $\tilde{\nu}$ are gauge equivalent. Let us take such angles and compute $Z(\alpha, \beta, \gamma, \delta)$ using Corollary 18, Equation (29). We obtain

$$
\begin{align*}
Z(\alpha, \beta, \gamma, \delta) &= 2^{n(n+1)} \prod_{\ell=0}^{n-1} \prod_{j=1}^{n-\ell} |\sin(\bar{\delta} - \bar{\beta}_{j+\ell}) \sin(\bar{\gamma} - \bar{\alpha}_j) + \sin(\bar{\beta}_{j+\ell} - \bar{\gamma}) \sin(\bar{\delta} - \bar{\alpha}_j)| \\
&= 2^{n(n+1)} \prod_{\ell=0}^{n-1} \prod_{j=1}^{n-\ell} |\sin(\bar{\beta}_{j+\ell} - \bar{\gamma}) \sin(\bar{\delta} - \bar{\alpha}_j)| \prod_{\ell=0}^{n-1} \prod_{j=1}^{n-\ell} \left( \frac{|\sin(\bar{\delta} - \bar{\beta}_{j+\ell}) \sin(\bar{\gamma} - \bar{\alpha}_j)|}{|\sin(\bar{\beta}_{j+\ell} - \bar{\gamma}) \sin(\bar{\delta} - \bar{\alpha}_j)|} + 1 \right) \\
&= 2^{n(n+1)} \prod_{\ell=0}^{n-1} \prod_{j=1}^{n-\ell} \left[ |\sin(\bar{\beta}_{j+\ell} - \bar{\gamma}) \sin(\bar{\delta} - \bar{\alpha}_j)| \right] \prod_{\ell=0}^{n-1} \prod_{j=1}^{n-\ell} \left( \frac{x_j w_{j+\ell}}{y_j z_{j+\ell}} + 1 \right) \\
&= 2^{n(n+1)} \prod_{\ell=0}^{n-1} \prod_{j=1}^{n-\ell} \frac{|\sin(\bar{\beta}_{j+\ell} - \bar{\gamma}) \sin(\bar{\delta} - \bar{\alpha}_j)|}{y_j z_{j+\ell}} \prod_{\ell=0}^{n-1} \prod_{j=1}^{n-\ell} (x_j w_{j+\ell} + y_j z_{j+\ell}),
\end{align*}
$$

where in the third equality we used gauge equivalence of the weight functions $\nu$ and $\tilde{\nu}$, see Equation (7). Using gauge equivalence again, we know from Equation (2) that for any reference dimer configuration $M_0$,

$$Z(x, y, w, z) = \frac{\tilde{\nu}(M_0)}{\nu(M_0)} Z(\alpha, \beta, \gamma, \delta).$$

The proof is concluded by taking as reference dimer configuration $M_0$ the one of Figure 3, and observing that

$$\nu(M_0) = 2^{n(n+1)} \prod_{\ell=0}^{n-1} \prod_{j=1}^{n-\ell} |\sin(\bar{\beta}_{j+\ell} - \bar{\gamma}) \sin(\bar{\delta} - \bar{\alpha}_j)|, \quad \tilde{\nu}(M_0) = \prod_{\ell=0}^{n-1} \prod_{j=1}^{n-\ell} y_j z_{j+\ell}. \quad \square$$

## 4.2 Proof of Theorem 16

**Local moves.** Two local moves play a crucial rule in the study of the dimer model on minimal graphs: the spider move [Kup98, Pro03] and contraction/expansion of a degree two vertex; see [Thu17, GK13] for more on the subject. In the setting of the Aztec diamond, these moves allow to reduce a size $n$ Aztec diamond into a size $n-1$ Aztec diamond, see for example [Pro97]. Our argument consists in using this induction in the case of the dimer model with Fock's weights while controlling the effect on the partition function. The fact that this works in this very general framework relies on Fay's trisecant identity [Fay73, Foc15, BCdT23a].

The setting for the next lemma is the dimer model with Fock's weights, see Equation (5), on any finite minimal graph. Let us denote by $Z$ the dimer partition function before the move is performed, and by $Z'$, resp. $Z''$, the partition function after having performed a spider move, resp. a contraction of a degree two vertex, see Figure 10. This figure also illustrates the evolution of the oriented train-tracks, of their angle parameters, and introduces the notation of Lemma 21.
exists $(\alpha_j)_{j=2}^n, (\beta_j)_{j=1}^n$ such that $\alpha < \gamma < \beta < \gamma$ and such that the weight functions $\nu$ and $\tilde{\nu}$ are gauge equivalent. Let us take such angles and compute $Z(\alpha, \beta, \gamma, \delta)$ using Corollary 18, Equation (29). We obtain

$$
\begin{align*}
Z(\alpha, \beta, \gamma, \delta) &= 2^{n(n+1)} \prod_{\ell=0}^{n-1} \prod_{j=1}^{n-\ell} |\sin(\bar{\delta} - \bar{\beta}_{j+\ell}) \sin(\bar{\gamma} - \bar{\alpha}_j) + \sin(\bar{\beta}_{j+\ell} - \bar{\gamma}) \sin(\bar{\delta} - \bar{\alpha}_j)| \\
&= 2^{n(n+1)} \prod_{\ell=0}^{n-1} \prod_{j=1}^{n-\ell} |\sin(\bar{\beta}_{j+\ell} - \bar{\gamma}) \sin(\bar{\delta} - \bar{\alpha}_j)| \prod_{\ell=0}^{n-1} \prod_{j=1}^{n-\ell} \left( \frac{|\sin(\bar{\delta} - \bar{\beta}_{j+\ell}) \sin(\bar{\gamma} - \bar{\alpha}_j)|}{|\sin(\bar{\beta}_{j+\ell} - \bar{\gamma}) \sin(\bar{\delta} - \bar{\alpha}_j)|} + 1 \right) \\
&= 2^{n(n+1)} \prod_{\ell=0}^{n-1} \prod_{j=1}^{n-\ell} \left[ |\sin(\bar{\beta}_{j+\ell} - \bar{\gamma}) \sin(\bar{\delta} - \bar{\alpha}_j)| \right] \prod_{\ell=0}^{n-1} \prod_{j=1}^{n-\ell} \left( \frac{x_j w_{j+\ell}}{y_j z_{j+\ell}} + 1 \right) \\
&= 2^{n(n+1)} \prod_{\ell=0}^{n-1} \prod_{j=1}^{n-\ell} \frac{|\sin(\bar{\beta}_{j+\ell} - \bar{\gamma}) \sin(\bar{\delta} - \bar{\alpha}_j)|}{y_j z_{j+\ell}} \prod_{\ell=0}^{n-1} \prod_{j=1}^{n-\ell} (x_j w_{j+\ell} + y_j z_{j+\ell}),
\end{align*}
$$

where in the third equality we used gauge equivalence of the weight functions $\nu$ and $\tilde{\nu}$, see Equation (7). Using gauge equivalence again, we know from Equation (2) that for any reference dimer configuration $M_0$,

$$Z(x, y, w, z) = \frac{\tilde{\nu}(M_0)}{\nu(M_0)} Z(\alpha, \beta, \gamma, \delta).$$

The proof is concluded by taking as reference dimer configuration $M_0$ the one of Figure 3, and observing that

$$\nu(M_0) = 2^{n(n+1)} \prod_{\ell=0}^{n-1} \prod_{j=1}^{n-\ell} |\sin(\bar{\beta}_{j+\ell} - \bar{\gamma}) \sin(\bar{\delta} - \bar{\alpha}_j)|, \quad \tilde{\nu}(M_0) = \prod_{\ell=0}^{n-1} \prod_{j=1}^{n-\ell} y_j z_{j+\ell}. \quad \square$$

## 4.2 Proof of Theorem 16

**Local moves.** Two local moves play a crucial rule in the study of the dimer model on minimal graphs: the spider move [Kup98, Pro03] and contraction/expansion of a degree two vertex; see [Thu17, GK13] for more on the subject. In the setting of the Aztec diamond, these moves allow to reduce a size $n$ Aztec diamond into a size $n-1$ Aztec diamond, see for example [Pro97]. Our argument consists in using this induction in the case of the dimer model with Fock's weights while controlling the effect on the partition function. The fact that this works in this very general framework relies on Fay's trisecant identity [Fay73, Foc15, BCdT23a].

The setting for the next lemma is the dimer model with Fock's weights, see Equation (5), on any finite minimal graph. Let us denote by $Z$ the dimer partition function before the move is performed, and by $Z'$, resp. $Z''$, the partition function after having performed a spider move, resp. a contraction of a degree two vertex, see Figure 10. This figure also illustrates the evolution of the oriented train-tracks, of their angle parameters, and introduces the notation of Lemma 21.
<figure><img src="image_10.png" /><figcaption>Figure 10: Spider move and contraction of a degree two vertex.</figcaption></figure>

**Lemma 21.** The following equations describe the evolution of the partition function under

1. a spider move

$$Z = \frac{\prod_{j=1}^{4} \theta(t + \mathbf{d}(\mathbf{f}_j)) \theta(t + \mathbf{d}(\mathbf{f}) + \alpha + \beta - \gamma - \delta)}{|E(\alpha, \beta)E(\gamma, \delta)| \theta(t + \mathbf{d}(\mathbf{f}))} Z',$$

where $\mathbf{f}$ is the vertex at the center of the square, and $\mathbf{f}_1, \dots, \mathbf{f}_4$ are the vertices corresponding to faces bounding the square, see Figure 10 (left).

2. a contraction of a degree two vertex

$$Z = \frac{|E(\alpha, \beta)|}{\theta(t + \mathbf{d}(\mathbf{f}))\theta(t + \mathbf{d}(\mathbf{f}'))} Z'',$$

where $\mathbf{f}, \mathbf{f}'$ are the two vertices corresponding to the faces above and below the degree two vertex, see Figure 10 (right).

*Proof.* For the purpose of this proof it is convenient to write Fock's weight $K_{w,b}$ of Equation (5) as

$$K_{w,b} = K_{\alpha,\beta}^{f,f'}.$$

By [Foc15, BCdT23a] we know that the dimer model with Fock's weights, when considered as a model with face weights, is invariant under these two moves. In particular, for the spider move, this implies that when considered as a model with edge weights, there exists a constant $C$ such that for all six partial partition function of Figure 11, obtained by fixing the dimer configuration on edges bounding the square, we have $Z_j = CZ'_j$, $j \in \{1, \dots, 6\}$. In order to compute this constant, we can thus choose any of these six cases, and we choose the fourth one since it leads to simple computations (recovering $C$ from the others requires using Fay's trisecant identity). Using Figure 10 to identify the angle parameters, we obtain

$$C = \frac{Z}{Z'} = \frac{|K_{\beta,\delta}^{f,f_3}|}{|K_{\gamma,\delta}^{f_3,f_4} K_{\beta,\alpha}^{f_3,f_2} K_{\beta,\delta}^{f_1,f'}|} = \frac{\prod_{j=1}^{4} \theta(t + \mathbf{d}(\mathbf{f}_j)) \theta(t + \mathbf{d}'(\mathbf{f}))}{|E(\alpha, \beta)E(\gamma, \delta)| \theta(t + \mathbf{d}(\mathbf{f}))},$$
<figure><img src="image_12.png" /><figcaption>Figure 10: Spider move and contraction of a degree two vertex.</figcaption></figure>

**Lemma 21.** The following equations describe the evolution of the partition function under

1. a spider move

$$Z = \frac{\prod_{j=1}^{4} \theta(t + \mathbf{d}(f_j)) \theta(t + \mathbf{d}(f) + \alpha + \beta - \gamma - \delta)}{|E(\alpha, \beta)E(\gamma, \delta)| \theta(t + \mathbf{d}(f))} Z',$$

where $f$ is the vertex at the center of the square, and $f_1, \dots, f_4$ are the vertices corresponding to faces bounding the square, see Figure 10 (left).

2. a contraction of a degree two vertex

$$Z = \frac{|E(\alpha, \beta)|}{\theta(t + \mathbf{d}(f))\theta(t + \mathbf{d}(f'))} Z'',$$

where $f, f'$ are the two vertices corresponding to the faces above and below the degree two vertex, see Figure 10 (right).

*Proof.* For the purpose of this proof it is convenient to write Fock's weight $K_{w,b}$ of Equation (5) as

$$K_{w,b} = K_{\alpha, \beta}^{f,f'}$$

By [Foc15, BCdT23a] we know that the dimer model with Fock's weights, when considered as a model with face weights, is invariant under these two moves. In particular, for the spider move, this implies that when considered as a model with edge weights, there exists a constant $C$ such that for all six partial partition function of Figure 11, obtained by fixing the dimer configuration on edges bounding the square, we have $Z_j = CZ'_j$, $j \in \{1, \dots, 6\}$. In order to compute this constant, we can thus choose any of these six cases, and we choose the fourth one since it leads to simple computations (recovering $C$ from the others requires using Fay's trisecant identity). Using Figure 10 to identify the angle parameters, we obtain

$$C = \frac{Z}{Z'} = \frac{|K_{\beta, \delta}^{f, f_3}|}{|K_{\gamma, \delta}^{f_3, f_4} K_{\beta, \alpha}^{f_3, f_2} K_{\beta, \delta}^{f_1, f'}|} = \frac{\prod_{j=1}^{4} \theta(t + \mathbf{d}(f_j)) \theta(t + \mathbf{d}'(f))}{|E(\alpha, \beta)E(\gamma, \delta)| \theta(t + \mathbf{d}(f))},$$
<figure><img src="image_11.png" /><figcaption>Figure 11: Partial partition function $Z_1, \dots, Z_6$, resp. $Z'_1, \dots, Z'_6$ before, resp. after, the spider moves, and $Z_1, Z_2$, resp. $Z''_1, Z''_2$, before, resp. after, the contraction of a degree two vertex.</figcaption></figure>

where $d'(f)$ is the value of the discrete Abel map after the move is performed. Returning to its definition, see Section 2.2, we have

$$d'(f) = d(f) + \alpha + \beta - \gamma - \delta.$$

Note that the value of the discrete Abel map at the other dual vertices remains unchanged.

For the contraction of a degree two vertex, in a similar way, we can choose any of the two cases, and we obtain

$$C = \frac{Z}{Z''} = |K_{\alpha, \beta}^{f, f'}| = \frac{|E(\alpha, \beta)|}{\theta(t + d(f))\theta(t + d(f'))} \quad \square$$

**Proof of Theorem 16.** The proof consists in performing a sequence of spider moves and contraction of degree two vertices to transform an Aztec diamond of size $n$ into an Aztec diamond of size $n-1$ [Pro97], while keeping track of the evolution of the partition function using Lemma 21, see Figure 12.

Let us simply denote by $Z := Z_n(\alpha, \beta, \gamma, \delta; d)$ the partition function defined in (27).
<figure><img src="image_13.png" /><figcaption>Figure 11: Partial partition function $Z_1, \dots, Z_6$, resp. $Z'_1, \dots, Z'_6$ before, resp. after, the spider moves, and $Z_1, Z_2$, resp. $Z''_1, Z''_2$, before, resp. after, the contraction of a degree two vertex.</figcaption></figure>

where $d'(f)$ is the value of the discrete Abel map after the move is performed. Returning to its definition, see Section 2.2, we have

$$d'(f) = d(f) + \alpha + \beta - \gamma - \delta.$$

Note that the value of the discrete Abel map at the other dual vertices remains unchanged.

For the contraction of a degree two vertex, in a similar way, we can choose any of the two cases, and we obtain

$$C = \frac{Z}{Z''} = |K_{\alpha, \beta}^{f, f'}| = \frac{|E(\alpha, \beta)|}{\theta(t + d(f))\theta(t + d(f'))} \quad \square$$

**Proof of Theorem 16.** The proof consists in performing a sequence of spider moves and contraction of degree two vertices to transform an Aztec diamond of size $n$ into an Aztec diamond of size $n-1$ [Pro97], while keeping track of the evolution of the partition function using Lemma 21, see Figure 12.

Let us simply denote by $Z := Z_n(\alpha, \beta, \gamma, \delta; d)$ the partition function defined in (27).
<figure><img src="image_12.png" /><figcaption>Figure 12: Induction step for computing the partition function of the Aztec diamond.</figcaption></figure>

**Step 1.** Suppose $n \ge 1$, then Step 1 consists in performing a spider move at each of the square whose dual vertex has odd coordinates. Let us denote by $Z^1$ the partition function of the dimer model on the resulting graph, see Figure 12 (first two figures). Using Point 1. of Lemma 21, we obtain

$$Z = Z^1 \cdot \frac{[\prod_{f \in \{\text{corner}_n\}} \theta(t + \mathbf{d}(f))] [\prod_{f \in \{\text{bry}_n \setminus \text{corner}_n\}} \theta(t + \mathbf{d}(f))^2] [\prod_{f \in \{\text{int. even}_n\}} \theta(t + \mathbf{d}(f))^4]}{\prod_{j=1}^n |E(\alpha_j, \beta_j)^n E(\gamma_j, \delta_j)^n|} \cdot \prod_{f \in \{\text{odd}_n\}} \frac{\theta(t + \mathbf{d}(f) + \alpha + \beta - \gamma - \delta)}{\theta(t + \mathbf{d}(f))},$$

where we generically denote by $\alpha, \beta, \gamma, \delta$ the angles around a dual vertex f with odd coordinates, see Figure 10 (left).

**Step 2.** Suppose $n \ge 1$. Looking at the graph obtained after Step 1, one notes that all the boundary edges have to belong to a dimer configuration, see Figure 12 (second graph, green edges). We can thus factor out their contribution and then remove all their incident edges, which yields the third graph of Figure 12; let us denote by $Z^2$ its partition function. We thus have

$$Z^1 = Z^2 \cdot \frac{\prod_{j=1}^n |E(\alpha_j, \beta_j)^2 E(\gamma_j, \delta_j)^2|}{\prod_{f \in \{\text{bry}_n\}} \theta(t + \mathbf{d}(f))^2}.$$

Note that if $n = 1$, then this identity holds by setting $Z^2 = 1$.

**Step 3.** Suppose $n \ge 2$ (otherwise this step does not happen); one then performs the contraction move on all degree two (inner) vertices. Let us denote by $Z^3$ the partition function of the graph thus obtained, see Figure 12 (fourth graph). Using Point 2. of Lemma 21, we obtain

$$Z^2 = Z^3 \cdot \frac{\prod_{j=1}^n |E(\alpha_j, \beta_j)^{n-1} E(\gamma_j, \delta_j)^{n-1}|}{[\prod_{f \in \{\text{bry}_n \setminus \text{corner}_n\}} \theta(t + \mathbf{d}(f))] [\prod_{f \in \{\text{int. even}_n\}} \theta(t + \mathbf{d}(f))^4]}.$$
<figure><img src="image_14.png" /><figcaption>Figure 12: Induction step for computing the partition function of the Aztec diamond.</figcaption></figure>

**Step 1.** Suppose $n \ge 1$, then Step 1 consists in performing a spider move at each of the square whose dual vertex has odd coordinates. Let us denote by $Z^1$ the partition function of the dimer model on the resulting graph, see Figure 12 (first two figures). Using Point 1. of Lemma 21, we obtain

$$Z = Z^1 \cdot \frac{[\prod_{f \in \{\text{corner}_n\}} \theta(t + \mathbf{d}(f))] [\prod_{f \in \{\text{bry}_n \setminus \text{corner}_n\}} \theta(t + \mathbf{d}(f))^2] [\prod_{f \in \{\text{int. even}_n\}} \theta(t + \mathbf{d}(f))^4]}{\prod_{j=1}^n |E(\alpha_j, \beta_j)^n E(\gamma_j, \delta_j)^n|} \cdot \prod_{f \in \{\text{odd}_n\}} \frac{\theta(t + \mathbf{d}(f) + \alpha + \beta - \gamma - \delta)}{\theta(t + \mathbf{d}(f))},$$

where we generically denote by $\alpha, \beta, \gamma, \delta$ the angles around a dual vertex f with odd coordinates, see Figure 10 (left).

**Step 2.** Suppose $n \ge 1$. Looking at the graph obtained after Step 1, one notes that all the boundary edges have to belong to a dimer configuration, see Figure 12 (second graph, green edges). We can thus factor out their contribution and then remove all their incident edges, which yields the third graph of Figure 12; let us denote by $Z^2$ its partition function. We thus have

$$Z^1 = Z^2 \cdot \frac{\prod_{j=1}^n |E(\alpha_j, \beta_j)^2 E(\gamma_j, \delta_j)^2|}{\prod_{f \in \{\text{bry}_n\}} \theta(t + \mathbf{d}(f))^2}.$$

Note that if $n = 1$, then this identity holds by setting $Z^2 = 1$.

**Step 3.** Suppose $n \ge 2$ (otherwise this step does not happen); one then performs the contraction move on all degree two (inner) vertices. Let us denote by $Z^3$ the partition function of the graph thus obtained, see Figure 12 (fourth graph). Using Point 2. of Lemma 21, we obtain

$$Z^2 = Z^3 \cdot \frac{\prod_{j=1}^n |E(\alpha_j, \beta_j)^{n-1} E(\gamma_j, \delta_j)^{n-1}|}{[\prod_{f \in \{\text{bry}_n \setminus \text{corner}_n\}} \theta(t + \mathbf{d}(f))] [\prod_{f \in \{\text{int. even}_n\}} \theta(t + \mathbf{d}(f))^4]}.$$
**Conclusion.** When $n \ge 2$, combining all three steps gives

$$Z = Z^3 \cdot \left[ \prod_{j=1}^{n} |E(\alpha_j, \beta_j)E(\gamma_j, \delta_j)| \right] \prod_{f \in \{\text{odd}_n\}} \frac{\theta(t + \mathbf{d}(f) + \alpha + \beta - \gamma - \delta)}{\theta(t + \mathbf{d}(f))} \frac{1}{\prod_{f \in \{\text{bry}_n\}} \theta(t + \mathbf{d}(f))}$$

The proof is concluded by observing that $Z^3$ is the partition function of an Aztec diamond of size $n-1$, with angles $(\alpha_j)_{j=1}^{n-1}$, $(\beta_j)_{j=2}^{n-1}$, $(\gamma_j)_{j=1}^{n-1}$, $(\delta_j)_{j=2}^{n-1}$. Note moreover that the value of the discrete Abel map at the vertex $0 = (0,0)$ in the Aztec diamond of size $n-1$, is the value of the discrete Abel map at the vertex $(1,1)$ in the original Aztec diamond of size $n$ after the spider move is performed, that is:

$$(\gamma_1 - \alpha_1) + (\alpha_1 + \beta_1 - \gamma_1 - \delta_1) = \beta_1 - \delta_1.$$

When $n=1$, only the first two steps are performed, and we obtain

$$Z = \frac{[\prod_{f \in \{\text{corner}_n\}} \theta(t + \mathbf{d}(f))] \cdot \frac{\theta(t + \mathbf{d}(f) + \alpha_1 + \beta_1 - \gamma_1 - \delta_1)}{\theta(t + \mathbf{d}(f))} |E(\alpha_1, \beta_1)^2 E(\gamma_1, \delta_1)^2|}{|E(\alpha_1, \beta_1) E(\gamma_1, \delta_1)|} \cdot \frac{1}{\prod_{f \in \{\text{bry}_n\}} \theta(t + \mathbf{d}(f))^2} \\ = |E(\alpha_1, \beta_1) E(\gamma_1, \delta_1)| \frac{\theta(t + \mathbf{d}(f) + \alpha_1 + \beta_1 - \gamma_1 - \delta_1)}{\theta(t + \mathbf{d}(f))} \frac{1}{\prod_{f \in \{\text{bry}_n\}} \theta(t + \mathbf{d}(f))},$$

where in the last line we used that the boundary vertices are exactly the corner vertices in this case. We deduce that the formula of Theorem 16 also holds in this case. $\square$

# 5 Aztec diamond and minimal graphs

The Aztec diamond of size $n$ can be seen as a finite subgraph of an infinite minimal bipartite graph, obtained by gluing four “quadrants” made of hexagons to the sides of the Aztec diamond, where minimal graphs are defined in Section 2.2. Let us denote this infinite graph by $G_n$, see Figure 13 for a representation of $G_3$. Similarly to the case of the Aztec diamond, the train-tracks of $G_n$ are made of four families, see Figure 13. They are assigned angle parameters $\alpha = (\alpha_j)_{j=1}^{\infty}$, $\beta = (\beta_j)_{j=-\infty}^{n}$, $\gamma = (\gamma_j)_{j=1}^{\infty}$, $\delta = (\delta_j)_{j=-\infty}^{n}$, in such a way that: the indices 1 to $n$ correspond to the angle parameters of the train-tracks of $A_n$, and the cyclic order (4) is preserved for all the train-tracks (not only those crossing edges of $A_n$).

The graph $G_n$ belongs to a class of infinite graphs introduced in [Spe07] by Speyer, giving a combinatorial interpretation of the solution of the octahedron recurrence as the partition function of dimer configurations on those graphs with specific condition at infinity.

In addition to the finite Kasteleyn matrix $K = K_{A_n}$ with rows and columns indexed by vertices of the Aztec diamond of size $n$ and we consider also in this section $\tilde{K} = K_{G_n}$, the infinite Fock Kasteleyn operator for the infinite minimal graph $G_n$. $K$ is then the restriction of $\tilde{K}$ to vertices of $A_n$. The goal of this section is to use the framework of this paper to define an inverse of Fock's Kasteleyn operator $\tilde{K}$ on the infinite graph $G_n$ such
**Conclusion.** When $n \ge 2$, combining all three steps gives

$$Z = Z^3 \cdot \left[ \prod_{j=1}^{n} |E(\alpha_j, \beta_j)E(\gamma_j, \delta_j)| \right] \prod_{f \in \{\text{odd}_n\}} \frac{\theta(t + \mathbf{d}(f) + \alpha + \beta - \gamma - \delta)}{\theta(t + \mathbf{d}(f))} \frac{1}{\prod_{f \in \{\text{bry}_n\}} \theta(t + \mathbf{d}(f))}$$

The proof is concluded by observing that $Z^3$ is the partition function of an Aztec diamond of size $n-1$, with angles $(\alpha_j)_{j=1}^{n-1}$, $(\beta_j)_{j=2}^{n-1}$, $(\gamma_j)_{j=1}^{n-1}$, $(\delta_j)_{j=2}^{n-1}$. Note moreover that the value of the discrete Abel map at the vertex $0 = (0,0)$ in the Aztec diamond of size $n-1$, is the value of the discrete Abel map at the vertex $(1,1)$ in the original Aztec diamond of size $n$ after the spider move is performed, that is:

$$(\gamma_1 - \alpha_1) + (\alpha_1 + \beta_1 - \gamma_1 - \delta_1) = \beta_1 - \delta_1.$$

When $n=1$, only the first two steps are performed, and we obtain

$$Z = \frac{[\prod_{f \in \{\text{corner}_n\}} \theta(t + \mathbf{d}(f))]}{|E(\alpha_1, \beta_1)E(\gamma_1, \delta_1)|} \cdot \frac{\theta(t + \mathbf{d}(f) + \alpha_1 + \beta_1 - \gamma_1 - \delta_1)}{\theta(t + \mathbf{d}(f))} \frac{|E(\alpha_1, \beta_1)^2 E(\gamma_1, \delta_1)^2|}{[\prod_{f \in \{\text{bry}_n\}} \theta(t + \mathbf{d}(f))^2]} \\ = |E(\alpha_1, \beta_1)E(\gamma_1, \delta_1)| \frac{\theta(t + \mathbf{d}(f) + \alpha_1 + \beta_1 - \gamma_1 - \delta_1)}{\theta(t + \mathbf{d}(f))} \frac{1}{\prod_{f \in \{\text{bry}_n\}} \theta(t + \mathbf{d}(f))},$$

where in the last line we used that the boundary vertices are exactly the corner vertices in this case. We deduce that the formula of Theorem 16 also holds in this case. $\square$

# 5 Aztec diamond and minimal graphs

The Aztec diamond of size $n$ can be seen as a finite subgraph of an infinite minimal bipartite graph, obtained by gluing four “quadrants” made of hexagons to the sides of the Aztec diamond, where minimal graphs are defined in Section 2.2. Let us denote this infinite graph by $G_n$, see Figure 13 for a representation of $G_3$. Similarly to the case of the Aztec diamond, the train-tracks of $G_n$ are made of four families, see Figure 13. They are assigned angle parameters $\alpha = (\alpha_j)_{j=1}^{\infty}$, $\beta = (\beta_j)_{j=-\infty}^{n}$, $\gamma = (\gamma_j)_{j=1}^{\infty}$, $\delta = (\delta_j)_{j=-\infty}^{n}$, in such a way that: the indices 1 to $n$ correspond to the angle parameters of the train-tracks of $A_n$, and the cyclic order (4) is preserved for all the train-tracks (not only those crossing edges of $A_n$).

The graph $G_n$ belongs to a class of infinite graphs introduced in [Spe07] by Speyer, giving a combinatorial interpretation of the solution of the octahedron recurrence as the partition function of dimer configurations on those graphs with specific condition at infinity.

In addition to the finite Kasteleyn matrix $K = K_{A_n}$ with rows and columns indexed by vertices of the Aztec diamond of size $n$ and we consider also in this section $\tilde{K} = K_{G_n}$, the infinite Fock Kasteleyn operator for the infinite minimal graph $G_n$. $K$ is then the restriction of $\tilde{K}$ to vertices of $A_n$. The goal of this section is to use the framework of this paper to define an inverse of Fock's Kasteleyn operator $\tilde{K}$ on the infinite graph $G_n$ such
<figure><img src="image_13.png" /><figcaption>Figure 13: **Left:** The four families of train-tracks of $G_n$. The families $\alpha$ and $\gamma$ are indexed by positive integers. The family $\beta$ and $\delta$ are indexed by integers less or equal to $n$. **Right:** The Aztec diamond of size $n$ as a finite part of an infinite minimal graph $G_n$, for $n=3$. The added vertices form four quadrants with hexagonal connectivity, in the north, south, west, east of the original Aztec region. The (beginning of) the light-cone of a white vertex $w$ in the north quadrant is represented in light yellow. The icy edges in those quadrants, made of the horizontal and vertical edges, are highlighted in blue, and create a perfect matching of the complement of the Aztec diamond inside $G_n$.</figcaption></figure>

that the corresponding probability measure induced on the edges of $A_n$ is the Boltzmann measure computed by Theorem 5 from the finite matrices $K$ and $K^{-1}$. Moreover, this measure is frozen outside of the Aztec diamond: every edge of a quadrant is either present a.s. or absent a.s., see Proposition 25.

Denote by $Q_N, Q_S, Q_W, Q_E$, the four quadrants made of hexagons respectively above, below, to the left, to the right of the Aztec diamond. We need some more terminology to describe the graph:

**Definition 22.**

* We say that an edge of $Q_S$ or $Q_N$ (resp. of $Q_W$ or $Q_E$) is *icy* if it is vertical (resp. horizontal). Every vertex of these quadrants is incident with exactly one icy edge. So it makes sense to talk about the icy edge associated to a white (or black) vertex in one of the four quadrants.

* The *light cone* of a white vertex $w$ in $Q_N$ is the region of the plane above the two half lines starting from middle of the icy edge associated to $w$, and going north-west and north-east with a 45-degree angle. See Figure 13.

We define in a similar way the light cone for white vertices in $Q_S$, and for black vertices in $Q_W$ and $Q_E$.
<figure><img src="image_15.png" /><figcaption>Figure 13: **Left:** The four families of train-tracks of $G_n$. The families $\alpha$ and $\gamma$ are indexed by positive integers. The family $\beta$ and $\delta$ are indexed by integers less or equal to $n$. **Right:** The Aztec diamond of size $n$ as a finite part of an infinite minimal graph $G_n$, for $n=3$. The added vertices form four quadrants with hexagonal connectivity, in the north, south, west, east of the original Aztec region. The (beginning of) the light-cone of a white vertex $w$ in the north quadrant is represented in light yellow. The icy edges in those quadrants, made of the horizontal and vertical edges, are highlighted in blue, and create a perfect matching of the complement of the Aztec diamond inside $G_n$.</figcaption></figure>

that the corresponding probability measure induced on the edges of $A_n$ is the Boltzmann measure computed by Theorem 5 from the finite matrices $K$ and $K^{-1}$. Moreover, this measure is frozen outside of the Aztec diamond: every edge of a quadrant is either present a.s. or absent a.s., see Proposition 25.

Denote by $Q_N, Q_S, Q_W, Q_E$, the four quadrants made of hexagons respectively above, below, to the left, to the right of the Aztec diamond. We need some more terminology to describe the graph:

**Definition 22.**

* We say that an edge of $Q_S$ or $Q_N$ (resp. of $Q_W$ or $Q_E$) is *icy* if it is vertical (resp. horizontal). Every vertex of these quadrants is incident with exactly one icy edge. So it makes sense to talk about the icy edge associated to a white (or black) vertex in one of the four quadrants.

* The *light cone* of a white vertex $w$ in $Q_N$ is the region of the plane above the two half lines starting from middle of the icy edge associated to $w$, and going north-west and north-east with a 45-degree angle. See Figure 13.

We define in a similar way the light cone for white vertices in $Q_S$, and for black vertices in $Q_W$ and $Q_E$.
We can define an infinite matrix J with rows (resp. columns) indexed by black (resp. white) vertices of $G_n$ by extending Formula (17) used to compute $K^{-1}$ to pairs of vertices which are not necessarily both in $A_n$. It turns out that for about half of the pairs of vertices, the entries of J are trivially 0. Moreover, it becomes a formal inverse of the infinite Fock Kasteleyn operator $\tilde{K}$. This is made precised in the statement below, and its proof which computes explicitly the entries when needed.

**Lemma 23.** The infinite matrix J, has the following block structure, where rows and columns are grouped by regions in the order $A_n, Q_N, Q_S, Q_W, Q_E$:

$$ J = \left( \begin{array}{c|c|c|c|c} \begin{array}{|c|c|c|c|c} \hline K^{-1} & 0 & 0 & \star \\ \hline \end{array} & \begin{array}{|c|c|c|c|c} \hline D_N & 0 & \multicolumn{2}{c|}{\diamond} \\ \hline 0 & D_S & \multicolumn{2}{c|}{\star} \\ \hline 0 & 0 & D_W & 0 \\ \hline 0 & 0 & 0 & D_E \\ \hline \end{array} \end{array} \right) \quad (31) $$

Moreover, the operator J is a formal inverse of the infinite Fock Kasteleyn operator $\tilde{K}$ on $G_n$:

$$ J\tilde{K} = \mathrm{Id}_{\mathrm{blacks}}, \quad \tilde{K}J = \mathrm{Id}_{\mathrm{whites}}. $$

*Proof.* The proof follows from the construction and the computations below:

* If b is inside the Aztec diamond, we can extend the value of $K_{b,w}^{-1}$ for w in $Q_N$ and $Q_S$.

- If w is in $Q_S$, the train-tracks of type $\alpha$ separating b from w contribute as zeros of $g_{b,w}$. The contour $C_2$ does not contain any pole of $g_{b,w}$ and thus, the integral over $C_2$ of $g_{b,w}$ in this case is zero. So we do not need to care about the meaning of “w is on the right of b” in this case. The double integral is also zero by a similar argument: there is no train-track of type $\alpha$ passing below w (in this quadrant, we see only train-tracks of type $\beta, \gamma, \delta$). Therefore, the contour $C_2$ does not contain any of the poles in v of the integrand (for any fixed u). Thus the whole integral is 0.

- A similar result holds when w belongs to $Q_N$, but for a slightly different reason. Let us evaluate first the double integral in Equation (17). The contour $C_2$ for the v variable in Equation (17) contains all the poles of the integrand except the one at $v = u$. So for a fixed u, the integral over v is equal to $-2i\pi$ times the residue at $v = u$, which is equal to $g_{b,w}(u)$. We need to integrate this residue over u along $C_1$.

* If b is “on the left of w” (meaning here that no parameter from $\gamma$ appears as a pole of $g_{b,w}$), there is no pole inside $C_1$ so the double integral is 0. Moreover, the indicator function in front of the single integral is also zero.
We can define an infinite matrix J with rows (resp. columns) indexed by black (resp. white) vertices of $G_n$ by extending Formula (17) used to compute $K^{-1}$ to pairs of vertices which are not necessarily both in $A_n$. It turns out that for about half of the pairs of vertices, the entries of J are trivially 0. Moreover, it becomes a formal inverse of the infinite Fock Kasteleyn operator $\tilde{K}$. This is made precised in the statement below, and its proof which computes explicitly the entries when needed.

**Lemma 23.** The infinite matrix J, has the following block structure, where rows and columns are grouped by regions in the order $A_n, Q_N, Q_S, Q_W, Q_E$:

$$ J = \left( \begin{array}{c|c|c|c|c} \begin{array}{|c|c|c|c|c} \hline K^{-1} & 0 & 0 & \star \\ \hline \end{array} & \begin{array}{|c|c|c|c|c} \hline D_N & 0 & \multicolumn{2}{c|}{\diamond} \\ \hline 0 & D_S & \multicolumn{2}{c|}{\star} \\ \hline 0 & 0 & D_W & 0 \\ \hline 0 & 0 & 0 & D_E \\ \hline \end{array} \end{array} \right) \quad (31) $$

Moreover, the operator J is a formal inverse of the infinite Fock Kasteleyn operator $\tilde{K}$ on $G_n$:

$$ J\tilde{K} = \mathrm{Id}_{\mathrm{blacks}}, \quad \tilde{K}J = \mathrm{Id}_{\mathrm{whites}}. $$

*Proof.* The proof follows from the construction and the computations below:

* If b is inside the Aztec diamond, we can extend the value of $K_{b,w}^{-1}$ for w in $Q_N$ and $Q_S$.

- If w is in $Q_S$, the train-tracks of type $\alpha$ separating b from w contribute as zeros of $g_{b,w}$. The contour $C_2$ does not contain any pole of $g_{b,w}$ and thus, the integral over $C_2$ of $g_{b,w}$ in this case is zero. So we do not need to care about the meaning of “w is on the right of b” in this case. The double integral is also zero by a similar argument: there is no train-track of type $\alpha$ passing below w (in this quadrant, we see only train-tracks of type $\beta, \gamma, \delta$). Therefore, the contour $C_2$ does not contain any of the poles in v of the integrand (for any fixed u). Thus the whole integral is 0.

- A similar result holds when w belongs to $Q_N$, but for a slightly different reason. Let us evaluate first the double integral in Equation (17). The contour $C_2$ for the v variable in Equation (17) contains all the poles of the integrand except the one at $v = u$. So for a fixed u, the integral over v is equal to $-2i\pi$ times the residue at $v = u$, which is equal to $g_{b,w}(u)$. We need to integrate this residue over u along $C_1$.

* If b is “on the left of w” (meaning here that no parameter from $\gamma$ appears as a pole of $g_{b,w}$), there is no pole inside $C_1$ so the double integral is 0. Moreover, the indicator function in front of the single integral is also zero.
* If on the contrary, $w$ is “on the right” of $b$ (there are poles of type $\gamma$, but then none of type $\delta$), So the only poles of $g_{b,w}$ are either some $\alpha_j$ or some $\gamma_j$. The indicator function is equal to 1, so the final formula is $-\frac{1}{2i\pi}$ times an integral surrounding all the parameters from $\alpha$ and all the parameters from $\gamma$ of $g_{b,w}$ but since all the poles are encloses, the total is again equal to 0.

In this case again, $J_{b,w} = 0$ for all $w \in Q_N$.

* We can repeat the same arguments when $w$ is in the Aztec diamond, and $b$ is either in $Q_W$ or $Q_E$, by looking now first at the variable $u$ in the double integral. As a consequence we have the four cyan zero blocks in this infinite inverse.

* We now look at the formula when:

- $w$ is fixed in $Q_N$ (resp. $Q_S$) and $b$ is allowed to exit the Aztec region to be in $Q_W$, $Q_E$ and $Q_S$ (resp. and $Q_N$);

- $b$ is fixed in $Q_W$ (resp. $Q_E$) and $w$ is allowed to exit the Aztec region to be in $Q_N$, $Q_S$ and $Q_E$ (resp. and $Q_W$).

The previous arguments again show that in these situations, the value of $J_{b,w}$ is also 0. This is represented by the orange blocks.

* We then continue computing by taking $b$ in the Aztec region, and $w \in Q_W$: We can compute iteratively the value on every white vertex column by column, which leads at each step a linear equation with a single unknown. We do the same for $w \in Q_E$. This corresponds to the green block. We do the same for $w$ in the Aztec region, and $b \in Q_W \cup Q_N$. This corresponds to the purple region.

* We then discuss the entries when $b$ and $w$ are in the same quadrant. Fix for example $w$ in $Q_N$. We know from computations above that the value of $J_{b,w}$ is 0 if $b$ is just outside of $Q_N$ (but connected to a white vertex $w'$ of $Q_N$). We can then solve iteratively for all the values of $J_{b,w}$ by solving $\sum_b K_{w',b} A_{b,w} = \delta_{w',w}$, as at each step there will be always a white vertex $w'$ such that we know the value of $J_{b,w}$ for two black neighbors of $w'$, but the value of the third value is not computed yet, but is completely determined by the linear equation above. In particular, we obtain that $J_{b,w} = 0$ if $b$ is not in the light cone of $w$, and is equal to $\frac{1}{K_{w,b}}$ if $(w, b)$ is the icy edge attached to $w$. We proceed in the same way for $Q_S$ and, after exchanging the roles of the colors, for $Q_E$ and $Q_W$. This determines the entries of the four diagonal blocks $D_N, D_S, D_W, D_E$.

* Finally, we proceed as before to compute the entries when $b \in Q_N \cup Q_S$ and $w \in Q_W \cup Q_E$, by propagating known values on the boundary to the bulk by the linear equation. The actual entries of that block will not matter for our purposes. $\square$

It turns out that this inverse of the Kasteleyn operator has a probabilistic meaning. More precisely, the determinant of minors of $J$ are related to local statistics of the Boltzmann measure on the Aztec diamond, as follows: