\section{Introduction}\label{intro}

\subsection{Background}
The dimer model is a fundamental model from statistical physics. Its study goes back to the seminal work of Kasteleyn \cite{Kasteleyn} and Temperley--Fisher \cite{TemperleyFisher}
who computed its partition function. A remarkable aspect of the dimer model is its exact solvability, which makes it possible to approach it with tools coming from
many areas
of mathematics (determinantal processes, algebraic combinatorics, discrete complex analysis, etc.); see \cite{BufetovGorin,CohnKenyonPropp,KPWtemperley,KenyonOkounkov2,KenyonOkounkov,KenyonOkounkovSheffield,KenyonGFF,Kenyon_ci}
for a very partial list of recent references and see the excellent lecture notes of Kenyon \cite{KenyonSurvey} and De Tili\`ere \cite{Detiliere} for more complete surveys of the subject.

Let us recall the definition of the dimer model. Let $G$ be a finite planar weighted graph and let $w(e)$ be the weight of an edge $e$ of the graph $G$. A
\textbf{dimer configuration} on $G$ is a perfect matching $\bf m$ of the vertices of $G$ using only edges from the graph. In other words, $\bf m$ is a subset of edges
of $G$ such that every
vertex is incident to exactly one edge in $\bf m$. A finite graph $G$ is \textbf{dimerable} if the set of dimer configurations is nonempty.
We can then consider the following probability
measure:
\begin{equation}\label{Gibbs}
\mathbb{P}({\bf m}) = \frac{\prod_{e \in {\bf m}}  w(e)  }{Z}
\end{equation}
where $Z$ is the partition function.

As suggested by Thurston, a particularly convenient way to encode the dimer model on a planar bipartite graph is through a notion of height function. While we will define it precisely in \cref{sec:ht}, for now it suffices to know that it is a real valued function defined on the faces of the graph, which is uniquely determined by the dimer configuration. In the planar case, this turns the dimer model into a discrete random surface. A central question in the study of the dimer model is to describe the fluctuations around the mean of the height function.

It turns out that the height function of the dimer model is very sensitive to boundary conditions (see \cite{KenyonOkounkovSheffield}). In the so-called \textbf{liquid phase}, the model is believed to fluctuate around its mean like a (variant of) the \textbf{Gaussian free field} (See \cite{GFFShe},\cite{NBnotes} for an introduction to Gaussian free field and \cite{KenyonGFF,dubedat_torsion,marianna,BLR16} for examples of models where this is already shown.)

The goal of this paper is to analyse the behaviour of fluctuations of the height function for graphs embedded on Riemann surfaces with finitely many handles and holes. In this setting, the height function is no longer a function, but is a closed one-form: this means that the gradient is locally well defined, but it is possible to accumulate a nontrivial amount of height as one makes a noncontractible loop across the surface. In fact, using a version of the Hodge decomposition theorem (see \cref{sec:ht}) this one-form can be decomposed into two components:
\begin{itemize}
\item a true function (sometimes called the \textbf{scalar component}); and

\item
    a \textbf{harmonic one-form} (called the \textbf{instanton component}).
\end{itemize}

    The instanton component encodes the global information generated by the topology of the surface. More precisely it encodes how much height is accumulated as one performs a noncontractible loop around the surface, for all possible such loops. {To take this into account, we will simply view the height function as being defined on the universal cover of the surface.}

\subsection{Main result on the torus and annulus}

    In this paper, we focus on \textbf{Temperleyan graphs} (see \cref{sec:Temp}) embedded on Riemann surfaces. We assume that the graph and the Riemann surface satisfy some natural assumptions (see \cref{sec:surface_embedding,sec:setup}). The primary assumption is that simple random walk on the embedded graph (which may be oriented) converges to a Brownian motion on the surface.  We are now ready to state an informal version of one of the main conclusions in this paper, stated here for the torus or the annulus, where our results are most complete.

\begin{thm}\label{thm:main}
Let $M$ be a Riemann surface with the topology of either the torus or the annulus. Let $G^{\# \delta}$ be a sequence of Temperleyan graphs on $M$ satisfying the assumptions in \cref{sec:setup,sec:surface_embedding}. Then the {height function (viewed as a function on the universal cover of $M$) converges in law, and also in the sense of all moments. } The limit does not depend on the choice of the approximating sequence of graphs $G^{\# \delta}$, and is conformally invariant.
\end{thm}
See \cref{sec:ht_convergence} for a more precise formulation. In fact, as we will see below, \cref{thm:main}
is a consequence of results valid in much greater generality which constitute the most important new contribution of this paper. These results form the beginning of a programme concerning the scaling limit of dimers on Riemann surfaces. We have chosen to state \cref{thm:main} here because it is a particularly simple and easy to state result, and, as we now discuss, already solves some earlier conjectures.

In \cite{dubedat_torsion}, Dub\'edat considered the case when the surface $M$ is the flat torus and the graphs $G^{\# \delta}$ were assumed to be isoradial graphs.
Such graphs can easily be seen to satisfy the assumptions in \cref{thm:main}. Under these assumptions, Dub\'edat showed convergence of the dimer height one-form to a limit whose law is given by the \textbf{compactified Gaussian free field} (see \cite{dubedat_torsion}, Section 2.1.3). With an abuse of terminology, we still refer to this limit law as a field, although in reality it is a one-form (understood in the distributional Schwartz sense).

Since \cref{thm:main} shows that the limit law is universal (i.e. does not depend on the approximating graph sequence $G^{\# \delta}$), this immediately implies the following corollary:
\begin{corollary}
In the setup of \cref{thm:main}, the limiting field on the torus is distributed as a compactified Gaussian free field {(lifted to the universal cover of $M$)}.
\end{corollary}

This settles a conjecture of Dub\'edat and Gheissari \cite{DubedatGheissari}, who had obtained the partial result that the instanton component is universal. The law of the instanton marginal had first been derived in the case of the honeycomb lattice on the torus in an inspiring paper by Boutillier et de Tili\`ere \cite{BdT_torus} following nonrigourous physics predictions based on the Coulomb gas formalism (see e.g. \cite{Coulomb_gas} and the references in \cite{BdT_torus}).

\begin{comment}
\subsection{\noteb{Overview of the approach}}\label{sec:sketch}

\noteb{Our method to study the height function of the dimer model comes from our previous work \cite{BLR16} where a similar result was obtained in the simply connected case. Forgetting about some technicalities, the idea in the planar case is to start with a bijection between the dimer model and the uniform spanning tree (UST) in a related graph. Under that bijection, the height function $h(x)$ of a point appears essentially as the winding number of the path $\gamma_x$ in the tree that connects $x$ to the boundary. It is well known that $\gamma_x$ is a loop-erased random walk (LERW) and remarkably it seems easier to understand than $h(x)$ (it particular it's convergence was known in a much more general setting before \cite{BLR16}). The strategy is therefore to use the convergence of the path and to make it's winding converge.

A first difficulty with this approach is that the winding of a path (even a simple path) is not a continuous function of the path because it is hard to keep track of the turns very close to the starting point. This motivates us to introduce a regularisation $\gamma^t_x$ (think of the part of $\gamma_x$ connecting the boundary to $B(x, e^{-t})$) whose winding is a continuous of $\gamma_x$. Most of the work in \cite{BLR16} was then to control that the corresponding regularised $h_t$ is not too far in some sense to the true height function.

Transposing this approach to a Riemann surface settings poses several challenges, some of which come from perhaps unexpected directions (see \cref{sec:organisation} for the way they are organised in the paper).

First one need to generalise the bijection between dimers and some form of UST. There, even if the basic bijection is defined by a simple local relation between individual dimers and edges in the tree or dual tree, it turns out that global constraints appear which introduce a new type of object which we call Temperleyan cycle-rooted spanning forest. In particular, they can only be directly sampled through a version of Wilson's algorithm in genus $1$, which explains why our main result is restricted to the torus and annulus. A related issue is that one also need to generalise and clarify the link between winding and height function so that it holds for the more general bijection.

A second difficulty is that, even for simple cycle rooted spanning forest for which there is always a version of Wilson's algorithm, the convergence of the paths $\gamma_x$ are not known on a surface. It is also unclear how to even define the limit as the definition of a SLE-type curve in non simply connected domain is a challenge by itself.

A third major point is that in the simply connected case, we relied deeply on the fact that the theory of imaginary geometry gives in a sense the limit of the bijection. In particular a significant part of the work there was purely an analysis of SLE curves and Gaussian free field in the continuum. The corresponding theory in the Riemann surface case is completely missing. Surprisingly, we can bypass this issue entirely because our estimate of the distance between the true height function $h$ and it's regularised version $h_t$ turn out to be strong enough by themselves to prove convergence.

Finally let us mention that even though a lot of of the work on the difference between $h_t$ and $h$ can be taken straight from \cite{BLR16}, there are still some a-priori estimates on LERW that need to be adapted because of the modified Wilson's algorithm in the surface setting.
}
\end{comment}

\section{General theory on Riemann surfaces}

Although \cref{thm:main} is stated only for the torus and the annulus, as discussed above this result is in fact the consequence of a sequence of results, most of which are valid on more general surfaces. To introduce these results, we first need to discuss \textbf{Temperley's bijection} (or rather its extension by Kenyon, Propp and Wilson \cite{KPWtemperley}), which we first recall in the simply connected case. Briefly, this is a bijection between, one the one hand: a pair of dual uniform spanning trees on a graph $\Gamma$ and its dual $\Gamma^\dagger$ respectively; and on the other hand, a dimer model on the graph $G$ obtained by superposing $\Gamma$ and its dual $\Gamma^\dagger$, together with intermediary vertices where dual edges intersect primal edges. (To simplify we do not discuss here the boundary conditions of the dimer model and of the trees). This bijection has the further remarkable property that the height function of the dimer model (defined on the faces of $G$), is given by the winding of the branches of (either of the) spanning trees. In \cite{BLR16} we combined this observation together with the theory of \textbf{imaginary geometry} (\cite{dubedat,IG1,IG4}) to show convergence of the dimer height fluctuations towards the Gaussian free field (in fact, the result can be applied to more general dimer models by appealing to the notion of T-graph, see \cite{BLR16} and \cite{BLR16note} for details).

\subsection{Extension of Temperley's bijection to Riemann surfaces.}

Our starting point is an extension of Temperley's bijection to the setting of Riemann surfaces.
Thus we start with a graph embedded on a Riemann surface $M$ with a finite number $g$ of handles and $b$ of holes, together with its dual graph, and consider the superposition graph as above. Compared to the planar setting above, there is an immediate topological difficulty, which is that this graph is not in general dimerable. Indeed, a straightforward application of {Euler's formula} shows that we need to remove $|\chi|$ many edges (where $\chi := 2-2g-b$ is the Euler's characteristic) from the superposition graph for it to become dimerable (see \cref{sec:Temp} for details). These removed edges can be thought of as creating \textbf{punctures} in the surface.
Note that if $M$ is a torus or an annulus then $\chi = 0$ so no punctures are needed, which is one of the main reasons why our results in this paper are more complete in this case.
See also Ciucu--Krattenthaler \cite{ciucu} and Dubed\'{a}t \cite{dubedat_torsion}  for other situations where punctured dimers arise.

Since Temperley's bijection is a locally defined operation, it makes sense to apply it to the dimer configuration on the resulting graph $G$. We will see that the resulting objects are subgraphs of $\Gamma$ and $\Gamma^\dagger$ that are dual to one another and are locally, but not globally, tree-like: cycles are allowed but only if they form loops that are topologically nontrivial. This will lead us to the notion of \textbf{Temperleyan forest}: essentially, this will be an oriented subgraph $\mathcal{T}$ of $\Gamma$ such that each vertex has a unique outgoing edge leading from it, each cycle is noncontractible, and with the added property that each connected component in the dual subgraph $\mathcal{T}^\dagger$ contains exactly one cycle (see \cref{D:temp}). Crucially, this last property makes it possible to orient $\mathcal{T}^\dagger$ in such a way that each dual vertex also has a unique outgoing edge leading out of it. With this notion we can state an informal version of our extension of Temperley's bijection.

\begin{thm}\label{prop:temp_bij_intro}
Applying the local transformation in the planar Temperley bijection of \cite{KPWtemperley}, we obtain a bijection which transforms a dimer configuration on $G$ into a pair $(\mathcal{T},\mathcal{T}^\dagger)$ consisting of a Temperleyan forest and its dual. Consequently, this maps a uniform dimer law specified by \cref{Gibbs} to a uniform law on Temperleyan forests (specified in \eqref{eq:oriented CRSF}).
\end{thm}

\subsection{Convergence of Temperleyan forest implies convergence of dimer height fluctuations.}

In \cref{lem:number_crossing} we show that the bijection of \cref{prop:temp_bij_intro} retains the remarkable feature that height differences are between points in the same component of the Temperleyan forest are given by winding of branches in the Temperleyan forest (or, equivalently, its dual) computed on the universal cover. Moreover, we explain in this same result how to ``jump over components".

This makes it plausible that the techniques developed in \cite{BLR16} could be used in order to study dimer height fluctuations in this general setup. While no theory of imaginary geometry has been developed on Riemann surfaces (indeed, the theory of SLE on Riemann surfaces itself is at best in its infancy), imaginary geometry was only used in \cite{BLR16} to identify the limiting law of the dimer height fluctuations. As a consequence, the unavailability of imaginary geometry does not in fact hamper us, and (perhaps surprisingly) we obtain the following result, stated informally for now, which is one of the main results of this paper:

\begin{thm}\label{thm:main_conditional_intro}
Let $M$ be any Riemann surface with a finite number of holes and handles. Suppose that the Temperleyan forest converges, in the Schramm sense. Then the conclusion of \cref{thm:main} holds: both the scalar and instanton components jointly converge in law, and
also in the sense of all moments. This limiting law depends only on the law of the limiting Temperleyan forest.
\end{thm}

The precise conditions of this theorem are stated in \cref{sec:setup,sec:surface_embedding} for the surface and the graph respectively, and see \cref{assumption_precise} for precise assumptions required on the limiting behaviour of the Temperleyan forests. The precise statement of the theorem can be found in \cref{thm:main_precise}.

\subsection{Reduction to cycle-rooted spanning forest (CRSF) when $\chi = 0$.}

Theorem \ref{thm:main_conditional_intro} above is a conditional result, and in order for it to be useful one needs an understanding of Temperleyan forests in the scaling limit. While the results above say nothing about how to describe Temperleyan forests, we show that they are related to the more familiar notion of wired \textbf{cycle-rooted spanning forest} (CRSF), already discussed in work of Kassel and Kenyon \cite{KK12}. This is just a subgraph of $\Gamma$ which contains every vertex and the only allowed cycles are noncontractible. The reason why wired CRSFs are much more tractable is that they can be sampled through a variation of \textbf{Wilson's algorithm}. We explain this construction briefly here: as in the standard version of Wilson's algorithm to construct a wired uniform spanning tree, we perform loop-erased random walk until we hit the boundary of $M$ (if there is one) or until the walk has made a noncontractible cycle. This cycle (and the loop-erased walk leading to it) then becomes part of the CRSF. We now iterate this procedure, starting again from some other arbitrary starting point.
\begin{figure}
\centering
\includegraphics[scale = 0.2]{1000CRSF_1000branch_white_background1}
\caption{The first 1000 branches of a CRSF on a 1000 by 1000 flat torus sampled using the generalised Wilson's algorithm. The red branch shows the only noncontractible loop.}
\end{figure}

The relation between Temperleyan forests and wired CRSF is the following one. Essentially our definition of a Temperleyan forest coincides with that of a wired CRSF with the extra property that every connected component in its dual must have exactly one cycle (\cref{D:temp}). We show that given a CRSF on the punctured Temperleyan graph, this property can be checked directly on the forest itself. Indeed, consider the paths $\gamma_i$ and $\gamma'_i$ emanating on either side of each puncture ($1\le i \le |\chi|$) -- we call these \textbf{special branches}. Let $c_i$ be the union of these two paths together with a link connecting them through the puncture, and let $\mathfrak{B} = \cup_{i=1}^{|\chi|} c_i$. Then using a recursive decomposition of the surface in the spirit of the \textbf{pants decomposition} of a Riemann surface (\cite{Ratcliffe}), we obtain the following criterion:

\begin{prop}\label{P:TempCRSF_intro}
A wired CRSF $\mathcal{T}$ on $\Gamma$ is Temperleyan if and only if either $M$ is a torus or each connected component of $M\setminus \mathfrak{B}$ has the topology of an annulus.
\end{prop}

See \cref{L:top_condition} for a precise statement. As an example, observe that there is nothing to check if $\chi = 0$, i.e., if $M$ is a torus or annulus: any wired CRSF is automatically Temperleyan. Moreover, recall that in the above extension of Temperley's bijection (\cref{prop:temp_bij_intro}), one must also specify an orientation both for the edges of $\mathcal{T}$ and of $\mathcal{T}^\dagger$. While the wired CRSF $\mathcal{T}$ comes with its own orientation, there is still some freedom for the orientation of its dual $\mathcal{T}^\dagger$: essentially, we need to fix an orientation for each cycle of $\mathcal{T}^\dagger$.

Consequently, the law of a Temperleyan pair $(\mathcal{T}, \mathcal{T}^\dagger)$ differs from that of a wired CRSF sampled from Wilson's algorithm and its dual by a Radon--Nikodym factor of $2^{k^\dagger}$, where $k^\dagger$ is the number of cycles of the dual (free) CRSF (see \cref{lem:RN_dimer_CRSF}). Planar topology arguments (\cref{L:cycle_primal_dual}) then show that $k - k^\dagger$ is constant on a given surface, where $k$ is the number of nontrivial cycles in the wired CRSF rather than its dual.

This gives us a way to handle Temperleyan forests, at least in the case $\chi= 0$, since it suffices to understand a wired CRSF in the scaling limit and have a good control on the number of its noncontractible cycles.

\subsection{Scaling limit of wired CRSF.}
It follows from the discussion above and Theorem \ref{thm:main_conditional_intro} that in order to prove convergence of the dimer height one-form fluctuations in the case $\chi = 0$ of \cref{thm:main}, it suffices to prove the existence of a scaling limit (in the Schramm sense) of the wired CRSF, and to establish an exponential control on the tail of the number of cycles. The first of these problems was partly addressed in work of Kassel and Kenyon \cite{KK12}. We generalise some of their results to cover the range of graphs satisfying the assumptions in \cref{sec:setup,sec:surface_embedding}, and establish the desired exponential tail bounds on the number of cycles of the CRSF.

\begin{thm}\label{thm:CRSF_universal_intro}
Let $M$ be any Riemann surface with an arbitrary number of holes and handles, satisfying the assumptions in \cref{sec:setup}. Let $\Gamma^{\# \delta}$ be a sequence of graphs embedded on $M$ satisfying the assumptions in \cref{sec:surface_embedding}. Then the wired CRSF on $\Gamma^{\# \delta}$ has a scaling limit as $\delta \to 0$ in the Schramm topology. Furthermore, the limit does not depend on the sequence of graphs chosen. Consequently, this law is also conformally invariant. Moreover, if $K$ denotes the number of noncontractible cycles in the CRSF, then the tail of $K$ is superexponential: for any $q>1$, there exists a constant $C_q>0$ independent of $\delta$ such that
$$
\mathbb{E}(q^K) \le C_q < \infty.
$$
\end{thm}

Note that the above result is not restricted to the case $\chi = 0$: however this only (currently) implies convergence of the Temperleyan forests in the case $\chi =0$.

\subsection{Conclusion, perspective and future work}

At this point, combining together all the above mentioned results, we can conclude to the proof of \cref{thm:main} in the case $\chi = 0$: by \cref{thm:CRSF_universal_intro}
we know that the CRSF has a universal, conformally invariant scaling limit, and we have a good control on the number of cycles. Hence Temperleyan forest and wired CRSF are equivalent when $\chi = 0$. Plugging this into the conditional result \cref{thm:main_conditional_intro}, we obtain the desired \cref{thm:main}.

\medskip In order to complete the research program initiated in this article, it therefore remains only to understand the scaling limit of Temperleyan forests in the case when $\chi \neq 0$. We plan to do this in future work.

\medskip We anticipate that we will ultimately be able to prove the analogue of \cref{thm:main} in the general case (i.e., removing the assumption $\chi = 0$ and so working with Riemann surfaces of fairly general topology). Given \cref{thm:main_conditional_intro}, it is clear that what remains to be done is to obtain a scaling limit result for Temperleyan forests on the surface $M$.
Moreover, given \cref{P:TempCRSF_intro}, this in fact boils down to a proof of existence of scaling limit for the special branches.

However, this work will not solve the issue of \emph{identifying} the scaling limit in question, leaving in particular open the question of whether the limit is also given in the general case by the compactified GFF (with appropriate punctures in the surface).

\begin{conj}
The limiting height form is given by the compactified Gaussian Free Field in the appropriately punctured surface.
\end{conj}

 In order to do so it might appear tempting at first to turn back to the approach pioneered by Kenyon and exploit the fact that the partition function can be expressed through appropriate Kasteleyn matrices, as in \cite{dubedat_torsion}.
An exhaustive treatment of the Kasteleyn theory for Riemann surfaces with arbitrary genus $g$ was achieved by Cimasoni in \cite{cimasoni}.   Unfortunately, as this work makes clear, the corresponding analysis becomes necessarily much more involved as the genus increases. This is because the partition function of the dimer model can be expressed as a sum of $2^{2g}$ signed determinants of matrices. (In the case of the torus and the honeycomb lattice, this goes back to the work of Boutillier and de Tili\`ere \cite{BdT_torus}.) The signs themselves convey nontrivial geometric information (the so-called \emph{Arf invariant}). Carrying such an analysis is therefore a daunting task for all but the smallest values of $g$. An alternative approach would be to prove a suitable extension of the characterisation results of \cite{BerestyckiPowellRay} to the setting of Riemann surfaces and compactified GFF. This is promising since conformal invariance \emph{will} follow from the sequence of works beginning with the present paper.

\begin{comment}
The main step of the proof of \cref{thm:CRSF_universal_intro} is an algorithm to sample each branch of the discrete CRSF through a Markov chain which stops at an a.s. finite stopping time and prove that this Markov chain has a scaling limit. The limiting Markov chain can be viewed as a continuum version of Wilson's algorithm to generate the continuum CRSF.

Once we have \cref{thm:CRSF_universal_intro}, an adaptation of the technology developed in \cite{BLR16} provides us with a theorem which says that the winding of an oriented CRSF converges as a distribution in law. However, there is a serious issue if we apply this to prove convergence of height function in a topology which is not the torus or the annulus. The reason is the following. Firstly, it is straightforward to see that to apply Temperleyan bijection, we need to remove $\chi = 2-2g-b$ many white vertices from the Temperleyan graph (see \cref{sec:Temp} for details). Recall that $\chi $ is the Euler characteristic of a topological surface and is a topological invariant. If $\chi <0$, (which is the case as soon as the topology is different from torus and annulus) not all oriented CRSF's correspond to dimer configurations. The simple reason for this is that the dual CRSF must also have a single cycle in every component which is clearly not the case for some oriented CRSF. However, there is still a bijection between the dimer configurations and a subset of all oriented CRSF which turns out to be a measure zero subset in the scaling limit. Roughly, the reason why this subset is measure zero is that the branches near removed vertices behave in a singular manner. We call this subset of oriented CRSF's which correspond to dimer configurations \textbf{Temperleyan oriented CRSF}. For the sake of brevity, we plan to publish the universality of the scaling limit of Temperleyan oriented CRSF in an upcoming paper \cite{BLR17}. The proof of \cref{thm:main} for any $\chi$ is identical given
a scaling limit result of Temperleyan oriented CRSF is known, so we include the proof for the general case in this paper.

We summarise the assumptions on the large scale geometry of Temperleyan CRSF in \cref{assumption_precise}. The major assumption is convergence of the Temperleyan CRSF. We also need a couple of additional conditions, which would basically follow once we establish that the behaviour of the Temperleyan CRSF is the same as the regular one away from the singular points.
\end{comment}

\begin{comment}
\begin{thm}\label{thm:main_conditional}
The statement of \cref{thm:main} holds for any Riemann surface satisfying conditions of \cref{sec:setup,sec:surface_embedding} assuming that \cref{assumption_precise} holds.
\end{thm}
To prove universality of the scaling limit of Temperleyan CRSF, we only need to prove convergence of finitely many branches. After sampling these branches, the manifold is decomposed into annuli where every oriented CRSF is Temperleyan and we are back to the case of \cref{thm:CRSF_universal_intro}. To prove that the joint law of these finitely many branches converge, we note that the conditioning is singular only near the removed edges and outside a neighbourhood of this removed edge, the global conditioning event ceases to be singular and can be handled in a straightforward manner.
\end{comment}

\subsection{Organisation of the paper.}\label{sec:organisation} We now outline the structure of the paper along with highlighting our contributions to the theory of dimers on general surfaces in this article.
\begin{itemize}

\item In \cref{sec:background}, we recall some basic facts about dimers on surfaces. The main difference with the classical case is that the height function now becomes multivalued. In \cref{sec:ht}, we recall the language of height one-forms on graphs which is a classical way to handle such multivalued functions. In \cref{sec:uni_cover}, we recall the notion of universal cover and how height one-forms can be lifted to single-valued functions on the universal cover. This is in practice easier to deal with, and we mainly work with this lift in this article. We also illustrate how an application of the Hodge decomposition theorem allows us to decompose the (multivalued) height function on the surface into a single-valued function (scalar component) and a canonical representative of the ``multivalued part" (the instanton component). In \cref{sec:winding}, we recall the notions of windings of curves which were developed in our previous article \cite{BLR16}.

\item
In \cref{sec:Temp}, we carefully describe the notion of Temperleyan graphs on a Riemann surface with which we work (\cref{SS:tempgraph}).
Section \ref{SS:Tempforest} introduces the notion of Temperleyan forest and contains a statement and proof of our generalisation of Temperley's bijection (\cref{prop:temp_bij}), thereby extending the work of Kenyon, Propp and Wilson \cite{KPWtemperley}. A criterion is given for the more familiar cycle-rooted spanning forest (CRSF) to be Temperleyan in Section \ref{SS:reducCRSF}. A consequence of this discussion is that the Temperleyan graphs introduced in Section \ref{SS:tempgraph} are dimerable (Lemma \ref{L:dimerable}).

\item \cref{sec:universal} is devoted to the proof of the existence and universality of scaling limit of the CRSF, thereby extending the work of Kassel and Kenyon \cite{KK12}. These are introduced in Section \ref{sec:Wilson} and their relation to Temperleyan forests is made explicit. Furthermore, we explain Wilson's algorithm which gives us a way to control the CRSF in terms of loop-erased random walk (LERW). Conceptually the most difficult part of controlling the scaling limit of LERW has to do with the microscopic loops formed by the walk, so the fact that the walk is on a Riemann surfaces should make little difference.  Using Wilson's algorithm we patch up several pieces in which we can pretend the walk lives in a simply connected neighbourhood. For this we take full advantage of a relatively recent chordal version of the convergence of LERW to SLE$_2$ due to Uchiyama \cite{uchiyama}.

\item In \cref{sec:winding_ht}, we carefully develop the relation between
the height differences and the winding of Temperleyan forests; in spite of the curvature of the surface such a connection remains true if one considers a natural embedding of the graph on the universal cover of the surface.
This is in the spirit of the work of Kenyon--Propp--Wilson \cite{KPWtemperley}, who treated the (planar) simply connected case. In that case of course the bijection is with a uniform spanning tree.
Compared to that work there are two additional points that we need to handle. The first one is that the edges of the graph cannot be assumed to be straight lines as in \cite{KPWtemperley}. The second and more significant one is that there are additional terms coming from the fact that the forest is not connected: given points $x$ and $y$ on the universal cover, the height difference $h(x) - h(y)$ (which is unambiguously defined) is essentially given by the intrinsic winding of any path connecting $x$ to $y$, \emph{plus} additional discontinuities every time the path jumps between components. The resulting key formula is stated in \cref{lem:number_crossing} (see also \cref{lem:winding_arbitrary_path}).

\item
In \cref{sec:local_coupling_grand},
we extend our local and global coupling results from \cite{BLR16} to the framework of Riemann surfaces. This coupling is a key ingredient of our approach, which allows us to show that given a finite number of points $(z_i)_{1\le i \le k}$ on the surface (or, rather, their lifts to the universal cover), the respective geometries of the CRSF in a neighbourhood of these $k$ points decouple and are independent. Clearly, such an independence can only be expected to hold at distances smaller than the distances between the $z_i$'s, but if the points are macroscopically far apart this still leaves a lot of room. The strength of this coupling is that it holds at an essentially optimal scale. More precisely, the independence property holds in neighbourhoods whose size is random and comparable to the distance between the $z_i$'s, with an exponential control on the number of additional finer scales required for the independence to hold.

The argument in \cite{BLR16} was based on relatively soft estimates about LERW, and it is not difficult to adapt them to this setting. There is one additional technicality however, which can be summarised as follows. A basic estimate needed for the argument is a polynomial control on the probability that a LERW starting from $u$ comes close to a given point $v$ (Proposition 4.11 in \cite{BLR16}). In \cite{BLR16} we could exploit the fact that if the random walk starting from $u$ comes within $e^{-n}$ of $v$ then it has a positive probability to make a loop at all scales $e^{ - n +1}, \ldots, 1$ subsequently, which erases the portion of the walk coming close to $v$ in the loop-erasure. However here the walk may not reach these scales, since it might be possible for it to complete a (noncontractible) loop in the meantime, thereby stopping the process. The argument needed to overcome this technical difficulty is given in \cref{lem:coming_close}.

\item In \cref{sec:ht_convergence}, we finish by proving our main convergence result \cref{thm:main_conditional_intro}. The precise assumptions are listed in \cref{assumption_precise}, and a precise statement of \cref{thm:main_conditional_intro} is given in \cref{thm:main_precise}. \cref{sec:apriori,sec:full_spine} contain some a priori technical estimates on winding of the CRSF branches on the universal cover.

    Finally in \cref{sec:winding_convergence}, we finish the proof of \cref{thm:main_precise}. This proof shares similarities with the argument in
    \cite{BLR16}, but with the difference that we cannot rely on imaginary geometry to identify the limit.

\item Finally, \cref{app:spine} contains some geometric facts about \emph{spines} in the CRSF (that is, the lift to the universal cover of a cycle of the CRSF). It is shown that such spines, in the hyperbolic case, form simple chords in the unit disc (simple paths joining two boundary points) or a loop touching the boundary at a single point. This basic fact underlies much of the discussion connecting winding to height differences. This is then also used to prove \cref{lem:spine:boundary} which is needed when discussing the relation between height and winding in the CRSF. The proof relies on some arguments from the classical theory of Riemann surfaces.

\end{itemize}

\paragraph{Acknowledgement.} We thank David Cimasoni, Julien Dub\'edat and B\'eatrice de Tili\`ere for stimulating conversations on this topic. The last author is also indebted to Antoine Dahlqvist for some useful conversations.

\section{Background}\label{sec:background}

\subsection{Riemann surfaces and embedding}\label{sec:surface_embedding}
In this article, we work with a 2-dimensional orientable connected Riemann surface $M$ equipped with a Riemannian metric $d_M$ satisfying the following properties.
\begin{itemize}
\item $M$ is of finite topological type, meaning that
  the fundamental group $\pi_1(M)$ is finitely generated. In other
  words, we assume that the surface has finitely many ``handles'' and
  ``holes''.
\item  $M$ can be compactified by
  specifying a \textbf{boundary} $\partial M$. We denote by $\overline
  M$  the compactified Riemann surface with the boundary. More
  precisely, every point is either in the interior and hence has a
  local chart homeomorphic to $\mathbb{C}$ or is on the boundary and has a
  local chart homeomorphic to the closed upper half plane $\bar \mathbb{H}$. Also there are finitely many such charts which cover the boundary. Note that this condition implies that $M$ has no punctures. (However for future reference, we note here that we will later introduce punctures on $M$ which will align with the removed vertices of Temperleyan graphs. The resulting punctured manifold will be denoted by $M'$.)

  \item The metric in $M$ extends continuously to $\partial M$. In other words, recall that the metric inside $M$ can be represented locally in isothermal coordinates as $e^{\rho}|dz|^2$ for a smooth function $\rho$ and we assume that $\rho$ extends continuously to $\partial M$.

  \end{itemize}
We say $M$ is \textbf{nice} if $M $ satisfies the above properties. Note that continuous extension of the metric to the boundary means we exclude surfaces such as the hyperbolic plane, and will technically simplify certain topological issues later when we deal with the Schramm topology.

\paragraph{Classification of surfaces}

Riemann surfaces can be classified into the following classes depending on their conformal type (see e.g. \cite{donaldson2011riemann} for an account of the classical theory):

\begin{itemize}

\item Elliptic: this class consists only of the Riemann sphere, i.e., $M \equiv \hat{  \mathbb{C}}$

\item Parabolic: this class includes the torus, i.e., $ M \equiv \mathbb T =  \mathbb{C} / (\mathbb{Z} + \tau \mathbb{Z})$ where $\Im(\tau >0)$), the cylinder $M \equiv \mathbb{C} \setminus \{0\}$, and the complex plane itself (or the Riemann sphere minus a point), $M \equiv \mathbb{C}$.

\item Hyperbolic: this class contains everything else. This includes examples such as the two-torus, the annulus, as well as proper simply connected domains in the complex plane, etc.
\end{itemize}
The proofs in this paper (and its future sequel) will mostly be concerned with the hyperbolic case (subject to the above conditions) as well as the case of the torus. These are representative of the main difficulties that arise. We also remark that, in the case of simply connected domains in $\mathbb{C}$, this result is a  special case of our previous work \cite{BLR16}.

\subsection{Universal cover}

\label{SS:universalcover}

The universal cover $\tilde M$ of the Riemann surface $M$ will play an important role in our analysis. In the cases that we will analyse, due to the above classification, the universal cover can be classified as follows:
\begin{itemize}
\item $\tilde M \equiv \mathbb{C}$ in the parabolic case of the torus;

\item  $\tilde M \equiv \mathbb{D}$ (the unit disc) in all remaining non-simply connected hyperbolic cases.
\end{itemize}

 From now on we assume, unless otherwise explicitly stated, that we are only dealing with these cases. We also recall here the classical \textbf{Riemann uniformisation theorem}: $M$ is conformally equivalent to $\tilde M / F$ where $F$ is a discrete subgroup of the M\"obius group. In case of the torus, this discrete subgroup is isomorphic to $\mathbb{Z}^2$ and the generators specify translations in the two directions of the torus. In the hyperbolic case, this class of subgroups is much bigger and are known as Fuchsian groups (see e.g. \cite{donaldson2011riemann} and \cref{app:spine}).

Let $p: \tilde M \to M$ be the covering map associated with the Riemann uniformisation theorem. That is, in the hyperbolic case, we write $M = \mathbb{D}/F$ and $p:\mathbb{D} \to M$ is the canonical projection which is then conformal. In the case of the torus, $p: \mathbb{C} \to M$ is the standard projection from the plane onto the torus and is also conformal.
 We recall here that the covering map acts discretely, in the sense that for every $z \in M$, there exists a neighbourhood $N$ containing $z$ so that $p$ is injective in every component of $p^{-1}(N)$.

We will require the graphs we are working with to be embedded on $M$ in a way that preserve its topology and geometry. Essentially the topological conditions will be that edges cannot not cross, all interior faces must be homeomorphic to discs and the boundary of the manifold must correspond to simple loops on the graph. However we defer a precise discussion of the details to \cref{SS:tempgraph,sec:setup} as they also depend on the details of the generalised Temperley bijection.

\subsection{Height function and forms}\label{sec:ht}
  A \textbf{flow} $\omega$ is an antisymmetric function on the oriented edges $\vec{E}$ of $G$, i.e., for every oriented edge $(u,v)$, $\omega(u,v) = -\omega (v,u)$.  The total flow out of a vertex $v$ is defined to be $\sum_{w \sim v} \omega(v,w)$. Similarly, the total flow into a vertex $v$ is defined to be $\sum_{w \sim v}  \omega (w,v)$. A flow $f$ is a \textbf{closed 1-form} if the sum over any oriented contractible cycle is 0: i.e.,
for any oriented cycle $(v_0,v_1,\ldots, v_n=v_0)$ in $G$ so that the embedding of $\cup_{i=0}^{n-1}(v_i,v_{i+1})$ in $M$ forms a contractible loop,
$$
\sum_{i=0}^{n-1} \omega(v_i,v_{i+1}) =0.
$$
It is clear that if $M$ is simply connected, then a closed 1-form also defines a function on the vertices of $G$ up to a global constant.

Suppose $G$ is bipartite. We now associate to any dimer configuration $\bf m$ on $G$ a closed 1-form on $\vec{E}$. Let $\bf m$ be a dimer configuration on $G$, and let $\vec e = (w,b)$ be an oriented edge, where $w$ is a white vertex and $b$ a black vertex.
We define the flow $ \omega_{\bf m}$ by setting $\omega_{\bf m} (\vec e) =1_{\{ e \in \bf m\} }$. Also, $\omega_{\bf m}$ is defined in an antisymmetric way: $\omega_{\bf m}( (b,w)) = - \omega_{\bf m} ((w,b))$.
Note that the total flow out of a white vertex is 1 and that out of a black vertex is -1.

To any flow $\omega$ on oriented edges, one can associated a dual flow $\omega^\dagger$ defined on the oriented edges of the dual graph $G^\dagger$, where if $e^\dagger$ crosses the edge $e = (w,b)$ with $w$ on its right and $b$ on its left, then we set $\omega^\dagger (e^\dagger) = \omega(e)$.  Note also that if $\omega$ is divergence free (i.e., the flow out of every vertex is $0$), then $\omega^\dagger$ is a closed 1-form on $\vec{E^\dagger}$.

Consider any \textbf{reference flow} $\omega_0$ which
has total flow out of white vertex equal to $1$ and total flow out of a black vertex equal to $-1$. Then
$\omega = \omega_{\bf m} - \omega_0$ defines a divergence free flow on $\vec{E}$.
We call $\omega^\dagger$ the \textbf{height 1-form} corresponding to $\bf m$ with reference flow $\omega_0$.

When $G$ is embedded on $M$ in such a way that no cycle in $G^\dagger$ is non-contractible, every closed 1-form $\omega$ on $\vec{E^\dagger}$ becomes exact: i.e., there exists a function on the faces $F(G)$ of $G$,
$h: F(G) \mapsto \mathbb{R}$, so that for any two adjacent faces $f,f'$,
$$h(f' ) - h(f) = \omega(f,f').$$ Observe further that this function is defined only up to a global constant. The function $h$ is then called the \textbf{height function} of the dimer $\bf m$, admitting an abuse of terminology.

We recall the following simple but useful observation.
A \textbf{path} in $G$ (or $G^\dagger$) is a sequence of vertices $(v_0,\ldots, v_n)$ (or faces $(f_0,\ldots, f_n)$) of $G$ so that $v_i$ is adjacent to $v_{i+1}$ (or $f_i$ is adjacent to $f_{i+1}$ in $G^\dagger$) for all $0 \le i \le n-1$.
\begin{lemma}[Unique path lifting property]
Let $\gamma = (f_0,f_1,\ldots, f_n)$ be a path (not necessarily simple) in $G^\dagger$. Let $\tilde f_0$ be a lift (i.e. one pre-image) of $f_0$ to $\tilde M$. Then there exists a unique path $\tilde \gamma = (\tilde f_0,\tilde f_1,\ldots, \tilde f_n)$ in $\tilde M$ so that $\tilde f_i$ is the lift of $f_i$. Further, $\sum_{i=0}^{n-1} \omega(\tilde f_i, \tilde f_{i+1}) = h(\tilde f_n ) - h(\tilde f_0)$.
\end{lemma}

\medskip We now turn to the definition of height function in the more complicated case when $M$ is no longer assumed to be simply connected. In that case, when we sum the values of the height 1-form (defined above)
 along any noncontractible cycle, we may get a nonzero value. One can use the \textbf{Hodge decomposition theorem}, to isolate out the part of the height 1-form which is encoded by the topology of the underlying surface. The Hodge decomposition theorem works in great generality, but in the present context, it takes the following simple form. For any function $f$ on the vertices of $G$ we define $df$ to be the closed 1-form defined on $\vec{E}$ as
$$
df(u,v) = f(v)-f(u).
$$
A  \textbf{harmonic 1-form} $\mathfrak{h}$ is a closed 1-form which is divergence free, so that $\sum_{v\sim u} \mathfrak{h}(u,v) =0$.
\begin{thm}[Hodge decomposition \cite{aru2015,bott}]\label{thm:hodge}
For any closed 1-form $\omega$ on $G$ (or $G^\dagger$),  there exist a function $f$ on the vertices of $G$ and a harmonic 1-form $\mathfrak{h}$ defined on $\vec{E}$ such that
$$
\omega = df +\mathfrak{h}
$$
Furthermore, $f$ is unique up to an additive global constant, and $\mathfrak{h}$ is unique. Furthermore, $\mathfrak{h}$ is completely determined by summing $\omega$ over a finite set of oriented non-contractible cycles which forms the basis of the first homology group of $M$.
\end{thm}

In this paper, we will be deriving the joint scaling limit of $(f,\mathfrak{h})$ corresponding to the divergence free flow $\omega_{\bf m} - \omega_0$, where $\bf m$ is dimer configuration chosen from the law \eqref{Gibbs} subject to certain natural conditions and $\omega_0$ is a carefully chosen reference flow (see \cref{sec:ht_convergence} for a precise statement). We will call $\mathfrak{h}$ the \textbf{instanton component}. We remark that changing the reference flow changes the instanton component by a deterministic additive factor, and in particular does not affect the fluctuations of $(f, \mathfrak{h})$ around their mean.

\subsection{Height function on the universal cover}\label{sec:uni_cover}

Throughout the paper, rather than working with the scalar and instanton components of the height 1-form, it will be more convenient to lift the height 1-form $\omega$ to the universal cover of $M$. Since the latter is always simply connected, this allows us to work with actual functions without having to worry about the Hodge decomposition \cref{thm:hodge}. We will then check that the convergence of height function on the universal cover implies convergence of each of the components in the Hodge decomposition.

Our assumptions on the graph $G$ where the dimer model lives will be such that
$\tilde G = p^{-1}(G)$ is a planar graph embedded on $\tilde M$.
Moreover, the height 1-form $\omega$ on the dual edges of $G$ lifts to a height 1-form $\tilde \omega$ on the dual edges of $\tilde G$. Since $\tilde M$ is simply connected, and since $\tilde \omega$ is a closed one-form on the dual edges of $\tilde G$ (this is a local property, so remains true when we lift to $\tilde G$), we can define a height function $h = h(\boldsymbol{m}, G)$ (up to a global constant) on the dual graph $\tilde G^\dagger$.
The instanton component $\mathfrak{h}$ can be related to the height function $h$ on the universal cover by summing up the value of $\tilde \omega$ along any path in the dual graph of $\tilde G$ corresponding to a noncontractible loop in the dual edges of $G$. This is easier to explain on an example.

\begin{example}
If $M $ is the flat torus $\mathbb T := \mathbb{C} / (\mathbb{Z} + \tau \mathbb{Z})$ for some complex number $\tau $ with $\Im (\tau) >0$, then the universal cover is the complex plane $\mathbb{C}$. The universal cover can be thought of as many copies of the fundamental domain (a parallelogram determined by $1$ and $\tau$).

Fix $v_0$ in the fundamental domain. Then by periodicity of $dh$, the height function $h$ on $\tilde G$ evaluated at a point $v = v_0 + m +\tau n$ (where $m,n \in \mathbb{Z}$) is given by
$$
h(v) = h(v_0  + m+in) = h(v_0)+\mathsf{a} m+\mathsf{b} n,
$$
for some $\mathsf{a}, \mathsf{b} \in \mathbb{R}$ which do not depend on either $v_0, m,n$. Let us describe what $\mathsf a, \mathsf b$ are. Consider
the two loops on the torus described by $L_1 := (t+1/2\tau: t \in [0,1])$ and $L_2:= (1/2 + t\tau: t \in
[0,1])$ in the fundamental domain (i.e., $L_1$ and $L_2$ are the two noncontractible loops in
 the torus which form the basis of the homology group). Then $\mathsf a$ is the sum of the values of $\omega $ along any loop in $\vec{E^\dagger}$ which is homotopic to $L_1$, whereas $\mathsf b$ is the sum of the values of $\omega$ along any loop which is homotopic to $L_2$. Clearly, the choice of
these curves in $G^\dagger$ do not matter since the height 1-form is closed. Furthermore, in the Hodge decomposition of \cref{thm:hodge}, the harmonic 1-form $\mathfrak{h}$ is uniquely determined by the numbers $\mathsf a$ and $\mathsf b$.
\end{example}

\subsection{Intrinsic and topological winding}\label{sec:winding}

The goal of this section is to recall several notions of windings of
 curves drawn in the plane, which we use in this paper. We refer to \cite{BLR16} for a more detailed exposition. A self-avoiding (or simple) curve
 in $\mathbb{C}$ is an injective continuous map $\gamma:[0,T] \mapsto \mathbb{C}$ for some $T \in
[0,\infty]$.

\medskip The \textbf{topological winding} of such a curve $\gamma$ around a point $p \notin \gamma[0,T]$ is defined as follows. We first
write
\begin{equation}
 \gamma(t)  - p = r(t)e^{i \theta(t)}
\end{equation}
where the function $\theta(t): [0,\infty) \mapsto \mathbb{R}$ is taken to
be continuous, which means that it is unique modulo a global additive constant multiple of $2\pi$. We define the
winding for an interval of time $[s,t]$, denoted
$W(\gamma[s,t],p)$, to be
$$
W(\gamma[s,t],p) = \theta(t) - \theta(s)
$$ (note that this is uniquely defined).
Notice that if the curve has a derivative at an endpoint of $\gamma$, we can take $p$ to
be this endpoint by
defining
$$W(\gamma[0,t],\gamma(0)) := \theta(t)- \lim_{s \to 0} \theta(s)$$
and
similarly
$$W(\gamma[s,T],\gamma(T)) := \lim_{t
\to T} \theta(t)-\theta(s).
$$

With this definition, winding
is
additive: for any $0 \le s \le t \le T$
\begin{equation}
 W(\gamma[0,t],p) = W(\gamma[0,s],p) + W(\gamma[s,t],p).
\end{equation}

The notion of \textbf{intrinsic winding} we describe
now, also discussed in \cite{BLR16}, is perhaps a more natural definition of windings of curves. This notion is
the continuous analogue of the discrete winding of non backtracking paths in $\mathbb{Z}^2$
which can be defined just by the number of anticlockwise turns minus the number
of clockwise turns. Notice that we do not need to specify a reference point with
respect to which we calculate the winding, hence our name ``intrinsic" for this
notion.

We call  a curve smooth if the map $\gamma$ is smooth (continuously
differentiable).
Suppose $\gamma$ is smooth and for all $ t, \,\gamma'(t) \neq 0$. We write
$\gamma'(t) = r_\i(t)e^{i \theta_\i(t)}$ where again
$\theta_\i (t): [0,\infty) \mapsto \mathbb{R}$ is taken to be continuous. Then
define the intrinsic winding in the interval $[s,t]$ to be
\begin{equation}\label{E:windingsmooth}
W_{\i}(\gamma,[s,t]) :
= \theta_\i(t)- \theta_\i(s).
\end{equation}
The total intrinsic winding is again defined to be
$\lim_{t \to T} W_{\i}(\gamma,[0,t])$ provided this limit exists. Note that this
definition does not depend on the parametrisation of $\gamma$ (except for the assumption of
non-zero derivative). The following topological lemma
from \cite{BLR16} connects the intrinsic and topological windings for smooth curves.

\begin{lemma}[Lemma 2.1 in \cite{BLR16}]\label{lem:int_to_top}
 Let $\gamma[0,1]$ be a smooth curve in $\mathbb{C}$ then,
$$
 W_{\i}(\gamma[0,1]) = W(\gamma[0,1],\gamma(1)) + W(\gamma[0,1],\gamma(0))
$$
\end{lemma}
We also recall the following deformation lemma from \cite{BLR16} (see Remark 2.5).
\begin{lemma}\label{lem:winding_change_conformal}
Let $D$ be a domain and $\gamma \subset \bar D$ a simple smooth curve (or piecewise smooth with smooth endpoints). Let $\psi$ be a conformal map on $D$ and let $\arg_{\psi'(D)}$ be any realisation of argument on $\psi'(D)$. Then
\begin{equation*}
W_{\i}( \psi( \gamma ) )-  W_{\i}(\gamma) = \arg_{\psi'(D)}(\psi'(\gamma(1) ) ) - \arg_{\psi'(D)}( \psi'(\gamma(0) ) )
\end{equation*}
\end{lemma}

\section{ Temperley's bijection on Riemann surfaces}\label{sec:Temp}

\subsection{Notion of Temperleyan graphs}
\label{SS:tempgraph}
\begin{figure}
\centering
\includegraphics[width  = \textwidth ]{temp_example}
\caption{An illustration of the various graphs needed to construct a Temperleyan graph. Here $M$ has one handle and one boundary. The graph $\Gamma$ is shown in red and its dual $\Gamma^\dagger$ in black.}\label{fig:tem_example}
\end{figure}

Let $\Gamma$ be a graph which is properly embedded on a nice Riemann surface $M$. Recall we assume that $M$ is not the sphere or the full plane $\mathbb{C}$. Let $\Gamma^\dagger$ be its dual. A face of $\Gamma$ (resp. $\Gamma^\dagger$) is a connected component in $M$ of the complement of the embedded graph $\Gamma$ (resp. $\Gamma^\dagger$).  We assume that $\Gamma^\dagger$ is embedded on $M$ so that every vertex of $\Gamma^\dagger$ is in a face of $\Gamma$ and every edge $e$ of $\Gamma$ is crossed by a single edge $e^\dagger$ of $\Gamma^\dagger$ which joins the two faces incident to $e$. (Later, when we consider a random walk on $\Gamma$ we will allow the jump probabilities to be non-uniform and non-reversible, but for now $\Gamma$ and $\Gamma^\dagger$ are both unweighted, undirected graphs).

We assume that $\Gamma$ and $\Gamma^\dagger$ are \textbf{faithful} to the topology of the surface in the following sense. We require all faces of $\Gamma$ and $\Gamma^\dagger$ whose boundary does not intersect $\partial M$ to be homeomorphic to a disc.

We also require all faces of $\Gamma^\dagger$ whose boundary intersects $\partial M$ (we call those faces \textbf{outer faces}) to be homeomorphic to an annulus. In other words, we have a vertex of $\Gamma$ corresponding to each hole (let $\partial \Gamma$ denote the set of such vertices), and each hole is surrounded by a cycle in $\Gamma^\dagger$ which we call \textbf{boundary cycle} and which we denote by $\partial \Gamma^\dagger$.

 We introduce a new set of vertices $W$ at each point where some edge $e$ and dual edge $e^\dagger$ intersect. Define the graph $\hat G$ whose vertices are $ V = V(\Gamma) \cup V(\Gamma^\dagger) \cup W$ and the edges given by joining every vertex in $W$  which is on the edge $e$ with the endpoints of $e$ and $e^\dagger$ (in other words, each pair of edges $e$ and $e^\dagger$ corresponds to four edges in $\hat G$). We call $\hat G$ the \textbf{superposition graph}. Then define $G$ to be the graph where we remove from $\hat G$ the boundary vertices $\partial \Gamma$ and its corresponding half edges. See \cref{fig:tem_example} for an illustration. Clearly, $G$ is a bipartite graph where we take  $W$ to be the set of white vertices and the rest to be black. Also every non-outer face of $G$ is bounded by $4$ edges (i.e. every non-outer face is a quadrangle).

 \begin{remark}To explain the asymmetry between $\Gamma$ and $\Gamma^\dagger$, we point out that $\Gamma$ can be thought of as a graph that is wired at the boundary of $\partial M$ whereas $\Gamma^\dagger$ has free boundary conditions. In $\hat G$ the extra wired vertices are present and these are removed in $G$.
 \end{remark}

The graph $G$ obtained above is not necessarily dimerable. Indeed let $g$ be the genus of $M$ and suppose it has $b$ many boundary components. Such a surface has \textbf{Euler characteristic} $\chi = 2-2g-b$. Hence since $\Gamma$ and $\Gamma^\dagger$ are faithful to $M$, if  $F(\Gamma^\dagger)$ denotes the number of non-outer faces of $\Gamma^\dagger$, by Euler's formula:
\begin{equation}
V(\Gamma^\dagger) - E(\Gamma^\dagger)+F(\Gamma^\dagger) = 2-2g-b.\label{eq:Euler}
\end{equation}
If $G$ is dimerable, each dimer edge will connect one black vertex to a white vertex, and so there must be equal number of black and white vertices. Note that the number of white vertices is equal to the number of edges of $\Gamma$ (or equivalently $E(\Gamma^\dagger)$), while the number of black vertices is equal to the number of primal and dual vertices, which can be written in terms of $\Gamma^\dagger$ as $V(\Gamma^\dagger) + F(\Gamma^\dagger)$.
Hence if $G$ is dimerable we must have $V(\Gamma^\dagger) + F(\Gamma^\dagger) = E(\Gamma^\dagger)$.
This implies $2g+b =2$ is a necessary condition for the graph $G$ to be dimerable. (As we will see later on in \cref{L:dimerable}, this condition is in fact also sufficient.)

In the case of a simply connected domain ($g = 0, b = 1$), one needs to further remove one black vertex from $G$, and this corresponds to the construction outlined in \cite{KPWtemperley}.

From now on, and throughout the rest of this paper, we may thus assume $2g+b \ge 2$, or $\chi \le 0$. In this case, the above Euler characteristic calculation suggests that to obtain a dimerable graph, we choose $2g+b-2$ white vertices from $G$ which we call \textbf{punctures} and remove them from $G$ along with the four half-edges adjacent to each such vertex. We also ensure that no two such removed white vertices are adjacent (in later applications, the removed white vertices will be macroscopically far away as the mesh size of the graph becomes smaller). Removing such a puncture produces an octagon in $G$ consisting of four white vertices, two black vertices from $\Gamma$ and two black vertices from $\Gamma^\dagger$ (see \cref{edge_removal}). Call these new graphs respectively $G',\Gamma',(\Gamma^\dagger)'$. The graph $G'$ resulting from this sequence of operations is what we call a \textbf{Temperleyan graph} on $M$.
Note that in the case of a torus or an annulus, $2g+b =2$, thus $G'=G$. We denote by $F(G)$ the number of non-outer faces of $G$, i.e., the faces of $G$ which are homeomorphic to open discs. Call the vertices in $\Gamma^\dagger$ corresponding to the outer face of $G$ the \textbf{boundary vertices} of $\Gamma^\dagger$.
\begin{figure}[h]
\centering
\includegraphics[scale = 0.5]{edge_removal}
\caption{Removing a white vertex (puncture) to create the dimer graph $G'$.}
\label{edge_removal}
\end{figure}

We now claim that removing the white vertices as above indeed produces a dimerable graph.
 \begin{lemma}\label{L:dimerable}
The graph $G'$ obtained above is dimerable.
\end{lemma}

The proof of \cref{L:dimerable} will depend on our extension of Temperley's bijection to this setup and in particular the introduction of the notion of Temperleyan forest. This is what we now do, and we defer the proof of \cref{L:dimerable} until later.

\subsection{Notion of Temperleyan cycle rooted spanning forest; bijection}
\label{SS:Tempforest}

Let $\Gamma$ be a graph embedded on a surface with a certain specified set of boundary vertices.
\begin{defn}\label{def:CRSF}
A \textbf{wired oriented cycle rooted spanning forest} (which we abbreviate: wired oriented CRSF) of $\Gamma$ with the specified boundary is an oriented subgraph $\mathcal{T}$ of $\Gamma$ where
\begin{itemize}
\item Every non-boundary vertex of $\Gamma$ has exactly one outgoing edge in $\mathcal{T}$. Every boundary vertex has no outgoing edge. (As a result, any cycle of $\mathcal{T}$ must have a unique orientation).

\item Every cycle of $\mathcal{T}$ is noncontractible.

\end{itemize}
\end{defn}

This is equivalent to the notion of essential CRSF on a graph with wired boundary introduced by Kassel and Kenyon \cite{KK12}.
Ignoring the orientation of $\mathcal{T}$ gives an unoriented graph, its connected components will simply be called the \textbf{connected components} of $\mathcal{T}$ without any additional precision. Note that if $\mathcal{T}$ is a wired oriented CRSF, every connected component of $\mathcal{T}$ contains at most one cycle: more precisely, every boundary component must have zero cycles, while every non-boundary component contains exactly one cycle.

We will refer to the set of all noncontractible cycles of a wired oriented CRSF to mean the set of unique cycles corresponding to each (non-boundary) component of the wired oriented CRSF.

\medskip

Let us come back to the setup of \cref{SS:tempgraph}. For every wired oriented CRSF $\mathcal{T}$ of $\Gamma'$ with boundary $\partial \Gamma$, one obtains a natural dual \textbf{free cycle rooted spanning forest} $\mathcal{T}^\dagger$ (abbreviated free oriented CRSF) of $(\Gamma')^\dagger$ as follows. The  vertices of $\mathcal{T}^\dagger$ are given by the vertices of $(\Gamma')^\dagger$ (i.e., it spans $(\Gamma')^\dagger$) and an edge $e^\dagger$ is present in $\mathcal{T}^\dagger$ if and only if its dual $e$ is absent in $\mathcal{T}$. Note \emph{a priori} that $\mathcal{T}^\dagger$ does not come with an orientation. This is highly problematic from the point of view of Temperley's bijection (recall that in the classical simply connected case, the dimer configuration is obtained from the pair of dual oriented spanning trees by placing a dimer on the ``first half" of each oriented edge in both trees). The following definition is crucial for the rest of the paper and allows us to extend the theory to the setting of Riemann surfaces.

\begin{defn}\label{D:temp}
We say that the wired oriented CRSF $\mathcal{T}$ is \textbf{Temperleyan} if each connected component of $\mathcal{T}^\dagger$ contains exactly one cycle
\end{defn}
An example of a wired oriented CRSF $\mathcal{T}$ that is not Temperleyan is provided in Figure \ref{F:temperleyan}.

\begin{figure}
\begin{center}
\includegraphics{nonTCRSF.pdf}
\caption{A non-Temperleyan CRSF. The surface $M$ is the ``pair of pants": a domain of the plane with two holes (in grey in the picture). In this example, $\mathcal{T}$ does not contain any cycle, and hence any connected component flows to the boundary of $M$. Its dual $\mathcal{T}^\dagger$ must contain a component with two cycles which overlap: the cycles go around each of the two holes, and must touch each other, as otherwise there would have to be a path in $\mathcal{T}$ separating them, but this is impossible as such as path would have to connect two distinct boundary points. So $\mathcal{T}$ is \emph{not} Temperleyan. Note that $ 2g + b  = 3 >2 $ here. See Lemma \ref{lem:annulus} for a more general argument.}
\label{F:temperleyan}
\end{center}
\end{figure}

If $\mathcal{T}$ is a Temperleyan wired oriented CRSF and $\mathcal{T}^\dagger$ is its dual, we can assign an orientation to each cycle in each component of $\mathcal{T}^\dagger$ arbitrarily from one of the two possible choices. Then we orient all other edges of $\mathcal{T}^\dagger$ towards the cycle of that component. We let $\mathsf{TempCRSF}$ be the set of pairs $(t, t^\dagger)$ where $t$ is a Temperleyan wired oriented CRSF, $t^\dagger$ is its dual (hence a free CRSF) for which an orientation of its cycles has been specified, which allows us to view $t^\dagger$ also as a free, \emph{oriented}, CRSF such that each vertex has a single outgoing edge attached to it. Note that if $(t, t^\dagger) \in \mathsf{TempCRSF}$ then we call $t$ a Temperleyan CRSF and $(t, t^\dagger)$ a Temperleyan pair. We hope this terminology will not be too confusing: $t$ is the object we will mostly work with, and $t$ determines $t^\dagger$ uniquely up to the orientation of its cycles.

\medskip We now state the Temperleyan bijection for general surfaces. First, we assign \emph{oriented} weights $w_e$ to each edge $e$ in $\Gamma'$. However on the dual graph $(\Gamma^\dagger)'$, we will set $w_e =1$ for every edge in $e$. It is easy to see that this turns $G'$ into a weighted \emph{un}oriented graph. Indeed, if $e = (x,y)$ is an oriented edge of $\Gamma'$, let $w$ denote the white vertex in the middle of $e$. Then we assign to the unoriented edge $\{x,w\}$ of $G'$ the weight $w_{(x,y)}$ and to the edge $\{w,y\}$ of $G'$ the weight $w_{(y,x)}$.

 For every Temperleyan pair $(t,t^\dagger) \in \mathsf{TempCRSF}$, we define the measure
\begin{equation}
\Ptemp((\mathcal{T},\mathcal{T}^\dagger) = (t,t^\dagger)) = \frac{1}{\Ztemp} 1_{\{(t, t^\dagger) \in \mathsf{TempCRSF} \}}\prod_{e \in t} w(e),\label{eq:oriented CRSF}
\end{equation}
where $\Ztemp$ is the partition function.

\begin{thm}[Temperleyan bijection on general surfaces]\label{prop:temp_bij}
Let $M,\Gamma',(\Gamma^\dagger)',G'$ be as above. Then there exists a bijection $\psi$ between $\mathsf{TempCRSF}$ and the set of dimer configurations on $G'$. Furthermore if $(\mathcal{T}, \mathcal{T}^\dagger)$ has the law \eqref{eq:oriented CRSF} then $\textbf{m} = \psi((\mathcal{T}, \mathcal{T}^\dagger))$ has law \eqref{Gibbs} with unoriented weights on $G'$ described above.
\end{thm}

\begin{figure}
\begin{center}
  \includegraphics[scale=.5]{bijection_3_dimer} \hspace{.5cm}
    \includegraphics[scale=.5]{bijection_5_UST_dimer}
    \caption{Illustration of the local transformation in Temperley's bijection. Left: a dimer configuration on a superposition graph. Right: a collection of oriented edges forming dual oriented CRSF. }
        \label{F:Temp_bij}
    \end{center}
\end{figure}

\begin{proof}
Given a Temperleyan pair $(t,t^\dagger)$, we obtain a configuration of edges $\textbf{m} = \psi((t, t^\dagger))$ as follows: for every oriented edge $\vec e \in t$ (resp. $\vec e \in t^\dagger$), we can write $\vec e = e_1 \cup e_2$ where $e_1, e_2$ are the first and second halves of $e$ (recall that $e$ is oriented, whether in $t$ or in $t^\dagger$), and let $e_1 \in \textbf{m}$ (see \cref{F:Temp_bij}). Note that $\textbf{m}$ is a matching on $G'$ because every (non boundary) vertex has a unique outgoing edge in either $t$ or $t^\dagger$.
Furthermore, since $t \cup t^\dagger$ spans the black vertices of $G'$, the matching is a perfect matching.

Also $\psi$ is injective: if $(t_1, t_1^\dagger)$ and $(t_2, t_2^\dagger)$ are two distinct elements of $\mathsf{TempCRSF}$, then there must a black vertex $v$ on $G'$ (i.e., a vertex of $\Gamma'$ or $(\Gamma^\dagger)'$) such that the unique outgoing edge from $v$ in $t_1$ or $t_1^\dagger$ is different from the unique outgoing edge from $v$ in $t_2$ or $t_2^\dagger$.
Hence $v$ will be matched to two distinct white vertices in $\psi((t_1, t_1^\dagger))$ and $\psi((t_2, t_2^\dagger))$.

We now check $\psi$ is onto. Given a matching $\textbf{m}$ of $G'$, we can obtain a pair $(t,t^\dagger)$ by extending the matched edges: for every nonboundary black vertex $v$ of $G'$ (i.e., a vertex of $\Gamma'$ or $(\Gamma^\dagger)'$ not on a boundary cycle), let the unique outgoing edge from $v$ be the edge of $\Gamma'$ or $(\Gamma^\dagger)'$ containing the white vertex to which $v$ is matched in $\textbf{m}$. The fact that neither $t$ nor $t^\dagger$ contain contractible cycles is the same as in the standard, planar case: if say $t$ has a contractible cycle, then an elementary counting argument shows that $v - e + f = 0$ where $v, e, f$ are the number of vertices, edges and faces of $\Gamma$ restricted to the contractible component of the cycle, but Euler's formula implies $v-e+f = 1$ (again excluding the outer face). Since every vertex $v$ of $t^\dagger$ has a unique outgoing edge, $t^\dagger$ must have one cycle per component and so $t$ is Temperleyan.
This concludes the proof.
\end{proof}

\begin{remark}\label{rmk:temp_local_map}
It is clear from the proof of \cref{prop:temp_bij} that the mapping between spanning trees to dimers is a local operation. In fact, this correspondence can be extended easily to the following setup. Suppose $G$ is a bipartite graph obtained as a superposition graph embedded in $\mathbb{C}$. Then every dimer configuration corresponds to a forest and a dual forest, where each tree (in primal or dual) is oriented towards one end. Given such an oriented forest, this mapping can also be inverted and this describes a deterministic bijection between dimer matchings of infinite superposition graphs and pair of primal and dual forests, with each tree oriented towards one of their ends.
\end{remark}

\subsection{Criterion for a wired CRSF to be Temperleyan}
\label{SS:reducCRSF}

We now begin the proof of \cref{L:dimerable}. First of all note that if we can find a Temperleyan CRSF of $\Gamma'$ then by \cref{prop:temp_bij}, $G'$ is dimerable. Next note that if $M$ has the topology of an annulus (with all the nice properties of \cref{sec:surface_embedding}), then finding a Temperleyan oriented CRSF is straightforward. Indeed, \emph{any} wired spanning forest in annulus (where both boundaries are wired) is Temperleyan: the dual is a graph containing a single cycle separating the two components touching each boundary.
Also notice that for a torus, every oriented CRSF is Temperleyan \cite{DubedatGheissari}: essentially an oriented CRSF must contain a cycle (since there is no boundary on a torus) and cutting along this cycle gives us a (bounded) cylinder or equivalently an annulus. The converse is also obviously true when we do not remove edges:

 \begin{lemma}\label{lem:annulus}
Let $M$ be nice with $g$ handles and $b $ boundary components and $\Gamma,\Gamma^\dagger,G$ be embedded as above. A wired Temperleyan oriented CRSF of $\Gamma$ exists if and only $M$ has the topology of either a torus or an annulus. Furthermore in these cases, all oriented CRSF are Temperleyan.
\end{lemma}
 \begin{proof}
 This is simply a consequence of the extended Tempereley's bijection (\cref{prop:temp_bij}), because a Temperleyan oriented CRSF and an oriented dual correspond to a dimer configuration (by endowing each cycle with arbitrary orientation and orienting every other edge towards the unique cycle of its component). However, a dimer configuration only exists if and only if $2g+b=2$ by \cref{eq:Euler}. This equation has only two feasible solutions: $g=1,b=0$ (i.e. a torus) and $g=0,b=2$ (i.e. an annulus). The last part was already argued above the statement.
 \end{proof}

\begin{proof}[Proof of \cref{L:dimerable}]
In light of \cref{lem:annulus}, we assume $M$ is neither a torus, nor an annulus. Now recall the \textbf{pants decomposition} \cite{Hatcher}: every topological surface of genus $g$ with $b$ boundary components can be decomposed as a finite union of $2g+b-2$ pairs of pants. That is, we can find continuous paths on $M$ forming simple noncontractible cycles, so that if we cut open $M$ along these cycles, each component is homeomorphic to a pair of pants. Without loss of generality we can assume that these paths consist of edges from $\Gamma'$: indeed, any maximal collection of simple closed curves which are disjoint, pairwise non-homotopic as well as non-homotopic to a boundary component is a suitable collection of such paths (Theorem 9.7.1 in \cite{Ratcliffe}).
Clearly, the restriction of $\Gamma'$ and $(\Gamma^\dagger)'$ to each such component can be viewed as a pair of dual graphs embedded in a manifold with the topology of a pair of pants where boundary components coming from a cut are described by a single boundary cycle in $\Gamma'$. Removing these boundary cycles and the attached half-edges results in a pair of dual graphs faithfully embedded on the pair of pants, exactly as described in \cref{SS:tempgraph} (in particular, each boundary component is now associated with a boundary cycle in $(\Gamma^\dagger)'$).

Furthermore, since $2g + b -2$ is also the number of white vertices (punctures) which we remove to get $G'$, we can assume without loss of generality that there is exactly one white vertex removed from each component having the topology of the pair of pants, and that such a vertex does not belong to the boundary of $\Gamma$ restricted to that component.

We now claim it suffices to prove \cref{L:dimerable} when $M$ has the topology of a pair of pants. Indeed, for each cycle arising in the pants decomposition, we fix an arbitrary orientation of this cycle.
This defines as in \cref{prop:temp_bij} a dimer configuration on the edges of the cycle. Recall that the complement of these cycles define faithfully embedded dual graphs in a number of pair of pants. In each such pair of pants $P$, we superpose a dimer configuration on the graph $G'$ restricted to $P$.
Superposing these dimer configurations in each pair of pants and on the separating cycles gives rise to a dimer configuration on the whole graph $G'$: note that there are no conflicts on the separating cycles, since when we removed these cycles to obtain the pair of pants we also removed the half edges attached to them, so these will never be occupied by dimers.

\medskip

\begin{figure}
\centering
\includegraphics[scale = 0.5]{pants}\hspace{.5cm}
\includegraphics[scale = 0.5]{pants2}
\caption{ An illustration of the proof of \cref{L:dimerable} for a pair of pants. The special branches $p$ and $q$ decompose the surface into a number of disconnected annuli: three in the first case, two in the second.
The dotted edges are the ones removed from $G$ to get $G'$.} \label{F:pants}
\end{figure}

We thus now assume that  $M$ is a pair of pants with a pair of dual graphs faithfully embedded onto it as described in \cref{SS:tempgraph}. Let $v_1$ and $v_2$ be the two vertices of $\Gamma'$ which are in the octagon formed because of the removal of white vertex and its attached half-edges (puncture). Now consider two disjoint oriented paths $p$ and $q$ in $\Gamma'$ starting from $v_1 $ and $v_2$ forming a cycle around two boundaries as shown in \cref{F:pants}. If we cut along the loop formed by the paths $p,q$ and the octagon,
we get three annuli with faithfully embedded dual graphs (note again that removing the cycles formed by the paths $p$ and $q$ and the attached half-edges means that the each boundary component in the resulting annuli is associated to a boundary cycle in $(\Gamma^\dagger)'$, as in \cref{SS:tempgraph}). Thus, by fixing an orientation of $p, q$ and introducing a  matching as before, we are back to the annulus case. This we have dealt before in \cref{lem:annulus}, and hence the proof is complete.
\end{proof}

\begin{comment}
\begin{lemma}\label{lem:good_measurable}
The event that a wired oriented CRSF of $(\Gamma^\dagger)'$ is Temperleyan is a measurable function of its non-contractible cycles.
\end{lemma}
\begin{proof}
Given all the noncontractible cycles, we can cut open $M$ along these cycles and each component of $\Gamma',M'$ is a nice embedding on a nice manifold with at least two boundary components. The lemma now follows from  \cref{lem:annulus}.
\end{proof}
\end{comment}

We now deduce from the above an extremely convenient criterion for a wired oriented CRSF to be Temperleyan. Define the branch starting from a vertex $v$ of $\Gamma'$ to be the path obtained by going along the unique outgoing edge from each vertex (which necessarily ends when a loop is formed or a boundary is hit).
Recall that, at a puncture, there are two vertices $u_{e_i},v_{e_i}$ of $\Gamma'$ which were the two endpoints of the primal edge $e_i = (u_i,v_i)$ removed. Let $\mathfrak B_1,\ldots.\mathfrak B_k$ be the branches in $\Gamma'$ of $u_{e_i},v_{e_i}$ for $1 \le i \le 2g+b-2$.

\begin{prop}\label{L:top_condition}
A wired oriented CRSF is Temperleyan if and only if every component in the complement of $ \mathfrak{B} = (\bigcup_{i=1}^k\mathfrak B_i \cup e_i)$ in $M$ has the topology of an annulus or a torus.
\end{prop}

\cref{F:pants} gives two examples on a surface $M$ (the `pair of pants') where $M\setminus \mathfrak{B}$ consists of topological annuli (three annuli in the first example, and two in the second example).

\begin{proof}
First note that a component can only have the topology of a torus if the manifold is a torus in which case there is nothing to prove by \cref{lem:annulus}.

For the general case, let $\mathcal{T}$ be a Temperleyan CRSF and let $\mathcal{T}^\dagger$ be its dual with a choice of orientation. Note that the vertices (in $G'$) of $\cup_{i=1}^k\mathfrak B_i$ are all matched with each other in the dimer configuration associated to $(\mathcal{T}, \mathcal{T}^\dagger)$. Therefore in each component of $M \setminus \mathfrak B$, all vertices are also matched with each other. By \cref{lem:annulus}, this implies that these components are annuli.

Conversely, note that by definition $\mathcal{T}^\dagger$ cannot cross $\mathfrak B$,
 and so $\mathcal{T}$ can be restricted to each component of $M \setminus \mathfrak B$ to form a wired CRSF.
By the other implication in \cref{lem:annulus}, it follows that $\mathcal{T}$ is Temperleyan in each such component and so is globally Temperleyan.
\end{proof}

The significance of this criterion is as follows. By \cref{L:top_condition}, a Temperleyan forest can be thought of as a wired CRSF conditioned on the event in the statement of that proposition. However, wired CRSF are easier objects to understand owing to the fact that they can be sampled through a version of Wilson's algorithm, as will be recalled in \cref{sec:Wilson}.

\section{Universality of cycle rooted spanning forests}\label{sec:universal}

\subsection{Setup}\label{sec:setup}

In this section, we prove that the wired oriented CRSF on  a graph satisfying an invariance principle and an RSW-type crossing condition converges to a universal limit in the Schramm sense. This section can be read independently of the rest of the paper.  We only need to recall \cref{def:CRSF} (the definition of the wired oriented CRSF).

We now consider a sequence of graphs $\Gamma^{\# \delta}, (\Gamma^{\# \delta})^\dagger$ embedded faithfully on a nice Riemann surface $M$ (see \cref{sec:surface_embedding}), which is not the sphere, the punctured plane or the full plane. Recall also that $\tilde \Gamma^{\# \delta}$ denote the lift of $\Gamma^{\# \delta}$ to the universal cover $\tilde M$ (which is either the unit disc $\mathbb{D}$ or the complex plane $\mathbb{C}$). We
assume the following about $\Gamma^{\# \delta}$ apart from it being embedded faithfully (see \cref{sec:surface_embedding}). Let $d_M$ denote the Riemannian metric in $M$ and let $d_{\bar M}$ be this metric continuously extended to $\bar M$. We assume that we are given a Markov chain on $\Gamma^{\# \delta}$ respecting the graph structure which can be non-uniform and nonreversible: in other words, we have some weights $w_{(x,y)}$ for each oriented edge $(x,y)$ in $\Gamma^{\# \delta}$ and the Markov chain moves from $x$ to $y$ at rate $w_{(x,y)}$ in continuous time. With an abuse of terminology we will call this Markov chain \textbf{random walk} on $\Gamma^{\# \delta}$. (We think of it in continuous time for simplicity, but all properties of interest to us concern the geometry of its path up to time change, and so the precise time-parametrisation is completely irrelevant.)
We let $p:\tilde M \mapsto M$ be a \emph{conformal} lift to the universal cover $\tilde M$, which is either the unit disc or the whole plane. In the end the choice of this lift does not affect the following assumptions, see \cref{rem:lift} for a precise discussion about this lift.

\begin{enumerate}[{(}i{)}]
\item \label{boundeddensity} \textbf{(Bounded density)} There exists a constant
  $C$ independent of $\delta$ such that for any $x \in M$, the number
  of vertices of $\Gamma^{\# \delta}$ in the ball $\{z \in M: d_M(w,z) <\delta\}$ is smaller
  than $C$.
\item \label{embedding} \textbf{(Good embedding)} The edges of the graph are embedded
  as smooth curves and for every compact set  $K \subset \tilde M$, the intrinsic winding of every edge in the lift $\tilde \Gamma^{\# \delta}$ intersecting $K$ is bounded by a constant $C=C_K$ depending only on $K$. (Note that this allows edges to wind quite a bit near holes.)

\item \label{InvP} \textbf{(Invariance principle)} As $\delta
  \to 0$, the continuous time random walk $\{\tilde X_t\}_{t \ge 0}$ on
  $\tilde \Gamma^{\# \delta}$
  started from a nearest vertex to $0$ satisfies:
$$
 {( \tilde X_{t/\delta^2})_{t \ge 0}} \xrightarrow[\delta \to 0 ]{(d) }
(B_{\phi(t)})_{t \ge 0}
$$
where $(B_t, t \ge 0)$ is a two dimensional standard Brownian motion in $\tilde M$ (killed when it leaves $\tilde M$, if $\tilde M = \mathbb{D}$) started from
 $0$, and $\phi$ is a nondecreasing, continuous, possibly random function
satisfying $\phi(0) = 0 $ and $\phi(\infty) = \infty$. The above convergence
holds in law in Skorokhod topology.

We remark that the above condition is equivalent to asserting that simple random walk from some fixed vertex converges to Brownian motion on the Riemann surface itself up to time parametrisation (see e.g. \cite{hsu2002}).

\begin{remark}\label{rmk:start_point}
We also remark here that the above assumption actually implies something stronger: for any point $x$ in $\tilde M$, the random walk started from a vertex $x^{\# \delta}$ nearest to $x$ converges to a Brownian motion started from $x$ up to a time change as above. This is a consequence of the fact that random walk from 0 comes close to $x$ with uniformly positive probability using the crossing estimate and the strong Markov property of Brownian motion.
\end{remark}

\begin{figure}
 \centering
\includegraphics[scale = 0.5]{crossing}
\caption{An illustration of the crossing condition.}\label{fig:crossing}
\end{figure}

\item \label{crossingestimate} \textbf{(Uniform crossing estimate).}
Let $R$
   be the horizontal rectangle $[0,.3]\times
[0,.1]$ and $R'$ be the vertical
rectangle $[0,.1]\times [0,.3]$.
Let $B_1 :=
B((.05,.05),0.025)$ be the
\emph{starting ball} and $B_2:=
B((.25,.05),.025) $ be the \emph{target ball}
(see \cref{fig:crossing}).

The uniform crossing condition is the following. There exist universal constants $\delta_0,\alpha_0>0$ such that for every compact set $K  \subset  M$, there exists a $\delta_K$ such that for all $\delta \in (0,\delta_K)$  the following is true. Let $\tilde K$ be the lift of $K$. Let $R''$ be a subset of one of the connected components of $\tilde K$ and is a translation of $cR$ or $cR'$ where $c \ge \delta/\delta_0$. Let $B_1''$ (resp. $B_2''$) be the same translation of $cB_1,cB'_1$ (resp. $cB_2,cB_2')$. For all $v \in \tilde \Gamma^{\# \delta} \cap B_1''$,
\begin{equation}
  \mathbb{P}_{v}(\tilde X \text{ hits }B''_2 \text{ before exiting } R'')
>\alpha_0.\label{eq:cross_left_right}
\end{equation}
In what follows, sometimes for a compact set $K \subset \tilde M$, we will write $\delta_K$ to mean $\delta_{p(K)}$ as defined above.

\item \label{boundary} \textbf{(Boundary convergence).}
In case $\partial M \neq \emptyset$, recall that the set of boundary cycles $(\partial \Gamma^\dagger)^{\# \delta}$ corresponds to the connected components of $\partial M$. We assume that each boundary cycle converges in the Hausdorff metric (induced by $d_{\bar M}$) to the associated component of $\partial M$.

\end{enumerate}

Sometimes we drop the superscript $\delta$ from $\Gamma^{\# \delta}, (\Gamma^\dagger)^{\# \delta}$ for clarity which should not cause any confusion.

\begin{remark}\label{rem:lift} By the uniformisation theorem of Riemann surfaces, we know that there exists a conformal map from the Riemann surface $\tilde M/ F$ to $M$ where $F$ is a Fuchsian group which is a discrete subgroup of the group of M\"obius transforms on $\tilde M$\footnote{$F$ is discrete if and only if for every $x \in M$, $\exists$ a neighbourhood $V $ of $x$ so that $fV \cap V \neq \emptyset$ for finitely many $f \in F$.}. In the case of the torus, this subgroup is simply a group of translations isomorphic to $\mathbb{Z}^2$. In the hyperbolic case $F$ is a subgroup of the group of M\"obius transforms of the unit disc $\mathbb{D}$. Such a conformal map is unique up to conformal automorphisms (i.e. M\"obius transforms) of the unit disc. In other words, if $F,F'$ are two Fuchsian groups such that $M$ is conformally equivalent to both $\mathbb{D} / F$ and $\mathbb{D}/ F'$ then there exists a M\"obius map $\phi: \mathbb{D} \mapsto \mathbb{D}$ such that $F'  = \phi^{-1}\circ F \circ \phi$. Since we have fixed a canonical lift, we have defined $F$ uniquely.

We remark that in \cref{InvP}, we only require convergence up to time change, and hence this assumption depends only on the conformal type of the metric.
Finally, one could be worried about the fact that in \cref{crossingestimate}, the probability $\alpha_0$ is uniform over the position and scale of the rectangle despite the distortion between two copies of the same set $K \subset M$. However note that the image of a rectangle by a M\"obius transform is made of $4$ circular arcs and is crossed by Brownian motion with the same probability as the original rectangle, so our assumption is natural in this sense.

In summary, we could work with any lift (i.e. any choice of $F$) and we fix a particular choice of this lift and call it $p$ for concreteness.
\end{remark}

\begin{lemma}[Beurling type estimate]\label{lem:Beurling}
For all $r,\varepsilon>0$ there exists $\eta>0$ such that for any $\delta <\delta(\eta)$ and for any vertex $v \in \Gamma^{\# \delta}$ such that $\eta/2 < d_M(v,\partial M) <\eta$, the probability that a simple random walk exits $B_M(v,r ) := \{z\in M: d_M(z,v) <r\}$ before hitting $\partial \Gamma^{\# \delta}$ is at most $\varepsilon$.
\end{lemma}
\begin{proof}
Choose a cover of $\partial M$ so that the elements of the cover are disjoint if they belong to different components of $\partial M$ and by compactness, choose a finite subcover $\{U_i,\phi_i\}_{1 \le i \le k}$ where $\phi_i$ are charts. Note that $\phi_i$ maps $U_i$ to a subset of the upper half plane $\mathbb{H}$. In the upper half plane, by gambler's ruin estimates, for all $r',\varepsilon$, we can choose an $\eta'$ small enough so that the diameter of the trace of a Brownian motion in $\mathbb{H}$ starting from a point within distance $\eta'$ of the boundary until it hits the boundary is less than $r'$ with probability at least $1- \varepsilon$.
We now use continuity of $\phi_i$ in both directions, all the way to the boundary. Using this, we can choose $r'$ and then $\eta'$ small enough depending on $\phi_i$ so that if $d( \phi_i(x) , \partial \mathbb{H}) \le \eta')$ for all $i$ such that $x \in U_i$ then $d_M(x, \partial M) \le \eta$ and if a set $X \subset \phi_i(U_i) \subset \mathbb{H} $ has (Euclidean) diameter less than $r'$ then also $\diam_M( \phi_i^{-1}(X)) \le r$.
 The proof is now complete by the assumption of invariance principle (\cref{InvP}). \end{proof}

We finish this section with a lemma which will be useful later. It says that random walk on $\Gamma^{\# \delta}$ has uniformly positive probability in $\delta$ of creating a noncontractible loop while staying within a bounded set. The basic point is that the random walk can follow any continuous noncontractible loop in the manifold by crossing finitely many rectangles.

\begin{lemma}\label{lem:uniform_avoidance}
Let $K_0 \subset K'_0 \subset M$ be open connected sets and let $K \subset K_0',K'$ be compact sets which are the closures of $K_0,K'_0$. Also assume $K$ contains a loop which is noncontractible in $M$. Then there exists a $\delta_{K,K'}>0$ and $\alpha_{K,K'}>0$ depending only on $K,K'$ such that for all $\delta<\delta_{K,K'}$ and all $v \in \Gamma^{\# \delta}$ such that $v \in K$, simple random walk started from $v$ has probability at least $\alpha_{K,K'}$ of forming a noncontractible loop before exiting $K'$.
\end{lemma}
\begin{proof}
In this proof we will use terminology from the crossing assumption (\cref{crossingestimate}). Consider a curve formed by going twice around the noncontractible loop $\ell$ in $M$
and let $\tilde \ell$ be the lift of this curve. Using compactness, for every $v \in \tilde \ell$, let $B_v$ be a translation of $cB_1$, where $B_1$ as in the crossing estimate (\cref{crossingestimate}) and $c >\delta/\delta_0$ where $\delta < \delta_{K} \wedge \delta_{K'}$ as in \cref{crossingestimate}. Also pick $B_v$ such that $p(B_v ) \subset K'$.  Let $R_v$ be a rectangle which is a suitable scaling and translation of $R$ and containing $B_v$ so that $B_v$ is the starting ball of $R_v$ and $p(R_v)$ is in $K'$. Clearly $\{B_v\}_{v \in \tilde \ell}$ forms a cover which has a finite sub-cover by compactness. From this, it is easy to see that we can move by crossing rectangles from the neighbourhood containing any point of $\tilde \ell$ to a neighbourhood containing its copy, and then form a noncontractible loop. Furthermore, since $p(R_v)$ is in $K'$, we can ensure that this walk will never leave $K'$ with a probability which is uniform over the starting vertex.
\end{proof}

\subsection{Wilson's algorithm to generate wired oriented CRSF}\label{sec:Wilson}

Recall the measure $\Ptemp$, i.e., the law of $(\mathcal{T}, \mathcal{T}^\dagger)$ on $\mathsf{TempCRSF}$ under the measure \cref{eq:oriented CRSF}. We will not study directly $\Ptemp$ but rather a measure on $\mathsf{TempCRSF}$ which can be sampled through Wilson's algorithm and is defined as follows: we first sample a wired oriented CRSF of $\Gamma$ with law
$$
\Pwils (\mathcal{T} = t) = \frac1{\Zwils} 1_{\{ t \text{ Temperleyan} \} }\prod_{e \in t} w(e);
$$
and given $\mathcal{T} = t$, we pick $\mathcal{T}^\dagger$ an oriented dual uniformly among all possibilities of orientation of the dual. Thus $\Pwils$ can be viewed also (with a small abuse of notation) as a mesure on $\mathsf{TempCRSF}$.

The two laws look similar but are in fact different due to the fact that any cycle of the dual $t^\dagger$ of a Temperleyan oriented CRSF $t$ can be oriented in two possible ways to determine a dual pair $(t, t^\dagger ) \in \mathsf{TempCRSF}$. We deduce the following relationship:

\begin{lemma}\label{lem:RN_dimer_CRSF}
  Let $(t, t^\dagger)$ be a Temperleyan wired oriented CRSF such that $t^\dagger$ contains exactly $k^\dagger$ noncontractible cycles. Then the Radon--Nikodym derivative satisfies
  \begin{equation*}
    \frac{d \Ptemp}{d \Pwils} (t,t^\dagger) = \frac{\Zwils}{\Ztemp}2^{k^\dagger}
  \end{equation*}
In particular, conditioned on having $k^\dagger$ noncontractible cycles for the dual forest, the law $\Ptemp$ and $\Pwils$ coincide. \end{lemma}

In fact, we could equally use the number of cycles in the primal forest because of the following lemma.

\begin{lemma}
  \label{L:cycle_primal_dual}
  Let $(t, t^\dagger)$ be a pair of dual Temperleyan CRSF. Let $k$ and $k^\dagger$ be their respective number of noncontractible cycles.

  Then $k$ and $k^\dagger$ are related by the deterministic relation
  $$
  k - k^\dagger   =   g-1 .
  $$
\end{lemma}

\begin{proof}
  Start from the surface $M$ and suppose $M$ is not a torus, and add successively the special branches emanating on either side each of the $|\chi|$ punctures. At the end of this process we have cut the surface into a number $A$ of annuli. Inside each annulus, for planar reasons, every time we add a primal cycle it must be followed by a dual cycle (going from one boundary to the other). Therefore it suffices to consider the ``minimal" case where there will be exactly one dual cycle inside each annulus, i.e., $k^\dagger = A$.

  Now, each time we add a puncture and cut along the two branches emanating from it, there are two possibilities for each branch. Either the branch makes a loop around a hole or a handle (as illustrated in the left of \cref{F:pants}), or the branch joins a boundary (wired) vertex in the primal graph of the current faithfully embedded graph (as in the right of \cref{F:pants}). Suppose first that all such branches create loops. Then note that exactly 3 new boundary components are added in such a step (consider separately the cases where the associated nontrivial loops surround a hole or a handle). Therefore in this case, $A = (b + 3|\chi|)/2$, since each annulus has two boundary components. In other words $A = 3g + 2b - 3$. But in this case, there are exactly $k= 2|\chi|$ primal cycles, since each puncture leads to two such cycles (one for each branch). So in this case,
  $$
  k - k^\dagger = 2 (2g + b - 2) - (3g +2b - 3) = g -1.
  $$
Now consider instead the effect of a branch connecting to a wired boundary vertex instead of making a loop, as in the right of \cref{F:pants}. In this case, compared to the previous analysis, we create two fewer boundary pieces (resulting in one fewer annulus at the end and so also one fewer dual cycle) but also one fewer primal cycle. So the difference $k - k^\dagger$ remains the same and hence no matter what, $k - k^\dagger = g -1$ as desired.
   %

\end{proof}

Let $\Gamma, \Gamma^\dagger$ be faithfully embedded on a nice Riemann surface $M$.
We now describe Wilson's algorithm to generate a wired (but not necessarily Temperleyan)
oriented CRSF on $\Gamma$. We
prescribe an ordering of the vertices $(v_0,v_1, \ldots )$ of $\Gamma$.
\begin{itemize}
\item We start from $v_0$ and perform a loop-erased random walk until
  a noncontractible cycle is created or a boundary vertex (i.e., a vertex in $\partial \Gamma$) is hit.
\item We start from the next vertex in the ordering which is not
  included in what we sampled so far and start a loop-erased random
  walk from it. We stop if we create a noncontractible cycle or hit
  the part of vertices we have sampled before.
\end{itemize}
There is a natural orientation of the subgraph created since from every non-boundary vertex there is exactly one outgoing edge through which the loop erased walk exits a vertex after visiting it. Let $\Pwwils$ be the law of the resulting wired oriented CRSF.

\begin{prop}\label{prop:unoriented_to_oriented}
We have
\begin{equation}
 \Pwwils(t) = \frac1{ \Zwwils} \prod_{e \in t} w(e).\label{eq:law_CRSF}
\end{equation}
In particular, $\Pwwils$ generates a wired oriented CRSF of $\Gamma$ as described by \cref{def:CRSF} with law given by \eqref{eq:law_CRSF}. Furthermore, conditionally on being Temperleyan, $\Pwwils$ coincides with the first marginal of $\Pwils$.
\end{prop}
\begin{proof}
This follows from Theorem 1 and Remark 2 of Kassel--Kenyon \cite{KK12}.
\end{proof}

\subsection{Scaling limit and universality of cycle-rooted spanning forest}

 In this section, we give a precise statement and begin the proof of one of the main results of the paper, which shows the existence of a scaling limit for a uniform (oriented) cycle-rooted spanning forest on a nice Riemann surface. The main part of the proof consists in showing the convergence of a finite number of branches, after which a version of Schramm's ``finiteness lemma" (\cref{lem:Schramm_finiteness}) concludes the proof. In this subsection and the next, we deal with the main part of the argument, which is the convergence of a finite number of branches. The conclusion of the proof, based on Schramm's finiteness lemma, will be provided in \cref{finiteness}.

Since the wired oriented CRSF becomes space-filling as $\delta \to 0$, we need to define a suitable topology for this convergence. Such a topology was already proposed by Schramm in his original paper \cite{SLE}. We call this the \textbf{Schramm
topology}; it is defined as follows. Let $\mathcal{P}(z,w,M)$ be the space of all continuous paths in $\bar M$
from a point $z\in \bar M$ to $w\in  \bar M$ oriented from $z$ to $w$. We consider the Schramm space
$\mathcal{S} = \bar M \times \bar M \times \cup_{z,w \in \overline{M}} \mathcal{P}(z,w)$. For any metric space
$X$, let $\mathcal H (X)$ denote the space of compact subsets of $X$ equipped with the
Hausdorff metric. We view the Schramm space $\mathcal{S}$ as a subset of the
compact space $ \mathcal{H}( \overline M \times \overline M \times \mathcal{H}
(\overline M))$ equipped with its metric. Note that this metric does distinguish the orientation of the cycles and hence the orientation of the whole CRSF.

\begin{thm}[Universality of the CRSF scaling limit]\label{thm:CRSF_universal}
Let $\Gamma^{\# \delta}$ be a graph with boundary $\partial \Gamma^{\# \delta}$ faithfully embedded on a Riemann surface $M$ satisfying the assumptions of \cref{sec:setup}. Then the
limit in law as $\delta \to 0$ of the wired oriented CRSF sampled using \eqref{eq:law_CRSF} on $\Gamma^{\# \delta}$ exists
in the Schramm topology and is independent of the sequence $\Gamma^{\# \delta}$ subject to the assumptions in \cref{sec:setup}. This limit is also conformally invariant.

Furthermore, let $K$ be the number of noncontractible loops in the CRSF. Then for any $q>1$ there exists a constant $C_q>0$ independent of $\delta$ such that
$$\mathbb{E}(q^{K}) \le C_q.$$
\end{thm}

We explain briefly the ideas behind the proof of this theorem. As explained in \cref{sec:Wilson}, branches of the oriented wired CRSF can be sampled according to a version of Wilson's algorithm: namely, we do successive loop-erased random walks until we hit the boundary or create noncontractible loops. It is not hard to convince oneself that these should have a scaling limit. Indeed, the most difficult aspect of the scaling limit of LERW is to deal with small loops. However, locally, such a loop-erased random walk will behave as if on a portion of the plane where the scaling limit is known. Indeed in this situation, the assumptions on $\Gamma^{\# \delta}$ in \cref{sec:setup} and a result of Yadin and Yehudayoff \cite{YY} as well as Uchiyama \cite{uchiyama} guarantee the convergence of a small portion of the path towards an SLE$_2$-type curve (we need Uchiyama's result to deal with rough boundaries induced by the past of loop-erased random walk itself). It simply remains to glue these pieces together.

Kassel and Kenyon \cite{KK12} considered measures on loops on cycle rooted spanning forests arising from a generalization of Wilson's algorithm (we use a special case of that algorithm in \cref{sec:Wilson}) on a Riemann surface. They consider scaling limits of the loops associated with this measure. However, their measures are more general as one can assign a certain holonomy to every loop. They assume that the embedded graphs on the surface must \emph{conformally approximate} the surface, in the sense that the derivative of the discrete Green's function converges to the derivative of the continuum Green's function. This assumption is much stronger than our assumption of invariance principle and the crossing assumption.

We also mention here a robust approach to the convergence of loop-erased random walk by Kozma \cite{kozma2002}, which could probably be used as an alternative approach to proving \cref{thm:CRSF_universal}, and could also be useful for instance in extending this result to the case where instead of all boundaries on the surface being wired, we have mixed wired and free boundary conditions.

\subsection{A discrete Markov chain}
Let $\tilde \Gamma^{\# \delta}$ denote the natural lift of $\Gamma^{\# \delta}$ to the universal cover $\tilde M$.
To start the proof of \cref{thm:CRSF_universal}, we now consider the simple random walk $\{X_t\}_{t \ge 0}$ on $\Gamma^{\# \delta}$ starting from some vertex. We are
going to define certain stopping times $\{\tau_k\}_{k \ge 1}$ for this random walk. If $t \ge 0$, we denote by $\mathcal{Y}^t$ the loop
erasure of $X[0,t]$. In other words, if we chronologically erase the loops
of $X[0,t]$ then we obtain an ordered collection of vertices, which we denote by
$\mathcal{Y}^t$. Using compactness and the definition of a cover, we can find a finite cover $\cup_i N_i$ of $\bar M$ so that $p$ is injective in every component of $p^{-1}(N_i)$ for all $i$. For $v \in \tilde M$, define $N_v$ to be one of the preimages of $N_i$ containing $p(v)$ (picked arbitrarily). For $v,w \in \tilde M$, define $N_{v \setminus w}$ to be $N_v \setminus p^{-1}(B(p(w), \frac12 d_M(p(v),p(w))))$ (this definition is intended to find a large enough neighbourhood of $v$ not containing $w$). The following lemma is immediate now.
\begin{lemma}\label{lem:BM_hit}
Suppose $\partial M \neq \emptyset$. Let $B(t)$ be a standard Brownian motion on $M$. Assume $\tau_0=0$ and inductively define $\tau_k$ to be the exit time from $N_{B(\tau_{k-1})}$. Let $N$ be the smallest $k$ such that $B(\tau_k)$ is in the boundary of $M$. Then $N$ is finite a.s. and has exponential tail.
\end{lemma}
\begin{proof}
Since $\bar M$ can be covered by a finite cover $\{N_i\}_i$ there is a uniformly positive probability to go from any of $N_i$ to $N_j$ where $N_j$ is a neighbourhood containing a boundary point (uniformity is over all the neighbourhoods $\{N_i\}_i$). Once the Brownian motion is in a neighbourhood containing a boundary point, it has a uniformly positive probability to hit the boundary before leaving the neighbourhood. The geometric tail of $N$ is immediate and the lemma follows.
\end{proof}

Let $\partial $ be a specific subset of edges of $\Gamma^{\# \delta}$. Let $\tilde \partial $ be its lift to $\tilde M$, and assume that the connected components of $\tilde M \setminus \tilde \partial $ are simply connected.
We define a sequence of stopping times $\tau_1, \ldots, $ as follows. We start from an arbitrary vertex $v_0 \in \Gamma^{\# \delta} \setminus \partial $ and fix one pre-image $\tilde v_0=p^{-1}(v_0)$ in the covering map (in the end this choice is going to be irrelevant). Let $\tilde X$ the unique lift of $X$ starting from $\tilde v_0$. Observe that loops of $\tilde X$ correspond to contractible loops of $X$. On the other hand, noncontractible loops of $X$ do not give rise to loops for $\tilde X$ but we will stop when the first noncontractible loop is formed.

\begin{enumerate}[{(}i{)}]
 \item Define $\tau_1$ to be the first
time the walk $\tilde X$ leaves $N_{\tilde v_0}$ or intersects $\tilde \partial$.

\item Having defined $\tau_1, \ldots, \tau_k$, we define $\tau_{k+1}$ as
follows. Let $N = N_{\tilde X_{\tau_k} \setminus \tilde v_0}$ and let $\tilde A_k$ be the portion of $p^{-1}(\mathcal{Y}^{\tau_k})$ in $N$
 such that if $\tilde X$ intersects $\tilde A_k$ after $\tau_k$ but before exiting $N$,  a noncontractible loop will have been formed: in other words, $\tilde A_k$ consists of all other preimages of $\mathcal{Y}^{\tau_k}$ intersected with $N$, except the one started from $\tilde v_0$. Note that by assumption of injectivity on $N$, this is the only way a contractible loop can be formed.

 We
continue the simple random walk from $\tilde X_{\tau_k} $ until we intersect $\tilde A_k
\cup \tilde \partial $ or exit $N$ and  call that time
$\tau_{k+1}$.\label{main_step}

\item We stop if $\tilde X$ intersects $\tilde A_k \cup \tilde \partial$, otherwise we continue and perform step (ii) again with $k$ changed into $k+1$.
\end{enumerate}

We actually want to see $k \mapsto \mathcal{Y}^{\tau_k}$ as a Markov chain on
curves in $M$ because later we will provide a continuum description of this chain. It is easy to
see that the transition of that chain are given by the following.
\begin{enumerate}[{(}i{)}]
 \item In the first step, $\mathcal{Y}^{\tau_1}$ is a loop-erased walk from $v_0$
stopped at a time it either exits $p(N_{v_0})$ or intersects $\partial$.

\item Define $A_k = p(\tilde A_k)$. Given $\mathcal{Y}^{\tau_{k}}$, we start a random walk from its endpoint until
we either intersect $A_k \cup \partial$ or exit $p(N)$ where $N = N_{\tilde X_{\tau_k} \setminus \tilde v_0}$ as above. Let $V_k$
be the last vertex of $\mathcal{Y}^{\tau_{k}}$ which is not erased and let $\theta_k$
be the random walk time of the last visit to $V_k$. Let $\gamma$ be
the loop-erasure of $X[\theta_k, \tau_{k+1}]$ and $\mathcal{Z}^{k}$ be the portion
of $\mathcal{Y}^{\tau_{k}}$ which was not erased by $X[\tau_{k}, \theta_k)$. We have clearly
$$
\mathcal{Y}^{\tau_{k+1}} = \mathcal{Z}^{k} \cup \gamma.
$$
\end{enumerate}

This transition law can be simplified using the following lemmas. Let
$(Y_i^{\tau_k})_{i \ge 1}$ be the ordering of the vertices of $\mathcal{Y}^{\tau_k}$
which it inherits from the random walk.

\begin{lemma}\label{lem:Vk}
In the above construction, for any realisation of $X$ and $\mathcal{Y}$, we have $V_k
= Y^{\tau_{k}}_m$ with
$$
m = \inf \{ i : Y_i^{\tau_{k}} \in X[\tau_{k},
\tau_{k+1}] \}.
$$
\end{lemma}
\begin{proof}
 This follows from the definition.
\end{proof}
\begin{lemma}\label{lem:independent_RW}
 Conditioned on $V_k, X_{\tau_{k+1}}$ and $\mathcal{Y}^{\tau_{k}}$, the law of
$X[\theta_k,\tau_{k+1}]$ is a random walk from $V_k$
conditioned to first hit $p(N)^c \cup A_k \cup \partial \cup \mathcal{Z}_k$ at the point $X_{\tau_{k+1}}$.
\end{lemma}
\begin{proof}
 This lemma follows from the definition since conditioned on $V_k, X_{\tau_{k+1}}$, the law of
 $X[\theta_k,\tau_{k+1}]$ is uniform over all random walk trajectories starting at $V_k$ and ending at $X_{\tau_{k+1}}$
 which do not intersect $A_k \cup \partial \cup \mathcal{Z}_k$ or leave $p(N)$
 except at $X_{\tau_{k+1}}$.
 \end{proof}
Clearly, if in the algorithm above we have $\partial = \partial \Gamma^{\# \delta}$, the resulting curve $ \mathcal{Y} = \cup_{k\ge 1} \mathcal{Y}^{\tau_k}$, either intersects $\partial \Gamma^{\# \delta}$ or forms a noncontractible loop (this terminates with probability one). We can now repeat the above algorithm this time taking
$\partial$ to be $\partial \Gamma^{\# \delta}$ together with the curve $\mathcal{Y}$ discovered in the previous step. Repeating this algorithm until all vertices of $\Gamma^{\# \delta}$ are in $\partial$, this generates a random oriented subgraph of $\Gamma^{\# \delta}$ which by the generalisation of Wilson's algorithm (Section \ref{sec:Wilson}) has the same law as an oriented CRSF of $\Gamma^{\# \delta}$.
The above procedure then gives a convenient breakdown of each step of Wilson's algorithm into a Markov chain that is going to have a nice continuum description.

There is one small caveat. We need to show the following:

\begin{lemma}\label{L:simply_connected}
After every step of the above algorithm (i.e. after a full running of the Markov chain until termination), $\tilde M \setminus \tilde \partial$ is simply connected.
\end{lemma}
\begin{proof}
At the first step, recall that every component of $(\partial \Gamma^\dagger)^{\# \delta}$ is a noncontractible loop by assumption. We will show later in \cref{lem:spine:boundary} that every component of the lift of a noncontractible loop is a bi-infinite simple path. Furthermore these paths connect two boundary points of $\partial \mathbb{D}$ in the hyperbolic case, and go to infinity in a particular direction in the torus case. Since in every step, either a path connecting to $\tilde \partial $ is added or a noncontractible loop is formed, simple connectedness of $\tilde M \setminus \tilde \partial$ is maintained (one can think of a path connecting to $\partial \Gamma^{\# \delta}$ to be a path connecting to $(\partial \Gamma^\dagger)^{\# \delta}$ stopped at the mid-edge to justify this topological argument).
\end{proof}

\subsection{Continuum version of Wilson's algorithm to generate CRSF.}
\label{SS:wilsoncontinuous}\medskip We now describe the continuum process. The main technical input is a result of Uchiyama (\cite{uchiyama},Theorem 5.7), which itself is a generalisation of a result of Suzuki \cite{Suzuki}. Suzuki proved convergence of a loop-erased random walk excursion to chordal SLE$_2$ subject to an assumption that the boundary is piecewise analytic (while Yadin and Yehudayoff \cite{YY} dealt with the radial case).

We define a \textbf{discrete domain} to be a union of faces of $\Gamma^{\# \delta}$ along with the edges and vertices incident to them. We specify certain edges and vertices of the domain to be the boundary of the domain. We say a discrete domain is \textbf{simply connected} if the union of its faces and non-boundary edges and vertices (called its \textbf{interior}) form an open, connected and simply connected domain in $\mathbb{C}$.

\begin{thm}[Uchiyama \cite{uchiyama}]\label{lem:scaling_limit_main}
Let $D$ be a proper simply connected domain such that $\bar D \subset \mathbb{D}$. Let $\bar D^{\# \delta}$ be a sequence of simply connected discrete domains with $D^{\# \delta}$ being its interior. Let $p_0 \in D$
and suppose that $D^{\# \delta}$ converges in the Carath\'eodory sense to $D$: if $\phi$ (resp. $\phi_{\# \delta}$) is the unique conformal map sending $D$ (resp. $D^{\# \delta}$) to the unit disc $\mathbb{D}$ such that $\phi(p_0) = 0$ and $\phi'(p_0)>0$ (resp. $\phi_{\# \delta}(p_0) = 0$ and $\phi_{\# \delta}'(p_0)>0$), then $\phi_{\# \delta}$ converges to $\phi$ uniformly over compact subsets of $D$.  Suppose that $a^{\# \delta}, b^{\# \delta}$ are two boundary points on $\bar D^{\# \delta}$ (understood as prime ends) such that $\phi_{\# \delta}(a^{\# \delta}) \to \tilde a \in \partial \mathbb{D}$ and $\phi_{\# \delta}(b^{\# \delta}) \to \tilde b \in \partial \mathbb{D}$ with $\tilde a \neq \tilde b$.

Let $\tilde X^{\# \delta}$ be a random walk subject to the assumptions in \cref{sec:setup} from $a^{\# \delta}$ conditioned to take its first step in $D^{\# \delta}$ and to leave $D^{\# \delta}$ at $b^{\# \delta}$. Then the loop erasure of $\phi_{\# \delta}(X^{\# \delta})$ converges to
chordal SLE$_2$ from $\tilde a$ to $\tilde b$ in $\mathbb{D}$ for the Hausdorff topology on
compact sets (and in fact in the stronger, uniform sense modulo reparametrisation).
\end{thm}

\begin{proof}
 This follows from the work of Uchiyama. We emphasise here that Uchiyama uses a locally uniform invariance principle (called hypothesis {\bf(H)} in \cite{uchiyama}, Section 2), which says that for any compact set, a random walk run up to the time it leaves the compact set is uniformly close to a Brownian motion (up to reparametrised curves) and the uniformity is over any starting point in the compact set. This is clearly satisfied in our case, see \cref{rmk:start_point}.
\end{proof}
Note that the above theorem is for the conformal image of the loop erasure of the walk in the unit disc. To transfer the results to the domains of interest, we employ the following corollary. If $D^{\# \delta}$ is such that $\mathbb{C} \setminus D^{\# \delta}$ is uniformly locally connected then the conformal map $\phi_{\# \delta}^{-1}$ extends continuously to $\bar \mathbb{D}$. Furthermore, by assumption on the Carath\'eodory convergence, we know that $\phi_{\# \delta}^{-1} (z) \to \phi^{-1} (z)$ for all $ z \in \mathbb{D}$. Hence we deduce from the Carath\'eodory kernel theorem (see Corollary 2.4 in \cite{Pommerenke}) that $\phi_{\# \delta}^{-1}$ converges in fact \emph{uniformly} to $\phi^{-1}$ over $\bar \mathbb{D}$; furthermore it is easy to see that also $\mathbb{C}\setminus D$ is locally connected. Hence we obtain the following corollary:

\begin{corollary}\label{cor:Uchiyama}
Under the assumptions of \cref{lem:scaling_limit_main}, and if $\mathbb{C} \setminus D^{\# \delta}$ is uniformly locally connected, we have that the loop-erasure of $\tilde X^{\# \delta}$ converges to chordal SLE$_2$ from $a$ to $b$, where $a = \phi^{-1} (\tilde a)$ and $b = \phi^{-1} (\tilde b)$.
\end{corollary}

We now describe a continuum version of the discrete Markov chain described in the previous section.
Suppose we start with $\partial \subset \bar M$ and let $\tilde \partial$ be $p^{-1} (\partial \cap M) \cup \partial \mathbb{D}$ in the hyperbolic case, otherwise in the parabolic case we simply take $\tilde \partial = p^{-1} (\partial)$.
We will assume that $\partial$ is such that every connected component of $\tilde M \setminus \tilde \partial$ is simply connected. (This will be almost surely satisfied after every step of the continuum Wilson's algorithm; we verify this in \cref{lem:sc} later though this is essentially the same as the discrete \cref{L:simply_connected} proved above).
We now define a random curve starting from a point $z \in M$ and ending in $\partial$ or in a noncontractible loop. Fix a pre-image $\tilde z = p^{-1}(z)$ (again, in the end, the choice of pre-image is irrelevant).

\begin{enumerate}[{(}i{)}]
 \item Let $B_{\tilde z}$ be the connected component of $N_{\tilde z} \setminus \tilde \partial$ containing $\tilde z$. Then note that $B_{\tilde z}$ is simply connected since $N_{\tilde z}$ is simply connected, and it is an easy exercise to check that if $A, B$ are bounded, simply connected sets in $\mathbb{C}$ then every connected component of $A \cap B$ is also simply connected (e.g. using Jordan's theorem).
     In the first step, we define $\mathcal{Y}^{\tau_1}$ to be the image under $p$ of a radial SLE$_2$ in $B_{\tilde z}$ targeted to $\tilde z$
from a point chosen from $\partial B_{\tilde z} $ according to the
harmonic measure seen from $\tilde z$.

\item Suppose we have defined the continuum curves up to step $k$ and call
it $\mathcal{Y}^{\tau_{k}}$. Let $\tilde z_k$ be the end point of $\tilde \mathcal{Y}^{\tau_{k}}$ where $\tilde \mathcal{Y}^{\tau_{k}}$ is the unique lift of $ \mathcal{Y}^{\tau_{k}}$ starting from $\tilde z$. Let $\tilde A_k = p^{-1} (\mathcal{Y}^{\tau_{k}}) \setminus \tilde \mathcal{Y}^{\tau_{k}}$, so $\tilde A_k$ consists of all the other preimages of $\mathcal{Y}^{\tau_{k}}$ except for $\tilde \mathcal{Y}^{\tau_{k}}$.

We start a Brownian
motion independent of everything else from $\tilde z_k$ until it either intersects $\tilde A_k \cup \tilde \partial$ or exits $N_{\tilde z_k \setminus \tilde z}$. Call the point where we stop
the Brownian motion $\tilde V_k'$. Let us parametrise  $\mathcal{Y}^{\tau_{k}}$ using some choice of continuous parametrisation and lift it to $\tilde \mathcal{Y}^{\tau_{k}}$. Let $\tilde V_k$ be the infimum of the set of  points in  $ \tilde \mathcal{Y}^{\tau_{k}}$ which
the Brownian motion intersects (this makes sense for any choice of
parametrisation of $\mathcal{Y}^{\tau_{k}}$ starting from $z$ and ending at $z_k$ and $\tilde V_k$ is independent of
the choice of parametrisation).\label{step2}

\item   Let $\tilde \mathcal{Z}^{k}$ be the portion of
$\tilde \mathcal{Y}^{\tau_{k}}$ from its starting point to $\tilde V_k$ and let $\mathcal{Z}^k = p(\tilde \mathcal{Z}_k)$. Let $D_k$ be the connected component of $N_{\tilde z_k \setminus \tilde z} \setminus (\tilde A_k \cup \tilde \mathcal{Z}^{k} \cup \tilde \partial)$ containing $\tilde V_k'$.
An argument similar to the above can be used to show that $D_k$ is simply connected since $\tilde z \notin N_{\tilde z_k \setminus \tilde z}$ and $p$ is injective in $ N_{\tilde z_k \setminus \tilde z}$.

Now define a chordal SLE$_2$ curve
$\gamma_k$ in $D_k$ from
from $\tilde V_k$ to $\tilde V_k'$ independent of everything else. Define $$\mathcal{Y}^{\tau_{k+1}}:=
\mathcal{Z}^k \cup p(\gamma_k).$$
\item We stop if $\mathcal{Y}^{\tau_{k+1}}$ contains a noncontractible
loop or touches $\tilde \partial$. Otherwise, we return to step \ref{step2}.
\end{enumerate}
We now prove the following lemma which says that the paths $\mathcal{Y}^{\tau_k}$ converge to a limiting path $\mathcal{Y}^\infty := \lim_{k \to \infty} \mathcal{Y}^{\tau_k}$.
This will correspond to a branch of a continuum CRSF. In fact we will prove that $\mathcal{Y}^\infty$ is a union of finitely many elements in the union. Recall that we are not considering the whole complex plane case and the sphere case for now.
\begin{lemma}\label{lem:MC_branch}
There exists a random variable $N$ with exponential tail such that $\mathcal{Y}^\infty := \mathcal{Y}^{\tau_N}$.
\end{lemma}
\begin{proof}
We claim that we can couple a standard planar Brownian motion $B(t)$ from $\tilde z$ with the above Markov chain such that the endpoint of $\tilde \mathcal{Y}^{\tau_k}$ (i.e., $\tilde z_k$) is $ B(t_k)$ for some increasing sequence $(t_k)_{k \ge 1}$. Indeed,  we can sample a Brownian motion  from $\tilde z_k$, until it either intersects $\tilde A_k \cup \tilde \partial$ or exits $N_{\tilde z_k \setminus \tilde z}$ independent of everything else. By the strong Markov property, if we concatenate these Brownian paths, the whole trajectory has the law of a Brownian motion with the required property.

Let us consider the case where $\partial M \neq \emptyset$, which means we are in the hyperbolic setting. The fact that $N$ has exponential tail is now an easy consequence of  \cref{lem:BM_hit}.

Otherwise, if there is no boundary, we can cover $M$ by finitely many neighbourhoods, take a noncontractible loop $\ell$ and join a point from every neighbourhood to $\ell$. Using an argument similar to \cref{lem:uniform_avoidance}, we see that there is a positive probability for the Brownian motion to follow a path to $\ell$ and then move along $\ell$ to form a noncontractible loop for the Markov chain, and this probability is uniformly bounded below over the starting point. This event can happen in every step of the Markov chain with uniform positive probability, thereby concluding the proof.
\end{proof}

The above algorithm gives a recipe to sample one branch. To sample finitely many branches $\mathsf B_1,\mathsf B_2,\ldots$ from points $z_1,z_2,\ldots$, we continue sampling branches by updating $\tilde \partial$ to include the portion of the CRSF sampled in the previous step and applying the previous algorithm. Recall that we require $\tilde M \setminus \cup_{j=1}^k \mathsf B_j$ to be simply connected at every step to make sense of the algorithm. The proof is exactly the same as in \cref{L:simply_connected} which we now record.
\begin{lemma}\label{lem:sc}
For every $k$, every component of $\tilde M \setminus \cup_{j=1}^k \mathsf B_j$ is a.s. simply connected.
\end{lemma}

\begin{thm}\label{thm:main_tech}
Let $\partial^{\# \delta}$ be a set of edges in $\Gamma^{\# \delta}$ and assume that $\partial^{\# \delta}$ converges in the Hausdorff sense to some set $\partial \subset M$. Let $\tilde \partial $ be the lift of $\partial$ to $\tilde M$. Assume $\tilde M \setminus \tilde \partial$ is locally connected and all the connected components of $\tilde M \setminus \tilde \partial$ are simply connected.
Then the Markov chain $(\mathcal{Y}^{\tau_k})^{\# \delta}$ converges to the Markov chain $\mathcal{Y}^{\tau_k}$ as $\delta \to 0$.
More precisely this means that for any $k \ge 1$, the joint law of
$((\mathcal{Y}^{\tau_j})^{\# \delta}:1 \le j \le k)$ converges to the joint law of $(\mathcal{Y}^j: 1
\le j \le k)$ (the convergence is in product of Hausdorff topology).
\end{thm}
\begin{proof}
 We are going to use induction and prove at the same time that $\mathcal{Y}^{\tau_k}$ is a simple curve a.s. at every step $k$. We use the notations used in the description of the continuous and the discrete Markov chains. In the first step, the proof is just an application of the result of Yadin and Yehudayoff \cite{YY} and the fact that radial SLE$_2$ is a.s. a simple curve. Suppose we condition on $(\mathcal{Y}^{\tau_k})^{\# \delta}$ for $k\ge 1$.

 Let $D_k^{\# \delta}$ be the connected component containing $\tilde X^{\# \delta}_{\tau_k}$ of $\tilde N_{\tilde X_{\tau_k} \setminus \tilde v_0} \setminus (\tilde \partial \cup \tilde \mathcal{Z}^k \cup \tilde A_k )^{\# \delta}$. Recall that $D_k^{\# \delta}$ is simply connected.

Hence we can apply Uchiyama's result (\cref{lem:scaling_limit_main}) and conclude via induction.

Let us elaborate this application of Uchiyama's result.
Assume that $(\mathcal{Y}^{\tau_k})^{\# \delta}$ is within distance $\varepsilon$ of the law of $\mathcal{Y}^{\tau_k}$ in L\'evy--Prokhorov metric (with an underlying topology generated by the Hausdorff metric) for small enough $\delta$. We first need the following lemma.

\begin{lemma}\label{L:exit_convergence}
$\tilde X^{\# \delta}_{\tau_{k+1}}$ converges in law to $\tilde V'_k$.
\end{lemma}

\begin{proof} From the invariance principle we know that the random walk $X^{\# \delta}$ can be coupled with a reparametrised Brownian motion $B_{\phi^{-1}(t)}$ so that they are uniformly close on compact time intervals. Thus let $\tau$ be the time at which the Brownian motion hits $\tilde A_k \cup \tilde \partial \cup (N_{\tilde z_k \setminus \tilde z})^c$ (call this set $\mathcal{H}_k$). Therefore, at time $\phi^{-1}(\tau)$, the random walk $\tilde X^{\# \delta}$ is uniformly close to $\mathcal{H}_k^{\# \delta} : = \tilde A_k^{\# \delta} \cup \tilde \partial^{\# \delta} \cup ((N_{\tilde z_k \setminus \tilde z})^c)^{\# \delta}$. Applying the Beurling-type estimate \cref{lem:Beurling} shows that with high probability the random walk will next intersect $\mathcal{H}_k^{\# \delta}$ after time $\tau$ at a position close to $B_{\phi^{-1}(\tau)} = \tilde V'_k$. Conversely, applying \cref{lem:Beurling} to Brownian motion (which follows e.g. by letting $\delta \to 0$ in this lemma) we see that when the random walk hits $\mathcal{H}_k^{\# \delta}$ at time $\tau_{k+1}$, the Brownian motion will also next hit $\mathcal{H}_k$ after that time at a nearby position. Altogether this shows that $X^{\# \delta}_{\tau_{k+1}}$ converges to $V'_k$.
\end{proof}

From the invariance principle in our assumption, \cref{lem:Vk} and \cref{L:exit_convergence} above, it is not hard to see that $\tilde V_{k}^{\# \delta}$ converges to $\tilde V_{k}$ in law since the point $\tilde V_{k}$ is an a.s. continuous function of the Brownian path $X[\tau_{k},\tau_{k+1}]$ and $\mathcal{Y}^{\tau_k}$.
Using \cref{lem:independent_RW} we deduce that conditioned on $X[0,\theta_{k}]^{\# \delta}, (\mathcal{Y}^{\tau_k})^{\# \delta}, X_{\tau_{k+1}}^{\# \delta}$,
 the law of $\tilde X[\theta_{k},\tau_{k+1}]^{\# \delta}$ is the same as a simple random walk starting from $\tilde V_{k}^{\# \delta}$ conditioned to exit $D_k^{\# \delta}$
 at $\tilde X_{\tau_{k+1}}^{\# \delta}$. Since $D_k^{\# \delta}$ is simply connected, now apply Uchiyama's result (\cref{cor:Uchiyama}) to conclude that the law of the loop erasure of $X[\theta_{k},\tau_{k+1}]^{\# \delta}$ conditioned on $X[0,\theta_{k}]^{\# \delta}, (\mathcal{Y}^{\tau_k})^{\# \delta},X^{\# \delta}_{\tau_{k+1}}$ converges as $\delta \to 0$ to an independent chordal SLE$_2$ in $D_k$ from $\tilde V_{k}$ to $\tilde V_{k}'$. Here $D_k$ is as in Step 3 of the continuum Wilson algorithm for generating CRSF: that is, let $\mathcal{Y}^{\tau_k}$ be the limiting simple curve of $(\mathcal{Y}^{\tau_k})^{\# \delta}$ which is at most $\varepsilon$ away in the Hausdorff sense from it (which exists by assumption). Then $D_k$ is the connected component containing $\tilde X^{\tau_k}$ in $\tilde N_{\tilde X^{\tau_k} \setminus v_0} \setminus(\tilde \partial  \cup \tilde \mathcal{Z}_k \cup \tilde A_k)$.

 To see that we can apply \cref{cor:Uchiyama}, we need to verify that $D_k^{\# \delta}$ converges to $D_k$ in the Carath\'eodory sense. To see that the loop-erasure converges, suppose without loss of generality that the convergence of $\tilde \partial^{\# \delta}$ and $(\mathcal{Y}^\tau_k)^{\# \delta}$ holds almost surely, by the induction hypothesis. Hence $\partial D_k^{\# \delta}$ converges in the Hausdorff sense to $\partial D_k$, almost surely. Moreover, for any point $p_0$ in $D_k$ we have $p_0 \in D_k^{\# \delta}$ for $\delta$ small enough and furthermore we can find an open neighbourhood of $p_0$ which is contained in $D_k^{\# \delta}$  for small enough $\delta$. In other words, $D_k^{\# \delta}$ converges in the sense of kernel convergence (\cite[Section 1.4]{Pommerenke}). Consequently, applying the Carath\'eodory kernel theorem (Theorem 1.8 in \cite{Pommerenke}), we deduce that for some fixed $p_0 \in D_k$, the Riemann map $\phi_{\# \delta}$ in the assumptions of Theorem \ref{lem:scaling_limit_main} converges uniformly to $\phi$ on compact subsets of $D_k$.  Also note that since $\tilde \mathcal{Y}^{\tau_k}$ is a simple curve by the induction hypothesis, $\mathbb{C} \setminus D_k^{\# \delta}$ is locally connected, uniformly in $\delta$. Hence the application of Corollary \ref{cor:Uchiyama} is justified and the proof is complete.

 %
 %
\end{proof}

Using \cref{thm:main_tech} and \cref{lem:MC_branch}, we know that the portion of the discrete CRSF sampled in any finite number of Wilson algorithm steps (i.e., a finite number of macroscopic branches in the CRSF) converges in law to a subset of $M$ sampled using the continuum algorithm described above. To complete the proof of \cref{thm:CRSF_universal}, we need a version of Schramm's finiteness theorem (originally proved in \cite{SLE}). This is achieved in \cref{lem:Schramm_finiteness}, which introduces ideas (especially the ``good algorithm") which will be important for the local coupling argument later. We start to discuss this below.

\subsection{Schramm's finiteness theorem}\label{finiteness}

We start with a lemma on hitting probabilities which was proved in
\cite{BLR16} in the simply connected case using only the uniform crossing assumption; this is in a similar spirit to Lemma 2.1 in Schramm \cite{SLE}. Essentially, this provides a non-quantitative Beurling estimate and the proof is exactly the same as in \cite{BLR16}.

\begin{lemma}[Lemma 4.15 in \cite{BLR16}]
  \label{lem:SRW_hit}
There exist constants $c_0,c_1,C$ depending only on the constants in the crossing assumptions of \cref{sec:setup}
such that the following holds. Let $K \subset K' \subset \tilde M$ be a connected set such that the Euclidean diameter of $K$ is at least $R$. Let $v \in \tilde \Gamma^{\# \delta}$ be such that $B_{\textsf{euc}}(v,R) \subset K'$ where $B_{\textsf{euc}}$ denotes the Euclidean ball. Let $\dist(v,K)$ be the Euclidean distance between $v$ and $K$. Then
for all $\delta \in (0,\delta_{K'} \wedge C\delta_0 \dist(v,K))$,
$$
\mathbb{P}(\text{simple random walk from $v$ exits $B(v,R)^{\# \delta}$ before hitting $K^{\# \delta}$})
\le c_0 \left(\frac{ \dist(v,K)}{R}\right)^{c_1}
$$
\end{lemma}

We will now need a version of the Schramm's finiteness lemma in
our setting of Riemann surfaces. Suppose we have specified a (possibly empty) set $\partial$ of boundary vertices. (In applications later, $\partial$ will consist of the natural boundary of the manifold $\partial \Gamma^{\# \delta}$, which may be empty, and possibly a finite set of branches already discovered in the CRSF, including some noncontractible cycles.) Suppose $v \in \tilde M$ and choose $r$ small enough so that $p$ is injective in $B(v,r)$ and also $B(v,r)^{\# \delta} \cap \partial  = \emptyset$.
Let $H$ be a subset of vertices of  $B(v,r/2)^{\# \delta}$.
Using the generalised Wilson's
algorithm, we now prescribe a way to sample the portion of the CRSF formed by branches starting from vertices in
$p(H)$ with the specified set of boundary vertices $\partial $. Consider a sequence of scalings $\{\frac{r}{2} 6^{-j} \mathbb{Z}^2\}_{j
\ge 1}$. Such a scaling divides the plane into squares of sidelength $6^{-j} r/2$ which we will refer to as cells. Let $H(s)$ be the subgraph induced by all vertices within Euclidean distance $s$ (in $\tilde M$) from $H$.  Define $\mathcal{Q}_j = \mathcal{Q}_j(H)$ as follows. Pick one vertex from $ H(2^{-j} r)$ in each cell of $\frac{r}{2} 6^{-j} \mathbb{Z}^2$ so that it is farthest from $v$ (break ties arbitrarily). Now we define the \textbf{good algorithm} which proceeds as follows. Sample
branches of the CRSF from the vertices of $p(\mathcal{Q}_j)$ (in some arbitrary order) using
Wilson's algorithm to obtain $\mathcal{T}^{\# \delta}_j$. Then increase the value of $j$ to $j+1$ and repeat
 until we exhaust
all vertices in $H$. We denote this good algorithm by $GA_{\tilde \Gamma^{\# \delta},\partial, H}(v,r)$.
It is clear that this contains the set of branches containing $H$ in a sample $\mathcal{T}^{\# \delta}$ of the CRSF with wired boundary $\partial$. Call this $\mathcal{T}_H^{\# \delta}$.

\medskip The proof of the following lemma is exactly the same as in Lemma 4.18
in \cite{BLR16} hence we do not provide a proof here and simply refer to that paper.

\begin{lemma}[Schramm's finiteness theorem \cite{SLE}]\label{lem:Schramm_finiteness}
 Fix $\varepsilon>0$ and let $v,r,H$ be as above. Then there exists a $j_0 =
j_0(\varepsilon)$ depending solely on $\varepsilon$ and the crossing constants from \cref{sec:setup} such that for all $j \ge j_0$ and all $\delta \le \text{min}\{\delta_{{\bar B(v,r)}} ,C6^{-j_0}\delta_0 r\}$, where $\delta_{{\bar B(v,r)}},\delta_0$ is as in \cref{crossingestimate}, the
following holds with probability at least $1-\varepsilon$:
\begin{itemize}
 \item The random walks emanating from all vertices in $\mathcal{Q}_j(H)$ for $j > j_0$ stay in
$\cup_{z\in H }B(z,r/4)$.
\item All the branches of $\mathcal{T}^{\# \delta}$ sampled from vertices in $\mathcal{Q}_j
\cap B(v,r/2)$ for $j > j_0$ until they hit $\mathcal{T}^{\# \delta}_{j_0}
\cup \partial$ or complete a noncontractible loop have Euclidean
diameter at most $\varepsilon r$. More precisely, the connected components of
$\mathcal{T}_H^{\# \delta} \setminus \mathcal{T}^{\# \delta}_{j_0}$ within $B(v, r/2)$ have Euclidean
diameter at most $\varepsilon r$.
\end{itemize}
\end{lemma}

\begin{proof}[Proof of \cref{thm:CRSF_universal}]
 Using \cref{thm:main_tech} and \cref{lem:MC_branch}, we know that the portion of the discrete wired oriented CRSF sampled in any finite number of Wilson algorithm steps (i.e., after a finite number of branches) converges in law to a subset of $M$ sampled using the continuum algorithm described in \cref{SS:wilsoncontinuous}. Fix $\varepsilon >0$. We will prescribe a way to sample the finite number of branches $\mathsf B$ so that the diameter of each remaining branch is at most $\varepsilon$ with probability at least $1-\varepsilon$ for all small enough $\delta$. This will complete the proof as this implies that the law of the discrete CRSF is Cauchy in the L\'evy--Prokhorov metric associated with the Schramm topology. Also, we know from \cref{thm:main_tech} that the law of the finite number of branches sampled above is close to the continuum branches sampled using the continuum Wilson's algorithm which does not depend on the sequence $\Gamma^{\# \delta}$ chosen as long as it satisfies the conditions in \cref{sec:setup}. Hence the limiting law also is independent of the choice of $\Gamma^{\# \delta}$.

\medskip
We concentrate on the hyperbolic case; the parabolic case (i.e., a torus under our assumptions) is almost exactly the same and in fact a little simpler.
An essential difference from the simply connected case consists in ruling out an accumulation of noncontractible loops near the boundary. Let $K\subseteq \bar M$ be a compact subset (which may include portions of the boundary of $M$). Given $c>0$, consider an open cover of $K$ with $\cup_{z \in K} B_{M}(z,r_z)$ such that $r_z <c$ for all $z$ and $p$ is injective on every component of $p^{-1}(B_{M}(z,r_z))$ (recall $B_M$ is the ball induced by the metric in $M$ and this can include a portion of the boundary of $M$). Call a finite subcover $C(K,c)$ for any such choice of $K,c $ and some fixed choice of $r_z$.

Let $\varepsilon>0$.
Consider a finite cover $C(\overline M,\varepsilon)$, with balls $B_1, \ldots, B_\ell$ (so $\ell$ is the number of sets in the cover). Now by the ``boundary Beurling" estimate (showing the boundary is hit quickly if one starts close to it) \cref{lem:Beurling}, we can choose a small $\beta = \beta( \varepsilon)<\varepsilon$ and $\delta=\delta(\beta)$ small so that for every vertex $v \in \Gamma^{\# \delta}$ with $d_{M}(v,\partial M) < \beta$, the diameter (in the metric of $\bar M$) of a branch sampled from $v$ is at most $\varepsilon/2$ with probability at least $1-\varepsilon/\ell$.  Let $C'$ be the
set of balls in $C(\bar M, \varepsilon)$ that intersect $\partial M$; call $\ell'$ the number of such balls and say without loss generality they are $B_1, \ldots, B_{\ell'}$. In each such ball $B_i$ ($1\le i \le \ell'$), let $v_i$ be a vertex such that $\beta / 2 \le d_M(v_i, \partial M) \le \beta$.

Let  $\mathcal{E}_1$ be the event that none of the branches sampled from $\mathcal{V}' = \{v_1, \ldots, v_{\ell'}\}$ has diameter more than $\varepsilon$. By a union bound, $\mathcal{E}_1$ has probability at least $1-\varepsilon$ since $\ell' \le \ell$. Since every noncontractible loop in the manifold has $d_M$-length lower bounded by $\lambda>0$ which depends only on $M$ (as it has no punctures and finitely many holes), we can assume without loss of generality that $\varepsilon$ is small enough so that on $\mathcal{E}_1$, all the branches sampled from $\mathcal{V}'$ don't form a noncontractible loop and hit the unique boundary component within distance $\varepsilon>0$.

\medskip Let $D_{\beta} =\{z:d_{M}(z,\partial M) \ge \beta/2  \}$. Let $C(\overline D_\beta,\beta/4) = \cup_{i=1}^k B_{M}(z_i,r_{z_i})$. Pick $\eta>0$ (depending only on $\beta$ and hence only on $\varepsilon$) small enough such that $p^{-1}(B_{M}(z_i,r_{z_i}))$ has at least one component in $(1-\eta) \mathbb{D}$ for all $1\le i\le k$. Note that the number of such components contained in $(1-\eta) \mathbb{D}$ is finite.
For each $1\le i \le k$, we fix $K_i$ to be one such pre-image of $B_M(z_i, r_{z_i})$ contained in $(1-\eta) \mathbb{D}$ and let $w_i:= p^{-1}(z_i) \cap K_i$.

Let $K_i^{\# \delta}$ be the set of vertices of $\tilde \Gamma^{\# \delta}$ in $K_i$.
For each $K_i$, we can define $\mathcal{Q}_{j,w_i}:= \mathcal{Q}_j(K_i^{\# \delta})$ as in \cref{lem:Schramm_finiteness}. We now sample the branches from  $(\mathcal{Q}_{j,w_i})_{j \ge 1}$ as prescribed by the good algorithm. Since the Euclidean metric is conformally equivalent to the lift of the metric $d_M$ to $\mathbb{D}$, we see that there is an $\tilde \varepsilon$ (depending only on $\eta$ and $\varepsilon$, and hence only on $\varepsilon$) such that if the Euclidean diameter of a connected set $X$ intersecting $(1-\eta)\mathbb{D} $ is less than $\tilde \varepsilon$ in $\mathbb{D}$ then the diameter of $p(X) $ is at most $\varepsilon$. Using \cref{lem:Schramm_finiteness}, we pick a $j_0$ depending on $\tilde \varepsilon$ and $\beta$ (and so only on $\varepsilon$)
such that for all $\delta < \delta(\beta)$, the following event $\mathcal{E}_2$ holds with probability at least $1-\varepsilon$: the Euclidean diameter of all the branches starting from vertices from $(\mathcal{Q}_{j,w_i})_{1 \le i \le k,j>j_0}$ sampled according to the good algorithm is at most $\tilde \varepsilon$.

\medskip Now consider the finite set of branches $\mathsf B$ consisting of all the branches starting from $v_i$, $1\le i \le \ell'$ and all the branches in $\mathcal{Q}_{j, w_i}$, $j \le j_0$ and $1\le i \le k$. (This is the set $\mathsf B$ discussed at the start of the proof).
To finish the proof it therefore remains to point out that, once the branches $\mathsf B$ have been sampled,
conditionally on the event $ \mathcal{E}_1\cap \mathcal{E}_2$, by planarity all the other branches deterministically have diameter in $M$ smaller than $6\varepsilon$. Indeed, all the other branches are trapped in a cell of diameter at most $6 \varepsilon$ on $\mathcal{E}_1\cap \mathcal{E}_2$. For $\delta < \delta(\beta)$ (and so $\delta$ small enough depending only on $\varepsilon$), $\mathbb{P}( \mathcal{E}_1 \cap \mathcal{E}_2) \ge 1 - 2\varepsilon$. This completes the proof of convergence. The proof of superexponential tail of the number of noncontractible cycles is immediate from  \cref{lem:non-contractible_cont} below.
\end{proof}

\begin{corollary}\label{lem:non-contractible_cont}
Let $(C_1^{\# \delta},\ldots, C_{K^{\# \delta}}^{\# \delta})$ be the set of noncontractible cycles of
a wired oriented CRSF. Then
$$
 (C_1^{\# \delta},\ldots, C_{K^{\# \delta}}^{\# \delta} )
\xrightarrow[\delta \to 0]{(d)} (C_1,C_2, \ldots, C_{K})
$$
where $C_1, \ldots, C_{K}$ are almost surely disjoint noncontractible simple loops in $M$. Furthermore, for all $\varepsilon>0$, there exists $C(\varepsilon)<\infty$ such that for all $\delta$ small enough (depending on $\varepsilon$), for all $k \ge 1$,
\begin{equation}
 \mathbb{P}(K^{\# \delta}>k) \le C(\varepsilon) \varepsilon^k. \label{eq:non-contractible_tail}
\end{equation}
\end{corollary}
We remark that Lemma 10 of Kenyon and Kassel \cite{KK12} provides a proof of  \eqref{eq:non-contractible_tail}, but we still include a proof for completeness and since it is rather short in our setting given the developed technology.
\begin{proof}
First note that the convergence in law of the set of noncontractible loops is a direct consequence of the convergence of the whole CRSF (\cref{thm:CRSF_universal}).

For the tail bound, notice that in the proof of \cref{thm:CRSF_universal}, once we have sampled $\mathsf B$, none of the rest of the branches have diameter more than $\varepsilon$ with probability at least $1-\varepsilon$. Since a noncontractible loop must have a diameter which is uniformly lower bounded, this proves that none of the rest of the branches sampled is a noncontractible loop with probability at least $1-\varepsilon$, and hence trivially, the same statement is true for the next branch sampled. Since this probability is non-decreasing in the number of branches sampled, the proof is completed by iterating this bound.
\end{proof}

\begin{remark}
The proof of the convergence of the wired oriented CRSF in \cref{thm:CRSF_universal} goes through if the manifold has finite number of punctures. Indeed in that case, we do not need to worry about branches within distance $\varepsilon$ of the punctures once the other branches have been sampled as they all must have diameter less than $\varepsilon$. However, \eqref{eq:non-contractible_tail} is not true as there can be a lot of small noncontractible loops around the punctures.
\end{remark}

In fact, the proof of \cref{thm:CRSF_universal} shows the following stronger result, which will be needed in \cite{BLR_riemann2}. In essence, this says that convergence of the special branches in the Temperleyan forest (denote them here by $\mathfrak{B}^{\# \delta}$ to emphasise the difference between discrete and continuum) to some continuum limit $\mathfrak{B}$ satisfying very mild assumptions implies convergence in the Schramm sense of the entire Temperleyan forest $\mathcal{T}^{\# \delta}$. This is because, given the special branches $\mathfrak{B}^{\# \delta}$, the rest of the Temperleyan forest has the law of the union of oriented wired CRSF in each component of $M \setminus \mathfrak{B}^{\# \delta}$ and each component of $M \setminus \mathfrak {B}^{\# \delta}$ has the topology of an annulus. Thus $\mathfrak{B}^{\# \delta}$ can be treated as being part of the boundary $\partial^{\# \delta}$ in the initial step of Wilson's algorithm, thereby allowing us to use \cref{thm:main_tech}. We deduce:

\begin{thm}[Convergence of Temperleyan forest away from special branches]\label{thm:specialbranches_Temp}
Let $\Gamma^{\# \delta}$ be a graph with boundary $\partial \Gamma^{\# \delta}$ faithfully embedded on a Riemann surface $M$ satisfying the assumptions of \cref{sec:setup}. Suppose that the branches $\mathfrak{B}^{\# \delta}$ of the Temperleyan CRSF $\mathcal{T}^{\# \delta}$ on $(\Gamma')^{\# \delta}$ converge to a continuum limit $\mathfrak{B}$ in the sense of uniform convergence of curves modulo reparametrisation, independent of the sequence $\Gamma^{\# \delta}$. Also suppose that the law of $\mathfrak{B}$ is conformally invariant, and that almost surely, $\mathcal{B}$ is a set of continuous curves in $M$ such that each component of $M \setminus \mathfrak{B}$ has the topology of an annulus.

Then the limit $\mathcal{T}$ in law as $\delta \to 0$ of $\mathcal{T}^{\# \delta}$ on $(\Gamma')^{\# \delta}$ exists
in the Schramm topology and is independent of the sequence $\Gamma^{\# \delta}$ subject to the assumptions in \cref{sec:setup}. This limit is also conformally invariant.

Furthermore, let $K^{\# \delta}$ be the number of noncontractible loops $\mathcal{T}^{\# \delta}$. Then for any $q>1$ there exists a constant $C_q>0$ independent of $\delta$ such that
$$\mathbb{E}(q^{K^{\# \delta}}) \le C_q.$$
\end{thm}

\section{Winding and height function}\label{sec:winding_ht}

In this section, we explain the connection between winding of the Temperleyan forest and height function. In order to account for the curvature of the surface it will be important to work on the universal cover $\tilde M$ and the lifts of both the dimer configuation and the Temperleyan CRSF to it. This will also have the advantage that the dimer height one-form (defined properly below) becomes an actual function on the faces of the lift of the Termperleyan graph embedded on the surface. We refer the reader to \cref{sec:ht,sec:Temp} for relevant definitions and notations. The theory we develop below is similar to \cite{KPWtemperley} but with a few important modifications, related in particular to the fact that the Temperleyan forest is typically not connected. See also \cite{S16} for a version on the torus.

Also recall that $\tilde M = \mathbb{C}$ only for the case of the flat torus in this article.
We recall the notation $G'$ for a Temperleyan graph embedded in $M$ and also recall $\Gamma',(\Gamma^\dagger)'$. Now we need to lift the graph $G'$ and define a height function which is consistent with this lift.

At this point, we need to spare a few words related to the removal of white vertices from the graph $G$ to obtain a dimerable graph. This operation can be interpreted as inserting certain discrete version of magnetic operators on the free field (e.g. in the sense of \cite{dubedat_torsion}). If we want to interpret the height function as winding, the height function would be additively multivalued where it picks up an additional $\pm 2\pi$ winding when it goes around a removed white vertex. This motivates us to introduce a puncture corresponding to each face obtained by removal of a white vertex (cf. \cref{edge_removal}) and call the new manifold $M'$. Later on we will assume that each of the punctures converge to fixed distinct points in the manifold (\cref{assumption_precise}). We now treat every face with a puncture as an outer face.

We lift $G'$ to the universal cover $\tilde M'$ of $M'$ and call it $\tilde G'$.  Note that the lift of every non-outer face of $G'$ is a quadrangle. For every face $f$ of $\tilde G'$, we fix once and for all a diagonal $d(f)$ joining the two black vertices. We assume without loss of generality that the diagonal is a smooth curve lying completely inside the quadrangle.

We take a dimer configuration of $G'$ which corresponds to a dimer configuration on $\tilde G'$. We now wish to relate the dimer height function to the winding of a wired oriented CRSF branch adjacent to a path joining the faces, up to certain explicit terms describing the effect of jumping from one component of the CRSF to another. In \cite{KPWtemperley}, this connection was established for trees with straight line embeddings in the simply connected case. In \cite{S16}, the toroidal case was treated, but with only straight line embeddings. In what follows, we need to define the height function properly not necessarily for just straight line embeddings, but any arbitrary embedding which is smooth except at the vertices. We also need to deal with the fact that the CRSF might have many connected components.
The main result of this section, which summarises the desired relationship is stated in \cref{lem:number_crossing}.

\subsection{Winding field of embedded trees and choice of reference flow}\label{sec:tree_embedded}

{To describe properly the connection between winding field of trees and height function of dimers, one needs to get past certain technicalities.
 One technicality with this connection is  that the height function is defined on the faces of the graph and the winding should ideally be computed between vertices of the spanning forest. Another issue we have is that now we need to deal with a spanning forest, and hence the winding between vertices belonging to different connected components must be properly defined. Finally, the definitions should ideally be symmetric with respect to the primal and dual trees. }

{In this subsection, we temporarily forget about dimers and Temperleyan forests, and focus on how to compute the \textbf{winding field} of a \emph{deterministic}, infinite, one-ended, spanning tree and its dual tree which are embedded smoothly in the complex plane. This will create a simple setup for connecting dimer height function with winding of Temperleyan spanning trees. Hence the rest of this subsection could be read independently of the rest of the paper.}

Consider an infinite one-ended tree $\mathcal{T}$ embedded in $\mathbb{C}$ with the edges embedded smoothly (although having points of non-differentiability at the vertices, which we call \textbf{corners}, are allowed, so that the branches are only piecewise smooth). Recall that the intrinsic winding of any finite branch in this tree is well-defined. Since the infinite tree is one-ended, we can orient the tree towards that unique end.
From every vertex $x$ on the tree, we can define an infinite branch $\gamma_x$ from $x$ to infinity.
Suppose for now
\begin{equation}\label{tree_assn}
|W_\i(\gamma_x)| <\infty \text{ for all }x\in \mathcal{T}.
\end{equation}
Then we can define a winding field  $\{h_\mathcal{T}(x): x \in \mathcal{T}\}$ of the tree to be simply $h_\mathcal{T}(x) := W_\i(\gamma_x)$. The following elementary lemma expresses the height in a way which later allows us to extend the definition of $h_\mathcal{T}$ even if \eqref{tree_assn} is not satisfied.
If $x \notin \gamma_y$ and $y \notin \gamma_x$, notice that $\gamma_x$ and $\gamma_y$ eventually merge and $\gamma_y$ merges either to the right or to the left of $\gamma_x$ (since the tree is embedded in $\mathbb{C}$, this makes sense). Let $\gamma_{xy}$ be the unique path connecting $x$ and $y$ in $\mathcal{T}$.

\begin{lemma}\label{lem:winding_field}
 In the above setup, if $\gamma_y$ merges with $\gamma_x$ to its right then
$$
h_\mathcal{T}(x)  - h_\mathcal{T}(y) = W_\i(\gamma_{xy}) + \pi
$$
If $\gamma_y$ merges with $\gamma_x$ to its left, then
$$h_\mathcal{T}(x)  - h_\mathcal{T}(y) = W_\i(\gamma_{xy}) - \pi.$$
If $y \in \gamma_x$ and $y$ is not a corner (or $x \in \gamma(y)$ and $x$ is not a corner), then $$h_\mathcal{T}(x )  - h_\mathcal{T}(y)  = W_\i(\gamma_{xy}) .$$
\end{lemma}
\begin{proof}
Notice that the last assertion follows simply from additivity of intrinsic winding. Indeed, for example if $y \in \gamma_x$, there is no discontinuity of intrinsic winding at $y$ since $y$ is not a corner.

For the rest, take $m \in \gamma_x \cap \gamma_y$. Notice that by additivity of winding,
\begin{align*}
h_\mathcal{T}(x) - h_\mathcal{T}(y) & = W_{\i} (\gamma_{xm}) - W_{\i} (\gamma_{ym})\\
& = W_{\i} (\gamma_{xm}) + W_{\i} (\gamma_{my})\\
& = W_{\i} (\gamma_{xy}) +\varepsilon \pi
\end{align*}
where $\varepsilon = +1$ (or $\varepsilon = -1$) if $\gamma_y$ merge with $\gamma_x$ to its right (or left). This is clear since we need to do a half turn to move from $\gamma_{xm}$ to $\gamma_{my}$ at $m$ and the turn is clockwise if $\gamma_y$ merges to the right of $\gamma_x$ and anticlockwise otherwise.
\end{proof}
We remark that the last assertion of the above lemma works even at corners by adding the appropriate angle at the corner to match the winding field difference. In what follows, we avoid using winding field at corners, hence this ambiguity would not bother us. We also remark that such a definition easily extends to a finite tree with the branches oriented towards a fixed vertex in the tree in place of being oriented towards ``infinity". Finally the formula for $h(x) - h(y)$ described in \cref{lem:winding_field} can be taken to be the definition of the winding field (or rather its gradient) for any tree embedded with piecewise smooth edges, even if \eqref{tree_assn} is not satisfied. This will be the typical situation for our setup.

We will now extend the definition of the winding field of $\mathcal{T}$ to the faces of a graph spanned by $\mathcal{T}$. For context, we remind the reader that in \cref{sec:Temp}, a bijection between Temperleyan CRSF and dimer configurations was established. Also recall that the height function of a dimer configuration is defined on the faces of the graph. Thus it is necessary to do this extension carefully so that the dimer height differences become exactly the same as the winding field, perhaps up to some global topological error term coming from the jumps between various components in the forest.

With this in mind, take an infinite locally finite graph $\Gamma$ {embedded smoothly in $\mathbb{C}$, except perhaps at the vertices where we might have corners} and let $\mathcal{T}$ be a one ended spanning tree of $\Gamma$ ({we emphasise that we are still considering a spanning tree for the moment and not yet a forest}). Therefore the dual spanning tree $\mathcal{T}^\dagger$ of the dual graph $\Gamma^\dagger$ is also one-ended.
Let $G$ be the superposition graph (in $\mathbb{C}$), as introduced in \cref{sec:Temp}.
It will be useful to \textbf{augment the trees} $\mathcal{T}$ and $\mathcal{T}^\dagger$ to include diagonals, as follows. We fix a point on the diagonal $d(f)$ once and for all, which we denote by $m(f)$ and sometimes refer to as \emph{midpoint of the diagonal} by an abuse of terminology.
For each face, add to $\mathcal{T}$ (resp. $\mathcal{T}^\dagger$) the portion of the diagonal $d(f)$ connecting the point $m(f)$ to the unique primal (dual) vertex touching $d(f)$. This way the primal and dual trees meet in each face $f$ at the (smooth) point $m(f)$ on the diagonal $d(f)$ of that face. With a small abuse of notation, we will still denote $\mathcal{T}$ and $\mathcal{T}^\dagger$ these augmented trees.

Note that we can orient $\mathcal{T},\mathcal{T}^\dagger$ towards their unique ends. This allows us to define {two winding fields as above (one for $\mathcal{T}$ and one for $\mathcal{T}^\dagger$).
Having oriented $\mathcal{T}$ and $\mathcal{T}^\dagger$ we can also apply the Temperleyan bijection described in \cref{sec:Temp} to obtain a dimer matching of $G$ (see  \cref{rmk:temp_local_map}; recall that for the moment $\mathcal{T}$ and $\mathcal{T}^\dagger$ are still a dual pair of spanning trees, not forests).} We will first need to define a suitable reference flow on $G$, {which will then allow us to speak of the height function associated to the dimer configuration and then show the relation between this dimer height function and the two above winding fields.}

\begin{figure}
\centering
\includegraphics[scale = 0.7]{winding_ht2}
\caption{The definition of the height function in terms of winding.}\label{fig:wind_ht}
\end{figure}

\begin{defn}[reference flow]\label{def:ref_flow}
Let $w,b$ be two adjacent white and black vertices and let $f_l, f_r$ be the faces to the left and right of the oriented edge $(bw)$.
Define
\begin{equation}
\omega_{ref} (wb) = \frac1{2\pi} (W_\i((m(f_r) , b) \cup (b,m(f_l))) + \pi )
\label{D:flowref}
\end{equation}
 where $(m(f_l) , b)$ is the portion of $d(f_l)$ joining $m(f_l)$ and $b$, and similarly $(m(f_r),b)$.
Define $\omega_{ref} (bw) =  - \omega_{ref} (wb)$ (see \cref{fig:wind_ht}).
\end{defn}
\begin{figure}[h]
\centering
\includegraphics[scale = 0.7]{ref_flow_proof}
\caption{Proof of \cref{lem:omega_ref}.}
\label{F:ref_flow}
\end{figure}
\begin{lemma}\label{lem:omega_ref}
$\omega_{ref}$ defined above is a valid reference flow. That is, the total mass sent out of any white vertex $w$, $\sum_{b \sim w} \omega_{ref}(wb)$, is equal to one; and the total mass received to any black vertex $b$, $\sum_{w \sim b} \omega_{ref}(wb)$, is also one.
\end{lemma}
\begin{proof}
Let $w$ be a white vertex. Notice that in $\sum_{b \sim w} \omega_{ref}(wb)$, the oriented diagonals form a clockwise loop whose total winding is
$- 2\pi$. Adding $+\pi$ for each of the surrounding black vertices, and dividing by $2\pi$, we see that the total flow out of $w$ is indeed 1 as desired.

For a black vertex $b$, the argument is better explained by considering a picture (see \cref{F:ref_flow}).  Fatten the ``star" formed by the half-diagonals incident to $b$ into a star shaped domain. Then notice that the total flow out of $b$ is  simply the limit of the total winding, divided by $2\pi$, of the boundary of this domain (again in the clockwise orientation this time), as the  domain thins into the ``star". Indeed, the $-\pi$ term in the definition of $\omega_{ref}$ in \eqref{D:flowref} counts the half-turn as we move from the left side to the right side of a half-diagonal. Since the total winding of such a curve is $-2\pi$, it follows that the total flow out of $b$ is $-1$, as desired.
\end{proof}

{We are now ready to relate the three notions of height function defined by the pair of dual spanning trees $\mathcal{T}, \mathcal{T}^\dagger$. To do so, note that we can extend the definition of the winding field of both $\mathcal{T}$ and $\mathcal{T}^\dagger$ from Lemma \ref{lem:winding_field} to the augmented trees.}

\begin{prop}\label{prop:winding_field=ht}
In the above setup, let $h_\mathcal{T}$ and $h_{\mathcal{T}^\dagger}$ be the winding field of $\mathcal{T}$ and $ \mathcal{T}^\dagger$ respectively. Let $h_{\dim}$ be the height function corresponding to the dimer configuration obtained from $(\mathcal{T},\mathcal{T}^\dagger)$ with reference flow $\omega_{ref}$.  For any two faces $f, f'$,
$$
h_\mathcal{T} (m(f')) - h_{\mathcal{T}}(m(f)) = h_{\mathcal{T}^\dagger} (m(f')) - h_{\mathcal{T}^\dagger}(m(f))  = 2\pi(h_{\dim } (f') - h_{\dim} (f)) .
$$
\end{prop}

\begin{remark}
  Note that having augmented the trees as explained above, the winding fields in $\mathcal{T}$ and $\mathcal{T}^\dagger$ now play a completely symmetric role.
\end{remark}

\begin{proof}
 Define $\gamma_v$ for the branch of $\mathcal{T}$ starting from $v$ and similarly define $\gamma^\dagger_v$. {For a face $f$, we define $\gamma_f$ (respectively $\gamma^\dagger_f$) to be the branch of the augmented tree $\mathcal{T}$ (resp. $\mathcal{T}^\dagger$) starting from $m(f)$.} Fix faces $f$ and $f'$ and assume without loss of generality that $\gamma_{f'}$ is to the right of $\gamma_f$.
 Note that this means that $\gamma^\dagger_{f'}$ is to the left of $\gamma^\dagger_{f}$. Also note that
 $$
 W_{\i}(\gamma_{ff'}) + W_{\i}(\gamma^\dagger_{f'f})  = -2\pi
 $$
because $\gamma_{ff'}$ concatenated with $\gamma^\dagger_{f'f}$ forms a clockwise loop {and there is no jump at $m(f)$ and $m(f')$ because by assumption the midpoint $m(f)$ is a smooth point of $d(f)$}.
The {first equality} easily follows by applying the definition of winding field from \cref{lem:winding_field}.

For the last equality let $f_l,f_r$ be adjacent faces. Let the common (oriented) edge be $(bw)$ with $b$ being the black and $w$ the white vertex and let $f_r$ lie to its right. We assume {without loss of generality} that $b$ is a primal vertex. From the definition of $\omega_{ref}$ and recalling the sign convention of the flow defining the height function (\cref{sec:ht})
\begin{align*}
2\pi(h_{\dim } (f_r) - h_{\dim} (f_l)) & = \omega_{ref}(wb) - 2 \pi 1_{\text{$(bw)$ occupied by dimer}}  \\
&= W_\i((f_r , b) \cup (b,f_l)) + \pi - 2 \pi 1_{\text{$(bw)$ occupied by dimer}}
\end{align*}
Note that that $\gamma_{f_r}$ and $\gamma_{f_l}$ merge at $b$. Also note from Temperleyan bijection that if $(bw)$ is occupied by a dimer, then $\gamma_b$ starts by using the (half) edge $bw$ which implies that $\gamma_{f_l}$ lies to the left of $\gamma_{f_r}$. Otherwise, $\gamma_{f_l}$ lies to the left of $\gamma_{f_r}$. We conclude using the definition of winding field from \cref{lem:winding_field} and the above equation.
\end{proof}

{As a step towards extending the correspondence of \cref{prop:winding_field=ht} to forests, we now explain how to read off the height change along a path in the graph which does not necessarily follow the tree branches. Note that although the dimer height function is independent of the chosen path, it is not clear how to see this path independence looking at just the winding field. For an arbitrary path in the graph, there could be several ``jumps" over edges in the dual tree and it turns out that these jumps contribute an extra $\pm  \pi$ on top of the winding, depending on orientation. It will turn out that in case of forests, there is an analogous contribution for jumping over dual components which separate the primal connected components (and vice-versa).}

\begin{figure}[h]
\centering
\includegraphics[width = 0.8 \textwidth]{paths_modified}
\caption{The path $P$ in $\Gamma$ is the union of solid blue and dashed blue edges. Here number of partitions $k=3$. The solid blue denotes the segments in the tree $\mathcal{T}$. The union of solid red and solid blue edges is the modified path. The orange dotted paths denote the direction in which the primal tree goes off to $\infty$ and the green dotted path denotes the same for the dual tree. This determines the $\varepsilon_i's$ and $\delta_i'$s. Here $\varepsilon_1 = -1,\varepsilon_2 = 1,\varepsilon_3 = -1$ and $\delta_1=1, \delta_2=-1$.}\label{F:paths_modified}
\end{figure}

Let $P$ be a self avoiding path in $\Gamma$. We can partition this path into segments belonging to $\mathcal{T}$ separated by edges not belonging to $\mathcal{T}$ ({we remind the reader that $\mathcal{T}$ is still a tree, not yet a forest}). Let us call these segments $(P_1,\ldots, P_k)$ and let $(e_1,\ldots,e_{k-1})$ be the edges in $\Gamma$ separating them. Note that we allow $P_i$ to be a single vertex. Let $(x_i,y_i)$ be the starting and ending points of $P_i$.

Now we modify $P_i$ as follows.  Observe that the oriented edge $(y_i,x_{i+1})$ has two faces of $G$ to its left. Call the one incident to $y_i$, $f_i^-$ and the one incident to $x_{i+1}$, $f_i^+$. Call $m_i^-, m_i^+$ the midpoint of the diagonals of these faces.  We pick a face incident to $x_1$ and $y_k$ and add the segments joining these vertices and the midpoint of their diagonals. Call these endpoints $m_0^+, m_{k}^-$ respectively. We also join $y_i$ to $x_{i+1}$ using the diagonal segments of $f_i^-$ and $f_i^+$. Finally we delete the edges $e_i$. This completes the modification of the path $P$, which we are still going to denote as $P$ (see \cref{F:paths_modified}).

We also partition $P$ into segments as $[m_i^+,m_{i+1}^-]$ for $0 \le i \le k-1$ and $[m_i^-,m_{i}^+]$ for $1 \le i \le k-1$. Let $\varepsilon_i = +1$ (resp. $-1$) if $\gamma_{m_i^-}$ lies to the right (resp. left) of $\gamma_{m_{i-1}^+}$ for $1 \le i \le k$. Let $\delta_i = +1 $ (resp. $-1$) if $\gamma^\dagger_{m_i^+}$ lies to the right (resp. left) of $\gamma^\dagger_{m_i^-}$ for $1 \le i \le k-1$.

\begin{lemma}\label{lem:winding_arbitrary_path}
Under the above setup,
$$ h_{\mathcal{T}}(m_0^+) - h_{\mathcal{T}}(m_{k}^-) = W_{\i} (P) + \pi(\sum_{i=1}^{k} \varepsilon_i  +\sum_{i=1}^{k-1} \delta_i )= 2\pi(h_{\dim} (f_1) - h_{\dim} (f_k) )$$
\end{lemma}
\begin{proof}
By summing along each segment, the first equalty is simply a consequence of the definition and additivity of $h_\mathcal{T}$ and \cref{prop:winding_field=ht}. The second equality is also an implication of the second equality of \cref{prop:winding_field=ht}.
\end{proof}

\paragraph{Extension to forests.} We now extend the definition of winding field to forests before relating it to a dimer height function. Suppose $\mathcal{T}$ is now a spanning \emph{forest} of $\Gamma$ where each component is infinite. Let $\mathcal{T}^\dagger$ be its dual, and note that its components are also necessarily infinite. We fix an end of each component of primal and dual, and orient the trees towards that end. Thus we obtain an oriented pair of dual forests. Note again that by the local operation of Temperleyan bijection, we can find a dimer configuration on the superposition graph $G$ corresponding to $(\mathcal{T},\mathcal{T}^\dagger)$. Let $h_{\dim} $ be the dimer height function corresponding to this dimer configuration with reference flow given by $\omega_{ref}$ defined in \cref{def:ref_flow}.

We augment $(\mathcal{T},\mathcal{T}^\dagger)$ in the same way as in the connected case: in each face join the midpoint of the diagonals to the corresponding primal vertices in $\mathcal{T}$ and dual vertices in $\mathcal{T}^\dagger$.
{
\begin{defn}
In the above setup, define the winding field of $(\mathcal{T},\mathcal{T}^\dagger)$ to be the same as that given by the first equality of the formula in \cref{lem:winding_arbitrary_path}. This is well defined up to a global shift by $\mathbb{R}$.
\end{defn}

Notice that in the definition of $\delta_i$ above (the error term we need to add when ``jumping" over a dual edge) is defined using the dual tree, and hence there is no issue of connectivity when dealing with spanning forests rather than spanning trees.
It is straightforward to see that the above notion of winding field for forests is well-defined as the second equality of \cref{lem:winding_arbitrary_path} also tells us that this quantity is the same as the dimer height function (up to a global shift), and in particular is independent of the path $P$. The proof of \cref{lem:winding_arbitrary_path} relies on additivity of winding for each edge and does not depend on the fact that $(\mathcal{T},\mathcal{T}^\dagger)$ is a tree--dual tree pair and not a forest.

\begin{remark}
Note that there is no assumption about the number of ends of $(\mathcal{T},\mathcal{T}^\dagger)$ in the above definition: it makes sense as long as an orientation is fixed towards a unique end in each component.
Later we will see that because of toplogical reasons, each component (either of primal or dual) of the relevant (random) lift of the Temperleyan forests we need to deal with has \emph{exactly two ends} almost surely. This leaves us with a choice of which end to orient for each connected component, and once this choice is fixed, the above definition can be applied to define the winding field, which is going to be equal to the dimer height function (up to a global shift). But since the above definition for general forests with arbitrary ends require no additional extra effort, we decided to keep this definition.
\end{remark}

}

\subsection{Winding of CRSF and height function}\label{sec:height_winding}

In this section, we show how to extend the connection between winding and height function (established in \cite{KPWtemperley}) from the simply connected setting in the Euclidean plane with straight line embeddings to height one forms on general surfaces. Firstly we work in the universal cover if the surface, so that the CRSF is lifted to a spanning forest for which we have already worked out the connection in the previous section. However there are many ways to choose a path between vertices in different components. Most of the work in this section will actually be to specify a convenient one so that the winding computation is as simple as possible.

{Roughly this choice of path is as follows. As a preparatory step, we first observe that the cycles in the CRSF, when lifted, become bi-infinite paths, which we call \textbf{spines}. Next we show in \cref{lem:spine:boundary} that:

\begin{itemize}
\item In the hyperbolic case, the spines converge to some point on the boundary of the hyperbolic disc (i.e., on the unit circle),

\item In the parabolic case of the torus, the spines converge to infinity in some fixed asymptotic direction.

\end{itemize}
We could not find a soft probabilistic argument for this and had to rely on tools coming from the classical theory of Riemann surfaces (essentially, uniformisation and Fuschian theory). We will postpone the proof of \cref{lem:spine:boundary} to the appendix in order to maintain the flow in the paper. Armed with \cref{lem:spine:boundary},  given $x$ and $y$, we choose the path between them as follows. Suppose we are in the hyperbolic case. We first move from $x$ along the spine of its tree component to infinity and do the same for $y$. These paths converge to the unit circle at $\zeta_x, \zeta_y$. We join  $\zeta_x, \zeta_y$ along an arc on the unit circle (there are two choices of this arc, and a canonical choice is possible). This defines a path and we prove in \cref{lem:number_crossing} that the height gap between $x$ and $y$ can be written as the winding of this path plus a sum of terms of the form $\pm \pi$ depending on the ``jumps" over the primal and dual spines lying in between. Note that this is a non-trivial fact as the path is not completely in the graph, but ``goes through infinity". An analogous path is chosen in the torus by choosing points along the corresponding spines in place of $\zeta_x, \zeta_y$ and then taking a limit. This choice is particularly useful as we do not need to compute the winding coming from the components lying in between trees containing $x$ and $y$, which would be hard to keep track of using Wilson's algorithm.}

\begin{figure}
\begin{center}
\includegraphics[width= .9\textwidth]{annulus_lift.pdf}
\caption{The map from between an annulus and its universal cover. The dotted lines separate different copies of the fundamental domain. The blue and red curves show two loops in the surface and the associated spines in the cover.}\label{fig:cover_annulus}
\end{center}
\end{figure}

Recall $\Gamma, \Gamma^\dagger$ from \cref{sec:Temp}. We call the vertices in the lift of $(\Gamma^\dagger)'$ the dual vertices and those in the lift of $\Gamma'$ primal vertices. Recall that the dual of a wired Temperleyan CRSF of $\Gamma'$ is a free CRSF of $(\Gamma^\dagger)'$. Furthermore, each component of both the wired Temperleyan CRSF and its dual contains either a single cycle or contains a boundary component.
In the rest of this section we drop the adjective Temperleyan and refer simply to the wired and free CRSF.

When relating the height function to winding, it is convenient to replace each boundary vertex of $\partial \Gamma$ by a cycle surrounding the corresponding hole in the surface. In this manner, all paths of the wired CRSF that end up in the boundary can also be considered to form loops -- call this also a boundary loop in what follows. Hence all components of both the wired and free CRSF can be viewed as a set of paths flowing towards a single noncontractible cycle.

It is clear from the unique path lifting property that each oriented loop in the CRSF (including any ``boundary loop" mentioned above, if there is any) corresponds to a bi-infinite simple path in the lift (the one obtained by going along the loop infinitely many times in clockwise and anti-clockwise direction). We call this a \textbf{spine}.
Note also that each loop corresponds in the lift to multiple spines (except in the case of the annulus). We now state a useful lemma about the geometry of spines.

\begin{lemma}\label{lem:spine:boundary}
Assume $M$ is hyperbolic. Any spine $S$ in the CRSF is either a simple path in $\mathbb{D}$ connecting two points in $\partial \mathbb{D}$ or a simple loop containing a unique point in $\partial \mathbb{D}$.
\end{lemma}

The proof of \cref{lem:spine:boundary} uses classical tools from the theory of Riemann surfaces, so we postpone to \cref{app:spine} in order to not disrupt the rest of the argument too much.

\cref{lem:spine:boundary} allows us to describe the geometry of spines and dual spines. In the case of the torus, it is clear that spines and dual spines form alternating bi-infinite paths, all in the same asymptotic direction. When the universal cover is the disc, each (oriented) spine separates $\mathbb{D}$ into two simply connected components which lie to its right and left. Given two spines $S$ and $S'$, we have a well defined region $\Omega_{S, S'}$ between them which is bounded by $S$, $S'$ and two portions of $\partial \mathbb{D}$ (if $S$ and $S'$ are loops, then these portions of $\partial \mathbb{D}$ are understood as only prime ends associated with the same point). We say that a spine or dual spine $S''$ separates $S$ from $S'$ if it connects these two portions of $\partial \mathbb{D}$. Since the graph $\tilde G'$ only has accumulation points on $\partial \mathbb{D}$, it is easy to see that two spines can only be separated by finitely many others. Furthermore, two adjacent dual spines must be separated by a primal spine.
\begin{figure}[h]
\centering
\includegraphics[scale = 0.5]{spine}
\caption{An illustration of spines in the hyperbolic case. The spines $S$ and $S'$ are separated by a dual spine drawn in dashed blue.
This spine also separates $S''$ and $S'$ (left). The second and third figures from the left illustrate the choice of $\varepsilon_S$ in \cref{lem:number_crossing}: in the second, $\varepsilon_S = 1 = -\varepsilon_{S'}$. In the third  figure (note that the orientation of $S'$ is reversed), $\varepsilon_S = \varepsilon_{S'} = 1$.}
\label{F:spine}
\end{figure}

Let us call the lifts also $(\mathcal{T},\mathcal{T}^\dagger)$ with an abuse of notation. Also augment these trees by joining the midpoint of the diagonals to the respective endpoints, as explained in \cref{sec:tree_embedded}. Now pick two faces $f,f'$ and let $S,S'$ be the spines of the components of $\mathcal{T}$ containing $m(f), m(f')$. Let $\Omega_{S,S'}$ be the component between them as above. Draw a simple curve connecting $S$ and $S'$ in $\Omega_{S,S'}$, and oriented from $S$ to $S'$. For each primal spine $\sigma \subset \Omega_{S,S'}$ (hence not including $S$ and $S'$), let $\varepsilon_\sigma$ be the algebraic number of times $\sigma$ is crossed by this curve (with the convention of counting +1 if $\sigma$ is crossed from its left to its right by the curve and -1 otherwise). If $\sigma$ is not crossed, define $\varepsilon_\sigma$ to be 0. Define $\delta_\sigma$ similarly for primal spines. Notice that
\begin{equation}
\sum_{\sigma\subset \Omega_{S,S'}}\varepsilon_\sigma + \delta_\sigma
\label{topterm}
\end{equation}
 is a topological term which does not depend on the choice of the curve (where the sum is over all primal and dual spines contained in $\Omega_{S, S'})$. Also, its only dependence on $f$ and $f'$ is through the spines $S$ and $S'$.

We will need a slightly modified definition of $\varepsilon_S$ and $\varepsilon_{S'}$. For any face $f$, let $\gamma_f$ be the infinite oriented path in $\mathcal{T}$ started from $m(f)$ and going off to infinity along the unique outgoing oriented edges. Let $\zeta$ be the limit point of $\gamma_f$ (which exists due to \cref{lem:spine:boundary}).  Let $\zeta'$ be the limiting endpoint of $S'$ which lies in the same connected component of $\partial \tilde M \cap \Omega_{S,S'}$ as $\zeta$. Note that we are not defining $\zeta'$ to be the limit point of $\gamma_{f'}$ as it could be the case that $\zeta$ and $\zeta'$ might lie in different boundary components of $\partial \tilde M \cap \Omega_{S,S'}$ (depending on the orientation of $S'$).
In case $S,S'$ are loops through the same boundary point, we want $\zeta $ and $\zeta'$ to be in the same prime end of $\Omega_{S,S'}$.

Now we define $\varepsilon_{S}$ and $\varepsilon_{S'}$. Define  $\varepsilon_{S} = +1$. Now we have a few cases for $\varepsilon_{S'}$.
\begin{itemize}
\item If the limit point of $\gamma_{f'}$ lies in the same component of $\partial \tilde M \cap \Omega_{S,S'}$, then define $\varepsilon_{S'} = 1$.
\item If not, the there are two cases. If $f'$ lies in $\Omega_{S,S'}$, then define $\varepsilon_{S'} = -1$. Otherwise,  define $\varepsilon_{S'} = +1$.
\end{itemize}
The above choice of $\varepsilon_{S}, \varepsilon_{S'}$ is made in accordance with \cref{lem:winding_arbitrary_path}. Indeed imagine a path not going through infinity, but which starts at $f$ moves up along the spine $S$ in the direction of its orientation, joins two vertices in $S,S'$ very close to the boundary arc and then moves down along $S'$ (either in the direction of the orientation of $S'$ or the opposite, depending on the orientation of $S'$ itself). Note that for this path, the choice of the $\varepsilon_{S}, \varepsilon_{S'}$ exactly matches with the choice defined for \cref{lem:winding_arbitrary_path}. We refer the readers to the second figure of \cref{F:spine} for the case when the limit point of $\gamma_{f'}$ does not lie in the same component of $\partial \tilde M \cap \Omega_{S,S'}$ and $f'$ lies in $\Omega_{S,S'}$, in which case $\varepsilon_{S'} = -1$.

Let $(\zeta,\zeta')$ be the arc joining $\zeta$ and $\zeta'$ (which could be a single point in case $\zeta  = \zeta'$) in $\partial \tilde M$ in the hyperbolic case. Let $h_{\dim}$ be the dimer configuration corresponding to the pair $(\mathcal{T},\mathcal{T}^\dagger)$ with reference flow given by \cref{def:ref_flow}. We can now state the following final result relating the dimer height function to the winding of trees in the general setting we consider:

\begin{thm}\label{lem:number_crossing}
In the hyperbolic case, let $\gamma := \gamma_{f,f'}$ be the curve formed by concatenating $\gamma_f$, $(\zeta,\zeta')$ and the path in $\mathcal{T}$ joining $\zeta'$ to $m(f')$. Orient $\gamma$ from $m(f)$ to $m(f')$. We have the following deterministic relation:
\begin{equation}\label{windingrel_hyp}
h_{\dim}(f') - h_{\dim}(f) = W(\gamma, m(f)) + W(\gamma, m(f'))+ \pi\sum_{\sigma \in \bar \Omega_{S, S'}} (\varepsilon_\sigma+\delta_\sigma)
\end{equation}
Here the sum $\sum_{\sigma \in \bar \Omega_{S, S'}} \varepsilon_\sigma  + \delta_\sigma$ is as in \eqref{topterm} but also includes $S$ and $S'$.
\end{thm}

\begin{remark}
  The same statement holds in the case of the torus, but with a few obvious modifications, where we think of $\zeta $ and $\zeta'$ being the same point at infinity (so starting from $f$ and $f'$ both paths go to infinity in the same direction). Then \eqref{windingrel_hyp} is also true but obviously without the winding term between $\zeta$ and $\zeta'$.

\end{remark}

\begin{proof}
Consider the winding field $h$ corresponding to $(\mathcal{T},\mathcal{T}^\dagger)$ defined as in \cref{lem:winding_arbitrary_path}. See also the discussion following that lemma for the definition when $\mathcal{T}$ is a forest. Notice that the winding field differences between the diagonal midpoints are exactly the dimer height differences between the corresponding faces, hence it is enough to prove the lemma for the winding field.

Let us consider the hyperbolic case first. Take two vertices $x,x'$ in $S,S'$ respectively. Observe that we can find a path joining $x,x'$ which goes along the primal components,  and moves from one component to the other by ``jumping" over dual spines (i.e. going along edges whose dual belong to a dual spine). Also one can make sure that the path is minimal, in the sense that every component between those of $x,x'$ (i.e. components which separate $S,S'$) is visited at most once. Call this path $(x,x')$. Now letting $x \to \zeta$ and $x' \to \zeta'$, we can also ensure that the portion of $\Omega_{S,S'}$ bounded by $(x,x'), (\zeta,\zeta')$ and the spines $S,S'$ contains none of $f$ or $f'$.

Let $\tilde \gamma$ be the path obtained by concatenating $(m(f), x), (x,x'), (x', m(f')) $. From \cref{lem:winding_arbitrary_path}, it is clear that
\begin{equation*}
h_{\dim}(f') - h_{\dim}(f) = W_\i(\tilde \gamma) + \pi \sum_{S} (\varepsilon_S+\delta_S )
\end{equation*}
 Indeed, notice that since the path is minimal, the $\varepsilon_S, \delta_S$ terms are defined so as to match with the definition of $\varepsilon_i,\delta_i$ in \cref{lem:winding_arbitrary_path}. Furthermore, $W_\i(\tilde \gamma) = W_\i( \gamma)$ because of the above choice of $x,x'$. We finish the proof using \cref{lem:int_to_top}.

For the torus case, the same proof applies by noticing that $W((x,x'), m(f)) + W((x,x'), m(f'))$ converges
to 0 as $x$ and $x'$ go to infinity along $S,S'$ in the same asymptotic direction.

Finally, the fact that the term $\pi \sum_{S} (\varepsilon_S+\delta_S )$ converges follows simply from the fact that the number of noncontractible components is a.s. finite in the limiting CRSF (and hence so is the number of spines which separate $S,S'$ into different components).
\end{proof}

{We now prove a lemma about the instanton component of the height one-form which shows that it is a function of only the noncontractible loops and nothing else. Although this may be intuitively clear, it is not so easy to see using the connection between height difference and winding established in \cref{lem:number_crossing}. Indeed, consider a noncontractible (continuous) closed curve $\lambda$ in the manifold. To compute the height gap we first lift $\lambda$ to the cover $p^{-1}(\lambda)$ and we then compute the height gap between two copies of the starting point of the loop. A priori this might depend on the winding of the spines corresponding to the start and end points of $p^{-1}(\lambda)$. However, it is clear in the case of the torus that the winding terms cancel out as the spines of the starting and ending points are translates of each other. It turns out the same is true in the hyperbolic case but a slightly more involved argument is needed, as the map from one fundamental domain to another is not just a translation but a M\"obius map which perturbs the winding. {Thus, the proof of the following lemma requires this input from Riemannian geometry, so we encourage the reader to read the introduction of \cref{app:spine} before reading this proof.}

{Take an ordered finite set of continuous simple loops which forms the basis of the first homology group of $M'$, all endowed with a fixed orientation. Let $\mathsf H $ be the finite set of numbers which denote the height change along these loops. It is well-known (see \cref{thm:hodge}) that $\mathfrak h$ is completely determined by $\mathsf H$ (at the discrete level). In the following lemma, we write a superscript $\delta$ to account for the dependance in $\delta$ as in \cref{sec:setup}.}

}

\begin{lemma}\label{lem:instanton_global}
Let $(\mathfrak C^{\# \delta}, (\mathfrak C^\dagger)^{\# \delta})$ be the set of oriented noncontractible loops of the primal and dual Temperlayen CRSF.
Let $\mathfrak h^{\# \delta}$ be the instanton component of the height 1-form of the dimer configuration corresponding to this CRSF pair given by the extended Temperley bijection. Then $\mathfrak h^{\# \delta}$ is a function of $(\mathfrak C^{\# \delta}, \mathfrak (C^\dagger)^{\# \delta})$ only.

Furthermore, assume that we are in the setup of \cref{sec:setup} and the special branches $\mathcal{B}^{\# \delta}$ converges in the sense of \cref{thm:specialbranches_Temp} as $\delta \to 0$. Then $ \mathsf H^{\# \delta}$ also converges and the limit is measurable {with respect to the limit $\mathcal{T}$ of the Temperleyan forest and in fact is measurable with respect to the limit of  $(\mathfrak C^{\# \delta}, (\mathfrak C^\dagger)^{\# \delta})$ as $\delta \to 0$.}
\end{lemma}
\begin{proof}
Take a set of loops which forms the basis of the homology group of $M'$. It is enough to prove that the height change along one such loop $\lambda$ is a function of $(\mathfrak C, \mathfrak C^\dagger)$ only. To this end, we lift the loop to the universal cover and compute the winding between its endpoints using \cref{lem:number_crossing}. Note that it is enough to show that the winding term in \cref{lem:number_crossing} depends only on $(\mathfrak C, \mathfrak C^\dagger)$.
We will actually show that the only contribution of the winding term in \cref{lem:number_crossing}  comes from the winding of the arc $(\zeta, \zeta')$.

 We borrow the notations from \cref{lem:number_crossing}. Clearly, the winding of the interval $(\zeta,\zeta')$ is determined by the spines and hence $(\mathfrak C, \mathfrak C^\dagger)$. Using the isomorphism between the Fuchsian group corresponding to $M'$ and the fundamental group of $M'$, (see \cref{app:spine}), we see that there exists a M\"obius transform $\Phi$ which maps $\gamma_{f}$ to $ \gamma_{f'}$ and which depends only on the loop $\lambda$.
 In the hyperbolic case, observe that a M\"obius map extends slightly beyond the unit disc and so it makes sense to talk about $\Phi'(\zeta)$. Using \cref{lem:winding_change_conformal}, we see that the difference in winding between $\gamma_{f}$ and $\gamma_{f'}$ is $\arg_{\Phi'(\tilde M')} (\Phi'(\zeta)) -\arg_{\Phi'(\tilde M')} (\Phi'(m(f))) $ which is completely determined by $(\mathfrak C, \mathfrak C^\dagger)$.

In the toroidal case, as mentioned before, the mapping $\Phi$ is simply a translation (i.e. $\Phi'$ is a constant), so the lemma is immediate using the same argument as above. This completes the proof.
\end{proof}

The next lemma, combined with \cref{lem:instanton_global}, shows that the instanton component converges in law.

\begin{lemma}
  \label{L:convergence_instanton}
  {In the setting of \cref{thm:specialbranches_Temp}, suppose $x, y \in \tilde M'$ and that $f , f'$ are two faces closest to $x,y$ (breaking ties arbitrarily). Then $\sum_{\sigma \in \bar \Omega_{S, S'}}  (\varepsilon_\sigma+\delta_\sigma)$ converges in law. In fact, this convergence in law holds jointly for an arbitrary number of pairs of faces approximating given points in $\tilde M'$.}
\end{lemma}

\begin{proof}
  By \cref{thm:specialbranches_Temp}, the Temperleyan forest $\mathcal{T}^{\# \delta}$ converges to a continuum limit $\mathcal{T}$ (under the assumptions of this theorem). Consequently the nontrivial primal and dual cycles $(\mathfrak{C}, \mathfrak{C}^\dagger)$ also converge (with respect to the Hausdorff metric) to the nontrivial cycles induced by $\mathcal{T}$. Moreover, since the number $K$ of nontrivial cycles has exponential tail by \cref{thm:specialbranches_Temp}, no two cycles are likely to be close to one another by Wilson's algorithm and the rough Beurling estimate \cref{lem:Beurling}. It is easy to deduce that $\sum_S (\varepsilon_S+\delta_S)$ converges and the limit is measurable with respect to the limit of $(\mathfrak C^{\# \delta}, (\mathfrak C^\dagger)^{\# \delta})$. The joint convergence for an arbitrary finite number of pair of faces also follows in the same manner.
\end{proof}

\section{Local coupling}
\label{sec:local_coupling_grand}
In this section we prove a local discrete coupling result which extends ideas of \cite{BLR16} to the setup of Riemann surfaces. Roughly speaking, the goal of such a result is to show that the local geometry in a small neighbourhood of a Temperleyan CRSF is given by that of a uniform spanning tree in the surface or, alternatively (and more usefully), in some reference planar domain. Moreover, locally around a finite number of given points, the configurations can be coupled to independent such USTs.

{Recall that the actual Temperleyan CRSF's cannot be completely sampled using the standard Wilson's algorithm. However, due to \cref{L:top_condition}, given the special branches $\mathfrak{B}$ emanating from either side of the punctures, the rest of the Temperleyan CRSF can be sampled from Wilson's algorithm. For clarity, we prove our local coupling Lemma for a wired oriented CRSF (\cref{lem:exp_tail}) sampled \emph{completely} using Wilson's algorithm. Then we make an assumption in  \cref{assumption_precise} which says that given finitely many points in the manifold, with high probability, the special branches do not come too close to them (an analogue of an upcoming \cref{lem:coming_close}). Therefore, the local coupling results of this section will also be valid for Temperleyan CRSFs under \cref{assumption_precise}.

The argument follows the same line of arguments as in \cite{BLR16} so let us first recall the strategy there. This consists of two main steps. Consider $k$ points $v_1,\ldots, v_k$ in $\Gamma^{\# \delta}$. In the first step, we choose cutsets at a small but macroscopic distance around each of the $k$ points, such that the cutsets separate the points from each other and from the rest of the graph. We reveal \emph{all} the branches emanating from these cutsets. This leaves $k$ unexplored subgraphs $\Gamma_i^{\# \delta}$, one around each point. In this step the key point is to make sure that the $\Gamma_i^{\# \delta}$ are macroscopic (e.g., contain a ball of a radius roughly of the same order of magnitude as the distance to the cutsets). Clearly,  the conditional law of the tree in each $\Gamma_i^{\# \delta}$ is that of a wired UST. Moreover, these wired USTs are also independent conditionally given the cutset exploration. (Of course, unconditionally there is still some dependence). The second step is then to say that in each $\Gamma_i^{\# \delta}$, one can couple a wired UST with a full plane one, which shows, among other things, that the unconditional distribution is close to being independent.

To adapt this strategy to Riemann surfaces, if the $\Gamma_i^{\# \delta}$ are sufficiently small that they are simply connected then the conditional law of the CRSF in each will also be that of a wired UST, so that the second step can be used directly. For the first step however (cutset exploration), we will need to redo parts of the proof to take into account the possible loops in the CRSF.

\subsection{Cutset exploration} \label{sec:local_coupling}

 We now describe the construction more precisely. Fix $k$ points $v_1, \ldots, v_k$ in $\Gamma^{\# \delta}$ and let $N_{v_i}$ be small enough neighbourhoods around each $v_i$ such that $\{N_{v_i}\}_{1 \le i \le k} $ do not intersect each other or the pre-specified boundary $\partial \Gamma^{\# \delta}$ of $\Gamma^{\# \delta}$ (if the boundary is non-empty)
 and for each $1 \le i\le k$, $p^{-1}(N_{v_i})$ is a disjoint union of sets in $\tilde M$ such that $p$ restricted to each component is a homeomorphism to its image. Also for each $i$, fix one pre-image $\tilde v_i$ of $v_i$ and let $\tilde N_{\tilde v_i}$ denote the component of $\tilde{v_i}$ in $p^{-1}(N_{v_i})$.
Let $R(\tilde v_i,\tilde N_{\tilde v_i})$ be the inradius seen from $\tilde v_i$ in $\tilde M$ with respect to the Euclidean metric, and call
 \begin{equation} \label{def_r}
 r = \text{min}_{1\le i \le k} R( \tilde v_i; \tilde N_{\tilde v_i}).
 \end{equation}
 {(We point out that in our setup it is natural to define these quantities with respect to Euclidean geometry on $\tilde M$ and project to $M$, because our assumption and in particular the uniform crossing condition are stated with respect to this geometry; whereas the intrinsic geometry of $M$ does not really appear in our setup).}

We denote by $B_{\textsf{euc}}(\tilde v,r)$ the Euclidean ball of radius $r$ around $\tilde v  $ and for $r'>r$, let $A_\textsf{euc}(\tilde v , r,r') = B_{\textsf{euc}}(\tilde v,r') \setminus B_{\textsf{euc}}(\tilde v,r)$ be the Euclidean annulus of inradius $r$ and outer radius $r'$.
Let $H_i$ be a set of vertices in $p(A_\textsf{euc}(\tilde v_i,r/2,r)) \cap \Gamma^{\# \delta}$ which disconnects $v_i$ from $\partial N_{v_i}$.
The \textbf{cutset exploration} is simply the revealment of the branches from $H_i, 1 \le i \le k$ by Wilson's algorithm, resulting in a subgraph $\mathcal{T}_{H_i}^{\# \delta}$. We say a vertex $ v_j$ has
\textbf{cutset isolation radius} $6^{-k}r$ at scale $r$ if
$$  p( B_{\textsf{euc}}(\tilde v_j,6^{-k}r) )
\text{ does not contain any vertex from $\mathcal{T}_{H_i}^{\# \delta}$}.$$
Let us define $J_{v_j}$ as the the minimum value such that $v_j$ has isolation radius $6^{-J_{v_j}}r$ and let $J = \max_j J_{v_j}$.

We want to show that $J$ has exponential tail (which results in polynomial tail of the isolation radius). To this end, we rely on the following bound on the distance between a loop-erased walk and a point, which is a version of Proposition 4.11 in \cite{BLR16}.
  \begin{lemma}
    \label{lem:coming_close}
    Let $\gamma$ be a loop-erased random walk starting from a vertex $v$ until it hits $\partial \Gamma^{\# \delta}$ or a noncontractible loop is created. Let $u \neq v$ be another vertex and let $\tilde u$ be one of the images under $p^{-1}$ of $u$. Let $r$ be small enough such that $U:=\bar B_\textsf{euc}(\tilde u,r)$, is contained in the pre-image of $N_{u}$ which contains $\tilde u$.
Then there exist constants $\alpha,c>0$ (depending only on the initial assumptions of the graph) such that for all $\delta <\delta_U$ and all $n \in (0,\log_2(\frac{Cr\delta_0}{\delta} )-1)$ where $\delta_U,\delta_0$ are as in the crossing condition (assumption \ref{crossingestimate}),

$$
\mathbb{P}(\gamma \cap  p(B_{\textsf{euc}}(\tilde u,2^{-n}r))  \neq \emptyset )< c \alpha^n .
$$
\end{lemma}

  \begin{proof}
    {This is almost identical to Lemma 4.11 in \cite{BLR16} except we now need to take into account the topology as well. To emphasise the differences with Lemma 4.11 in \cite{BLR16}, we recall the strategy there. The idea is that if the loop erased walk on the manifold comes inside $p(B_{\textsf{euc}}(\tilde u,2^{-n}r))$ then some lift of the random walk must necessarily come within $B_{\textsf{euc}}(\tilde u,2^{-n}r)$ -- call this region (exponential) scale $n$. Furthermore, after the last such visit, this (lift of the) random walk must cross $n$ many annuli without making a loop around $ \tilde u$ (which we called a ``full turn"). This has a probability bounded by $e^{-cn}$.

\begin{figure}[t]
\begin{center}
\includegraphics[width=.7\textwidth]{spine_close}
\caption{A schematic representation (in solid line) of the lift of the loop erasure of the random walk on the torus until a noncontractible loop is formed. Call this path $\tilde \gamma$ and let $\gamma  = p(\tilde \gamma)$. The dashed  square denotes the fundamental domain and the dashed paths denote some other lifts of $\gamma$. In this case, $\tilde \gamma$ stops inside the fundamental domain.}
\label{fig:gamma_tilde}
\end{center}
\end{figure}

In the current situation however, the random walk might form a noncontractible loop before exiting $U$, and therefore its relevant lift described above does not necessarily have to cross $n$ many annuli (see e.g. \cref{fig:gamma_tilde}) after coming within Euclidean distance $2^{-n}r$ of $\tilde u$ before we stop it. Thus we cannot simply apply the argument of the previous paper.
We overcome this using the following idea which we first explain informally. The random walk on the manifold may visit $p(B_{\textsf{euc}}(\tilde u, r))$ multiple times. Consider one such time when it enters $p(B_{\textsf{euc}}(\tilde u, r))$ (not necessarily the first time) and consider its relevant lift $\tilde X$ which also  enters $B_{\textsf{euc}}(\tilde u, r)$  at that time. Let $X'$ be the portion of the loop-erasure of $X$ on $M$ at that time such that, if the random walk hits $X'$ later on, then a noncontractible loop in $M$ is formed.
Assume that $X'$ comes inside $p(B_\textsf{euc}(\tilde u, 2^{-m}r) )$. In order for the whole loop-erasure $\gamma$ to come inside $p(B_\textsf{euc}(\tilde u, 2^{-n}r))$ the following events must take place on one such visit.
First, the lift $\tilde X$ has to cross the first $m$ scales without performing a full turn (otherwise it would close a noncontractible loop on the manifold and stop); this has a probability bounded by $e^{-cm}$. Then $\tilde X$  needs to come within Euclidean distance $2^{-n}r$ of $\tilde u$, but we bound crudely the probability of this event by 1. Finally $\tilde X$ needs to come back out after the last visit to $B_\textsf{euc}(\tilde u, 2^{-n} r)$ in such a way that no full turn occurs between distances $2^{-n}r$ and $2^{-m}r$ (for the same reason as in the simply connected case). The probability of this event can be bounded by $e^{-c(n-m)}$. The intersection of these three events gives the right overall upper bound: $e^{-cm} e^{-c(n-m)} = e^{-cn}$.}

   Let us fill in the details. Let $C_i$ be the Euclidean circle of radius $r_i:= 2^{-i}r$ around $\tilde u$ for $i \ge 0$. We start a random walk $X$ from $v$ (to emphasise again: $X$ is on the manifold $M$). Let $\{\tau_k\}$ be a sequence of stopping times defined inductively as follows. Set $\tau_0 = 0$. Having defined $\tau_k$ to be a time when the random walk $X$ crosses or hits some circle $p(C_{i(k)})$, define $\tau_{k+1}$ to be the smallest time after $\tau_k$ when the random walk crosses or hits either $p(C_{i(k)-1})$ or $p(C_{i(k)+1})$; this defines $\tau_k$ by induction for every $k \ge 1$. If $i(k) = 0$, define $\tau_{k+1}$ to be the smallest time after $\tau_k$ when the random walk crosses or hits $p(C_{i(k)+1})$.
 Let $k_{\text{exit}}$ be the smallest integer such that in the interval $[\tau_{k_{\text{exit}}},\tau_{k_{\text{exit}}+1}]$ either a noncontractible loop is created by the loop-erasure of the random walk or the random walk hits the boundary $\partial \Gamma^{\# \delta}$. Let $\kappa_0,\kappa_1,\ldots, \kappa_N$ be the set of indices $k<k_{\text{exit}}+1$ when $X_{\tau_k}$ has crossed or hit $p(C_0)$.
 {Also note that the portions $ X[\tau_{\kappa_0 + 1}, \tau_{\kappa_1} ] $, $X[ \tau_{\kappa_1 +1}, \tau_{\kappa_2}] , \ldots$
 are contained inside $p(C_0)$; while the portions $ X[\tau_{\kappa_0}, \tau_{\kappa_0 +1} ],  X [ \tau_{\kappa_1}, \tau_{\kappa_1 + 1}], \ldots$ are contained outside $p(C_1)$}.

     Our first claim is that $N$ has exponential tail, i.e.,  $\exists \alpha_1\in (0,1)$, such that for all $n \ge 1$,
     \begin{equation}
  \mathbb{P}(N >n) < \alpha_1^n. \label{E:N_exp}
\end{equation}
Indeed, using \cref{lem:uniform_avoidance}, every time the walk hits $p(C_0)$, there is a positive probability independent of the past that the walk creates a noncontractible loop before returning to $p(C_1)$. Therefore, $N$ has geometric tail. This proves \eqref{E:N_exp}.

Let $\mathcal{S}$ be the set of points $\{X(\tau_k)\}_{k \ge 1}$. Note that  given $\mathcal{S}$, the pieces of random walk $\{X[\tau_k,\tau_{k+1}]\}$ are independent of each other. {We call such pieces \textbf{elementary pieces} of the walk.} If $i(k) \neq 0$, $X[\tau_k,\tau_{k+1}]$ is (given $\mathcal{S}$) a random walk starting from $X_{\tau_k}$ conditioned to exit the annulus $p(A_\textsf{euc}(\tilde u,r_{i(k)-1},r_{i(k)+1}))$ at $X_{\tau_{k+1}}$. If $i(k)=0$, $X[\tau_k,\tau_{k+1}]$ is a random walk which is conditioned to next hit $p(B_\textsf{euc}(\tilde u,r/2))$ at $X_{\tau_{k+1}}$. (Note that this property is lost if we solely condition on $\{X(\tau_k)\}_{k\le \kappa_N}$ since the conditioning on $N$ is complicated.) By Lemma 4.7 in \cite{BLR16}, conditionally on $\mathcal{S}$, each random walk piece $X[\tau_k,\tau_{k+1}]$ has a uniformly positive probability to do a \textbf{full turn} in the annulus $p(A_\textsf{euc}(\tilde u,r_{i(k)-1},r_{i(k)}))$ for $\delta \le \delta_U$ and given range of $n$ (where $\delta_U$ comes from the uniform crossing assumption).
Here we define a full turn to be the event that the random walk crosses every curve joining the inner and outer boundary in the specified annulus. {Indeed, although Lemma 4.7 in \cite{BLR16} gives the uniform positive probability estimate for crossing in the Euclidean plane, the estimate is valid here by considering the relevant lift of $X[\tau_k, \tau_{k+1}]$ which is inside $\bar B_\textsf{euc}(\tilde u,r)  = U $ and applying the uniform crossing estimate in the universal cover. Let us also point out that $\delta$ is chosen small enough so that the uniform crossing estimate is valid inside $U$.}

\medskip We now define certain low probability events $\mathsf E_1,\ldots, \mathsf E_n$ such that one of them must take place if the loop-erasure of $X$ is to enter $B_n:=p(B_{\textsf{euc}}(\tilde u,2^{-n}r))$. Let us condition on $\mathcal{S}$. By definition, the event $\mathsf E_j$ occurs if:

\begin{enumerate}[{(}i{)}]
\item The portion $X[\tau_{\kappa_{j-1} +1},\tau_{\kappa_{j}}]$ intersects $B_n$. We then let $ \lambda_j$ be the smallest $k$ in $[\tau_{\kappa_{j-1} +1},\tau_{\kappa_{j}}]$
such that $X_{\tau_k}$ crosses (or hits) $p(C_n)$.

\item
Let $X_j'$ be the portion of the loop-erasure of $X[0,\tau_{\kappa_{j-1} +1}]$ such that if the walk $X[\tau_{\kappa_{j-1} +1},\tau_{\kappa_{j}}]$ intersects $X_j'$, a noncontractible loop would be created.
Let $m$ be the maximum index such that $X'$ intersects the circle $p(C_m)$.

Then for the event $\mathsf E_j$ to hold we also require, in addition to the previous point, that: for any $\kappa_{j-1} +1 \le k\le \lambda_j$ if $i(k)<m$, then the walk $X[\tau_k,\tau_{k+1}]$ does not perform a full turn in $p(A_\textsf{euc}(\tilde u,r_{i(k)-1},r_{i(k)}))$. If no such $m$ exists (e.g., if $X_j'$ is empty), we do not require anything further.
\item Let $ \ell_j$ be the last $k$ before $\kappa_j$ such that $X_{\tau_k}$ crosses (or hits) $p(C_n)$. Let $\ell'_j$ be the first time after $\ell_j$ that the walk intersects $p(C_{m+1}).$ Then in addition to the previous two points, for $\mathsf E_j$ to hold we require that the walk $X[\tau_k,\tau_{k+1}]$ does not perform a full turn for any $\ell_j \le k \le \ell_j'$.
\end{enumerate}

From the discussion above, it is clear that we have the following lemma.
\begin{lemma}\label{lem:events}
We have $$\{\gamma \cap  B_n \neq \emptyset\}  \subseteq  \{N \le n, \cup_{j=1}^n \mathsf E_j \} \cup \{N >n\}.$$
\end{lemma}

Thus all we need to show is that the event on the right hand side of \cref{lem:events} has exponential tail bound. Now we claim that
$$
\mathbb{P}(\mathsf E_j | \mathcal{S}) \le e^{-c'n} \text{ and so } \mathbb{P}( \mathsf E_j) \le e^{- c'n}.
$$

This is justified using the uniform positive probability of the walk $X$ performing a full turn, even conditionally given $\mathcal{S}$.
Indeed, conditioned on $\mathcal{S}$, we have that the event (ii) in the definition of $\mathsf E_j$ has probability at most $e^{-c'm}$, and conditioned on event in (ii), the event in (iii) has probability at most $e^{-c''(n-m)}$ since conditionally given $\mathcal{S}$, the random walk portions $X[ \tau_k, \tau_{k+1}]$ are independent. {Thus the overall probability given $\mathcal{S}$ is at most $e^{-cn}$ with $c = c' \wedge c''$. }
All in all, using \cref{E:N_exp}, \cref{lem:events} and a union bound, we obtain
\begin{equation*}
\mathbb{P}(\{\gamma \cap  B_n \neq \emptyset\}) \le ne^{-c'n} +e^{-c'n} \le ce^{-c'n}.
\end{equation*}
thereby concluding the proof.
\end{proof}
We now state the result showing an exponential tail of $J$, which is a combination of \cref{lem:coming_close} and Schramm's lemma, and is identical to the proof of Lemma 4.20 in \cite{BLR16} (see also the proof of Theorem 4.21 in \cite{BLR16}}); as it is identical we skip the proof here.

\begin{lemma}\label{lem:cutset isolation}
There exist constants $c,c'>0$ such that the following holds. Let $\tilde D$ be a compact set containing $B(\tilde v_i,r)$ for $1 \le i \le k$ where $r$ is as in \eqref{def_r}.
Then for all $\delta \in (0,\delta_{\tilde D})$ and for all $ m \in (0,\log_6(\delta_0r/\delta) -1)$,
$$
\mathbb{P}(J>m) \le ce^{-c'm}.
$$
\end{lemma}

Finally, we state a lemma which says that with exponentially high probability, a branch of the CRSF, after entering an exponential scale $t$ does not backtrack to a smaller scale. Such a lemma for SLE curves can be found in \cite{SLE} (see also Lemma 3.4 in \cite{BLR16} in the simply connected case).

\begin{lemma}
\label{lem:backtrack}
Fix $u,U, \delta_U$ as in \cref{lem:coming_close}.
Suppose $\gamma$ is the loop-erasure of a simple random walk in $\Gamma^{\# \delta}$ started from vertex $u$ until it hits the boundary or creates a noncontractible loop. Suppose $\tilde \gamma$ is the lift of $\gamma$ started from $\tilde u$ (parametrised from $\tilde u$ to its endpoint). There exist constants $c,c'>0$ (depending only on the initial assumptions of the graph) such that for all $\delta <\delta_U$ and all $n \in (0,\log_2(\frac{Cr\delta_0}{\delta} )-1)$
$$
\mathbb{P}(\text{$\tilde \gamma$ enters  $B_{\textsf{euc}}(\tilde u, r 2^{-n})$ after exiting $B_{\textsf{euc}}(\tilde u, r 2^{-n/2})$}) \le ce^{-c'n}.
$$
\end{lemma}
\begin{proof}

Let $\mathsf E$ be the event that $\tilde \gamma$ enters  $B_{\textsf{euc}}(\tilde u, r 2^{-n})$ after exiting $B_{\textsf{euc}}(\tilde u, r 2^{-n/2})$.  Let $r$ be as in \cref{lem:coming_close} and assume $n$ is even without loss of generality. The argument for this is very similar to \cref{lem:coming_close} and in fact simpler, so we content ourselves with a sketch. Let $r,C_i,B_i$ be as in the proof of \cref{lem:coming_close}. We look at the lift $\tilde X$ of the simple random walk $X$ started at $\tilde u$ and we stop when either $X$ hits the boundary or a noncontractible loop is created. Let $\tau_k$ be the set of stopping times defined as in the proof of \cref{lem:coming_close} but for the lift $ \tilde X$ instead of $X$ and let $\mathcal{S}$ be the set $ \{\tilde X(\tau_k)\}_{k \ge 1}$. Observe that lift of the loop erasure of $X$ is the loop erasure of $\tilde X$ since erasing contractible loops commutes with lifting to the universal cover. If the loop erasure of $\tilde X$ has to backtrack to scale $n$, the random walk has to necessarily enter scale $n$ after leaving scale $n/2$. Let $J$ be the largest $j$ such that $\tilde X_{\tau_j}$ crosses or hits $C_n$ after leaving $C_{n/2}$
and let $I$ be the largest index $i$ smaller than $J$  when $\tilde X_{\tau_i}$ crosses or hits $C_{n/2}$. Conditioned on $\mathcal{S}$, if $\mathsf E$ occurs, then $\tilde X$ enters $B_n$ at least once after leaving $B_{n/2}$, and none of the elementary pieces of the walk between $\tau_I$ and $\tau_J$ can perform a full turn. But again, conditioned on $\mathcal{S} $ there is a uniformly positive probability to do a full turn for each elementary piece. Since there are at least $n/4$ such elementary pieces contained in $[\tau_I, \tau_J]$, we conclude the proof of the lemma applying the upper bound on the full-turn estimate on each elementary piece.
\end{proof}

\subsection{Full coupling} \label{sec:fullcoupling}

{The results of the previous section covered the first step in the proof of the coupling.\ As we mentioned above, the second step is identical to the simply connected case so we only recall the main statements.}

We first recall the result which we will need from \cite{BLR16}. We use the notations and assumptions already in force.
Let $\tilde D \subset \tilde D' \subset \tilde M'$ be two simply connected compact domains and fix $\tilde v \in \tilde D^{\# \delta}$. Let $\mathcal{T}^{\tilde D'}, \mathcal{T}^{\tilde D}$ denote the wired UST respectively in  $(\tilde D')^{\# \delta}$ and $\tilde{D}^{\# \delta}$. Let $r_{\tilde v} $ denote $R(\tilde v, \tilde N_{\tilde v})$ as in \cref{def_r} (the largest Euclidean radius so that $p$ is injective).

\begin{lemma}[Theorem 4.21, \cite{BLR16}]
  \label{lem:isolation_rad}
  There exists $c,c'>0$ such that the following holds. Fix $\tilde v , \tilde D ,\tilde D'$ as above.
There exists a coupling between $\mathcal{T}^{\tilde D}$ and $\mathcal{T}^{\tilde D'}$ and a random variable $R'>0$ such that
$$
 \mathcal{T}^{\tilde D'}\cap {B_\textsf{euc}(\tilde v,R')^{\# \delta}} = \mathcal{T}^{\tilde D}\cap {B_\textsf{euc}(\tilde v,R')^{\# \delta}}.
$$
Furthermore, for all $\delta < \delta_{\tilde D'}$ and for all $m \in (0,\log_6(\delta_0r_{\tilde v}/\delta) -1)$, if we write $R' = 6^{-K_v}r_{\tilde v,\tilde D}$ where $r_{\tilde v, \tilde D}$ is the minimum of $r_{\tilde v}$ and the Euclidean distance between  $\tilde v$ and $ \partial \tilde D$, then
$$
\mathbb{P}(K_{v} \ge m) \le ce^{-c'm}.
$$
\end{lemma}
We now put together the cutset exploration with the above one-point coupling from the simply connected case as follows. Recall the notations from \cref{sec:local_coupling}. Let $\mathcal{T}_{H_i}^{\# \delta}$ be the branches revealed in the cutset exploration around each $v_i$.
Let $\mathcal{T}_H^{\# \delta} = \cup_{i=1}^k \mathcal{T}_{H_i}^{\# \delta}$. Let $\Gamma_i^{\# \delta}$ be the connected component of $\Gamma^{\# \delta}\setminus \mathcal{T}_H^{\# \delta}$ containing $v_i$. Observe that
given $\mathcal{T}^{\# \delta}_H$, the law of $\mathcal{T}^{\# \delta}\cap \Gamma_i^{\# \delta}$ are independent wired UST in $\Gamma_i^{\# \delta}$ (with the natural boundary), by the generalised Wilson algorithm. Applying the coupling of \cref{lem:isolation_rad} in the lift of $\Gamma_i^{\# \delta}$ to $\tilde M'$ and some fixed compact $\tilde D$ in $\tilde M'$ containing some lifts $\tilde v_1,\ldots, \tilde v_k$ of points $v_1,\ldots, v_k$, we obtain a coupling of the oriented CRSF in $\Gamma^{\# \delta}$ and independent wired USTs  $(\mathcal{T}^{\tilde D}_i)_{1\le i \le k}$ in $\tilde D$. Furthermore, the $r$ in \eqref{def_r} and $r_{\tilde v}$ in \cref{lem:isolation_rad} differs by a constant multiplicative factor which depends only on the choice of lifts of the vertices. Furthermore, we may (and will) choose the $(\mathcal{T}^{\tilde D}_i)_{1\le i \le k}$ to be independent of $\mathcal{T}_H^{\# \delta}$. In fact, note that for each $1\le i \le k$, $\mathcal{T}^{\tilde D}_i$ may be chosen independent of the restriction of $\mathcal{T}^{\# \delta}$ to $\cup_{j \neq i} p(B(\tilde v_j, r/2))$.

\begin{prop}
  \label{lem:exp_tail}
The above coupling has the following properties:
there exists random variables $R_1, \ldots, R_{k}$ such that
\begin{equation}\label{coincide}
\mathcal{T}^{\# \delta}
\cap p( B( \tilde v_i, R_i) )= p( \mathcal{T}^{\tilde D}_i
\cap B( \tilde v_i, R_i) ).
\end{equation}
Furthermore if we write $R_i = 6^{- I_{v_i}} r_i$ where $r_i $ is the minimum of $r$ as in \eqref{def_r} and the distance between  $\tilde v_i$ and $\partial \tilde D$,
then for all
$\delta \le \delta_{\tilde D}$,
and for all
$1\le i\le k$, for all $n  \in (0,\log_6(\delta_0r_i/\delta) -1)$,
\begin{equation}
  \label{eq:32}
  \mathbb{P} (I_{v_i} \ge n) \le ce^{-c'n}
\end{equation}
for some constants $c,c'>0$ (depending only on the initial assumptions on the graph). In particular, $\mathbb{P}(I_{v_i} \ge n) \le ce^{-c'n} \vee \delta^{c'}$.

The set of noncontractible loops of $\mathcal{T}^{\# \delta}$ is measurable with respect to $\mathcal{T}_H^{\# \delta}$.
In particular, $(\mathcal{T}_i^{\tilde D})_{1 \le i \le k}$ are also independent of the set of oriented noncontractible loops in the oriented CRSF.
\end{prop}
Observe that when $I_{v_i}$ is very big or $r_i$ is very small, it is possible that the ball $B(v_i, R_i)$ is reduced to a point so the statement \eqref{coincide} is trivial (that is, \eqref{coincide} holds for a single vertex). This happens with a probability which is at most $\delta^{c'}$ for some $c'$.

\begin{proof}
This follows immediately from \cref{lem:cutset isolation} and \cref{lem:isolation_rad} once we observe that $I_{v_i}$ is within $O(1)$ of the sum of $J_{v_i}$ in \cref{lem:cutset isolation} and $K_{v_i}$ in \cref{lem:isolation_rad}, both of which have exponential tails.

The proof of the final assertion is a topological fact. Indeed, conditioned on $\mathcal{T}_H^{\# \delta}$, it is a deterministic fact that none of the oriented noncontractible loops pass through the portion of the CRSF in $\Gamma_i^{\# \delta}$ (which is a wired UST). Indeed, otherwise we would have a path joining two points of the wired boundary of a wired UST which is impossible. Thus, the wired UST in each $\Gamma_i^{\# \delta}$ is conditionally independent of the noncontractible loops and hence so are $\mathcal{T}_i^{\tilde D}$s.
\end{proof}

\begin{remark}\label{rmk:special_branch_coupling}
Recall from \cref{L:top_condition} that {to sample a Temperleyan CRSF} for a Riemann surface with non-zero Euler characteristic, we need to sample the special branches (called $\mathfrak B_i$ in \cref{L:top_condition}) emanating from the punctures which must decompose the surface into annuli. Also recall that these branches cannot be sampled using the usual Wilson's algorithm, as the condition conditioning on these special branches becomes degenerate in the limit (we will tackle this in a future paper). In this context, when we apply \cref{lem:exp_tail}, we pick $k$ points macroscopically away from the punctures, then first sample the special branches and assume that they do not come too close to the $k$ chosen points (this is part of \cref{assumption_precise}). After this step, we know that the generalised Wilson algorithm is applicable to sample the rest of the Temperleyan forest and hence so is \cref{lem:exp_tail}. See \cref{sec:winding_convergence} where we use this coupling in the general case to prove the convergence of height function assuming convergence of the special branches.
\end{remark}

\begin{comment}
Let $D$ be a domain in $\mathbb{C}$ containing $\{\tilde v_i\}_{1 \le i \le k}$. Suppose we perform a base coupling around $B( v_i ,10r)$.
We say a vertex $\tilde v_j$ has
\textbf{isolation radius} $6^{-k}r$ at scale $r$ at any step in the above base coupling (centered around $v_j$) if
$$ p(B(\tilde v_j,6^{-k}r))
\text{ does not contain any vertex from the branches sampled so far}.$$
For any $1\le j \le k$, including $j=i$, set $I_{\tilde{v_j}}$ to be the minimum such $k\ge 1$ at the end of the base coupling around $\tilde v_i$.
\end{comment}

\begin{comment}
\begin{proof}
This proof uses \cref{lem:coming_close} and is identical to the proof of Lemma 4.18 of \cite{BLR16}. The basic idea is the following. We only need to take care of the probability of $\mathcal{E}_4$ not occurring as the other events clearly contribute an isolation radius less than $6^{-m}r$ with probability at most $e^{-cm}$ by \cref{lem:coming_close}.

Likewise, we use \cref{lem:coming_close} to bound the probability that any branch sampled from $\mathcal{Q}_\ell$ with $\ell <\sqrt{m}$ contributes an isolation radius at most $6^{-m}r$. For $\ell \ge \sqrt{m}$, the probability of the coupling failing is itself exponentially small in $m$ (this is because of explicit Gaussian error bounds in Schramm's finiteness theorem -- see e.g. (4.6) in \cite{BLR16}).

Finally since the probability that the coupling fails is lower bounded by $1-p_0$ in \cref{lem:coming_close}, we can condition on this event without affecting the exponential bound.  We refer the reader to the proof of Lemma 4.18 in \cite{BLR16} for details.
\end{proof}
\end{comment}

\begin{comment}

Now we describe a version of the base
coupling used in \cite{BLR16}. Recall that $B(z,r) \subset \tilde M$ denotes the \emph{Euclidean} ball of radius $r$ around $z$ in $\tilde M$. This takes in the following inputs:
\begin{itemize}
\item A subset $S $ of vertices in $\Gamma^{\# \delta}$ and its lift $\tilde S$ in $\tilde \Gamma^{\# \delta}$. We also take a vertex $v \in \tilde \Gamma^{\# \delta}$
\item An $r >0$ such that $B(v,10r) \subset \tilde M$ and $B(v,10r)^{\# \delta} \cap \tilde S= \emptyset$. Also $p$ is injective in $B(v,10r)$.
\item An (open, simply connected) domain $D \subset \tilde M$ containing $B(v,10r)$.
\end{itemize}

$S$ will be the set of vertices already discovered in previous steps of Wilson's algorithm. $v$ will be the point around which we try to couple the CRSF to a wired UST in $D^{\# \delta}= D \cap \tilde \Gamma^{\# \delta}$; the coupling will take place in $B(v, r)$.

For any vertex $u \in \tilde \Gamma^{\# \delta}$, denote by
$\gamma_{\tilde M }(u)$ the lift of the branch of the CRSF sampled from $u$ with boundary $S$ via $p^{-1}$; let $\gamma_D(u)$ be branch of the wired UST in $D^{\# \delta}$ started from $u$. Recall that $A(v,r,R)$ denotes the annulus of inner radius $r$ and outer radius $R$ in $\tilde M \subset \mathbb{C}$.
\begin{itemize}
\item Pick a point $u_1$ in $A^{\# \delta}(v,8 r,9 r)$ and sample
  $\gamma_{\tilde M}(u_1), \gamma_D(u_1)$ independently. Let $\mathcal{E}_1$ be the event that
  $p(\gamma_{\tilde M}(u_1))$  stay outside $p(B(v,7
  r))$ and $ \gamma_D(u_1)$ stay outside $B(v,7
  r)$. Suppose $\mathcal{E}_1$ holds.

\item Let $u_2 \in A^{\# \delta}(v, 2 r,3 r)$. We will use the same underlying random walk to couple $\gamma_{\tilde M}(u_2)$ and $\gamma_D(u_2)$. We start a simple random walk $X$
  from $u_2$ in $\tilde \Gamma^{\# \delta}$ until one of the following events occur: either $p(X)$ intersects
  $p(\gamma_{\tilde M}(u_1)) \cup S$ or the loop erasure of $p(X)$ creates a non-contractible loop or $X$
  intersects $\gamma_D(u_1) \cup \partial D^{\# \delta}$. Suppose this event
  occurs at step $t_1$ of $X$ and also assume without loss of generality that $X$ hits $\gamma_D(u_1) \cup \partial D^{\# \delta}$ at step $t_1$. Then
  we continue the walk from that point until $p(X)$ hits
  $p(\gamma_{\tilde M}(u_1)) \cup S$ or the loop erasure of $p(X)$ creates a non-contractible loop
  and suppose this happens at time $t_2$. We then define $\gamma_D(u_2)$ to be the loop erased path up to time $t_1$ and
  $\gamma_{\tilde M}(u_2)$
  to be the loop erased
  path from time $0$ to $t_2$.

  We do the obvious analogous thing if $p(X)$ hits
  $p(\gamma_{\tilde M}(u_1)) \cup S$ or the loop erasure of $p(X)$ creates a non-contractible loop before $X$ hits $\gamma_D(u_1) \cup \partial D^{\# \delta}$. To re-iterate, let this event occur at time $t_1$ and define $\gamma_{\tilde M}(u_2)$ to be the loop erased
  path from time $0$ to $t_1$. We then continue $X$ from time $t_1$ until it intersects $\gamma_D(u_1) \cup \partial D^{\# \delta}$ at time $t_2$. Define $\gamma_D(u_2)$ to be the loop erasure of $X$ from time 0 to $t_2$.

Let $\mathcal{E}_2$ be the event that $\gamma_{\tilde M}(u_2)$ and $\gamma_D(u_2)$ agree
in $B(v,6r)$, and suppose $\mathcal{E}_2$ holds.

\item Fix a $j_0=j_0(1/2)$ as defined in
  \cref{lem:Schramm_finiteness}. Let $\mathcal{Q}_j$ be a set of points, one in
  each cell of $6^{-j} (r/2)(1+2^{-j}) \mathbb{Z}^2$ which is farthest away from $v$,
as described in the good algorithm above. Let $\mathcal{E}_3$ be the event that the
  branches from all the vertices in $ \cup_{j \le j_0} \mathcal{Q}_j$ of the
  UST and the CRSF
  agree in $B(v,5r)$, and suppose that $\mathcal{E}_3$ holds.

  \item \label{GAfail} Finally let $\mathcal{E}_4$ be the event that all the branches
  from vertices in $\cup_i \mathcal{Q}_i$ of  the CRSF and the UST agree in
  $B(v,r)$.

\end{itemize}
Let $$\mathcal{E} = \cap_{i=1}^4 \mathcal{E}_i.$$ We say \textbf{base coupling has
  succeeded} if $\mathcal{E}$ occurs. Otherwise we say that the \textbf{base
  coupling has failed}. To estimate $\mathbb{P}(\mathcal{E})$ and what happens when $\mathcal{E}$ fails, we need the following lemma.
\end{comment}

\begin{comment}
\note{B: I haven't read the proof so carefully but where do we see the possibility for the walk to close a noncontractible loop close to $u$.}
\note{G: Indeed this was an issue. I have modified the proof now.}
\note{N: I want to add comments too. Alternatively, we can erase all three?}
\end{comment}

\begin{comment}
Now we turn to the estimate of $\mathbb{P}(\mathcal{E})$.
\begin{lemma}\label{lem:fail}
  There exists universal
  constants $p_0,p_0' \in(0,1)$ such that for all $\delta <\text{min}\{\delta( {\bar B_{\textsf{euc}}(v,10r)}),C\delta_0 r\}$,
$$
p_0'< \mathbb{P}(\mathcal{E}) <p_0
$$
\end{lemma}
\begin{proof}
  By \cref{lem:coming_close}, applied to the manifold $M$ and to the domain $D$ in $\tilde M$, we know that $\mathbb{P}(\mathcal{E}_1) > c_1$ for some $c_1>0$ for $\delta < \delta_{\bar B(v,10 r)}$. It is also easy to see that $\mathbb{P}(\mathcal{E}_1)$ is upper bounded by some constant $p_0$ by an application of \cref{lem:uniform_avoidance}.

To lower bound $\mathbb{P}(\mathcal{E}_2)$, using Lemma 4.5 of \cite{BLR16}, we conclude that the random walk after exiting $B(v,6r)$ has a positive probability to do a full turn in $A(v,9r,10r)$. Again, using Lemma 4.5 of \cite{BLR16}, for every  vertex in $\cup_{j \le j_0} \mathcal{Q}_j$, there is a positive probability to do a full turn in $A(v,3r,5r)$ before exiting $B(v,r)$. Since there are at most $C6^{j_0(\varepsilon)}$ many such vertices, we obtain a positive probability of $\mathbb{P}(\mathcal{E}_3)$. Finally using Schramm's finiteness \cref{lem:Schramm_finiteness}, for an appropriate choice of $\varepsilon$ in the previous step, we obtain $\mathbb{P}(\mathcal{E}_4) > 1/2$. This completes the proof.
\end{proof}
\end{comment}

\begin{comment}
\begin{enumerate}[{(}i{)}]
\item Perform a base coupling on $ \Gamma^{\# \delta}$ and its lift with inputs $\partial$ and $B(\tilde v_1,r)$ and some domain $D \subset \tilde M$. If the
  coupling succeeds, we move on to vertex $\tilde v_2$.
\item If the coupling fails, let
  $6^{-I_{\tilde v_i,1}}r$ be the isolation radius of $\tilde v_i$ at scale $r$ at the step the
  coupling has failed. If $\max_{1\le i \le k} I_{\tilde v_i,1} \ge
  \log_6 (\delta_0/\delta)$, we \textbf{abort} the whole process and we say that the full coupling failed.

\item If the coupling has failed but we haven't aborted, we move to a smaller scale. Let $\mathcal{T}_{1,1}$ be the portion of
  the CRSF sampled up to this point. We perform the base
  coupling with $\mathcal{T}_{1,1} \cup \partial$ as the boundary for the CRSF and an
\emph{independent copy} of the UST in $D^{\# \delta}$ in the ball
  $B(\tilde v_1,6^{-I_{\tilde v_1,1}}r)$ around $\tilde v_1$. (We emphasise here that we perform this step
  with a fresh independent sample of uniform spanning tree of $
  D^{\# \delta}$. Hereafter if the coupling fails at any step, we sample a new
  independent copy of the spanning tree in $ D^{\# \delta}$).

\item If the coupling fails, let $6^{-I_{\tilde v_i,1} - I_{\tilde v_i,2}}r$  be the isolation radius
  at scale $r$ around $\tilde v_i$ at the step the coupling has failed. Let
  $\mathcal{T}_{1,2} \supset \mathcal{T}_{1,1}$ be the portion of the CRSF
  sampled up to this point. If
  $\max_{1\le i\le k} (I_{\tilde v_i,1}  +I_{ \tilde  v_i,2})\ge
  \log_6 (\delta_0/\delta)$, we abort the whole process. Otherwise we
  perform the base coupling with the boundary being $\mathcal{T}_{1,2} \cup \partial$
for the CRSF, an independent copy of the UST in $D^{\# \delta}$ and
$B(\tilde  v_1,6^{-(I_{\tilde v_1,1}  +I_{\tilde v_1,2})}r)$.
\item We continue in this way until we either abort or the base coupling succeeds at the
  $N_1$th iteration. If we haven't aborted the process along the way, we have
  obtained a partial CRSF $\mathcal{T}_{1, N_1}$ which is coupled with an independent
sample of the
  uniform spanning tree of $D^{\# \delta}$ in $B(\tilde v_1,6^{-(I_{\tilde v_1,1} +
    I_{\tilde  v_1,2} +\ldots + I_{\tilde v_1,N_1-1})}r)$.
\item  After succeeding around $\tilde v_1$, we move to $\tilde v_2$ restarting the whole
procedure with boundary $ \mathcal{T}_{1,N_1} \cup \partial$, UST in the domain $D^{\# \delta}$
in the neighbourhood $B(\tilde v_2, 6^{- (I_{\tilde v_2,1}   + \ldots + I_{\tilde v_2,N_1 }   ) }
r)$ of $\tilde v_2$.

\item For a generic step: let $I = \sum_{\ell=1}^{N_1} I_{\tilde v_1,\ell} + \ldots + \sum_{\ell=1}^{N_{i-1}} I_{\tilde v_{i-1}, \ell}  + I_{\tilde v_i,1} + \ldots+ I_{\tilde v_i,j} $ so that  $6^{- I} r $ is the isolation radius around $\tilde v_i$ after the
  $j$th iteration of the above process. When we are
  doing the base coupling around $\tilde v_{i}$, suppose the portion of the
  CRSF sampled after step $j$ is $\mathcal{T}_{i,j}$. At the $(j+1)$th step we
  perform the base coupling with boundary $\mathcal{T}_{i,j} \cup \partial$ for the
CRSF, the UST in $D^{\# \delta}$ and
  $B(\tilde v_i, 6^{- I} r )$. If the coupling succeeds,
  we declare $N_i = j+1$, we call $\mathcal{T}_{i,N_i} = \mathcal{T}_{i+1, 0}$ the resulting
CRSF,
  we move on to $v_{i+1}$ (if $i =k$ we finish). If
  $  I + I_{\tilde v_i,j+1} \ge    \log_6 (\delta_0/\delta)$,
  we abort. If the base coupling fails and we haven't aborted, we move
  on to the next scale and iterate  (vii) to build $\mathcal{T}_{i, j+1}$.

\item  If we abort the process at step $m$
      while performing base coupling around vertex $v_i$, define $N_i
      = N_{i+1} = \ldots = N_k = m$ by convention.
\end{enumerate}

We call $I_i =  \sum_{\ell=1}^{N_1} I_{\tilde v_1,\ell} + \ldots + \sum_{\ell=1}^{N_{i} -1} I_{\tilde v_{i}, \ell} $, so that $6^{-I_i} r$ is the isolation radius at scale $r$ when we have succeeded in coupling the trees around $\tilde v_i$.
Thus we can summarise our results in this section as follows (we recall that $r>0$ is any scale satisfying the requirements described at the beginning of the iteration of the base coupling, and in particular can be chosen on the order of the minimum distance between $\tilde v_i$ and $\tilde v_j$ even if this is relatively small).
\end{comment}

\def \textsf{ext} {\textsf{ext}}

\section{Convergence of height function and forms}\label{sec:ht_convergence}

In this section, we precisely state our main result (this is \cref{thm:main_precise}) and then prove it. Recalling the sketch from \cref{sec:organisation}, we see that what remains to be done is to go from the convergence of the Temperleyan CRSF to the convergence of its winding field using the coupling of \cref{sec:local_coupling_grand}. The global idea is the same as in \cite{BLR16} but some of the estimates on winding of LERW have to be redone. The primary difficulty is that spines are made of multiple copies of LERW, and hence Wilson's algorithm cannot be used to estimate the winding of all the copies. These are dealt with respectively in \cref{sec:apriori,sec:full_spine}. The  proof of the main result is finally concluded in \cref{sec:winding_convergence}.

\subsection{Precise assumptions and result}

We first provide a precise statement of what we prove. From now on, we work with the manifold $M'$ which is obtained by removing $2g+b-2$ points from its interior. Eventually, the white vertices removed from $G^{\# \delta}$ to obtain a Temperleyan graph in \cref{L:top_condition} will converge to these points. Denote by $\tilde M'$ the universal cover of $M'$; in the sequel ``lift" refers to lift on $\tilde M'$.
 Let $h^{\# \delta}_{\mathsf{}}$ be the height function defined as in \cref{sec:winding_ht}. Recall that $h^{{\# \delta}}_{\mathsf{}}$ is a function from the the dual of $ (\tilde G')^{\# \delta}$ to $\mathbb{R}$, that is defined up to a global additive constant and that a choice of reference flow is used in the definition that depends only on the embedding.

 Recall the probability measures $\Pwils $ and $\Ptemp$ from \cref{sec:Wilson}. We now precisely write down what we assume about the special branches of \cref{L:top_condition} on top of the setup in \cref{sec:setup}.

\begin{assumption}
\label{assumption_precise}
\begin{itemize}
\item The removed white vertices $(w_i^{\# \delta})_{1 \le i \le (2g+b-2)}$ {converge to the $2g+b-2$ points removed from $M$ as $\delta \to 0$}. Furthermore, the law of the Temperleyan CRSF under $\Ptemp$ has a scaling limit in the Schramm topology. Moreover, this limit does not depend on the graph sequence $(G')^{\# \delta}$ and is conformally invariant. (By \cref{thm:specialbranches_Temp} it suffices to assume that the special branches $\mathfrak{B}$ converge in the Hausdorff sense to a conformally invariant limit and that the limit is sufficiently well behaved.)

\item
For the measure $\Ptemp$, the statement of \cref{lem:coming_close} still holds if we take $\gamma$ there to be one of the special branches and $u$ to be a vertex closest to an internal point in $M'$.
\item Let $\tilde \mathcal{S}$ be the set of all lifts on $\tilde M'$ of endpoints of the removed primal edges as in \cref{sec:Temp}.  Recall that the lift of the special branch starting from any point  $x$ in $\tilde \mathcal{S}$ {contains} a bi-infinite path.

    Let $\mathsf p_{x}$ (resp. $\mathsf{\bar p}_x$) be the portion of this branch obtained by starting from $p(x)$ going clockwise (resp. anticlockwise) around the noncontractible loop infinitely many times. Note that $\mathsf p_x, \mathsf {\bar p}_x$ will have a common initial portion before they branch out in two different directions in the lift. Let  $\mathcal{P} = \{ \mathsf p_{x}, \bar {\mathsf p}_x : x \in \tilde \mathcal{S} \}$.  Let $\tilde v $ be  a vertex in the lift of $(G')^{\# \delta}$ and let $r_{\tilde v}$ be the largest $r$ so that $p$ is injective in $B_{\textsf{euc}} (\tilde v,r)$ (as in \cref{lem:isolation_rad}). For $t \ge 1$ and any path $\mathsf p \in \mathcal{P}$, let $t_1$ be the first time it enters $B_\textsf{euc}(\tilde v, r_{\tilde v}e^{-t})$ and $t_2$ be the last time it is in $B_\textsf{euc}(\tilde v, r_{\tilde v}e^{-t})$. For all $k \ge 1$, there exist constants $m>0$ so that for all $\delta < \delta_{\bar B(\tilde v, r_{\tilde v} e^{-1})}$ and for all $ 1 \le t < \log (C'\delta_0 / \delta)$,
$$
\mathbb{E}(\sup_{ \mathsf p \in \mathcal{P}} |\max_{\mathcal{Y} \subseteq   \mathsf p  [t_1,t_2] \cap B(\tilde v, r_{\tilde v}e^{-t-1})^c}   |W(\mathcal{Y},\tilde v)| |^k)
 ) \le m,
$$
where the supremum is taken over all continuous segments. Also
$$
\mathbb{E}(\sup _{\mathsf p \in \mathcal{P}}|\max_{\mathcal{Y} \subseteq   \mathsf p \cap B(\tilde v, r_{\tilde v} e^{-1})^c}   |W(\mathcal{Y},\tilde v)| |^k)
 ) \le m.
$$
\end{itemize}
\end{assumption}
Let us say a few words about these assumptions. Item 1 says that the scaling limit of a Temperleyan CRSF exists.
The next two items
ensure that even at a discrete level, the special branches are topologically not very different from the regular CRSF branches (for example, item two implies that it is not space-filling). The third item says that in a suitably weak sense, the special branches do not wind too much. Again, this is known for CRSF branches as shown in this paper and, intuitively, special branches should wind even less.
We plan to prove these properties in our subsequent work \cite{BLR_riemann2}.

Having made these assumptions, we now come back to the statement of the main result. First, we extend $h^{\# \delta}$ to a function $h^{\# \delta}_{\textsf{ext}}: \tilde M' \to \mathbb{R}$ by defining $h^{\# \delta}_{\textsf{ext}}(x)$ to be the value of $h^{\# \delta}$ on the face containing $x$. Recall the graphs $(\Gamma^{\# \delta})',(\Gamma^{\dagger,{\# \delta}})'$ from \cref{sec:Temp}. Also recall that $\bar X$ denotes $X - \mathbb{E}(X)$.

\begin{thm}\label{thm:main_precise}
Let $\tilde f: \tilde M' \to \mathbb{R}$ be a smooth compactly supported function with $\int_{\tilde M'} \tilde f \vol = 0$, where $\vol$ is the lift of the volume form on $\tilde M'$. Assume that \cref{assumption_precise} holds along with the assumptions in \cref{sec:setup}. Then
$$
\left(\int \tilde f(x) \bar h^{\# \delta}_{\textsf{ext}}(x)  \vol(x) , \mathcal{T}^{\# \delta}\right)
$$
converges jointly in law as $\delta \to 0$. The first coordinate also converges in the sense of all moments. Furthermore, the limit of the first coordinate
is measurable with respect to the limit $\mathcal{T} $ of $\mathcal{T}^{\# \delta}$, is universal (in the sense that it does not depend on the graph sequence $(G')^{\# \delta}$), and is conformally invariant.
\end{thm}
To clarify, convergence in the sense of all moments means that for all $i$, $X^{\# \delta} := \int \tilde f(x) \bar h^{\# \delta}_{\textsf{ext}}(x) \vol(x)$,
$
\mathbb{E}(|X^{\# \delta}|^i )
$
converges as $\delta \to 0$. Notice also that since $\int \tilde f\vol =0$, the fact that $\bar h^{\# \delta}_{\textsf{ext}}(x)$ is defined only up to a global additive constant is irrelevant.

\begin{comment}
\begin{remark}\label{remark:assumption}
In practice it is more convenient to work with $\Pwils$ rather than $\Ptemp$. Note that using \cref{lem:RN_dimer_CRSF,thm:CRSF_universal}, we can replace $\Ptemp$ by $\Pwils$ in \cref{assumption_precise}. This follows from the fact that for any $q>0$ there is a constant $C_q>0$ such that for all $\delta$, $\mathbb{E}( q^{\mathsf K}) \le C_q$, where $\mathsf K$ is the number of noncontractible loops of the free CRSF on $\Gamma'$. This superexponential tail of $K$ follows from \cref{thm:CRSF_universal} as finite number of special branches decomposes the manifold into finite number annuli and in each of this annulus, the estimate of \cref{thm:CRSF_universal} is valid.
\end{remark}
\end{comment}

\begin{proof}[Proof of \cref{thm:main}, assuming \cref{thm:main_precise}]
If the Euler characteristic is zero (annulus or torus), the first item of
\cref{assumption_precise} is precisely the content of \cref{thm:CRSF_universal}, while the last two items are trivially true since there are no special branches to consider. Hence the assumptions of \cref{thm:main_precise} are satisfied in this case. In particular, combining \cref{thm:CRSF_universal} and \cref{thm:main_precise} we obtain a proof of convergence and universality in \cref{thm:main}. Conformal invariance also readily follows, since the limiting CRSF is itself conformally invariant (a conformal map only changes the constants in the assumptions of the graph in \cref{sec:setup}, which has no effect on the limiting law) and the limiting height 1-form is measurable with respect to the limiting CRSF.
\end{proof}

\subsection{Some a priori tail estimates on winding}\label{sec:apriori}

The goal of this section is to obtain tail estimates on the winding of a branch of a Temperleyan forest. This will be achieved in \cref{L:winding_tail_partial} which is the main result of this section. Conceptually the arguments are similar to Section 4 of \cite{BLR16}. However, as in \cref{sec:local_coupling_grand}, there are additional difficulties linked with the fact that Wilson's algorithm can stop because of a noncontractible loop being formed. Furthermore we ultimately want to consider the winding of entire spines, yet only one copy of the lift of a loop is directly connected to a loop erased random walk path. We first treat the part directly obtained by loop-erasure in this section and defer estimates on the copies for the next.

Throughout this section, we deal with a CRSF sampled from $\Pwils$ (cf. \cref{sec:Wilson}).
First we sample the special branches (cf. \cref{L:top_condition}) which we denote by $\mathfrak B$.
Let $\tilde {\mathfrak B}$ be the lift of $\mathfrak B$ to $\tilde M'$. Recall that $\mathfrak B$ decomposes $M'$ into finite number of disjoint annuli and conditionally on $\mathfrak{B}$, in each of them we can sample the rest of the Temperleyan CRSF using Wilson's algorithm.

We now work conditionally on $\mathfrak B$. Let $\gamma_v$ be the branch of the CRSF started from $v$ (which can thus be sampled using Wilson's algorithm).
For any vertex $\tilde v \in p^{-1}(v)$ in $\tilde \Gamma^{\# \delta} \setminus \tilde {\mathfrak B}$, let $\tilde
\gamma_{\tilde v} $ be the lift of $\gamma_v$ starting from $\tilde v$ and up until the time when $\gamma_v$ closes a noncontractible loop or hits the boundary  $\partial \Gamma^{\# \delta} \cup \mathfrak B$. Let $\tau_{nc}$ be the stopping time when the simple random walk generating $\tilde\gamma_{\tilde v}$ creates a  noncontractible loop or hits the  boundary.
Recalling the definition of spines from \cref{sec:winding_ht}, note that $\tilde \gamma_{\tilde v}$ will include a part of a spine as soon as the random walk does not hit $\partial \Gamma^{\# \delta} \cup \mathfrak B$ when it stops (see \cref{fig:gamma_tilde}).

 Let us orient $\tilde
\gamma_{\tilde v}$ starting from $\tilde v$ and going
away from it in some continuous manner in $[0,1]$. For $t>0$, if $\tilde
\gamma_{\tilde v}$ exits $B(\tilde v,e^{-t-1})$, let $t_1$ be the  first time $\tilde
\gamma_{\tilde v}$ exits $B(\tilde v,e^{-t-1})$ and let $t_2$ be the last time it exits $B(\tilde v,e^{-t})$. In this case, if $\tilde \gamma_{\tilde v}$ ends in $B(\tilde v,e^{-t})$ we set $t_2 = 1$.

We first state a simple deterministic lemma connecting the winding of curves avoiding each other.
\begin{lemma}\label{lem:wind_comp}
Consider the annulus $A= \{z\in \mathbb{C}: r < |z-x| < R\}$ where $r>0$ and $R \in (r,\infty]$ and let $\gamma_0$ be a simple curve in $A$ connecting the outer and inner boundaries of $A$, assumed to be parametrised in $[0,1]$. Then for any simple curve $\gamma$ in $A \setminus \gamma_0$, we have
$$
|W(\gamma, x)| \leq \sup_{0 \leq s_1 < s_2 \leq 1} |W(\gamma_0[s_1,s_2], x)| + 4 \pi.
$$
For $R = \infty$, the annulus is interpreted as the complement of a ball.
\end{lemma}
Note that in the above lemma we do not need any assumption on the regularity of the curves {beyond continuity}.

\begin{proof}
Join each endpoint of $\gamma$ to its nearest points in $\gamma_0$ using a geodesic in $A$ (with its intrinsic metric inherited from the Euclidean plane). Assume these points are $\gamma_0[s_1]$ and $\gamma_0[s_2]$. Consider the loop $L$ obtained by $\gamma$, these two geodesics and $\gamma_0[s_1,s_2]$.  Note that $L$ might be non-simple, but any loop is created by the union of $\gamma$ and the two geodesics. Hence these loops lie in the annulus $A$ slitted by $\gamma_0$ which is simply connected and do not contain $x$. Hence all these loops contribute winding 0 around $x$. Since the winding of $L$ after erasing these loops is 0 or $\pm 2\pi$, the total winding of $L$ around $x$ is also either 0 or $\pm 2\pi$. It is easy to observe that the geodesic joining any two points in the annulus lie in the smaller half annulus containing the two points, and hence has winding at most $\pi$. Using this observation, the proof of the lemma is complete.
\end{proof}

Assume without loss of generality and to simplify notations that $t$ is an integer. Let $r_{\tilde v}$ be such that $B(\tilde v, 10r_{\tilde v})$ does not intersect $\tilde {\mathfrak B}$ and $p$ is injective in $B(\tilde v,r_{\tilde v})$ (this is a slight modification of the previous definition of $r_{\tilde v}$). Let $e^{-t_0} =r_{\tilde v}$.
We consider concentric circles $C_j$ of radius $\{e^{-t_0-j}\}_{0 \le j \le t+2}$ (with $B_j$ the ball inside it)
around $\tilde v$. Take a
random walk $X$ in $\Gamma^{\# \delta}$ starting from $\tilde v$ stopped when it hits $\partial \Gamma^{\# \delta} \cup \mathfrak B$. In case $\partial \Gamma^{\# \delta} \cup \mathfrak B = \emptyset$ (i.e., in the case of the torus),
 the random walk continues forever. Let $\tilde X$ be the lift of this walk starting from $\tilde v$. Now let $\{\tau_k\}_{k \ge 0}$ be the
set of stopping times as described in the proof of \cref{lem:coming_close} for the random walk $\tilde X$.
That is, if we hit or cross the circle $C_{i(k)}$ at time $\tau_k$, we wait until
we hit or cross $C_{i(k)\pm 1}$ at time $\tau_{k+1}$. If $i(k) =
0$ (or $t+2$), we wait until we hit or cross $C_{1}$ (or $C_{t+1}$). Let $B_i$ denote the disc inside $C_i$.

Let $\tau_{i_1},\tau_{i_2},\ldots$
be the successive times in the sequence $(\tau_k)_{k\ge 1}$ when the walk hits $C_0$. Note that the interval $[\tau_{i_j},\tau_{i_j+1})$ is spent completely outside $B_{1}$.
We now claim that the random walk cannot wind too much outside $B_1$.

\begin{lemma}\label{lem:macro_winding}
There exist $c,c'>0$ such that for all $\delta<\delta_{ {p(\bar B_0)}}$, $n \ge 1$, $j \ge 1 $ and $u \in B_1$ such that $\mathbb{P}(X_{\tau_{i_j+1}} = u) >0$,
\begin{gather*}
\mathbb{P} \Big(\sup_{\mathcal{Y} \subset \tilde X[\tau_{i_j},\tau_{i_j+1}]}|W(\mathcal{Y} ,\tilde v)| >n\Big | X_{\tau_{i_j+1}} = u\Big) \le ce^{-c'n},\\
\mathbb{P} \Big(\sup_{\mathcal{Y} \subset \tilde X[\tau_{i_j},\tau_{i_j+1}]}|W(\mathcal{Y} ,\tilde v)| >n\Big | X_{\tau_{i_j+1}} \in \partial \Gamma^{\# \delta} \cup \mathfrak B \Big) \le ce^{-c'n}.
\end{gather*}
Here the supremum is over all continuous paths obtained by erasing portions of $\tilde X[\tau_{i_j},\tau_{i_j+1}]$.
\end{lemma}
\begin{proof}{The proof of \cref{lem:macro_winding} is very similar to Lemma 4.8 in \cite{BLR16}. But it needs an input from Riemannian geometry to control the winding of the spines near the boundary of the universal cover. We postpone this proof to \cref{app:spine}.}
\end{proof}

\cref{lem:macro_winding} takes care of the winding of the excursions outside $B_1$. For  excursions inside, most of the technical work was done in \cite{BLR16}.
Let $ \tilde Y^j$ be the loop-erasure of $\tilde X[0,j]$. For any $j$, we parametrise $\tilde Y^j$ in some continuous way away from $\tilde v$. Fix $m \ge 1$ and let $t_1$ be the first time $\tilde Y^{\tau_{i_m}}$ exits $B(\tilde v,e^{-t-1})$ and $t_2$ be the last time $\tilde Y^{\tau_{i_m}}$ exits $B(\tilde v,e^{-t})$.

\begin{lemma}\label{lem:winding_inner_annulus}
There exist $C,c>0$ such that for all $\delta<\delta_{ {p(\bar B_0)}}, t \in (t_0, \log (C \delta_0/\delta))$,  and $n \ge 1,m \ge 1 $,
\begin{equation*}
\mathbb{P}\Big( \sup_{\mathcal{Y} \subseteq \tilde Y^{\tau_{i_m}}[t_1, t_2] \cap B(\tilde v, e^{-t-1})^c}  |W(\mathcal{Y},\tilde v)| >n  | \tau_{i_m} < \infty\Big) < Ce^{-cn}.
\end{equation*}
\end{lemma}
We emphasise that in the above lemma, $m$ is non-random as it is going to be important in what follows.
\begin{proof}
The proof of this lemma is identical to that of \cite{BLR16}, Lemma 4.13 and the only difference is in the setup, which we point out. In \cite{BLR16}, we were working with a simply connected domain and we waited until the random walk exited it. The argument proceeds by conditioning on the positions $\mathcal{S} := \{\tilde X_{\tau_k}\}_{k \ge 1}$ and arguing that in each interval of walk between successive points in $\mathcal{S}$, the winding of any continuous subpath has exponential tail. Then we proved that we only need to look at a random number of intervals which itself has exponential tail. In the present setup, we can condition on $\mathcal{S}$ so that $\tau_{i_m} < \infty $ is satisfied. The exponential tail of winding inside any inner annulus follows from Lemma 4.7 in \cite{BLR16} (this is exactly the same as the simply connected case) and for the outer annulus, we use \cref{lem:macro_winding}. The number of relevant intervals to consider also has exponential tail following verbatim the proof of Lemma 4.15 in \cite{BLR16}. \end{proof}

With these lemmas we can now state and prove the main result of this section, which controls the (topological) winding in an annulus.

\begin{lemma}\label{L:winding_tail_partial}
There exist constants $C,C', c>0$ so that for all $n \ge 1$, for all $\tilde v$, for all $\delta < \delta_{\bar B(\tilde v,r_{\tilde v})}$ and for all $0< t  < \log (C'r_{\tilde v}\delta_0 / \delta)$,
\begin{equation}\label{E:windingtailpartial1}
\mathbb{P}\Big(\max_{\mathcal{Y} \subseteq \tilde \gamma_{\tilde v}[t_1, t_2] \cap B(\tilde v, r_{\tilde v} e^{-t-1})^c}   |W(\mathcal{Y},\tilde v)| >n
 \Big) <Ce^{-c n^{1/3}}.
\end{equation}
where the maximum is taken over all continuous segments from $\tilde \gamma_{\tilde v}[t_1, t_2]$. Also
\begin{equation}\label{E:windingtailpartial2}
\mathbb{P}\Big(\max_{\mathcal{Y} \subseteq \tilde \gamma_{\tilde v}    \cap B(\tilde v, r_{\tilde v} e^{-1})^c}   |W(\mathcal{Y},\tilde v)| >n
 \Big) <Ce^{-cn}.
\end{equation}
\end{lemma}
A few remarks are in order. Firstly, the stretched exponential tail is an artefact of the proof and we believe that an exponential tail bound can be proved with more care. Secondly, note that the intersection in the argument of the $\max$ above is used so that we don't need to look into what happens very close to $\tilde v$. This is a technicality which however is useful for the proof, but later it is not going to matter. In the end, we can decompose the whole path $\tilde \gamma_{\tilde v}$ into a disjoint union over $t$ of $[t_1',t_2']$ where $t_1'$ is last exit of $B(\tilde v,e^{-t-1})$ and $t_2'$ is the last exit of $B(\tilde v, e^{-t})$ which will accomplish the desired moment bound of truncated winding by exploiting the moment bound for each of these segments. We also emphasise that, although the noncontractible loop in the component containing $v$ could be a special branch, $\tilde \gamma_{\tilde v}$ itself does not contain any portion of the special branch. This is simply because we have sampled the special branches first before defining $\gamma_v$.

\begin{proof}[Proof of \cref{L:winding_tail_partial}]
The main idea is to use a union bound for the winding of each excursion between annuli. One difficulty with working with $\tilde \gamma_{\tilde v}$ is that if we condition on where or when a noncontractible loop is formed then we break the independence between the pieces of random walk. Indeed, a walk conditioned on not forming a noncontractible loop will avoid certain portions of its previous trajectory, which \emph{a priori} might bias it to have a lot of winding.

{Recall that $t_0$ satisfies $e^{-t_0 } = \tilde r_{\tilde v}$. Note that \eqref{E:windingtailpartial2} follows easily from \cref{lem:macro_winding}.}
Indeed, let us call $\tau_{nc}$ the first time where a noncontractible loop is created and $\tau_\partial$ be the first hitting of the boundary. Fix $N = \max \{ j : \tau_{i_j} < \tau_{nc} \wedge \tau_\partial \}$. Recall that $N$ has exponential tail since every time we hit $C_0$,
conditioned on what happened before, we have a positive probability to create a
noncontractible loop or hit the boundary {before hitting $C_{1}$}, by \cref{lem:uniform_avoidance}. Thus we can work on the event $N \le n$ at a cost which is exponentially small in $n$. Now \cref{lem:macro_winding} entails that on each of the $n$ pieces, the winding has uniform exponential tail. This completes the proof of \eqref{E:windingtailpartial2}.

Now we turn to \eqref{E:windingtailpartial1}. As before, let $\mathcal{S} := \{\tilde X_{\tau_k}\}_{k \ge 1}$. The idea is to compare the winding of $\tilde \gamma_{\tilde v}$ to the winding of $\tilde Y^{\tau_{i_m}}$ because there the conditioning on $\mathcal{S}$
preserves the independence and \cref{lem:winding_inner_annulus} controls the winding. The main work will be to do a case-by-case analysis of what can be erased and created between $\tau_{i_m}$ and the creation of a noncontractible loop.

Let $N$ be as above and note that using the same idea of exponential tail of $N$ and exponential tail of winding up to a fixed number of hits of the outermost circle (\cref{lem:winding_inner_annulus}), we get
\begin{equation}
\mathbb{P}\Big( \sup_{\mathcal{Y} \subseteq \tilde Y^{\tau_{i_N}}[t_1, t_2] \cap B(\tilde v, e^{-t-1})^c}  |W(\mathcal{Y},\tilde v)| >n \Big) < Ce^{-c'n}.  \label{eq:YiN}
\end{equation}
\begin{comment}
To be more precise, observe that we are in a setting where we have a sequence of random variables $X_i$, not independent but with uniform exponential tails and a stopping time $N$ with exponential tail. Therefore we can bound $\mathbb{P}( X_N \geq n ) \leq \sum_{i = 1}^n \mathbb{P}( X_i \geq n) + \mathbb{P}(N \geq n) \leq nC e^{-cn} + C'e^{-c'n} \leq C'' e^{-c'' n}$.
\end{comment}

Let $\lambda_1$ and $\lambda_2$ be respectively the first time $\tilde Y^{\tau_{i_N}}$ exits $B(\tilde v, e^{-t-1})$ and the last time $\tilde Y^{\tau_{i_N}}$ exits $B(\tilde v, e^{-t})$. To ease notations, from now on, all maximums in this proof come with the additional condition that the paths stay outside $B(\tilde v, e^{-t-1})$ without writing it explicitly. We will also assume without loss of generality that the parametrisations of $\tilde \gamma_{\tilde v}$ and $\tilde Y^{\tau_{i_N}}$ are identical up to the first point their traces differ.

If a noncontractible cycle is created or the boundary is hit in the interval $[\tau_{i_N}, \tau_{(i_N +1)}]$ then, since $\tilde X[\tau_{i_N}, \tau_{(i_N +1)}]$ does not intersect $B(\tilde v, e^{-t_0 -1})$, only pieces of $\tilde Y^{\tau_{i_N}}[0, \lambda_2]$ can be erased and nothing can be added  {in the time interval $[\tau_{i_N}, \tau_{(i_N +1)}]$} to get $\tilde \gamma_{\tilde v} [0, t_2]$.
 In particular we see that in this case
$$
\max_{t_1<s_1<s_2<t_2}   |W(\tilde \gamma_{\tilde v}(s_1,s_2),\tilde v)| \leq \max_{\lambda_1<s_1<s_2<\lambda_2}   |W(\tilde Y^{\tau_{i_N}}(s_1,s_2),\tilde v)|.
$$
and we are done using \eqref{eq:YiN}.

\smallskip

The only other possibility is that a noncontractible cycle is created between $\tau_{({i_N} + 1)}$ and $\tau_{i_{(N + 1)}}$ (otherwise that would contradict the maximality of $N$). Since $p$ is injective in $B(\tilde v, e^{-t_0})$, this occurs if and only if the walk hits a copy inside $B( \tilde v , e^{-t_0})$ of a portion of the walk that is further away from $\tilde v$, as illustrated schematically in \cref{fig:lambda}. From now on we assume we are on this event.

First we make a topological observation. Let $\beta$ be the first exit time of $B( \tilde v, e^{-t_0})$ by  $\tilde Y^{\tau_{i_N}}$. We claim that $\tilde X[ \tau_{i_N+1}, \tau_{nc} ]$ cannot hit $\tilde Y^{\tau_{i_N}}[0, \beta]$.
Indeed, suppose by contradiction that it does so at some time $T \in [ \tau_{i_N+1}, \tau_{nc} ]$. Then, after erasure, we are left with a path completely contained in $B( \tilde v, e^{-t_0})$ where $p$ is injective. No noncontractible loop can then be created before $\tau_{i_{N+1}}$, which contradicts the maximality of $N$ as explained above.

Let $k_{nc}$ be the index during which the noncontractible loop happens, i.e, the unique index $k$ such that $\tau_{nc} \in [\tau_{k}, \tau_{k+1}]$.  By the topological claim in the previous paragraph, no full turn can occur in any of the intervals $[\tau_k, \tau_{k + 1}]$ for $i_N \leq k < k_{nc}$. However, by Corollary 4.5 in \cite{BLR16}, a full turn can occur in any interval $[\tau_k, \tau_{k + 1}]$ independently with uniformly positive probability given $\mathcal{S}$. Hence, there exist constants $c, C$ depending only on the crossing estimate such that
\begin{equation*}
\mathbb{P}(k_{nc} - i_N > n) \le \mathbb{P}(k_{nc} - i_N > n, N \le n) + \mathbb{P}(N >n) \le Ce^{-cn} .
\end{equation*}
Combining the above with Lemma 4.7 in \cite{BLR16} (which bounds the winding of the random walk during an interval of the type $[\tau_i, \tau_{i + 1}]$), we obtain the following stretched exponential tail bound:
\begin{equation}
\mathbb{P}\big (\max_{\mathcal{Y} \subset \tilde X[\tau_{i_N}, \tau_{nc}]}  |W (\mathcal{Y} ,\tilde v)| >n \big) \le Ce^{-c\sqrt{n}}\label{eq:RW_portion_added}
\end{equation}
for some $C,c>0$ depending only on the crossing estimate and where, as before, $\mathcal{Y}$ is any continuous portion obtained from $X[\tau_{i_N}, \tau_{nc}]$ which preserves the order of the random walk path. In particular, this gives a good control of the winding of the piece of $\tilde \gamma_{\tilde v}$ added to $Y^{\tau_{i_N}}$.

\begin{figure}[h]
\centering
\includegraphics[width = 0.5\textwidth]{proof_initial_winding}
\caption{The red curve denotes $\tilde Y^{\tau_{i_N}}$ and the blue part is $\tilde X[\tau_{i_N}, \tau_{nc}]$.}\label{fig:lambda}
\end{figure}

However, we are still not done as illustrated in \cref{fig:lambda}: the times $t_1,t_2$ (which were first entry, last exit times for $\tilde \gamma_{\tilde v}$) may be different from  $\lambda_1,\lambda_2$ (which were the first entry, last exit of $\tilde Y^{\tau_{i_N}}$), so we need additional arguments.    Let $$\lambda_{E} := \inf \{ \lambda : \exists t \in [\tau_{i_N}, \tau_{nc}] , \tilde Y^{\tau_{i_N}}(\lambda) = \tilde X(t) \} $$ be the last time in $\tilde Y^{\tau_{i_N}}$ which is not erased. Note that with this notation we showed above that $ \lambda_E \geq \beta$. This implies immediately that $t_1 = \lambda_1$. Now we need to consider several cases depending on where $\lambda_E$ is in relation to $\lambda_2$.

\begin{itemize}
\item If $\lambda_E \in [\lambda_1, \lambda_2] $, then $\tilde \gamma_{\tilde v}[t_1, t_2]$ can be decomposed as the union of a piece of $ \tilde Y^{\tau_{i_N}}[\lambda_1, \lambda_2]$ and some erasure of $X[\tau_{i_N}, \tau_{nc}]$, so on that event
$$
\max_{t_1<s_1<s_2<t_2}   |W(\tilde \gamma_{\tilde v}(s_1,s_2),\tilde v)| \leq \max_{\lambda_1<s_1<s_2<\lambda_2}   |W(\tilde Y^{\tau_{i_N}}(s_1,s_2),\tilde v)| + \Delta
$$
where $\Delta$ is a variable with stretched exponential tail using \eqref{eq:RW_portion_added}.

\item  If $\lambda_E \geq \lambda_2$ and $\tilde \gamma_{\tilde v}(\lambda_E,t_2]$ (the loop erasure after $\lambda_E$) does not enter $B(\tilde v, e^{-t})$ then $\tilde \gamma_{\tilde v}[t_1, t_2] = \tilde Y^{\tau_{i_N}}[\lambda_1, \lambda_2]$ and there is nothing more to prove.

\item If $\lambda_E \geq \lambda_2$ and $\tilde \gamma_{\tilde v}(\lambda_E,t_2]$ enters $B(\tilde v, e^{-t})$ (this is the case pictured in \cref{fig:lambda}), then we decompose $\tilde \gamma_{\tilde v}$ as the union of $\tilde Y^{\tau_{i_N}}[\lambda_1, \lambda_2] $, $\tilde Y^{\tau_{i_N}}[\lambda_2, \lambda_E]$ and $\tilde \gamma_{\tilde v}[\lambda_E, t_2]$. The winding of any continuous portion of the first part has exponential tail by \eqref{eq:YiN}. The winding of any continuous portion of the last part has stretched exponential tail since it is bounded by $\Delta$ as in the first case. So we only need to take care of the middle part.

To that end, we decompose $\tilde Y^{\tau_{i_N}}[\lambda_2, \lambda_E]$ into excursions inside and outside $B_0$ as follows:
\begin{equation}
\tilde Y^{\tau_{i_N}}[\lambda_2, \lambda_E] = \tilde Y^{\tau_{i_N}} [\lambda_2, \beta_0] \cup \tilde Y^{\tau_{i_N}} [\beta_0, \beta_1]   \cup \tilde Y^{\tau_{i_N}} [\beta_1, \beta_2] \cup \ldots \cup  \tilde Y^{\tau_{i_N}} [\beta_{k_0}, \lambda_E].\label{eq:decomposition}
\end{equation}
where $\beta_0 = \beta$ and for $k \ge 1$, $\beta_{2k}$ is the first exit of $B(\tilde v, e^{-t_0})$ after $\beta_{2k-1}$ and $\beta_{2k-1}$ is the first entry into $B(\tilde v, e^{-t_0 -1})$ after $\beta_{2k-2}$. Note that any portion of $\tilde Y^{\tau_{i_N}} [\beta_{2k}, \beta_{2k+1}]$ is outside $B(\tilde v, e^{-t_0-1})$ so its winding has exponential tail using \cref{lem:macro_winding}. Note also that $\tilde Y^{\tau_{i_N}} [\beta_{2k+1}, \beta_{2k+2}]$ lies inside the annulus bounded between $C_t$ and $C_0$ and never intersects the curve $\tilde X[\tau_{i_N}, \tau_{nc}]$ by maximality of $\lambda_E$. Let $Y'$ be the loop erasure of the portion of $\tilde X$ from $\tau_{i_N}$ until its first hit of $C_t$. Hence using \cref{lem:wind_comp}
\begin{equation*}
\max_{\beta_{2k}<s_1<s_2<\beta_{2k+1}}   |W(\tilde Y^{\tau_{i_N}}(s_1,s_2),\tilde v)| \leq \max_{s_1<s_2}   |W(Y'[s_1,s_2],\tilde v)| +4\pi
\end{equation*}
Note that the right hand side has stretched exponential tail by \eqref{eq:RW_portion_added}. Thus each term in the decomposition \eqref{eq:decomposition} has stretched exponential tail and clearly the number of terms is bounded by $N$ which itself has exponential tail. Combining these two, we can conclude that the absolute value of winding of any continuous portion of $\tilde Y^{\tau_{i_N}}[\lambda_2, \lambda_E] $ has stretched exponential tail (with exponent $1/3$), thereby completing the proof of this case.
\end{itemize}
This concludes the proof of \cref{L:winding_tail_partial}.
\end{proof

\begin{comment}
\bigskip

\note{comment everything after that, we need to write almost a fresh proof.}
We return to the proof of \cref{L:winding_tail}. Let us parametrise the loop erased walk $\tilde Y^{\tau_{i_N}}$ from $\tilde v$ to $\tau_{i_N}$ using some continuous monotone increasing parametrisation. \noteb{Let $\beta$ be the ending time in the parametrisation of $\tilde Y^{\tau_{i_N}}$. Note that while $\tilde X$ is in $B(\tilde v, e^{-t_0})$ it cannot create a non-contractible loop

 Let $\lambda_1$ and $\lambda_2$ be respectively the last times that $\tilde Y^{\tau_{i_N}}$ exits $B(\tilde v, e^{-t-1})$ and $B(\tilde v, e^{-t-1})$}

Let $\beta$ be the
the last time $\tilde Y^{\tau_{i_N}}$ exits $B(\tilde v, e^{-t_0} )$. Note that $\beta$ is actually the ending time of $\tilde Y^{\tau_{i_N}}$.

 Indeed this is the case as if $\tilde Y^{\tau_{i_N}}$ is a time when $\tilde Y$ enters $\tilde B_0$, a noncontractible loop must form before it exits $\tilde B_0$ which is an impossibility as $p$ is injective in $\tilde B_0$. \note{needs modification because we have to think in random walk time and not LREW time.}

Let $\lambda_1$ be the last time before $\beta$ that $\tilde Y^{\tau_{i_N}}$ exits $B(\tilde v, e^{-t-1})$ and let $\lambda_2$ be the last time before $\beta$ that $\tilde Y^{\tau_{i_N}}$ exits $B(\tilde v,e^{-t})$.
Note that the random walk $\tilde X[\tau_{i_N },\tau_{i_{N +1} }]$  cannot enter $B(\tilde v, e^{-t_0 - 1})$ as this would contradict the maximality of $N$. \noteb{Therefore $\tilde \gamma_{\tilde v}[0, t_2]$ is is obtained from $\tilde{Y}^{\tau_{i_N}}$ only by erasing some loops and hence it suffices to prove a stretched exponential tail for $\max_{\lambda_1<s_1<s_2<\lambda_2}   |W(\tilde Y^{\tau_{i_N}}(s_1,s_2),\tilde v)|$}.
\note{There is an issue here, we might need to go back to the previous argument because it is not clear that the noncontractible cycle happen outside $e^{-t_0}$}

Now we separately bound the winding of  $\tilde Y^{\tau_{i_N}}$ inside $B(\tilde v,e^{-t_0})$ and outside $B(\tilde v, e^{-t_0-1})$.

Let us divide the interval $[\lambda_1,\lambda_2] = [\lambda_1 = \alpha_1,\beta_1] \cup [\alpha_
2,\beta_2] \cup \ldots \cup [\alpha_p,\beta_p = \lambda_2]$ where the intervals with odd indices correspond to the portions of $\tilde Y^{\tau_{i_N}}$ inside $B(\tilde v,e^{-t_0})$ and those with even  indices correspond to the portions of $\tilde Y^{\tau_{i_N}}$ outside $B(\tilde v,e^{-t_0-1})$.

 Then we have
\begin{align}
\max_{t_1 \le t, t'\le t_2 } |W (\tilde \gamma_{\tilde v} [ t,t'] ; \tilde v) | & \le \sum_{\ell}  \sup_{\alpha_\ell \le t, t' \le \beta_\ell}
|W(\tilde  Y^{\tau_{i_N}}  [t, t'] ; \tilde v) | \\
& \le \sum_{j=1}^N Z_j + \sum_{\ell \text{ odd }} \sup_{\alpha_\ell \le t, t' \le \beta_\ell}
|W(\tilde  Y^{\tau_{i_N}}  [t, t'] ; \tilde v) | \label{eq:Z}
\end{align}
where $Z_j = \sup_{\mathcal{Y} \subset X[\tau_{i_j},\tau_{i_j +1 }]}|W(\mathcal{Y} ,\tilde v)|$.
It is now easy to conclude using Proposition 4.14 in \cite{BLR16} which bounds the second term on the right hand side of the above equation (corresponding to the total winding inside the ball) and by \cref{lem:macro_winding} which bounds the first term. Indeed observe that $Z_j$ are independent since the walks in each interval are independent given the set of $\{X_{\tau_k}\}$ and by \cref{lem:macro_winding} has an exponential tail which is uniform over $j$. Therefore by \cref{lem:exp_stretched_exp}, we conclude that $\sum_{j=1}^N Z_j$ has exponential tail since $N$ has exponential tail. Therefore,
\begin{align*}
\mathbb{P} ( \max_{t_1 \le s_1, s_2\le t_2 } |W (\tilde \gamma_{\tilde v} [ t,t'] ; \tilde v) |  > n) & \mathbb{P} (\sum_{j=1}^{N} Z_j  > n/2)  + \mathbb{P} ( \sum_{\ell \text{ odd }} \sup_{\alpha_\ell \le t, t' \le \beta_\ell}
|W(\tilde  Y^{\tau_{i_N}}  [t, t'] ; \tilde v) | > n/2)\\
& \le C e^{-c' n}.
\end{align*}
\end{comment}
\begin{comment}
From \cref{lem:macro_winding} and \eqref{eq:good_event} we know that
\begin{equation*}
\mathbb{P}(\sum_{\ell \text{ even}} \sup_{\mathcal{Y} \subseteq Y^{\tau_{i_N}}[\alpha_\ell,\beta_\ell] }|W(\mathcal{Y},\tilde v) | >n) \le ce^{-c'n^\alpha}.
\end{equation*}
Note that the law of  $\tilde Y^{\tau_{i_N}}$ is the same as the loop-erasure of $\tilde X$ up to time $\tau_{i_N}$ where we erase every loop of $X$, even the noncontractible ones. This is simply because no noncontractible loop has been created up to time $\tau_{i_N}$. Thus, on the event $\mathcal{E}$, we know from Proposition 4.14 of \cite{BLR16} that
\begin{multline*}
\mathbb{P}(\sum_{\ell \text{ odd}} \sup_{\mathcal{Y} \subseteq Y^{\tau_{i_N}}[\alpha_\ell,\beta_\ell] }|W(\mathcal{Y},\tilde v) | >n; \mathcal{G}_n) \le \sum_{j=1}^n\mathbb{P}(\sum_{\ell \text{ odd}} \sup_{\mathcal{Y} \subseteq Y^{\tau_{i_j}}[\alpha_\ell,\beta_\ell] }|W(\mathcal{Y},\tilde v) | >n,N=j)\\
 \le\sum_{j=1}^n\mathbb{P}(\sum_{\ell \text{ odd}} \sup_{\mathcal{Y} \subseteq Y^{\tau_{i_j}}[\alpha_\ell,\beta_\ell] }|W(\mathcal{Y},\tilde v) | >n) \le  cne^{-c'n^\alpha}.
\end{multline*}
Combining the above two inequalities and \eqref{eq:good_event}, we conclude the proof.
\end{comment}

\subsection{From partial path to the full spine.}\label{sec:full_spine}

As shown in \cref{lem:number_crossing}, the path $\tilde \gamma_{\tilde v}$ defined above is only a part of what is needed to compute the height function. Recall the notion of spine from \cref{sec:height_winding} which is just a bi-infinite path in the cover. As observed before, when we follow the outgoing edges in the Temperleyan forest from any given $\tilde v$, we always end up in a unique spine (since boundary loops have been added around every hole).

Recall from \cref{lem:number_crossing} that we are interested in the winding of the path starting from $\tilde v$, and then moving along the spine to infinity or the boundary of the disc. Observe that the initial portion of this path is $\tilde \gamma_{\tilde v}$ (\cref{fig:gamma_tilde}) and then it moves along copies of the noncontractible loop in the component of $\tilde v$ in the Temperleyan CRSF. In this section, we will call this path $ \mathsf p_{\tilde v}$ (i.e., $\tilde \gamma_{\tilde v}$ followed by a semi-infinite piece of the spine). Observe that this notation is in contrast to the notation used in \cref{lem:number_crossing}, where the path $\mathsf{p}_{\tilde v}$ was called
$\gamma_{f}$, whereas here we emphasise that $\tilde \gamma_{\tilde v}$ denotes what is sampled from Wilson's algorithm given the special branches. When we apply Wilson's algorithm to sample $\tilde \gamma_{\tilde v}$, given the special branches, we may form a new noncontractible loop, in which case we have discovered a portion of a spine (the unique spine attached to $\tilde v$). The winding of this portion is controlled by \cref{L:winding_tail_partial}. However, we also need to control the winding of the rest of $\mathsf p_{\tilde v}$. The purpose of this section is precisely to achieve this (done in \cref{L:winding_tail}). We also need to control the winding of the other semi-infinite piece of the spine attached to $\tilde v$, which is done in \cref{cor:full_winding_moment}. Finally, if we want to control the height gap between $\tilde u$ and $\tilde v$, we need to control the winding of $\mathsf p_{\tilde u}$ around $\tilde v$ as well, which is done in \cref{lem:tildeu}.

 \medskip Let us parametrise $\mathsf p_{\tilde v}$ in $[0,\infty)$ in any continuous manner away from $\tilde v$. Let $t_0$ be as in \cref{sec:apriori}, i.e., $e^{-t_0} = \tilde r_{\tilde v}$.
For $t \ge t_0$, let $t_1$ be the first exit time of  $\mathsf p_{\tilde v}$ from $B(\tilde v, e^{-t-1})$ and let $t_2$ be the last exit time of the same from $B(\tilde v, e^{-t})$. Note again that here, it is possible that the unique spine attached to $\tilde v$ is the same as the spine from a vertex in a special branch.

\begin{lemma}\label{L:winding_tail}
For all $k \ge 1$, there exists a constant $m>0$ so that for all $\delta < \delta_{\bar B(\tilde v, e^{-t_0})}$ and for all $ t_0 \le t < \log (C'\delta_0 / \delta)$,
$$
\mathbb{E}(\max_{\mathcal{Y} \subseteq   \mathsf p_{\tilde v} [t_1,t_2] \cap B(\tilde v, e^{-t-1})^c}   |W(\mathcal{Y},\tilde v)|^k)
 ) \le m.
$$
where the supremum is taken over all continuous segments. Also
$$
\mathbb{E}(\max_{\mathcal{Y} \subseteq   \mathsf p_{\tilde v} \cap B(\tilde v, e^{-t_0})^c}   |W(\mathcal{Y},\tilde v)|^k)
 ) \le m
 $$
\end{lemma}

\begin{proof}
In this proof, we write $\mathsf p_{\tilde v} = \mathsf p$ to lighten notation.
Let us first consider the case when $\mathsf p$ contains a portion of the spine corresponding to a special branch.
In that case, for any portion of $\tilde \gamma_{\tilde v}$, we use \cref{L:winding_tail_partial} and for the rest of the spine, we use \cref{assumption_precise} to obtain the required bound.

Now consider the event that $\mathsf p$ does not intersect a special branch, i.e., $\{ \mathsf{p} \cap \mathfrak{B} = \emptyset\}$.
We parametrise $\tilde \gamma_{\tilde v}$ in $[0,1]$ as before and assume that the parametrisation of $\tilde \gamma_{\tilde v}$ and $\mathsf p$ is the same until they start to differ.
We drop $\tilde v$ and write $\tilde \gamma_{\tilde v} = \gamma$ throughout the rest of this proof for notational clarity. To differentiate the first and last exit times for these two parametrisations we write  $t_1 (\mathsf p)$ (resp. $t_2(\mathsf p)$) for the first exit of $B(\tilde v, e^{-t-1})$ (resp. last exit of $B(\tilde v, e^{-t})$) of $\mathsf p$. We also write $t_1 = t_1(\gamma)$ and $t_2 = t_2(\gamma)$ for clarity.

Note that it is always the case that $t_1(\gamma) = t_1(\mathsf p)$
and that $t_2( \gamma) \leq t_2(\mathsf p)$. On the event $t_2(\mathsf p ) = t_2( \gamma)$, the maximum in this lemma is over the same set as the one in \cref{L:winding_tail_partial} so there is nothing to prove. We focus now on the case where $t_2(\mathsf p ) > t_2( \gamma)$, meaning that a part of the spine comes back close to $ x$ on the cover $\tilde M'$ after the time that a noncontractible loop was created.

We start with the case of the torus.
Let us denote by $S$ the spine attached to $ \tilde v$ (meaning the full bi-infinite path). Since $S$ is a periodic path, it has a well-defined direction $d$ and separates the plane in two sets right and left of $S$. Let us assume without loss of generality that the direction $d$ is horizontal and that $ \tilde v$ is below $S$. Let $\tau$ be a time at which the vertical coordinate of $\gamma$ reaches its maximum (for topological reasons, this has to occur on the spine $S$) and let us define $\gamma'$ by appending to $\gamma[0, \tau]$ a vertical segment going up to infinity.

Now it is easy to see that the winding of a straight segment around a point is bounded by $\pi$, so
\begin{equation}
 \max_{\mathcal{Y} \subseteq  \gamma' \cap B(  \tilde v, e^{-t-1})^c}   |W(\mathcal{Y}, \tilde v)| \leq \max_{\mathcal{Y} \subseteq  \gamma \cap B( \tilde v, e^{-t-1})^c}   |W(\mathcal{Y}, \tilde v)| + \pi.\label{eq:replacement}
\end{equation}
Using \cref{lem:wind_comp}, this implies that we can always bound \begin{equation}
\max_{\mathcal{Y} \subseteq   {\mathsf p_{\tilde v}}  \cap B(  \tilde v, e^{-t-1})^c}   |W(\mathcal{Y}, \tilde v)| \leq  \max_{\mathcal{Y} \subseteq  \gamma' \cap B(  \tilde v, e^{-t-1})^c}   |W(\mathcal{Y}, \tilde v)| +4\pi \le \max_{\mathcal{Y} \subseteq  \gamma \cap B( \tilde v, e^{-t-1})^c}   |W(\mathcal{Y}, \tilde v)| + 5 \pi.\label{eq:asymp_direction}
\end{equation}
By \cref{L:winding_tail_partial} (the $\tilde \gamma_{\tilde v}$ there is  $\gamma$ here) applied to all scales up to scale $t$, the right hand side is a sum of $O(t)$ variables with uniform stretched exponential tails.

Let us now bound $\mathbb{P}(t_2( {\mathsf p} ) > t_2(\gamma); \mathsf{p} \cap \mathfrak{B} = \emptyset)$. Note that on the event $t_2 (\mathsf p) > t_2(\gamma)$, $ x$ has to be at distance less that $e^{-t}$ of its spine. Using the fact that we can sample points in any order in Wilson's algorithm, we can bound that probability by first doing a cutset exploration around $\tilde v$ at scale $r_{\tilde v}$.  After this cutset exploration, the probability that any of the branches sampled intersects $B(\tilde v, e^{-t})$ is at most $C e^{-c(t - t_0)}$ for some constants $C, c$ (see \cref{lem:cutset isolation}). At the same time, after the cutset exploration around $\tilde v$ the spine attached to $\tilde v$ is necessarily fully sampled (see e.g., \cref{lem:exp_tail}, final assertion). Hence
$$\mathbb{P}(t_2( {\mathsf p} ) > t_2(\gamma); \mathsf{p} \cap \mathfrak{B} = \emptyset) \le C e^{- c(t-t_0)}.$$
Thus overall, either $\max_{\mathcal{Y} \subseteq   {\mathsf p  [t_1,t_2]} \cap B(  \tilde v, e^{-t-1})^c}   |W(\mathcal{Y}, \tilde v)|$ is the same as the variable in \cref{L:winding_tail_partial}, or with probability at most $Ce^{-c(t-t_0)}$, it is a sum of $O(t)$ variables with uniform stretched exponential tail. The moment bound now easily follows.

For the case where the universal cover is the unit disc, a similar argument can be done provided we can construction of a path $\gamma'$ which is nice and avoids the spine. Let us also introduce $\tau_S$ as the first time $\gamma$ hits the spine and $\tau_{nc}$ as the ending time of $\gamma$.
As recalled in more details in \cref{app:spine},
it is a well known fact from Riemann surfaces that there exists a M\"obius transform $\phi = \phi_{\gamma,\tilde v}$ such that
$${\mathsf p} ( v) = \gamma[0,\tau_S] \cup \bigcup_{n \geq 0} \phi^{(n)}((\tau_S, \tau_{nc} ])
$$
where $\phi^{(n)} = \phi \circ \ldots \circ \phi$ and the union is disjoint. In other words, we keep applying the same M\"obius transform to obtain all the copies. Furthermore $\phi$ can be written as $\phi= \Phi^{-1} \circ \mu \circ \Phi$ where $\Phi$ is a M\"obius map from the unit disc to the upper half plane and $\mu$ is either the translation by $\pm 1$ or a multiplication by $\lambda > 1$.

If it is a translation we use the same argument as before. Otherwise, it is a scaling by $\lambda>1$ in which case $\phi(S)$ necessarily converges to infinity. Furthermore, let $\tau$ be the time at which $\Im(\Phi( \gamma ))$ reaches its minimum, we define $\gamma'$ by appending a straight vertical segment $\ell$ from $\Phi(\gamma(\tau))$ to $\mathbb{R}$ (note that this segment may not intersect $\Phi(\gamma)$ nor the subsequent scalings of the image of the portion of the spine $\Phi (\gamma([\tau_S, \tau_{nc}])$) and then mapping $\Phi(\gamma[0,\tau] \cup \ell)$ back to the disc by $\Phi^{-1}$. By construction, it is trivial to check that $\Phi(\gamma')$ does not intersects $\Phi(  {\mathsf p}  (\tau, \infty) )$ so $\gamma'$ does not intersect $ {\mathsf p} (\tau, \infty)$. On the other hand, $\Phi^{-1}$ is the image of a line segment by a M\"obius transform so it is a circular arc and therefore its winding around any point is bounded by $2 \pi$. We can then conclude using exactly the same reasoning as in the torus case, with only the constant $\pi$ replaced by $2 \pi$ on the right hand side of \eqref{eq:replacement} and hence obtain the analogue of \eqref{eq:asymp_direction}.
\end{proof}

\begin{comment}
\paragraph{General case.} We prove the following lemma. Let $p: \tilde M' \to M$ be the covering map where
$\tilde M'$ is either $\mathbb{C}$ or $\mathbb{D}$. Furthermore, we fix the lift so that in case $\mathbb{C}$ is endowed with Euclidean metric, or $\mathbb{D}$ is endowed with hyperbolic metric with constant negative curvature -1. Since this mapping is defined only up to M\"obius transforms, let us fix the M\"obius transform by defining a canonical lift. Take a fixed point $x_0$ in $M'$ and a fixed path $\gamma$ starting from $x_0$. We $x_0 \in M'$ to $0$. Let $x_1$ be the end point of the lift of $\gamma$. Then in case of $\mathbb{D}$ we fix rotation by sending $x_1$ to $\mathbb{R}$ and fix scaling and rotation in case of $\mathbb{C}$ by sending $x_1$ to $1$. Now in case $\tilde M' = \mathbb{D}$, we map everything to the upper half plane $\mathbb{H}$ by the unique M\"obius map which maps $0$ to $i$ and $1$ to $0$ and let $\tilde M' = \mathbb{H}$.
\begin{lemma}
Let $\ell$ be a simple noncontractible loop in $M'$ and let $x \in M'$.
Let $\tilde \ell$ be the lift of $\ell$ in $\tilde M'$ as described above and let $\tilde \ell_\infty$ be the lift of $\ell$ in $\tilde M'$ obtained by going around $\ell$ infinitely many times in the same direction as $\ell$. Then $\tilde \ell_\infty$ converges to the boundary (which includes $\infty$). Furthermore,
$$
|W(\tilde \ell_\infty,\tilde x)|  \le 2 \sup_{\gamma \subset \tilde \ell}W(\gamma,\tilde x) +7\pi.
$$
where the supremum is over all continuous subsets of $\tilde \ell$.
\end{lemma}

\proof The statement is clear in case of the torus since $\tilde \ell_\infty$ is formed by translates of $\tilde \ell$. So we focus on the hyperbolic case only.

The proof needs some recollection of some classical facts in Riemannian geometry.
 By uniformization theorem of Riemann surfaces, we know that there exists a conformal map from the Riemann surface $\mathbb{H} / \Gamma$ to $M'$ where $\Gamma$ is a Fuchsian group which is a discrete subgroup of PSL$(2,\mathbb{R})$. Furthermore, such a conformal map is unique up to conformal automorphisms (i.e. M\"obius transforms) of the unit disc. In other words, if $\Gamma,\Gamma'$ are two Fuchsian groups such that $M'$ is conformally equivalent to both $\mathbb{H} / \Gamma$ and $\mathbb{H}/ \Gamma'$ then there exists a M\"obius map $\phi: \mathbb{H} \mapsto \mathbb{H}$ such that $\Gamma'  = \phi^{-1}\circ\Gamma \circ \phi$. Since we have defined a canonical lift, we have defined $\Gamma$ uniquely.

Topologically, $\Gamma$ is isomorphic to the fundamental group $\pi_1(M',x)$ (topologically, this is also known as the group of Deck transformations). This means that $\tilde \ell$ is a simple curve in $\mathbb{H}$ starting from $\tilde x$ and ending at $\phi_\ell(\tilde x)$ where $\phi_\ell$ is the M\"obius map in $\Gamma$ corresponding to the element in $\pi_1(M',x)$ specified by $\ell$.
Also note that $\phi_\ell(\tilde \ell)$ is a curve which projects via $p$ to the same curve $\ell$ in $M'$ since $M'$ is conformally equivalent to $\mathbb{H} / \Gamma$ (and in particular is homeomorphic) and it does not intersect $\tilde \ell$ since $\ell$ is a simple curve. Furthermore, since the endpoint of $\phi_\ell(\tilde \ell)$ is $\phi_\ell \circ \phi_\ell (\tilde x)$, by the unique path lifting property, the curve $\tilde \ell \cup \phi_\ell(\tilde \ell)$ is the unique lift obtained by going around $\ell$ twice in the same direction. Iterating, we obtain that the infinite path obtained by going around $\ell$ in the same direction is given by $\cup_{n=0}^\infty \phi_\ell^{(n)}(\tilde \ell)$ where $\phi_\ell^{(n)}$ is the $n$-fold composition of $\phi_\ell$ and the union is a disjoint union.

Now recall that the mapping $$\phi(z)=\frac{az+b}{cz+d} \mapsto \begin{pmatrix} a & b \\ c &d \end{pmatrix}  = M_\phi ;\quad ad-bc =1; \quad a,b,c,d \in \mathbb{R}$$ is a homomorphism. Furthermore, PSL$(2,\mathbb{R})$ can be classified up to conjugation depending upon the behaviour of the trace.
\begin{itemize}
\item If $|a+d| =2$, then $\phi(z)$ is conjugate to either $z+1$ or $z-1$.
\item If $|a+d| >2$, then $\phi(z)$ is conjugate to $\lambda z$ where $\lambda>1$.
\item If $|a+d| <2$, then $M_\phi$ is conjugate to a rotation.
\end{itemize}
Thus there is a M\"obius map $\Phi$ in $\mathbb{H}$ such that $\phi^{(n)}_\ell = \Phi^{-1} \circ \mu^{(n)} \circ \Phi$ where $\mu$ is either a translation by $\pm 1$ or a scaling by $\lambda$ or a rotation.

First we argue that $\mu$ being a rotation is impossible. This is because if we map the whole lift of loop to $\mathbb{D}$ by a fixed M\"obius map $\psi$, then the images of $\psi(\tilde x)$ under the iteration of pushforward of $\mu$ by $\psi$ forms a dense set in a circle. Thus either the iteration is periodic, or it is dense in that circle. Being periodic is forbidden because of path lifting property and being dense is forbidden because $\Gamma$ is discrete. Since the remaining cases are conjugates of iteration of scaling and translates, this completes the proof that $\tilde \ell_\infty$ converges to the boundary.

Consider the case $\mu$ is a translation by $+1$. Let $u$ be such that  $\Re(u) =  \text{min} \{\Re(z):z \in \Phi(\tilde \ell)\}$. Let $L$ be a straight line $\{z:\Re(z) < \Re(u), \Im (z) = \Im(u)\}$. Clearly, the path $\cup _{n \ge 1}\mu^{(n)} \circ \Phi$ is a path inside $\mathbb{H} \setminus (\Phi(\tilde \ell) \cup L)$ and hence it mapping everything back by $\Phi^{-1}$, the path $\cup_{n=1}^\infty \phi_\ell^{(n)}(\tilde \ell)$ lies inside $\mathbb{H} \setminus (\tilde \ell \cup \Phi^{-1}(L))$. From this, it is easy to see that
$$
|W(\tilde \ell_\infty,\tilde x)| \le 2\sup_{\gamma \subset \tilde \ell}|W(\gamma,\tilde x)| + |W(\Phi^{-1}(L),\tilde x))| + 2\pi
$$

Let $L'$ be $L$ concatenated by a straight line joining $\Phi(\tilde x)$ and $u$. Now note that $W(\Phi^{-1}(L),\tilde x))$ is the winding of the image $L'$ under a M\"obius map. Further, $L'$ is a concatenation of two straight lines joining $\Phi(\tilde x)$ to infinity, hence its winding around $\Phi(\tilde x)$ is bounded by $\pi$. It follows from Lemma 3.11 of \cite{BLR16} that the difference in winding by a M\"obius map differs by at most $4\pi$.

The case of $\mu$ being a translation by $-1$ is handled similarly. The case of scaling is also similar, except we need to look at a straight line $L$ joining $u$ and origin such that $|u| = \text{min}\{ |z|:z \in  \Phi(\tilde \ell)\}$. The details are straightforward. This completes the proof.
\qed
\end{comment}

\begin{lemma}\label{cor:full_winding_moment}
For all $k \ge 1$, there exist a constant $C > 0$ such that the following holds. Fix a compact set $K \subset \tilde M'$ .
Suppose we are in the setup of \cref{L:winding_tail}. Let $\mathsf p = \mathsf p_{\tilde v}$ be as above and $ \bar{\mathsf p}$ be the curve which starts at $\tilde v$, hits the spine, and then goes to infinity in the direction opposite to the orientation of the spine. Orient and parametrise both $\mathsf p, \bar {\mathsf p}$ from $\tilde v$ to $\infty$ so that $t_2$ is the last time they exit $B(\tilde v, e^{-t})$. Then for all $ \delta < \delta_{K}, t \in[t_0,\infty], \tilde v \in K$,
$$
\mathbb{E}\Big(\sup_{\mathcal{Y} \subset \mathsf p[t_2,\infty) }|W(\mathcal{Y} , \tilde v)|^k \Big) \le C((1+t) \wedge \log (1/\delta))^{k} ; \quad \quad \mathbb{E} \Big(\sup_{ \mathcal{Y} \subset \mathsf {\bar p}[t_2,\infty)}|W(\mathcal{Y} , \tilde v)|^k \Big) \le C((1+t) \wedge \log (1/\delta))^{k}.
$$
\end{lemma}
\begin{proof}
First we tackle the case of $\mathsf p$. If $t < \log (C'\delta_0 / \delta)$, we need to add $O(t)$ many variables given by \cref{L:winding_tail} and hence we are done by Minkowski's inequality. If $t > \log (C'\delta_0 / \delta)$, first we apply the previous bound up to $t =  \log (C'\delta_0 / \delta)$. For the remainder, we can simply bound the winding by the volume of the ball of radius $C'\delta / \delta_0$ around $\tilde v$ which is $O(1)$ by our assumptions on the graph (see assumption \eqref{boundeddensity} in Section \ref{sec:setup}). Indeed, this quantity is bounded by the number of times $\mathsf p$ crosses a straight line joining $\tilde v$ to the boundary of the ball, which is simply bounded by the volume of the ball. For $\mathsf {\bar p}$, we can use \cref{lem:wind_comp} and the bound for $\mathsf p$ and the proof is complete.
\end{proof}

\begin{lemma}\label{lem:tildeu}
For all $k$ there exist $C,c>0$ such that for all points $\tilde u, \tilde v$, for all compact sets $\tilde K$ containing $\tilde u , \tilde v$, for all $\delta  < \delta_{\tilde K}$,
$$
\mathbb{E}\Big ( |W(\mathsf p_{\tilde u}  , \tilde v  )|^k\Big) \le C(|1+\log  |\tilde u - \tilde v|| \wedge \log (1/\delta))^c.
$$

\end{lemma}
\begin{proof}
Fix $T =  \log (\frac{C'\delta_0}{\delta})$ with $C'$ as in \cref{L:winding_tail}. We parametrise $\mathsf p_{\tilde v}, \mathsf p_{\tilde u}$ as in \cref{cor:full_winding_moment}.      If $|\tilde u - \tilde v| <e^{-T}$, we use  \cref{cor:full_winding_moment,lem:wind_comp} to conclude.

If $|\tilde u - \tilde v| \ge e^{-T}$, we take $t  = -\log |\tilde u - \tilde v| $. Then using \cref{lem:wind_comp}, we can write
$$
|W(\mathsf p_{\tilde u},  \tilde v)| \le 2\pi +  \sum_{k=t}^\infty \sup_{ \mathcal{Y} \subset \mathsf p_{\tilde v}[k_2, \infty)} |W(\mathcal{Y}, \tilde v)|1_{|\mathsf p_{\tilde u} -\tilde v| \in [e^{-k}, e^{-k-1} ]}
$$
where $k_2$ is the last exit from the $B(\tilde v, e^{-k})$ by $\mathsf p_{\tilde u}$.
Using \cref{lem:coming_close}, we get an exponential bound on the expectation of the indicator event above (notice for scales $k > \log (C'\delta_0/\delta)$, the probability actually becomes 0 so this is a finite sum). Therefore, we can again use \cref{cor:full_winding_moment} and Cauchy--Schwarz to conclude.
\end{proof}

\subsection{Convergence of height function}\label{sec:winding_convergence}

In this section we prove \cref{thm:main_precise}. We recall that the proofs of this section assume that \cref{assumption_precise} is valid.

Let us describe informally the general structure of the proof. Most of the work will be in the universal cover to obtain the convergence of expressions of the form $\mathbb{E} \prod_i (h(\tilde z_i) - h(\tilde w_i))$ for distincts points $\tilde z_i$ and $\tilde w_i$ (\cref{L:err_winding_moment}). By integrating this expression, we will then obtain the convergence of the height function, seen as a function on the universal cover (\cref{lem:conv_in_law}). We will conclude by arguing that convergence on the universal cover implies convergence of the scalar and instanton components on the manifold.

As mentioned in the introduction, for the first part, the idea is to introduce a regularised height function $h^{\# \delta}_t$ which is a continuous function of the CRSF so that the convergence of $h^{\# \delta}_t$ as $\delta \rightarrow 0$ is immediate. This leaves us with two issues: the comparison between $h^{\# \delta}$ and $h^{\# \delta}_t$ for fixed $\delta$ and the convergence of $h_t$ as $t \rightarrow  \infty$ in the limit. Both questions are actually solved simultaneously by the estimate of \cref{L:err_winding_moment} which compares $h^{\# \delta}$ and $h^{\# \delta}_t$ with an error term that becomes small both in $\delta$ and $t$ independently.

\paragraph{Setup and notations.}  Recall that our goal is to prove that
\begin{equation}\label{E:height_test}
\int_{\tilde M'} \overline h_{ext}^{\# \delta}(z)\tilde f(z)d\mu(z)
\end{equation}
converges in law and also in the sense of moments as $\delta \to 0$. (Recall that $\bar X$ denote the centered random variable $\bar X = X - \mathbb{E}(X)$ whenever this expectation is well defined). Implicitly, $h^{\# \delta}$ is sampled according to the dimer law \eqref{Gibbs}. In other words, by \cref{prop:temp_bij}, we need to first sample a Temperleyan pair $(\mathcal{T}, \mathcal{T}^\dagger)$ and apply the bijection $\psi$ in that theorem.

However, it turns out to be more convenient in the proof to work with a pair $(\mathcal{T}, \mathcal{T}^\dagger)$ sampled from $\Pwils$.
To this pair $(\mathcal{T}, \mathcal{T}^\dagger)$ we can apply the bijection $\psi$ from \cref{prop:temp_bij} and obtain a dimer configuration $\mathbf{m}$ whose centered height function can be studied.
We will first prove \eqref{E:height_test} for $\Pwils$ and then later explain how this implies the same for $\Ptemp$.

Recall that since $\int_{\tilde M'}\tilde f(z)d\mu(z) = 0$, the expression in \eqref{E:height_test} is in fact well-defined.
We wish to compute the moments of this integral but only in terms of height differences since the field is a priori defined only up to constant.
To do this, we use the following trick. Note that since $\int \tilde f d\mu = 0$, $\int \tilde f^+ d \mu  = \int \tilde f^- d \mu =: Z(\tilde f)$ where $f^+ = \max\{f,0\}$ and $f^- = - \text{min} \{f,0\}$. Now we can write
\begin{equation}
\int_{\tilde K} \overline h_{ext}^{\# \delta}(z)\tilde f(z)d\mu(z) = \int_{\tilde K \times \tilde K} (\overline h_{ext}^{\# \delta}(z) - \overline h_{ext}^{\# \delta}(w) )\frac{\tilde f^+(z)\tilde f^-(w)}{Z(\tilde f)}d\mu(z)d\mu(w).\label{eq:int_double_int}
\end{equation}
which implies
\begin{equation}
(\int_{\tilde K} \overline h_{ext}^{\# \delta}(z)\tilde f(z)d\mu(z) )^k = \int_{\tilde K^{2k}} \prod_{i=1}^k(\overline h_{ext}^{\# \delta}(z_i) - \overline h_{ext}^{\# \delta}(w_i)   )\frac{\tilde f^+(z_i)\tilde f^-(w_i)}{Z(\tilde f)}d\mu(z_i)d\mu(w_i)\label{eq:kth_moment_int}
\end{equation}
Therefore we are interested in the $k$-point function, $\mathbb{E} [ \prod_{i=1}^k(\overline h_{ext}^{\# \delta}(z_i) - \overline h_{ext}^{\# \delta}(w_i)   )]$. Pick $k$ distinct pairs of points $( z_1,w_1), \ldots, ( z_k ,w_k)\in \tilde K$ and let $(f(z_1),f(w_1)),
\ldots, (f(z_k),f(w_k))$ be the faces containing them. Let $z_i^{\# \delta},w^{\# \delta}_i$ be the midpoint of the diagonals of $f(z_i), f(w_i)$.

Now recall \cref{lem:number_crossing} which relates the dimer height difference between two faces $f$ and $f'$ to the winding of a specific path $\gamma_{f,f'}$ connecting $m(f)$ and $m(f')$ and additional terms of the form $\pm \pi$ associated with jumping over components of the CRSF.
Let $\gamma_i^{\# \delta}$ be the path $\gamma_{f,f'}$ when $f = f(z_i)$ and $f'= f(w_i)$, and orient it
from $z_i^{\# \delta}$ to $w_i^{\# \delta}$.
Then with these notations, \cref{lem:number_crossing} says that
\begin{equation}
h(z_i^{\# \delta}) - h(w_i^{\# \delta}) = W(\gamma_i^{\# \delta}, z_i^{\# \delta}) + W(\gamma_i^{\# \delta}, w_i^{\# \delta}) + \Psi^{\# \delta}_i\label{eq:path_height}
\end{equation}
where $\Psi^{\# \delta}_i$ is the $\pi \sum_S (\varepsilon_S+\delta_S)$ term in \cref{lem:number_crossing}.
We drop the superscript $\delta$ from now on for clarity.
\begin{comment}
The identity \eqref{eq:path_height} entail that
\begin{multline}
\int_{\tilde K \times \tilde K} (\overline h_{ext}(z) - \overline h_{ext}(w) )\frac{\tilde f^+(z)\tilde f^-(w)}{Z(\tilde f)}d\mu(z)d\mu(w) = \int_{\tilde K \times \tilde K} (\mathsf W (z_i,w_i) - \\
\Etemp(\mathsf W (z_i,w_i)) ) \frac{\tilde f^+(z)\tilde f^-(w)}{Z(\tilde f)}d\mu(z)d\mu(w). \label{TW1}
\end{multline}
We need to show convergence in law and of all moments of the right hand side under $\Etemp$.
We now claim that it is enough to show convergence of all moments under $\Etemp$ of
\begin{equation}
\int_{\tilde K \times \tilde K} ((\mathsf W (z_i,w_i)  -
\Ewils(\mathsf W (z_i,w_i))) \frac{\tilde f^+(z)\tilde f^-(w)}{Z(\tilde f)}d\mu(z)d\mu(w). \label{TW2}
\end{equation}
Indeed the difference between the previous two expressions can be written as
\begin{equation}
\int_{\tilde K \times \tilde K} (\Etemp((\mathsf W (z_i,w_i) ) -
\Ewils(\mathsf W (z_i,w_i))) \frac{\tilde f^+(z)\tilde f^-(w)}{Z(\tilde f)}d\mu(z)d\mu(w)\label{TW3}
\end{equation}
and the convergence of $\eqref{TW3}$  is immediate from Fubini and the first moment convergence of \eqref{TW2} under $\Etemp$. Furthermore, the $k$th $\Etemp$ moment of the right hand side of \eqref{TW1} can be written as a sum of constant times products of $j$th $\Etemp$ moment of \eqref{TW2} and $(k-j)$th power of \eqref{TW3}. This also converges if all moments of right hand side of \eqref{TW1} converge under $\Etemp$.

\end{comment}
Thus from now on we focus on proving convergence of
\begin{equation}
\Ewils\Big(\prod_{i=1}^k (\bar W(\gamma_i ,z_i) + \bar W( \gamma_i ,w_i) + \bar \Psi_i )\Big)\label{eq:height_to_winding2}
\end{equation}
Let $$\mathcal{X} = \{z_i,w_i:1 \le i \le k\}, \text{ and assume } p(u) \neq p(v) \text{ for all }u \neq v \in \mathcal{X}.$$

Clearly, \eqref{eq:height_to_winding2} can be expanded as a sum of $2^k$ many terms of the form:
\begin{equation}
\Ewils(\prod_{x \in S} (\bar W(\gamma_x,x) + \bar \Psi_x/2) )=: \Ewils(\prod_{x \in S} \bar F_x(\gamma_x))\label{eq:top_int_eq1}
\end{equation}
where $S$ is a subset of vertices of $\mathcal{X}$ with distinct indices and $\gamma_x$ is $ \gamma_i$ for some $i$ such that $x = z_i$ or $w_i$ (of course, the products in the expansion of \eqref{eq:top_int_eq1} has further restrictions, but we ignore that for clarity).

We are interested in estimating and proving convergence of \eqref{eq:top_int_eq1}. To that end we employ an idea similar to that in \cite{BLR16}: we truncate the CRSF branch at a macroscopic scale and deal with the truncated macroscopic winding and the remaining microscopic winding part separately.

We now fill in the details.
Parametrise $\gamma = \gamma_x$. Define $(\gamma_x(t))_{t \ge 1}$ to be $\gamma_x$ at the first entry time into the ball $B(x,e^{-t})$ (Note that at the moment, $B(x,e^{-t})$ might overlap for different $x \in \mathcal{X}$.) We emphasise here that we parametrise $\gamma$ in the opposite direction compared to \cref{sec:apriori,sec:full_spine} to be consistent with \cite{BLR16}. With an abuse of notation, we will denote by $\gamma_x (-\infty, t]$ the whole path from the opposite end of $\gamma$ up until $\gamma_x(t)$. Define the regularised term and the error term as
\begin{align}
\bar F_x(\gamma_x, t) & := \bar W(\gamma_x (-\infty, t]); x) + \bar \Psi_x/2\label{Fx}\\
\bar e_x(t) & := \bar W(\gamma_x,x) - \bar W(\gamma_x (-\infty, t]),x) = \bar F_x(\gamma_x) - \bar F_x(\gamma_x, t)\label{ex}.
\end{align}
When we want to emphasise the role of $z,w$, we write $\gamma_{zw}, \Psi_{zw},F_z(\gamma_{zw})$ in place of the above. We start with a general moment bound for the truncated winding.

\begin{lemma}\label{L:reg_winding_moment}
For all $m$, there exists constants $c = c( \tilde K,m),\alpha=\alpha(m)$ such that for all $z,w, \delta < \delta_{\tilde K}, t \ge 0$,
$$
\Ewils(|\bar F_{z}(\gamma_{zw}, t)|^m) \le c|(1+t  + |\log |z-w||)  \wedge \log (1/\delta)|^\alpha
$$
\end{lemma}
\begin{proof}
The proof is immediate from \cref{cor:full_winding_moment,lem:tildeu} and the fact that $\Psi_{zw}$ is bounded by a constant $c(K)$ times the number of noncontractible loops in the CRSF. Indeed, this is clear from the fact that for a fixed compact set $\tilde K \subset \tilde M$ there exists a constant $c(\tilde K)$ such that any curve $P \subset \tilde K$ will cross at most $c(\tilde K)$ copies of a given spine (or lift of a loop). Since the number of noncontractible loops has superexponential tail (\cref{thm:CRSF_universal}), the moment bound of $\Psi_{zw}$ is immediate.
\end{proof}

By compactness, choose $r_{\tilde K}$ small enough so that $p$ is injective in $B(z,r_{\tilde K})$ for all $z \in \tilde K$. Now let $r_{\mathcal{X}}$ be defined as in \eqref{def_r} but for the set of vertices $p(\mathcal{X})$ (which are all distinct by assumption on $\mathcal{X}$). We observe that $r_{\mathcal{X}} \ge  c(\tilde K) \text{min}_{x\neq y \in \mathcal{X}} |x-y|$ for some constant $c(\tilde K)$. We set
\begin{equation}
\Delta =\Delta (\mathcal{X}) =  \frac1{10}(r_{\mathcal{X} } \wedge r_{\tilde K}) \label{eq:Delta}
\end{equation}
\begin{lemma}\label{L:err_winding_moment}
There exist constants $c,c'>0$ such that for all $m,m' \ge 1$ there exists $\alpha>0$ such that the following holds.
Let $S\subset \mathcal{X}, S' \subset \mathcal{X}$ be disjoint.  Also assume that $|S| = m , |S'| = m'>0$.  Let $\Delta$  be as in \eqref{eq:Delta}. Then for all $\delta < \delta_{\tilde K}$ and $t \ge \log (r_{\tilde K} /\Delta)$
$$
|\Ewils(\prod_{x \in S}\bar e_x(t)\prod_{x \in S'}\bar F_x(t))| \le c |1+t |^\alpha(e^{-c(t- \log(r_{\tilde K}  / \Delta))} + \delta^{c'}).
$$
\end{lemma}

\begin{proof}
For simplicity, we first assume $S'$ is empty. Recall that we can sample a CRSF from $\Pwils$ by first sampling the branches $\mathfrak B$ and then the rest by Wilson's algorithm. Note that the second item of \cref{assumption_precise} tells us that the isolation radius corresponding to the special branches of each vertex in $S$ has polynomial tail. Since after sampling these branches, the rest of the branches are sampled simply by Wilson's algorithm, we can conclude that the application of \cref{lem:exp_tail} is valid with $\Delta$ in place of $r_i$.

We perform the coupling in \cref{sec:fullcoupling} (in particular \cref{lem:exp_tail}, see also \cref{rmk:special_branch_coupling}) with points $p(\mathcal{X})$ and their lift $\mathcal{X}$, and a compact domain $D \subset \tilde M'$ containing all points in $\mathcal{X}$ so that the minimal Euclidean distance between any point in $\mathcal{X}$ and $\partial D$ is at least $r_{\mathcal{X}}$. Note that we can choose $r_\mathcal{X}$ for the $r$ in \eqref{def_r} there. Call $(\mathcal{T}^D_x)_{x \in \mathcal{X}}$ the resulting independent UST in $D$. For $x \in \mathcal{X}$ let $\gamma^D_x$ be the branch in the UST $\mathcal{T}^D_x$
joining $x$ to $\partial D$. Let $\gamma_x^D(t)$ be parametrised so that $\gamma^D_x$ enters $B(x,e^{-t}r_{\tilde K})$ for the first time (going from the outside to $x$) at time $t$.

Let $R_x$ be the isolation radius of  $x$ in the application of \cref{lem:exp_tail} and write $R_x = e^{-I_x}r_{\tilde K}$. Let $I = \max_{x \in \mathcal{X}} I_x$. (Note that for notational clarity, $I$ here is shifted by $\log (r_{\tilde K}/\Delta)$ from that in \cref{sec:fullcoupling}.)
We now decompose
\begin{align}
e_x(t) & = \underbrace{\overline W(\gamma^D_x(t,\infty),x)}_{\alpha_x} +
\underbrace{(\overline W(\gamma_x(t,\infty),x) - \overline W(\gamma^D_x(t,\infty),x)) }_{\xi_x} \end{align}
Therefore, we need to deal with expectation of products of $\alpha_x,\xi_x$ for different indices $x$. Let $\mathfrak C$ be the sigma algebra generated by the cutset exploration. We will first compute the conditional expectation and then take the overall expectation.
Note that $\mathcal{T}_x^D$ are independent for different $x$ and also independent of $\mathfrak C$ and hence any term involving $\alpha_x$ is 0. Thus we only have to deal with terms involving $\xi_x, x \in S$.

Let $\Lambda $ be the \emph{last} time $\gamma_x$ enters $B(x,e^{-I}r_{\tilde K})$. In the coupling, $\gamma_x, \gamma_x^D$ agree inside $B(x,e^{-I}r_{\tilde K})$ so in particular $\gamma_x(\Lambda, \infty)  = \gamma_x^D(\Lambda, \infty)$, so
\begin{equation*}
\xi_x = \overline W(\gamma_x(t,\Lambda),x) - \overline W(\gamma^D_x(t,\Lambda),x).
\end{equation*}
Let $G$ be the event that $\xi_x$ without the bar (meaning without the expectation terms) is 0. Observe that if $G$ does not occur then one of the following events happen. Either $$I  - \log(r_{\tilde K}  / \Delta)> (t-\log(r_{\tilde K}  / \Delta))/2$$ which has probability at most $e^{-c(t - \log(r_{\tilde K}  / \Delta))} \vee \delta^c \le (e^{-c(t-\log(r_{\tilde K}  / \Delta))} + \delta^c)$  (\cref{lem:exp_tail}). Otherwise, $\gamma_x$ has to exit $B(x, e^{-I}r_{\tilde K})$ after hitting $e^{-t}r_{\tilde K}$. This also has probability at most $e^{-c(t -\log(r_{\tilde K}  / \Delta)) }$  (\cref{lem:backtrack}). Now we bound the moments of $\xi_x$. Notice that we can write
\begin{align*}
\Ewils(|\xi_x|^k)  & \le \sum_{j = t/2 + \log (r_{\tilde K} / \Delta )/2}^{\infty} \mathbb{E}(|\xi_x|^k 1_{j \le I \le j+1}) + c e^{-c(t -\log(r_{\tilde K}  / \Delta)) }\\
&\le \sum_{j = t/2 + \log (r_{\tilde K} / \Delta )/2}^{\infty} |1+j|^k (e^{-c(j - \log(r_{\tilde K}  / \Delta) )} +\delta^c)
\end{align*}
where we first used Cauchy--Schwarz and then used \cref{cor:full_winding_moment} to bound the moment and \cref{lem:exp_tail}. Thus overall
$$
\Ewils(|\xi_x|^k) \le |1+t|^k( e^{-c(t- \log(r_{\tilde K}  / \Delta) )} +\delta^c).
$$
We have a product of at most $m$ terms and so using H\"older's inequality, taking $\alpha =m$ works.

Finally, if $S'$ is non-empty, the proof is exactly the same as the vertices in $S'$ are distinct from $S$ and hence local independence from the coupling still holds. We then use \cref{L:reg_winding_moment} to conclude using Cauchy--Schwarz. Details are left to the reader.
\end{proof}

\begin{corollary}\label{L:winding_moment}
Let $S\subset \mathcal{X}$ containing vertices with distinct indices such that $|S| = m$. There exists a constant $c=c(\tilde K,m),\alpha=\alpha(m)$ such that for all $\delta < \delta_{\tilde K}$,
$$
|\Ewils(\prod_{x \in S} \bar F_x(\gamma_x) )| \le c|1+ \log^\alpha(\Delta)|
$$
\end{corollary}
\begin{proof}
Decompose
\begin{equation}
\Ewils( \prod_{x \in S} \bar F_x(\gamma_x) ) = \Ewils( \prod_{x \in S}  (\bar F_x(\gamma_x,t) + \bar e_x(t)) )\label{eq:winding_moment1}
\end{equation}
with $t = 2\log(r_{\tilde K} / \Delta)$. Then this is a straightforward application of \cref{L:err_winding_moment,L:reg_winding_moment}.
\end{proof}

Now we prove a convergence of the height function integrated against $f$ in the sense of moments (still for the Wilson law $\Pwils$). Recall that $X_\delta$ converges in the sense of moments as $\delta \to 0$ if for all $k$, $\mathbb{E}(X_\delta^k)$ converges as $\delta \to 0$.
\begin{lemma}\label{lem:kth_moment_conv}
$\int_{\tilde K} \overline h_{ext}^{\# \delta}(z)\tilde f(z)d\mu(z)$ converges in the sense of moments under the law $\Pwils$. Furthermore, the limit does not depend on the sequence $(G')^{\# \delta}$.
\end{lemma}
\begin{proof}
 Using \cref{eq:kth_moment_int,eq:height_to_winding2,eq:top_int_eq1}, we need to prove the convergence as $\delta \to 0$ of
\begin{equation}
\int_{\tilde K^{2k}} \Ewils( \prod_{x \in S} \bar F_x(\gamma^{\# \delta}_x) )\frac{\tilde f^+(z_i)\tilde f^-(w_i)}{Z(\tilde f)}d\mu(z_i)d\mu(w_i)\label{Sproj}
\end{equation}
We use Fubini to bring the expectation inside the integral in the above display. We first observe that integrating \eqref{Sproj} over all sets of vertices $S$ so that $p(x) \neq p(y)$ for all $x \neq y \in S$ is enough. Indeed, using \cref{L:reg_winding_moment} and the fact that $\|f\|_\infty < \infty$, we see that the integrand can be bounded by $O(\log^\alpha (1/\delta))$. Since the volume of $\{S \subset \tilde K^{2k}: p(x) = p(y) \text{ for some }x,y \in S\}$ is $O(\delta)$ (indeed the number of preimages of any vertex in $\tilde K$ is bounded by a constant depending only on $\tilde K$), we see that the integral over this set is $O(\delta\log^\alpha (1/\delta) )$.

Thus we now concentrate on the integral \eqref{Sproj} over
\begin{equation}
\mathcal{A} (\tilde K) = \{ \text{sets of vertices } S  \text{ so that } p(x) \neq p(y)  \text{ for all } x \neq y \in S  \} \label{cA}
\end{equation}

 We now use \cref{L:winding_moment} and dominated convergence theorem. Since $\|f\|_\infty < \infty$ and $\log^m(\Delta)$ is integrable for any $m>0$,  we need to prove convergence of the expectation inside the integral above. Now we claim that the regularised part
\begin{equation}\label{E:fgammat}
\Ewils(\prod_{x \in S} \bar F_x(\gamma^{\# \delta}_x,t) )
\end{equation}
converges as $\delta \to 0$. This follows from our assumption of a.s. convergence of Temperleyan CRSF and because the term inside the expectation is a.s. continuous function of the Temperleyan CRSF. Indeed, this follows from a.s. continuity properties of SLE$_2$ and the fact that the CRSF branches are made a.s. from finitely many chunks of SLE$_2$, in particular for a fixed $t$, the SLE curve is a.s. not a tangent to the boundary of circle of radius $e^{-t}$. \cref{L:reg_winding_moment} tells us that the random variable in \eqref{E:fgammat} is uniformly integrable which completes the proof of convergence of the regularised term \eqref{E:fgammat}.

Now given a fixed $S$, choose $t \ge \log(r_{\tilde K}/\Delta)$. Now we claim that that the error term satisfies
\begin{equation}
|\Ewils( \prod_{x \in S} \bar F_x(\gamma_x) )- \Ewils( \prod_{x \in S} \bar F_x(\gamma_x,t) )| <c |1+t |^\alpha(e^{-c(t- \log(r_{\tilde K}  / \Delta))} + \delta^{c'})\label{eq:error_30}
\end{equation}
Indeed, \eqref{eq:error_30} follows by writing $\bar F_x(\gamma_x) = \bar F_x(\gamma_x,t) + \bar e_x(t)$ and then expanding and using the bounds in \cref{L:reg_winding_moment,L:err_winding_moment}.
To finish the proof of the lemma, fix $\varepsilon>0$. First choose $t $ large enough and then $\delta$ small enough so that the right hand side of \eqref{eq:error_30} is less than $\varepsilon$. Next choose a smaller $\delta$ if needed so that for all $\delta'<\delta$,
$$ |\Ewils(\prod_{x}\bar F(\gamma^{{\# \delta}'}_x,t)) - \Ewils(\prod_{x}\bar F_x(\gamma^{{\# \delta}}_x,t))| <\varepsilon.$$
via the convergence of the regularised term. This completes the proof as $\varepsilon$ is arbitrary.

Observe that \eqref{eq:error_30} completes the proof that the limit does not depend on the sequence $((G')^{\# \delta})_{\delta>0}$ since the main term \eqref{E:fgammat} is measurable with respect to the limiting continuum Temperleyan CRSF which is universal by \cref{assumption_precise} (and is proved for the annulus and the torus in \cref{thm:CRSF_universal}).
\end{proof}
Now we prove convergence in law (still for $\Pwils$ for now). For this, we need to alter the definition of truncation slightly. Given $t>0$,  take a cover $\{B_\textsf{euc}(x,r_{\tilde K}e^{-10t}):x \in \tilde K\}$ of $\tilde K$ and take a finite subcover. Let $\mathfrak c(z), \mathfrak c(w)$ denote the center of one of the balls (chosen arbitrarily) in the finite subcover in which $z,w$ belong. Define $\mathsf F_x(t), \mathsf e_x(t)$ to be the same as $F_x(t)$ and $e_x(t)$ but we cut off the first time $\gamma_x$ enters $B(\mathfrak c(x) , e^{-t})$ (so compared to the above, the centre of the cutoff ball is shifted by an amount which is at most $e^{-10t}$). However, in this definition, we still measure winding around $x$ not $\mathfrak c(x)$.

\begin{lemma}\label{cor:shift_center}
The statements of \cref{L:reg_winding_moment,L:err_winding_moment} still hold if we replace $F,e$ by $\mathsf F, \mathsf e$ everywhere.
\end{lemma}
\begin{proof}
For \cref{L:reg_winding_moment}, the proof identically follows from \cref{cor:full_winding_moment,lem:tildeu} by noticing that the supremum over all continuous subpaths contain the portion of the branch until it first hits the shifted ball. Notice also that we shift only by an additive term in the exponential scale which is $O(t)$.

For \cref{L:err_winding_moment}, the proof is also identical, in particular we still consider the coupling around the points in $S$. Because we still shift only by $O(t)$ in the exponential scale, the proof readily follows.
\end{proof}

\begin{thm}\label{lem:conv_in_law}
Assume \cref{assumption_precise} holds.\ Let $\mathcal{T}^{\# \delta}$ be the oriented Temperleyan CRSF coupled with the dimer configuration though Temperleyan bijection. Then the joint law of
$$(h_{ext}^{\# \delta}(z),\mathcal{T}^{\# \delta})$$ converges in the sense of \cref{thm:main_precise}. Furthermore, the marginal of the limit's first coordinate is measurable with respect to the second coordinate, does not depend on the sequence $G'^{\# \delta}$ and is conformally invariant.
\end{thm}
\begin{proof}
Again, we first prove this under $\Pwils$ before explaining how to extend this and concluding the proof of \cref{thm:main_precise} to $\Ptemp$. We write $r = r_{\tilde K}$ and pick a $t > 0$ to be taken large later.  Recall from \cref{eq:int_double_int,eq:path_height},
\begin{align*}
\int_{\tilde K} \overline h_{ext}^{\# \delta}(z)\tilde f(z)d\mu(z)=\int_{\tilde K \times \tilde K} (\bar W(\tilde \gamma^{\# \delta}_{zw},z) + \bar W(\tilde \gamma_{zw}^{\# \delta} ,w) +  \bar \Psi_{zw}) \frac{\tilde f^+(z)\tilde f^-(w)}{Z(\tilde f)}d\mu(z)d\mu(w).
\end{align*}
Here $Z(\tilde f)$ is a deterministic constant so we can assume it to be 1 from now on without loss of generality. Firstly we recall that we only need to integrate over the set $\mathcal{A}(\tilde K)$ as in \eqref{cA} as the integral over the remaining part is $O(\delta \log^c(1/\delta))$.  Let us denote by $Y = Y(\delta)$ the above integral over $\mathcal{A}(\tilde K) $. Introduce
\begin{equation*}
X(\delta,t) :=  \int_{\mathcal{A}(\tilde K)} (\bar \mathsf{F}_{\mathfrak{c}(z)\mathfrak{c}(w)}(t) + \bar \mathsf{F}_{\mathfrak{c}(w) \mathfrak{c}(z)}(t)   )1_{|\mathfrak{c}(z)- \mathfrak{c}(w)| >re^{-t/10}} \tilde f^+(z)\tilde f^-(w)d\mu(z)d\mu(w)
\end{equation*}
Note that $X(\delta,t)$ is a sum of regularised winding of finitely many branches and hence converges in law (as $\delta \to 0$ and $t$ is fixed) by our assumption.

Now we show that for all $t>0$ and $\delta  < C'\delta_0e^{-t}$,
$$
\mathbb{E}(Y(\delta) - X(\delta,t))^2 \le c(1+t)^\alpha e^{-c't}.
$$
We expand the above square to get an integral over $(z,w,z',w') \in \mathcal{A}(\tilde K)^2$. We can again without loss of generality restrict to the the set $\mathcal{A}_2(\tilde K)$ such that the projection $p$ of all four points $(z, w, z',w')$ maps to pairwise distinct points on $M$. In that case let
$\Delta = \Delta (z,w,z',w')$ be as in \eqref{eq:Delta}. We now argue that this integral over the set $\Delta \le e^{-t/11}$ is  exponentially small in $t$. Indeed, we are integrating over a set which has exponentially small measure with respect to $\mu^4$ and furthermore the moments are integrable using \cref{L:winding_moment,cor:shift_center}.

For the rest of the integral, we write
\begin{align*}
 (\bar W(\tilde \gamma^{\# \delta}_{zw},z) + \bar W(\tilde \gamma_{zw}^{\# \delta} ,w) + \bar \Psi_{zw}) =  \bar \mathsf{F}_{zw}(t) + \bar \mathsf{F}_{wz}(t) +\bar \mathsf{e}_{zw}(t) + \bar \mathsf{e}_{wz}(t)
\end{align*}
and we expand again the product inside the integral to get products of terms of the form
$$
 \bar \mathsf{e}_{zw}(t) + \bar \mathsf{e}_{wz}(t) ;  \quad \bar \mathsf{F}_{zw}(t) + \bar \mathsf{F}_{wz}(t) - \bar \mathsf{F}_{\mathfrak c(z)\mathfrak c(w)}(t) - \bar \mathsf{F}_{\mathfrak c(w) \mathfrak c(z)}(t)
$$
Note here that the indicator over $|\mathfrak c(z) - \mathfrak c(w) | >e^{-t/10}$ is included in $\Delta > e^{-t/11}$ so we can get rid of the indicator. Products containing at least one $\mathsf{e}$ are small because of \cref{cor:shift_center}. Also note that on $\Delta  > e^{-t/11}$, $|z-w| >c(\tilde K) e^{-t/11}$. Thus we need to show
\begin{equation*}
\mathbb{E}(  |\bar \mathsf{F}_{zw}(t) -  \bar \mathsf{F}_{\mathfrak c(w) \mathfrak c(z)}(t) |^2 1_{|z-w| > c(\tilde K)e^{-t/11}} ) \le c(1+t)^\alpha e^{-c't}.
\end{equation*}
Observe that
\begin{multline*}
 (\bar \mathsf{F}_{zw}(t) -  \bar \mathsf{F}_{\mathfrak c(z) \mathfrak c(w)}(t))1_{|z-w| > c(\tilde K) e^{-t/11}}   = (\bar \mathsf{F}_{zw}(t) -  \bar \mathsf{F}_{\mathfrak c(z) w}(t))1_{|z-w| > c(\tilde K) e^{-t/11}} \\+ (\bar \mathsf{F}_{\mathfrak c(z)w}(t) -  \bar \mathsf{F}_{\mathfrak c(z) \mathfrak c(w)}(t))1_{|z-w| > c(\tilde K) e^{-t/11}})
 \end{multline*}
If $\mathsf p(z)$ and $\mathsf p(\mathfrak c(z))$ merge before exiting $B(\mathfrak c(z), e^{-5t})$, then the paths we need to consider are identical outside $B(\mathfrak c(z), e^{-t})$, only the centers around which we measure the topological winding are different. This difference in winding is therefore deterministically $O(e^{-9t})$. On the other hand, the paths we need to consider are not identical outside $B(\mathfrak c(z), e^{-5t})$
if and only if a simple random walk from $z$ does not hit $\mathsf p(\mathfrak c(z))$ before exiting $B(\mathfrak c(z), e^{-5t})$ which has probability exponentially small in $t$ by a Beurling-type lemma (\cref{lem:Beurling}). Hence we can conclude using Cauchy--Schwarz and \cref{cor:shift_center}. (Note that here the shifted cutoff is particularly useful since the cutoff point is the same for both $z$ and $\mathfrak c(z)$).

The proof of the rest of the statements is a simple consequence of the fact that the main term $X(\delta, t)$ is an a.s.\ continuous function of $\mathcal{T}^{\# \delta}$ for a fixed $t$. So trivially $(X(\delta, t), \mathcal{T}^{\# \delta})$ converges jointly in law, the limit does not depend on the sequence $(G')^{\# \delta}$ and is conformally invariant. It is a simple exercise to show that the $L^2$ bound on the error term $Y(\delta) - X(\delta,t)$ as shown above is enough to conclude the proof of the theorem (i.e. the proof of the same claim as in the previous sentence for the pair $(\bar h_{ext}^{\# \delta}(z),\mathcal{T}^{\# \delta})$ ).

We have proved \cref{lem:conv_in_law} for the $\Pwils$ law. We now explain how to convert the result so that it holds under the Temperleyan law $\Ptemp$.
Recall that if $\mathcal{T}$ is sampled by performing Wilson's algorithm and $\mathcal{T}^\dagger$ is sampled from the uniform distribution among all oriented duals of $\mathcal{T}$, then the Radon--Nikodym derivative of $(\mathcal{T}, \mathcal{T}^\dagger)$ with respect to $\Ptemp$ is $Z = 2^{K^\dagger}/ \Ewils (2^{K^\dagger})$ where $K^\dagger $ is the number of nontrivial cycles of $\mathcal{T}^\dagger$ by \cref{lem:RN_dimer_CRSF}. Alternatively we have
$Z = 2^K / \Ewils (2^K)$ where $K$ is the number of nontrivial cycles of $\mathcal{T}$ by \cref{L:cycle_primal_dual}. Now, observe that $Z$ is measurable with respect to $\mathcal{T}^{\# \delta}$ so $(Z, (\bar h_{ext} , \tilde f))$ jointly converges in law under $\Pwils$ by \cref{lem:conv_in_law}. Furthermore all moments of $Z$ and of $(\bar h_{ext} , \tilde f)$ are bounded under $\Pwils$ and therefore we conclude that
$$
\left( \int_{\tilde M} (h_{ext} (z) - \Ewils( h_{ext} (z) )) \tilde f(z) \mu (dz) ; \mathcal{T}^{\# \delta}\right)
$$
converges in law and in the sense of moments under $\Ptemp$. In particular, taking expectation (under $\Ptemp$) of the first quantity, we also deduce that $\int_{\tilde M} (\Etemp (h_{ext} (z)) - \Ewils( h_{ext} (z) )) \tilde f(z) \mu (dz)$ converges. Taking the difference, it follows:
$$
\left( \int_{\tilde M} (h_{ext} (z) - \Etemp( h_{ext} (z) )) \tilde f(z) \mu (dz) ; \mathcal{T}^{\# \delta}\right)
$$
converges in law and in the sense of moment under $\Ptemp$, as desired.
\end{proof}

\begin{proof}[Proof of \cref{thm:main_precise}]
\cref{lem:conv_in_law} proves that $\int \tilde f(x) \bar h^{\# \delta}_{\textsf{ext}}(x)  \vol(x)$ converges in law under $\Ptemp$ and in the sense of all moments, and is measurable with respect to $\mathcal{T}$. Furthermore, since the limit of $\mathcal{T}^{\# \delta}$ is independent of the graph sequence chosen (subject to the assumptions in \cref{sec:setup} and \cref{assumption_precise}), so is the limit of the first two coordinates.
\end{proof}

\begin{remark}
In fact, it is easy to see that the convergence in \cref{thm:main_precise} can be upgraded to specifically include information about the instanton component. More precisely, using \cref{lem:instanton_global} and \cref{L:convergence_instanton} we obtain the following.

Take an ordered finite set of continuous simple loops which forms the basis of the first homology group of $M'$, all endowed with a fixed orientation. Let $\mathsf H^{\# \delta} \in \mathbb{R}^{4g+2b-4}$ denote the vector of height differences along these loops (i.e., for each such loop, record the height accumulated by going along the loop once in the prescribed orientation). Consider the one-form
$$
d \bar h^{\# \delta}_{\mathsf{}}(e)  :=\bar h^{\# \delta}_{\mathsf{}}(\tilde e^+) - \bar h^{\# \delta}_{\mathsf{}}(\tilde e^-).
$$
It is well-known (see \cref{thm:hodge}) that the instanton component of the above one-form is completely determined by $\mathsf H^{\# \delta}$. Then we have:
$$
\left(\int \tilde f(x) \bar h^{\# \delta}_{\textsf{ext}}(x)  \vol(x),  \mathsf H^{\# \delta} , \mathcal{T}^{\# \delta}\right)
$$
converges jointly in law as $\delta \to 0$. The first two coordinates also jointly converge in the sense of all moments. Furthermore,
$$
\lim_{\delta \to 0}\left(\int \tilde f(x) \bar h^{\# \delta}_{\textsf{ext}}(x)  \vol(x) , \mathsf H^{\# \delta} \right)
$$
is measurable with respect to the limit $\mathcal{T}$ of $\mathcal{T}^{\# \delta}$.
\end{remark}