Laminations from the symplectic double

Let S be a compact oriented surface with boundary together with finitely many marked points on the boundary, and let S∘\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$S^\circ $$\end{document} be the same surface equipped with the opposite orientation. We consider the doubleSD\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$S_\mathcal {D}$$\end{document} obtained by gluing the surfaces S and S∘\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$S^\circ $$\end{document} along corresponding boundary components. We define a notion of lamination on the double and construct coordinates on the space of all such laminations. We show that this space of laminations is a tropical version of the symplectic double introduced by Fock and Goncharov. There is a canonical pairing between our laminations and the positive real points of the symplectic double. We derive an explicit formula for this pairing using the F-polynomials of Fomin and Zelevinsky.


Previous work on laminations
As part of their investigation of higher Teichmüller theory, Fock and Goncharov studied two versions of the Teichmüller space of a surface S with boundary [1,3]. These are called the Teichmüller Aand X -spaces and are denoted A + (S) and X + (S), respectively. The Teichmüller A-space, also known as the decorated Teichmüller space, was originally studied by Penner [15]. It arises as the set of positive real points of a certain algebraic variety constructed in [1]. The Teichmüller X -space, sometimes called the enhanced Teichmüller space, is a slight variant of the classical Teichmüller space of a punctured surface. It also arises as the set of positive real points of an algebraic variety [1].
In addition to the Teichmüller Aand X -spaces, Fock and Goncharov studied two types of laminations on a surface [1,3]. The two types of laminations are called Aand X -laminations, and the spaces of these laminations are denoted A L (S) and X L (S), respectively. These laminations are closely related to Thurston's transversally measured laminations [17]. A rational lamination is defined in [1,3] as a collection of finitely many simple nonintersecting curves on S with rational weights, subject to certain conditions and equivalence relations. The lamination spaces arise as the sets of rational tropical points of the two algebraic varieties constructed in [1].
In [1,3], Fock and Goncharov defined special coordinates A i (i ∈ I ) and X i (i ∈ I ) on the Teichmüller spaces A + (S) and X + (S), respectively. The A i are the same as Penner's lambda lengths [15], while the X i are related to shear coordinates. Here I is the set of edges of an ideal triangulation of the surface S, and there are certain rules for transforming between the coordinates associated with different triangulations. It was shown in [1,11] that in the case of the A-space these transformation rules are examples of the cluster mutation formulas from the theory of cluster algebras pioneered by Fomin and Zelevinsky [9].
Similarly, there are coordinates a i (i ∈ I ) and x i (i ∈ I ) on A L (S) and X L (S) [1,3]. As in the case of the Teichmüller spaces, these coordinates transform according to certain rules when we change the triangulation of the surface. These rules are obtained from the cluster transformation rules by a tropicalization procedure that will be made precise later.
In addition to defining special coordinates on the Teichmüller and lamination spaces, Fock and Goncharov showed that the Teichmüller and lamination spaces are dual in a certain sense [1]. They defined natural subsets A L (S, Z) ⊆ A L (S) and X L (S, Z) ⊆ X L (S) and canonical maps I : A L (S, Z) × X + (S) → R >0 , which we denote by the same symbol I. We usually think of these maps as operations which assign to a lamination l the function on Teichmüller space given by I(l)(m) = I(l, m).
The functions I(l) obtained in this way are interesting for algebraic reasons. As shown in [1], the function I(l) can always be written as a Laurent polynomial with positive integral coefficients in the variables X 1/2 i or A i . Moreover, if we consider a lamination l that has integral coordinates, then I(l) can in fact be written as a Laurent polynomial with positive integral coefficients in the coordinates X i or A i .
In subsequent work, Fock and Goncharov studied an algebraic variety called the symplectic double [4] and found that its properties are related to the geometry of a doubled surface [6]. To define the double S D of a compact oriented surface S, we let S • be the same surface equipped with the opposite orientation. Then S D is defined to be the surface obtained by gluing S and S • along corresponding boundary components. In [6], Fock and Goncharov considered a space D + (S) which we will call the Teichmüller D-space. It is similar to the Teichmüller space of S D , and it arises as the set of positive real points of the symplectic double.
To prove this fact, Fock and Goncharov showed in [6] that D + (S) has a system of coordinates B i , X i (i ∈ I ) associated to an ideal triangulation of S. There are certain formulas describing how the coordinates change when one changes the triangulation, and these are the same formulas used in [4] to define the symplectic double.

The present work
The goal of the present paper is to define and study a new class of objects called D-laminations. A D-lamination is typically represented by finitely many curves on the double S D . In the case where there are no marked points on S, one has the following definition.
Definition 1 A rational D-lamination on S D is the homotopy class of a collection of finitely many simple, nonintersecting, and noncontractible closed curves with positive rational weights and a choice of orientation for each component of ∂ S which meets or is homotopic to a curve. A lamination containing homotopic curves of weights a and b is equivalent to the lamination with one curve removed and the weight a + b on the other.
One of the main results of this paper is the construction of a system of coordinates b i , x i (i ∈ I ) on the space D L (S) of all rational D-laminations. As in the case of Aand Xlaminations, the coordinates transform by certain rules when we change the triangulation of the surface, and these rules can be obtained by tropicalizing the formulas that define the symplectic double.
In addition to defining special coordinates on the lamination space D L (S), one of the goals of this paper is to describe a duality between D-laminations and the Teichmüller D-space. We describe a subset D L (S, Z) ⊆ D L (S) and a canonical map This pairing is similar to the pairings between Aand X -laminations and the points of the Teichmüller X -and A-spaces. We usually view the above pairing as a map from Dlaminations to functions on D + (S) given by I D (l)(m) = I(l, m).
We show that the function I D (l) can be expressed in a particularly nice way as an algebraic function in the variables B i and X i for any l ∈ D L (S, Z). Moreover, if we consider a lamination l that has integral coordinates then I D (l) can in fact be written as a rational function in the coordinates B i and X i .
To make these statements more precise, let us introduce some notation and terminology. Label the elements of I by the numbers {1, . . . , n} so that a point of D + (S) has coordinates B 1 , . . . , B n , X 1 , . . . , X n . A curve on S D will be called an intersecting curve if every curve in its homotopy class intersects the image of the boundary ∂ S. Any D-lamination l ∈ D L (S, Z) can be represented by a collection of curves of weight 1. If this collection contains homotopic curves of weights a and b which are not intersecting curves, let us replace these by a single curve of weight a + b. In this way, we obtain a new collection of curves representing l. If we now cut the surface along the image of ∂ S, we obtain a collection C of curves on S and a collection C • of curves on S • .
The illustration below shows an example of an intersecting curve on the double S D of a genus-2 surface S with two holes. In this case, the set C consists of the curves labeled c 1 and c 3 , while the set C • consists of the curves labeled c 2 and c 4 . In Sect. 6, we will see how to associate, to any element of C or C • , a polynomial F c . For curves such as the ones below, which come from an intersecting curve, these F c are in fact the F-polynomials of Fomin and Zelevinsky [10]. We will prove the following theorem, which expresses the function I D (l) in terms of these polynomials.  where the F c are polynomials, the g l,i are integers, the h l,i are half integers, and the X i are given by All of the notation appearing in this theorem will be defined precisely below. As we will see, the above formula is in a sense a generalization of Corollary 6.3 in [10]. If c is a closed loop belonging to C or C • , then F c does not arise as one of Fomin and Zelevinsky's F-polynomials, but Theorem 1 suggests that the F c should be viewed as "generalized" F-polynomials. Such generalized F-polynomials have appeared previously in the work of Musiker, Schiffler, and Williams [13,14] on cluster algebras associated to surfaces.
Because of the factors of X 1/2 i in the above result, the function I D (l) is in general not expressible as a rational function in the B i and X i . In addition to proving the above result, we will show that the canonical mapping provides rational functions for a certain class of D-laminations.

Theorem 2 Let l be a D-lamination. Then I D (l) is a rational function in the variables B i and X i if and only if l has integral coordinates.
In fact, we will prove a more detailed statement which also gives a homological condition for the coordinates b i and x i of the lamination l to be integers.
In the final part of this paper, we discuss a map I D : D L (S, Z) × D L (S, Z) → Q which we call the intersection pairing. Roughly speaking, if l and m are D-laminations, we let k be half the minimal number of intersections between the portions of l and m that lie on S, we let k • be half the minimal number of intersections between the portions that lie on S • , and we define I D (l, m) = k • − k. In the final part of this paper, we will define this pairing more precisely and prove that it is the tropicalization of I D in an appropriate sense.

Organization
In Sect. 2, we review the results that we will need from [1][2][3]15], modifying the presentation to suit our purposes. We begin with a discussion of Teichmüller and lamination spaces and construct coordinates on these spaces. We explain how the properties of these coordinates lead to the definition of cluster varieties, and we explain the sense in which the Teichmüller and lamination spaces are dual.
In Sect. 3, we review the results of [4,6] and define the space D + (S). We construct coordinates on this space and derive formulas for transforming between different coordinate systems. We then introduce the symplectic double and describe the problem we wish to solve.
In Sect. 4, we define D-laminations on the double of a surface. We construct coordinates on the space of all D-laminations and derive formulas for transforming between different coordinate systems. We will see that the space of D-laminations is a tropical version of the symplectic double. We introduce the space of real D-laminations and describe a boundary for the Teichmüller D-space using results of [5].
In Sect. 5, we review some results on cluster algebras and F-polynomials that play a role in our discussion of the canonical pairing. The references for this section are [7,10,12]. In addition, we introduce a particular cluster algebra that we call the cluster D-algebra.
Finally, in Sect. 6, we define a canonical pairing of D-laminations with points of the Teichmüller D-space. Our main result in this section is a formula expressing this pairing in terms of F-polynomials. We show that any lamination with integral coordinates provides a rational function on D + (S). We conclude by defining a map I D : D L (S, Z)×D L (S, Z) → Q which we call the intersection pairing. We show that it is the tropicalization of the canonical pairing I D in an appropriate sense.

Preliminaries on surfaces
In this section, we review the basic theory of cluster varieties [1][2][3]. We begin by reviewing some geometric constructions on surfaces.
A decorated surface is a smooth oriented surface of genus g ≥ 0 with r ≥ 0 punctures and s ≥ 0 smooth boundary components, where each smooth boundary component has finitely many marked points. Definition 2 Let S be a decorated surface. An ideal triangulation T of S is a triangulation whose vertices are the marked points and the punctures.
From now on, we will consider only decorated surfaces S that admit an ideal triangulation. Note that in general the sides of a triangle in an ideal triangulation may not be distinct. In this case, the triangle is said to be self-folded.
An edge of an ideal triangulation T is called external if it lies along the boundary of S, connecting two marked points, and is called internal otherwise. We will write J for the set of internal edges of the triangulation T and I for the set of all edges. For a triangulation without self-folded triangles, we define a skew-symmetric matrix ε i j (i, j ∈ I ) by the formula where i, t, j equals + 1 (respectively, − 1) if i and j are sides of the triangle t and i lies in the counterclockwise (respectively, clockwise) direction from j with respect to their common vertex. Otherwise, we set i, t, j = 0.
If k is an internal edge of the ideal triangulation T , then a flip at k is the transformation of T that removes the edge k and replaces it by the unique different edge that, together with the remaining edges, forms a new ideal triangulation: ←→ A flip will be called regular if none of the triangles above is self-folded. It is a fact that any two isotopy classes of ideal triangulations on a surface are related by a sequence of flips. Note that there is a natural bijection between the edges of an ideal triangulation and the edges of the triangulation obtained by a flip at some edge. If we use this bijection to identify edges of the flipped triangulation with the set I , then it is straightforward to show that a flip at an edge k of an ideal triangulation changes the matrix ε i j to the matrix

Teichmüller Aand X -spaces
Recall that the classical Teichmüller space T (S) of a punctured surface S without marked points can be viewed as the quotient Hom (π 1 (S), P SL(2, R))/P SL(2, R) where Hom (π 1 (S), P SL(2, R)) is the set of all discrete and faithful representations of π 1 (S) into P SL(2, R) such that the image of a loop surrounding a puncture is parabolic. The group P SL(2, R) acts on this set by conjugation. Let ρ : π 1 (S) → P SL(2, R) be an element of the set described above. Then we can represent S as a quotient where H is the upper half plane and Δ = ρ(π 1 (S)) is a discrete subgroup of P SL (2, R). By definition, the map ρ takes any loop surrounding a puncture to a parabolic transformation. If x ∈ ∂H is the fixed point of the parabolic transformation corresponding to a puncture p in S, then a horocycle in H centered at x projects to a curve on S which we also call a horocycle at p.

Definition 3
If S is a decorated surface with no marked points, then we define the Teichmüller A-space A + (S) to be the space that parametrizes pairs (ρ, S) where ρ is a point of T (S) and S is a set of horocycles, one at each puncture.
More generally, suppose that S is any decorated surface. Delete the marked points on the boundary of S and double the resulting surface along its boundary arcs. This produces a punctured surface S where each marked point in the original surface gives rise to a puncture in S . The doubled surface S comes equipped with a natural involution ι : S → S .

Definition 4 The Teichmüller
Note that this space can be identified with the one defined previously in the special case where there are no marked points on S. We write A + 0 (S) for the set of points in A + (S) such that if e is the segment of ∂ S between two marked points, then the horocycles at the ends of e are tangent. When there is no possibility of confusion, we will simply write A + and A + 0 . The other version of Teichmüller space that we will consider parametrizes more general surface group representations. More precisely, we consider the set Hom (π 1 (S), P SL(2, R))/P SL (2, R) where Hom (π 1 (S), P SL(2, R)) is the set of all discrete and faithful representations of π 1 (S) into P SL(2, R) such that the image of a loop surrounding a puncture is either parabolic or hyperbolic. The group P SL(2, R) again acts by conjugation.
Suppose we are given a representation ρ : π 1 (S) → P SL(2, R) in the set described above. A puncture p in the surface S will be called a hole if ρ maps the homotopy class of a loop surrounding p to a hyperbolic transformation.

Definition 5
If S is a decorated surface with no marked points, then we define the Teichmüller X -space X + (S) to be the space that parametrizes pairs (ρ, S) where ρ is an element of the above quotient and S is a set of orientations, one for each hole.
More generally, if S is any decorated surface, then by doubling S, we can construct the punctured surface S with the natural involution ι : S → S as before. One then has the following definition.
This space can be identified with the one defined previously in the special case where there are no marked points on S. When there is no possibility of confusion, we will simply write X + .

Construction of coordinates
To construct coordinates on the Teichmüller A-space, fix a point m ∈ A + and let i be an edge of an ideal triangulation. The point m allows us to write S as a quotient S = H/Δ where Δ is a discrete subgroup of P SL(2, R). We can then deform i into a geodesic and lift this geodesic to the upper half plane H. By definition of the Teichmüller A-space, we have horocycles at the ends of the resulting geodesic in H. We define A i as the exponentiated half length (respectively, negative half length) of the segment of the lifted curve between the intersection points with the horocycles if these horocycles do not intersect (respectively, if they do intersect).
Doing this for every edge of an ideal triangulation of S, we get a collection of numbers A i (i ∈ I ) corresponding to the point m.

Proposition 1 The numbers A i (i ∈ I ) provide a bijection
. Proof We will construct an inverse to this map. Let us suppose that we are given a positive number A i for each edge i ∈ I . LetS denote the topological universal cover of S. Then we can lift the ideal triangulation of S to a triangulation ofS, and we can associate to each edge of this triangulation the number associated to its projection.
Let t 0 be any triangle in the triangulation ofS. By [15], Chapter 1, Corollary 4.8, there exists an ideal triangle u 0 in H and horocycles around the endpoints of u 0 realizing the A-coordinates associated to the edges of t 0 . Next, consider a triangle t adjacent to t 0 in the triangulation ofS. The common edge t ∩ t 0 corresponds to an edge in H with horocycles around its endpoints. By [15], Chapter 1, Lemma 4.14, there is a unique ideal triangle u in H adjacent to u 0 with horocycles around its endpoints so that these horocycles agree with the ones already constructed and realize the A-coordinates associated to the edges of t.
Continuing in this way, we obtain a collection of ideal triangles in H where each triangle corresponds to a triangle inS. Now any element γ ∈ π 1 (S) corresponds to a deck transformation ofS, and there is a unique element of P SL(2, R) that realizes this deck transformation as an isometry of H preserving the triangulation. In this way, we obtain a representation ρ : π 1 (S) → P L S(2, R). One can check that this construction provides a two-sided inverse of the map A + (S) → R |I | >0 . Now consider a point m ∈ X + and an ideal triangulation T . Modify the neighborhood of each hole in S to get a new surface S with geodesic boundary. The edges of T correspond to arcs on this surface S , and there is a canonical way to deform these arcs. If an arc ends on a hole, we wind its endpoint around the hole infinitely many times in the direction prescribed by the orientation so that the arcs spiral into the holes in S . More precisely, each geodesic boundary component of S lifts to a geodesic in H and we deform the preimage of an edge by dragging its endpoints along these geodesics until they coincide with points of ∂H.
Once we have deformed the edges of our triangulation in this way, we can lift the triangulation to the upper half plane to get a collection of ideal triangles. Let k be any internal edge and consider the two ideal triangles that share this edge. Together they form an ideal quadrilateral, and we number the vertices of this ideal quadrilateral in counterclockwise order as shown below so that k joins vertices 1 and 3.
Choose a horocycle at each vertex, and put A i j = e l i j /2 where l i j is the signed length of the segment between the horocycles at i and j. We then define the cross ratio It is easy to see that there are two ways of numbering the vertices, and both give the same value for the cross ratio. One can also show that the numbers X k (k ∈ J ) are independent of the chosen horocycles. They are the numbers that we associate to the point m. (Note that our quantities X k are inverse to the coordinates defined in some sources, for example [15], Chapter 2, Definition 4.1.)

Proposition 2
The numbers X j ( j ∈ J ) provide a bijection Proof Suppose we are given a positive number X j for each edge j ∈ J . To recover the orientation of a hole h, we compute the number log X j , where the sum is over all edges j incident to h. This sum is negative (respectively, positive) when the orientation is induced from the orientation of S (respectively, the opposite of this orientation). LetS denote the topological universal cover of the surface S. We can lift the ideal triangulation of S to an ideal triangulation ofS, and we can associate to each edge of this triangulation the number associated to its projection.
Let t 0 be any triangle in the triangulation ofS, and choose a corresponding ideal triangle u 0 in H. Next, consider a triangle t adjacent to t 0 in the triangulation ofS. There is an Xcoordinate associated to the common edge t ∩ t 0 . Since the cross ratio is a complete invariant of four points on ∂H, there is a unique ideal triangle u in H adjacent to u 0 so that these triangles realize the X -coordinate associated to the common edge.
Continuing in this way, we obtain a triangulation of a region in H by geodesic triangles where each triangle corresponds to a triangle inS. Now any element γ ∈ π 1 (S) determines a deck transformation ofS, and there is a unique element of P SL 2 (R) that realizes this deck transformation as an isometry of H preserving the triangulation. In this way, we obtain a representation ρ : π 1 (S) → P SL 2 (R). One can check that this construction provides a two-sided inverse of the map X + (S) → R |J | >0 .
One can show that a regular flip at an edge k of the ideal triangulation changes the coordinates A i and X i to new coordinates A i and X i given by the formulas The canonical map p : A + → X + which forgets the horocycles is given in terms of coordinates and the matrix ε i j by the formula p * (X i ) = j∈I A ε i j j .

Aand X -laminations
Let S be a decorated surface. By a curve on S, we mean an embedding C → S of a compact, connected, one-dimensional manifold C with (possibly empty) boundary into S. We require that any endpoints of C map to punctures or points on the boundary of S disjoint from the marked points. When we talk about homotopies, we mean homotopies within the class of such curves. A curve is called special if it is retractable to a puncture or to an interval on ∂ S containing exactly one marked point. A curve is contractible if it can be retracted to a point within this class of curves.

Definition 7
A rational A-lamination on S is the homotopy class of a collection of finitely many nonintersecting noncontractible curves on S, either closed or ending on a segment of the boundary bounded by adjacent marked points, with rational weights and subject to the following conditions and equivalence relations: 1. The weight of a curve is nonnegative unless the curve is special. 2. A lamination containing a curve of weight zero is equivalent to the lamination with this curve removed. 3. A lamination containing homotopic curves of weights a and b is equivalent to the lamination with one curve removed and the weight a + b on the other.
The set of all rational A-laminations on S is denoted A L (S, Q). We will write A L (S, Z) for the set of all A-laminations on S that can be represented by a collection of curves with integral weights. We write A 0 L (S, Z) for the subset of all laminations such that if e is the segment of ∂ S between two marked points, then the total weight of the curves ending on e vanishes. When there is no possibility of confusion, we will simply write A L and A 0 L . Definition 8 A rational X -lamination on S is the homotopy class of a collection of finitely many nonintersecting noncontractible and non-special curves on S with positive rational weights and a choice of orientation for each puncture in S that meets a curve. A lamination containing homotopic curves of weights a and b is equivalent to the lamination with one curve removed and the weight a + b on the other.
The set of all rational X -laminations on S is denoted X L (S, Q). We will write X L (S, Z) for the set of all X -laminations on S that can be represented by a collection of curves with integral weights. When there is no possibility of confusion, we will simply write X L .

Construction of coordinates
To construct coordinates on A L (S, Q), fix an A-lamination l and an ideal triangulation of S. Deform the curves of l so that each curve intersects each edge of the triangulation in the minimal number of points. Then we define a i to be half the total weight of curves that intersect the edge i.

Proposition 3 The numbers a i (i ∈ I ) provide a bijection
Proof Suppose we are given a rational number a i for each edge i ∈ I . It is enough to construct an A-lamination with coordinatesã i = pa i + q for some rational numbers p and q. Indeed, if we construct a lamination with these coordinates, then we can add a special curve of weight − q around each puncture and each marked point and then divide the weight of each curve by p to get a lamination with coordinates a i .
LetS denote the universal cover of S. Then we can lift the triangulation of S to a triangulation ofS, and we can associate to each edge of this triangulation the numberã i associated to its projection.
Let t be any triangle in the triangulation ofS. By an argument in [3], we can fix p and q so that there exists a corresponding topological triangle u with finitely many nonintersecting curves joining each pair of adjacent edges where the edge corresponding to i intersects the curves exactly 2ã i times. By gluing the triangles u and matching the curves at each edge, we recover the universal cover of S together with a collection of curves. Quotienting the resulting space by the group of deck transformations, we obtain the desired A-lamination on the surface S. Now consider an X -lamination l and an ideal triangulation T . Remove a small neighborhood of each puncture in S that meets a curve to get a new surface S with boundary. The edges of T correspond to arcs on this surface S . If an arc ends on a hole, we wind its endpoint around the hole infinitely many times in the direction prescribed by the orientation so that the arcs spiral into the holes in S .
Let k be an internal edge of the resulting triangulation of S , and consider the quadrilateral on the surface with diagonal k. There will be finitely many curves that connect opposite sides of the quadrilateral and possibly infinitely many curves that join adjacent sides. Number the vertices of this quadrilateral in counterclockwise order as shown below so that the edge k joins vertices 1 and 3. Let p be a vertex of this quadrilateral. If there are infinitely many curves connecting the edges that meet at p, then we can choose one such curve α p and delete all of the curves between α p and the point p. By doing this for each vertex, we remove all but finitely many curves from the quadrilateral and get an A-lamination on a disk with four marked points. Let a i j be the coordinate of this A-lamination corresponding to the edge connecting vertices i and j. Define It is easy to see that this number is independent of the chosen curves α p . It is the number associated to the edge k.

Proposition 4
The numbers x j ( j ∈ J ) provide a bijection Proof Suppose we are given a rational number x j for each edge j ∈ J . To recover the orientation of a puncture h, we compute the number x i , where the sum is over all edges j incident to h. This sum is negative (respectively, positive) when the orientation is induced from the orientation of S (respectively, the opposite of this orientation).
LetS denote the universal cover of the surface S. We can lift the ideal triangulation of S to an ideal triangulation ofS, and we can associate to each edge of this triangulation the number associated to its projection.
Let t 0 be any triangle in the triangulation ofS, and choose a corresponding ideal triangle u 0 in the hyperbolic plane H. There is a unique triple of horocycles about its endpoints that are pairwise tangent. The points of tangency provide three canonical points on the edges of u 0 . Parametrize the edges of this triangle by R, respecting the orientation induced by the orientation of the triangle, so that the point with parameter s ∈ R lies at distance |s| from the distinguished point. Connect points with parameter s ∈ 1 2 + Z ≥0 on one side to points with parameter −s on the next side in the clockwise direction by a horocyclic arc. In this way, we obtain the triangle u 0 with infinitely many arcs connecting adjacent sides.

. . .
Next, consider a triangle t adjacent to t 0 in the ideal triangulation ofS. There is a number x j associated to the common edge j, and we can find an ideal triangle u adjacent to u 0 so that the cross ratio of the resulting quadrilateral is e x j . We can draw infinitely many horocyclic arcs on u as we did for u 0 . By [15], Chapter 1, Corollary 4.16, these arcs connect to the ones already drawn on u 0 .
Continuing in this way, we obtain a triangulation of a region in H by ideal triangles where each triangle corresponds to a triangle inS. Quotienting this region by the action of the fundamental group, we obtain a surface homeomorphic to S with curves drawn on it. One can check that this construction provides a two-sided inverse of the map X L (S) → Q |J | .
One can show that a regular flip at an edge k of the ideal triangulation changes the coordinates a i and x i to new coordinates a i and x i given by the formulas Since these transformation rules are continuous with respect to the standard topologies on Q |I | and Q |J | , the coordinates define natural topologies on the spaces of Aand Xlaminations. We define the space of real A-laminations or real X -laminations as the metric space completion of the corresponding space of rational laminations.
The canonical map p : A L → X L which forgets the special curves is given in terms of coordinates and the matrix ε i j by the formula p * (x i ) = j∈I ε i j a j .

Aand X -varieties
We will now define the cluster Aand X -varieties. These are algebro-geometric objects defined using the transformation formulas given above.

Definition 9
A seed i = (I, J, ε i j , d i ) consists of a finite set I , a subset J ⊆ I , a Q-valued function ε i j on I × I such that ε i j ∈ Z if i ∈ J or j ∈ J , and positive rational numbers d i (i ∈ I ) such that ε i j = ε i j d −1 j is skew-symmetric. The function ε i j is called the exchange function, and the set I − J is called the set of frozen elements of I . Given a seed i = (I, J, ε i j , d i ), we get two split algebraic tori X i = (G m ) |J | and A i = (G m ) |I | called the seed X -torus and seed A-torus, respectively. Let {X j } be the natural coordinates on the seed X -torus and {A i } the natural coordinates on the seed A-torus. Definition 10 Let i = (I, J, ε i j , d i ) be a seed and k ∈ J a non-frozen element. Then we define a new seed μ k (i) = i = (I , J , ε i j , d i ), called the seed obtained by mutation in the direction k by setting I = I , J = J , d i = d i , and A seed mutation also induces birational maps on the seed Aand X -tori defined by the formulas where A i and X i are the coordinates on A i and X i . Two seeds will be called mutation equivalent if they are related by a sequence of mutations. We will denote the mutation equivalence class of a seed i by |i|. A transformation of the Aor X -tori obtained by composing the above birational maps is called a cluster transformation.

Definition 11
The cluster A-variety A = A |i| is a scheme over Z obtained by gluing all seed A-tori for seeds mutation equivalent to the seed i using the above birational maps. The cluster X -variety X = X |i| is obtained by gluing all seed X -tori for seeds mutation equivalent to the seed i using the above birational maps.
There is a canonical mapping p : A → X given in any cluster coordinate system by

Positive real and tropical points
We can now explain how the Teichmüller and lamination spaces arise as the positive real and tropical points of cluster varieties.

Definition 12
A semifield P is a set equipped with binary operations + and · such that + is commutative and associative, P is an abelian group under ·, and the usual distributive law holds: (a + b) · c = a · c + b · c for all a, b, c ∈ P.

Example 1
The following examples of a semifields will play an important role in our discussion.
1. Let P = Q >0 or P = R >0 , the set of positive rational or real numbers. Then P is a semifield under the usual operations of addition and multiplication. 2. Let P = Z, Q, or R. Then P is a semifield with the operations ⊕ and ⊗ given by for all a, b ∈ P. The semifields defined in this way are called tropical semifields in the works of Fock and Goncharov. They are denoted Z t , Q t , and R t . 3. Let P = Q sf (u 1 , . . . , u n ) be the set of subtraction-free rational functions in the variables u 1 , . . . , u n . This set consists of all rational functions in u 1 , . . . , u n that are expressible as a ratio of two polynomials with positive integral coefficients. It is a semifield whose operations are ordinary addition and multiplication of rational functions. 4. Let P = Trop(y 1 , . . . , y n ) be the free multiplicative abelian group generated by y 1 , . . . , y n with the auxiliary addition defined by This operation makes P into a semifield which Fomin and Zelevinsky call the tropical semifield generated by y 1 , . . . , y n .
Given a semifield P and a split algebraic torus H , we can form the set H (P) = X * (H )⊗ Z P. Here X * (H ) is the group of cocharacters of H and we are using the abelian group structure of P. For example, we have the set A i (P) obtained from the seed A-torus A i . Now the maps ψ i,i : A i → A i that we used to glue the seed A-tori induce maps ψ i,i * : A i (P) → A i (P), so we can define the quotient The set of P-points X (P) of the cluster X -variety is defined similarly.
Since the coordinates of the Teichmüller Aand X -spaces are positive by construction, we see that the sets A(R >0 ) and X (R >0 ) are identified with the Teichmüller Aand X -spaces. By examining how the coordinates transform under mutation, we see also that the sets A(Q t ) and X (Q t ) are identified with the Aand X -lamination spaces.
One can show that l ∈ X L (S, Z) if and only if l has integral coordinates, and hence On the other hand, one can show that l ∈ A L (S, Z) if and only if l has half integral coordinates and for any triangle the sum of the coordinates associated to its edges is an integer. Thus we have inclusions

Multiplicative canonical pairings
As explained in [1] and [3], the Teichmüller and lamination spaces defined above are dual in the sense that there exists a multiplicative canonical pairing of either lamination space with the Teichmüller space of the opposite type. More precisely, we have a pair of maps , which we denote by the same symbol I. We usually think of these maps as operations which assign to a lamination l the function on Teichmüller space given by I(l)(m) = I(l, m).
Before giving the definition of the maps I, let us describe two constructions involving Teichmüller spaces and laminations: 1. Let m be a point of A + 0 and l a curve on S connecting punctures or boundary segments on S. If an endpoint of l lies on a boundary segment, drag this endpoint in the counterclockwise direction until it hits a marked point. Take a geodesic homotopic to the resulting curve, and define I (l, m) to be half the length between the horocycles at the endpoints of l. 2. Let m be a point of X + and l a collection of curves with rational weights connecting boundary segments of S so that for any boundary segment, the total weight of the curves hitting it vanishes. If an endpoint lies on a boundary segment, drag this endpoint in the counterclockwise direction until it hits a marked point. Finally, take geodesics homotopic to the resulting curves. Choose a horocycle around every marked point. Then I (l, m) is the weighted sum of the signed half lengths of the curve between the horocycles. One can check that this definition is independent of the choice of horocycles.
One now has the following definition of the canonical pairings.
Definition 13 1. Let l ∈ X L (S, Z) be a lamination consisting of a single closed curve of weight k, and let m ∈ A + 0 . Then I(l, m) is the absolute value of the trace of the kth power of the monodromy around l. 2. Let m ∈ X + and let l ∈ A 0 L (S, Z) be a lamination consisting of a single closed curve of weight k which is not retractable to a hole. Then I(l, m) is the absolute value of the trace of the kth power of the monodromy around l. 3. Let m ∈ X + and let l ∈ A 0 L (S, Z) be a lamination consisting of a single closed curve of weight k which is retractable to a hole with positive (respectively, negative) orientation. Then I(l, m) is the absolute value of the smallest (respectively, largest) eigenvalue of the kth power of the monodromy around l. 4. Let l ∈ X L (S, Z) be a lamination consisting of a single curve of weight k connecting punctures or points on the boundary of S, and let m ∈ A + 0 . Assume that the orientation of any hole at one end of l is induced by the orientation of the surface. Then This defines the canonical pairing in the special case where the orientations of the holes in an X -lamination are induced from the orientation of the surface. If there is a hole p in an X -lamination l whose orientation disagrees with the orientation of S, then we can define I(l) by modifying slightly the above definition. To do this, we first note that there is a natural invariant associated to p. Indeed, fix an ideal triangulation T of S and consider the triangles having p as a vertex. We can label the edges that meet p by η 1 , . . . , η N in counterclockwise order and we can write ζ i for the third edge of the triangle having edges η i and η i+1 , where we count indices modulo N .
Given a point m ∈ A + 0 (S), we get a number A i associated to each edge i of T . We define One can check that α( p) is independent of the choice of ideal triangulation. Geometrically, the number α( p) is the area of the decorating horocycle at p (see [1], Sect. 12.6).
If r is the number of holes in the surface, then there is a natural action of the group (Z/2Z) r on the Teichmüller A-space [1]. The generator of the ith factor of Z/2Z acts by multiplying A j by α( p) whenever the edge j meets p. There is also an action of (Z/2Z) r on the space of X -laminations where the generator of the ith factor of Z/2Z acts by changing the orientation of the ith hole. We can therefore extend the canonical mapping I to all X -laminations by requiring that it be equivariant with respect to these group actions.

Laurent polynomials from laminations
In [1] and [3], Fock and Goncharov describe a method for computing the functions I(l) in terms of the coordinates on the Teichmüller Aor X -space. Here we review the method in the case of the X -space and discuss some of its implications.
To begin, let T be an ideal triangulation of the surface S. Draw a small edge transverse to every edge of the triangulation T and connect the endpoints of these edges pairwise within each triangle of T . In this way, we associate a graph Γ to the triangulation as illustrated below. (The original triangulation is indicated by the dotted lines in this picture.) This construction produces a small triangle inside every triangle of T , and we orient the edges of these small triangles in the clockwise direction.
Suppose we are given an oriented closed loop γ based at a vertex of the graph. Then γ is homotopic to a closed path in Γ . Let e 1 , . . . , e n be the edges of this path in order, and let us associate a matrix M(e i ) to each edge e i as follows. If e i intersects an edge k of T , then the matrix that we assign to this edge is On the other hand, if e i does not intersect an edge of T and its orientation agrees with the orientation coming from γ , then we define Finally, if e i does not intersect an edge of T and its orientation disagrees with the orientation of γ , then M(e i ) is the inverse of this last matrix. We can multiply the matrices M(e i ) defined in this way to get the monodromy One can check that this element ρ(γ ) is well defined.
There is a similar construction that allows us to express the monodromy of a closed loop in terms of A-coordinates. In [1], Fock and Goncharov use these constructions to compute I(l) when l is an Aor X -lamination and to show that this function can be written as a Laurent polynomial with positive integral coefficients in the variables X 1/2 j or A j ( j ∈ J ), respectively. Moreover, they show that when l has integral coordinates (that is, when l comes from A(Z t ) or X (Z t )), the function I(l) can in fact be written as a Laurent polynomial with positive integral coefficients in the variables X j or A j ( j ∈ J ). In Sect. 6, we will revisit the above construction and use it to prove a similar result for D-laminations.

The intersection pairing
In addition to the multiplicative canonical pairings that we defined above, we have the following canonical map, which should be viewed as a degeneration of these pairings.

Definition 14
Let S be a punctured surface and choose l ∈ A L (S, Z) and m ∈ X L (S, Z). Assume that m provides the negative orientation for each hole. Then we define I(l, m) to be half the minimal number of intersections between l and m. Here we take into account the weights of the curves so that if a curve of weight k 1 intersects a curve of weight k 2 , then this intersection contributes the term k 1 k 2 /2 to I(l, m).
This defines I(l, m) in the special case where m provides the negative orientation for each hole. Note that there are natural actions of the group where r is the number of punctures in S. The generator of the ith factor of Z/2Z acts on A L (S, Z) by changing the sign of the weight of curves surrounding the ith hole. It acts on X L (S, Z) by changing the orientation of the ith hole. We extend I to a map called the intersection pairing by requiring that it be equivariant with respect to these group actions.
To understand the relationship between the intersection pairing and the multiplicative canonical pairings defined above, we recall the notion of the tropicalization of a subtractionfree rational function [3]. Let F(u 1 , . . . , u n ) be such a function. We define its tropicalization F t (u 1 , . . . , u n ) by the formula It is easy to see that so tropicalization takes the operations + and · to max and +, respectively. For any laminations l ∈ A 0 L (S, Z) and m ∈ X L (S, Z), one has I(l, m) = (I(l)) t (m) and so that the intersection pairing is the tropicalization of the multiplicative canonical pairings. In Sect. 6, we will give a similar characterization of the tropicalization of the canonical mapping I D on D-laminations.

Teichmüller D-space
We now describe the moduli space from [6]. Let Σ be an oriented punctured surface.

Definition 15
A simple lamination on Σ is a finite collection γ = {γ i } of simple nontrivial disjoint nonhomotopic closed curves on Σ which do not retract to the punctures, considered up to homotopy.
Let Σ be an oriented surface equipped with a simple lamination γ = {γ i }. For any subset {γ 1 , . . . , γ k } of the set of loops γ i , we let Σ p 1 ,..., p k denote the singular surface obtained by pinching these loops to get the nodes p 1 , . . . , p k . This singular surface is equipped with a simple lamination γ p 1 ,..., p k given by the image of γ − {γ 1 , . . . , γ k }. Note that if we cut the surface Σ p 1 ,..., p k at the nodes p 1 , . . . , p k , we get a punctured surface Σ p 1 ,..., p k . When we talk about a point in the Teichmüller space of Σ p 1 ,..., p k , we really mean a point in the Teichmüller space of the surface Σ p 1 ,..., p k . Similarly, when we talk about a horocycle at a node of Σ p 1 ,..., p k , we really mean a horocycle at one of the corresponding punctures in Σ p 1 ,..., p k .
.., p k , together with the following data: 1. An orientation for each loop of the simple lamination γ p 1 ,..., p k . 2. For every node p i , a pair of horocycles (c −,i , c +,i ) centered at p i , located on opposite sides of the node, and defined up to simultaneous shift by any real number.
We write X + Σ;γ for the union of these sets X + Σ;γ ; p 1 ,..., p k . Now let S be a decorated surface. If S has punctures, then we can compactify S by gluing a boundary circle to each puncture. This produces a compact oriented surface with boundary which we will also denote by S. Let S • be the same surface with the opposite orientation.
The double S D of S is the punctured surface obtained by gluing S and S • along corresponding boundary components and deleting the image of each marked point in the resulting surface. The surface Σ = S D carries a natural simple lamination γ given by the image of the boundary loops of S.

Definition 17 The Teichmüller
When there is no possibility of confusion, we will denote the Teichmüller D-space by D + . Note that so far this space is a union of strata with no specified topology. However, using standard dimension counts from Teichmüller theory, one can see that the expected dimension of the open stratum is twice the number of internal edges of an ideal triangulation of S, while X + Σ;γ ; p 1 ,..., p k should have codimension k. Below we will define coordinates on D + giving it a natural topology.

Preliminaries
Let S be a surface as above and S D its double. The next two results will be used to construct coordinates on D + (S).

Lemma 1 If ρ ∈ T (S D ) is a point in the Teichmüller space of S D , then there exists a hyperbolic structure representing ρ such that ∂ S ⊆ S D is geodesic.
Proof A point ρ of the Teichmüller space can be viewed as a marked hyperbolic surface, that is, a hyperbolic surface X together with a diffeomorphism φ : S D → X . The image of ∂ S ⊆ S D under φ may not be geodesic in X , but we can deform φ to a homotopic map φ such that φ (∂ S) is geodesic. This is the same as saying that the diagram commutes up to homotopy. Thus (X, φ) and (X, φ ) represent the same point of Teichmüller space. Pulling back the hyperbolic structure of X along φ , we obtain a hyperbolic structure on S D representing the point ρ.
Let ρ ∈ T (S D ). By the above lemma, we can view ρ as a hyperbolic structure on S D such that ∂ S ⊆ S D is geodesic. By cutting along ∂ S, we recover the surfaces S and S • equipped with hyperbolic structures with geodesic boundary. Then the universal coverS of S can be identified with a subset of H obtained by removing countably many geodesic half disks. Similarly, the universal coverS • of S • can be identified with a subset of H. We know that the mapι restricts to an isometry on the geodesic boundary ofS because the other three maps of the diagram restrict to isometries on boundary geodesics.

Definition of B i and X i
To construct coordinates on D + (S), fix a point m ∈ D + (S) and let i ∈ J be an edge of the ideal triangulation T . The point m determines a point of the Teichmüller space of Σ p 1 ,..., p k where Σ = S D , and we can represent this by a hyperbolic structure such that any curve in the image of ∂ S is geodesic. By cutting along the image of ∂ S, we recover the surfaces S and S • equipped with hyperbolic structures with geodesic boundary.
Suppose the edge i corresponds to an arc connecting two holes in S. Choose a pair of geodesics g 1 and g 2 in the upper half plane H which project to these boundary components and are connected by a liftĩ of i. Deform the arc connecting the holes by winding its endpoints around the holes infinitely many times in the direction prescribed by the orientation. This corresponds to deforming the preimageĩ in H so that its endpoints coincide with endpoints of g 1 and g 2 . If we let i • be the image of the arc i under the tautological map S → S • , then we can apply the same procedure to i • to get an arcĩ • in H.
Choose horocycles c 1 and c 2 around the endpoints ofĩ. The horocycle c k intersects g k in a unique point. By Lemma 2, there is a corresponding point on g • k and thus a corresponding horocycle c • k . The map constructed in Lemma 2 restricts to an isometry on g k , so if we shift c k by some amount, then the corresponding horocycle c • k will shift by the same amount.
Denote by A i the exponentiated signed half distance between c 1 and c 2 , and denote by A • i the exponentiated signed half distance between c • 1 and c • 2 . We can then define a number associated to the edge i by This defines B i when i corresponds to an arc connecting two holes. If one or both of the endpoints of i are punctures, then the data of the point m ∈ D + (S) provides a horocycle c k at any endpoint of i which is a puncture, as well as a horocycle c • k at the corresponding endpoint of i • . Thus we can associate numbers A i and A • i to these arc as before, and we can define B i by the above formula. One can show that the |J | numbers obtained in this way are independent of the chosen lifts and horocycles.
In addition to the B i , there are |J | numbers X i associated to a point in the space D + (S). Given a point of D + (S), these are simply defined as the X -coordinates of the point of the Teichmüller X -space of the surface S obtained by cutting S D along the image of ∂ S.

Reconstruction
We will now show that the B i and X i are indeed coordinates on D + (S).

Proposition 5 The numbers B i and X i provide a bijection
Proof Call this map φ. We will construct a map ψ : R 2|J | >0 → D + (S) and prove that φ and ψ are inverses. Step Suppose we are given positive numbers B j and X j for every edge j ∈ J . By the reconstruction procedure for the Teichmüller X -space, we can glue together ideal triangles in H, using the X i as gluing parameters, to get a tiling of a regionS ⊆ H with geodesic boundary.
Choose a horocycle around each vertex of this triangulation. (We do not require these horocycles to be covariant under the action of the deck transformation group.) Then for every edge i of this triangulation, there is a number A i defined as the exponentiated signed half length between the horocycles at the ends of i. Let B i be the number corresponding to the image of i under the covering map, and define (Note that while there may be infinitely many numbers A i and A • i , there are only finitely many B i .) We will use these numbers A • i to construct another regionS • with geodesic boundary in a copy of H.
To constructS • , first choose an edge i in the triangulation ofS. Let i • be any geodesic in the second copy of H. There are horocycles around the endpoints of i with corresponding exponentiated half length A i , and we can choose horocycles around the endpoints of i • so that the resulting exponentiated half length equals A • i . Consider one of the triangles adjacent to i. There are numbers A j and A k corresponding to its other sides. By [15], Chapter 1, Lemma 4.14, there is a unique point in the second copy of ∂H and a horocycle about this point so that the exponentiated half lengths of the decorated arcs incident to this point are A • j and A • k , and the cyclic order of the vertices of the resulting triangle agrees with the original cyclic order of the vertices.
Repeating this process for every edge in the triangulation ofS, we obtain a regionS • ⊆ H with geodesic boundary. To construct this region, we had to choose horocycles around the endpoints of the triangulation ofS, but the construction is independent of these choices. We also had to choose edges i and i • and horocycles around the endpoints of i • . If we had made a different choice we would get a different region obtained fromS • by a transformation in P SL(2, R). ThusS • is well defined up to isometry. Now the regionS is obtained from H by removing infinitely many geodesic half disks. We can extendS to a larger region by gluing a copy ofS • in each of these half disks in such a way that the horocycles around identified vertices coincide. The resulting region is again obtained from H by removing infinitely many geodesic half disks, and we can enlarge it by gluing a copy ofS in each of these half disks. Continuing this process ad infinitum, we construct the universal cover of the doubled surface within the hyperbolic plane. The illustration below shows an example of how the spacesS andS • may be glued together in the disk model of the hyperbolic plane.
Any element of π 1 (S D ) corresponds to a deck transformation and is thus represented as a unique element of P SL (2, R). In this way we recover a discrete and faithful representation ρ : Step Let B j and X j ( j ∈ J ) be given. By the reconstruction procedure described above, we construct triangulated regionsS ⊆ H andS • ⊆ H which we then glue together to get a triangulation of the hyperbolic plane. From this triangulation, we get a point m ∈ D + (S). We want to show that the coordinates of m are the numbers B j and X j .
This point m determines a hyperbolic metric on S D , and the universal cover of the resulting hyperbolic surface is isometric to the triangulated surfaceS D that we got by gluing together copies ofS andS • . Consider a copy ofS inS D . To find the coordinates of m, we choose horocycles around the vertices of the triangulation ofS, and we can take these to be exactly the horocycles used in the construction of m from the B j and X j . Now consider a copy ofS • adjacent toS inS D . Choose a basepoint x on the geodesic separating these regions. If g is any boundary geodesic ofS, then there is a horocycle h around one of the endpoints of g, and this horocycle intersects g in a unique point p. Draw a curveα inS from the point p to the point x.
This curveα projects to a curve α on the surface S, and we can apply the map ι to get a curve α • on S • . Finally, we lift α • to a curveα • in S • that starts at x. This curveα • ends at some point q =ι( p), and there is a horocycle h • that intersects g • at q. In this way, we draw horocycles around all of the vertices ofS • and can define the coordinates of m.
On the other hand, consider the monodromy along the curve in S D obtained by concatenating α and α • . It maps the regionS isometrically into the region bounded by g • . The horocycle used in the construction of m from the B j and X j is obtained by applying this transformation to h. Thus the horocycles used to construct m agree with the ones obtained using the mapι.
It follows that the B-coordinates of m are simply the numbers B j that we started with. It is easy to see that the X -coordinates of m are the numbers X j . This completes Step 2 of the proof. Step Let m ∈ D + (S) be given. To calculate the coordinates of m, let us pass to the universal coverS D of S D and choose a copy ofS inS D . Choose horocycles around the vertices of the triangulation of this copy ofS. Using the construction described above involving lifts of the map ι : S → S • , we can get horocycles around all vertices of the triangulation of S D . We can use these horocycles to calculate the numbers A j and A • j , and thus the coordinates B j and X j . We can now use the X i to reconstruct the regionS. We must choose horocycles around the vertices of the triangulation ofS, and we can assume that these are exactly the ones used above to define the B j and X j . Then we can use the B j to reconstruct an adjacent regionS • with exactly the horocycles used above. By gluing together copies ofS andS • , we recover S D together with all of the horocycles used to compute the coordinates. Quotienting this universal cover by the action of π 1 (S D ), we recover the point m ∈ D + (S). This completes Step 3 of the proof.

Transformation rule
We have defined the B i and X i coordinates in terms of a fixed ideal triangulation of S. The next result says how these coordinates vary when we change the triangulation.

Proposition 6 A regular flip at an edge k of the triangulation changes the coordinates X i and B i to new coordinates X i and B i given by the formulas
Proof By definition, the coordinates X i on D + (S) coincide with the coordinates of the corresponding point of the Teichmüller X -space of S. Therefore the transformation rule for the X i is just the usual transformation rule for the coordinates on the X -space.
To prove the second rule, deform the arcs corresponding to the edges of the ideal triangulation by winding their endpoints around the curves of the simple lamination infinitely many times. Lift these deformed curves to the universal cover of S, and consider the ideal quadrilateral formed by the two triangles adjacent to the geodesic arck corresponding to k.
Number the vertices of this quadrilateral in counterclockwise order so that the edgek joins vertices 1 and 3. Choose a horocycle around each vertex of this ideal quadrilateral and let A i j denote the exponentiated signed half length between the horocycles at i and j. There is a corresponding ideal quadrilateral in the universal cover of S • and a number A • i j corresponding to the edge connecting vertices i and j of this ideal quadrilateral.
If we flip at the edge k, then the ideal quadrilateral in the universal cover of S is replaced by the same ideal quadrilateral triangulated by the arc from 2 to 4, and the number associated to this new arc is Similarly, the number A • 13 transforms to Applying these rules to the quotient B 13 = A • 13 /A 13 , we obtain where we have used the relation X 13 = A 12 A 34 A 14 A 23 . This proves the transformation rule for the B i .

Definition of the symplectic double
We will now use the transformation rules stated above to define the symplectic double. For any seed i = (I, J, ε i j , d i ) with I = J , we define a split algebraic torus D i = (G m ) 2|J | with natural coordinates {B i , X i } i∈J . A seed mutation induces a map on tori defined by where X i and B i are the coordinates on D i .

Definition 18
The symplectic double D = D |i| is a scheme over Z obtained by gluing the D-tori for all seeds mutation equivalent to the seed i using the above birational maps.
Our goal in the next section is to describe a space of laminations which is related to the symplectic double in the same way that the spaces of Aand X -laminations are related to the cluster Aand X -varieties. These new laminations will be called D-laminations.
The space D L (S, Q) of rational D-laminations should be a tropical version of the symplectic double in the sense that it is identified with D(Q t ). More concretely, this means that there are coordinates {b i , x i } i∈J associated to the edges of an ideal triangulation of S, and if we flip the triangulation at an edge k, we get new coordinates

The notion of a D-lamination
Let S be a compact oriented surface with finitely many marked points on its boundary, and let S • be the same surface with the opposite orientation. Recall that the double S D of S is defined as the surface obtained by gluing S and S • along corresponding boundary components and deleting the image of each marked point in the resulting surface. By a (closed) curve on S D , we mean an embedding of a circle into S D . When we talk about homotopies, we mean homotopies within the class of such curves. A curve is called contractible if it can be retracted to a point within this class of curves. It is special if it is retractible to a puncture.
As before, a simple lamination on such a surface is a finite collection γ = {γ i } of simple noncontractible nonspecial disjoint nonhomotopic closed curves considered up to homotopy. The surface S D comes equipped with a simple lamination γ given by the image of the boundary loops of S in S D .

Definition 19
A rational D-lamination on S D is the homotopy class of a collection of finitely many nonintersecting, noncontractible, and non-special closed curves with positive rational weights and a choice of orientation for each component of γ which meets or is homotopic to a curve. A lamination containing homotopic curves of weights a and b is equivalent to the lamination with one curve removed and the weight a + b on the other.
The set of all rational D-laminations on S D will be denoted D L (S, Q). We will write D L (S, Z) for the set of all D-laminations on S D that can be represented by a collection of curves with integral weights. When there is no possibility of confusion, we will simply write D L .

Preliminaries
Let l ∈ D L (S, Q). Then l can be represented by a collection of nonintersecting simple closed curves on S D such that all curves have the same rational weight. If there exists a curve homotopic to a component γ i of the simple lamination, then the orientation of γ i agrees with one of the surfaces S or S • , and we assume that the curve lies entirely on this surface. By cutting along ∂ S, we recover the surfaces S and S • with curves drawn on them.
LetS andS • denote the universal covers of S and S • , respectively. It is useful when drawing pictures to choose hyperbolic structures on S and S • . We can choose these hyperbolic structures so that if γ is a component of ∂ S or ∂ S • that does not meet a curve of the lamination, then the monodromy around γ is parabolic. Then the universal covers can be obtained from H by removing countably many geodesic half disks. Below we will assume that these hyperbolic structures have been specified. None of our constructions will depend on the choice of hyperbolic structures.

Definition of b i and x i
To construct coordinates on D L (S, Q), fix a point l ∈ D L (S, Q) and let i ∈ J be an edge of the ideal triangulation T . Realize the lamination l by a collection of nonintersecting simple closed curves on S D such that all curves have the same rational weight. By cutting along the image of ∂ S, we recover the surfaces S and S • with curves drawn on them.
Suppose the edge i corresponds to an arc connecting two holes γ 1 and γ 2 in S which meet the curves of l. Choose a pair of geodesics g 1 and g 2 in ∂S which project to these boundary components. Deform the curve connecting the holes by winding its endpoint around the holes infinitely many times in the direction prescribed by the orientation. This corresponds to deforming the preimageĩ inS so that its endpoints coincide with endpoints of g 1 and g 2 . If we let i • denote the image of i under the tautological map S → S • , then we can apply the same procedure to i • to get an arcĩ • inS • .
Observe that the curves of the lamination that end on γ k can be lifted to infinitely many curves inS that end on g k . Similarly, if g • k is the geodesic inS • that projects to γ k , then the curves in S • that end on γ k can be lifted to infinitely many curves inS • that end on g • k . Label the endpoints of curves on g k by the symbols v α (α ∈ Z), and label the endpoints of curves on g • k by v • α (α ∈ Z). By Lemma 3, there is a mapι :S →S • that projects to the natural map ι : S → S • and is unique up to the action of π 1 (S) by deck transformations. This provides a bijection which preserves the order of the vertices. Choose a vertex v α(k) on g k and let v • β(k) be the corresponding vertex given by v • β(k) = f (v α(k) ). We can choose v α(k) in such a way that the curve ending at v α(k) intersectsĩ and the curve ending at v • β(k) intersectsĩ • . Notice that if we choose a different vertex v α(k) , then the vertex v • β(k) will change by a corresponding amount. By construction, the curve that ends at v α(k) intersectsĩ at some point p(k). Denote by a i half the number of intersections between the lifted curves of l and the lifted edgeĩ between the points p(1) and p (2). Similarly, the curve that ends at v • β(k) intersectsĩ • at some point p • (k). Let a • i be half the number of intersections between the lifted curves of l and the lifted edgeĩ • between the points p • (1) and p • (2). We can then define a coordinate associated to the edge i by i − a i . This defines b i when i corresponds to an arc connecting two holes. If one or both of the endpoints of i are punctures, then i intersects only finitely many curves near these punctures, and i • intersects only finitely many curves near the corresponding punctures in S • . Thus we can associate the half intersection numbers a i and a • i to these arcs as before, and we can define b i by the above formula. One can show that the |J | numbers obtained in this way are independent of all lifts and other choices.
In addition to the b i , there are |J | numbers x i associated to a point in the space D L (S, Q). Given a point of D L (S, Q), these are simply defined as the X -coordinates of the X -lamination on the surface S obtained by cutting S D along the image of ∂ S.

Reconstruction
We will now show that the b i and x i are indeed coordinates on D + (S).

Proposition 7 The numbers b i and x i provide a bijection
Proof Call this map φ. We will construct a map ψ : Q 2|J | → D L (S, Q) and prove that φ and ψ are inverses.
Suppose we are given rational numbers b j and x j for every j ∈ J . By the reconstruction procedure for X -laminations, we can use the x j to glue together ideal triangles to get a regioñ S ⊆ H with geodesic boundary together with infinitely many curves.
Let t 0 be a triangle inS. There are infinitely many curves connecting each pair of adjacent sides of this triangle. For each vertex p of t 0 , choose a curve connecting the two sides of this triangle that meet at p. Then for every edge i, there is a number a i defined as half the total weight of the curves that intersect i between the distinguished curves. Define We will use these numbers a • i to construct another regionS • with geodesic boundary in a copy of H.
To constructS • , let u 0 be an ideal triangle with infinitely many curves connecting each pair of adjacent sides as before. If we choose the distinguished curves on t 0 sufficiently close to the vertices, then we can choose a triple of distinguished curves near the vertices of u 0 so that a • i is half the total weight of the curves that intersect an edge of u 0 between distinguished curves. Now suppose t is a triangle adjacent to t 0 in the triangulation ofS. As before we can choose a distinguished curve near each vertex of t to get a triple of numbers a i . Then we can draw an ideal triangle u with infinitely many curves connecting each pair of adjacent sides, and there are distinguished curves near each vertex of u realizing the numbers a • i . We can choose the distinguished curves on t 0 and t so that they coincide at the common edge t 0 ∩ t, and then we can glue u 0 and u so that their distinguished curves coincide. Continuing this process inductively, we obtain the desired spaceS • . Now the regionS is obtained from H by removing infinitely many geodesic half disks. We can extendS to a larger region by gluing a copy ofS • in each of these half disks in such a way that corresponding curves are identified. The resulting region is again obtained from H by removing infinitely many geodesic half disks, and we can enlarge it by gluing a copy ofS in each of these half disks. Continuing this process ad infinitum, we construct the universal cover of the doubled surface together with infinitely many curves. Quotienting this space by the group of deck transformations, we recover the surface S D with a collection of curves. There may be infinitely many curves homotopic to some component γ i of γ . In this case we delete a maximal collection of such curves between the distinguished curves. If there are any remaining curves homotopic to γ i , then they all lie on one of the surfaces S or S • , and we choose the orientation of γ i to agree with the orientation of this surface.
Let b j and x j ( j ∈ J ) be given. By the reconstruction procedure described above, we construct triangulated regionsS ⊆ H andS • ⊆ H which we then glue together to get a triangulation of the hyperbolic plane together with a collection of curves. From these data, we get a D-lamination l on S D . We want to show that the coordinates of l are the numbers b j and x j .
We can lift l to its universal cover, which is exactly the triangulated surfaceS D that we got by gluing together copies ofS andS • . Consider a copy ofS inS D , and letĩ be an edge of the triangulation ofS. To find the coordinate of l corresponding to the edgeĩ, we must choose near each endpoint ofĩ a distinguished curve inS which intersectsĩ. Now consider a copy ofS • adjacent toS inS D . Choose a basepoint x on the geodesic separating these regions. Suppose the edgeĩ is asymptotic to an endpoint of the boundary geodesic g ofS. Then there is a distinguished curve c that intersectsĩ and g. Let p be the point of intersection with g. Draw a curveα inS from the point p to the point x.
This curveα projects to a curve α on the surface S, and we can apply the map ι to get a curve α • on S • . Finally, we lift α • to a curveα • in S • that starts at x. This curveα • ends at some point q =ι( p), and there is a unique lifted curve c • of the lamination that passes through q.
In this way, we get distinguished curves near the endpoints of the edgeĩ • . These can be used to define the coordinates of l.
On the other hand, consider the monodromy along the curve in S D obtained by concatenating α and α • . It maps the regionS isometrically into the region bounded by g • . In the construction of l from the coordinates b j and x j , there is a correspondence between curves that end on g and curves that end on g • , and this correspondence is obtained by applying this transformation. Thus the distinguished curves used to construct l agree with the ones obtained using the mapι.
It follows that the b-coordinates of l are simply the numbers b j that we started with. It is easy to see that the x-coordinates of l are the numbers x j . This completes Step 2 of the proof.
Let l ∈ D L (S, Q) be given. To calculate the coordinates of l, let us pass to the universal coverS D of S D and choose a copy ofS inS D . We associate numbers x i to the edges of the triangulation in the usual way. Ifĩ is an edge of the triangulation ofS, then we can choose a distinguished curve near each endpoint ofĩ. Using the construction described above involving lifts of the map ι : S → S • , we can get a pair of distinguished curves near the endpoints of a corresponding edgeĩ • inS • . We can use these curves to calculate the numbers a i and a • i , and thus the coordinate b i .
We can now use the x i to reconstruct the regionS. We must choose a distinguished curve near each endpoint of the edgeĩ, and we can assume that these are exactly the ones used above to define b i . We can use the curves to begin constructing the spaceS • with a collection of curves. By gluing together copies ofS andS • , we recoverS D with a collection of curves. Quotienting this space by the action of π 1 (S D ), we recover the point l ∈ D L (S, Q). This completes Step 3 of the proof.

Transformation rule
We have defined the b i and x i coordinates in terms of a fixed ideal triangulation of S. The next result says how these coordinates vary when we change the triangulation.

Proposition 8 A regular flip at an edge k of the triangulation changes the coordinates x i and b i to new coordinates x i and b i given by the formulas
Proof By definition, the coordinates x i on D L (S, Q) coincide with the coordinates of the X -lamination on the surface S. Therefore the transformation rule for the x i is just the usual transformation rule for the coordinates of an X -lamination.
To prove the second rule, deform the curves corresponding to edges of the ideal triangulation by winding their endpoints around the holes infinitely many times. Lift these deformed curves to the universal cover of S, and consider the ideal quadrilateral formed by the two triangles adjacent to the geodesic arck corresponding to k. Number the vertices of this quadrilateral in counterclockwise order so that the edgek joins vertices 1 and 3. In the construction of the b i , we considered near each endpoint e of a lifted edgeĩ a curve that intersectsĩ and projects down to a curve of the lamination. We can choose these curves to intersect both edges of the quadrilateral that meet at e.
Our construction will then associate a number a i j to the geodesic connecting i and j. There is a corresponding ideal quadrilateral in the universal cover of S • and a number a • i j corresponding to the edge connecting vertices i and j of this ideal quadrilateral.
If we flip at the edge k, then the ideal quadrilateral in the universal cover of S is replaced by the same ideal quadrilateral triangulated by the arc from 2 to 4, and the number associated to this new arc is a 24 = max(a 12 + a 34 , a 14 + a 23 ) − a 13 where we have used the relation x 13 = a 12 + a 34 − a 14 − a 23 . This proves the transformation rule for the b i .

Real D-laminations
Since the transformation rules in Proposition 8 are continuous with respect to the standard topology on Q 2|J | , the coordinates define a natural topology on D L (S, Q). We define the space of real D-laminations as the metric space completion of D L (S, Q).
This space of real D-laminations is identified with the space D(R t ) of R t -points of the symplectic double associated to the surface S. There is a natural action of the group R >0 on this space where an element λ ∈ R >0 acts by multiplying the coordinates in any coordinate system by λ. The spherical tropical space SD(R t ) is the quotient By Proposition 2.2 of [5], we know that SD(R t ) can be viewed as a boundary of the space D + (S) of positive real points of the symplectic double associated to the surface S.

Cluster algebras with coefficients
In the following definition, P denotes an arbitrary semifield. One can show that the group ring ZP is an integral domain, and hence we can form its fraction field QP. We will write F for a field isomorphic to the field of rational functions in n independent variables with coefficients in QP. A labeled seed (x, y, B) consists of a skew-symmetrizable n × n integer matrix B = (b i j ), an n-tuple y = (y 1 , . . . , y n ) of elements of P, and an n-tuple x = (x 1 , . . . , x n ) of elements of F such that the x i are algebraically independent over QP and F = QP(x 1 , . . . , x n ).

Definition 21
Let (x, y, B) be a labeled seed, and let k ∈ {1, . . . , n}. Then we define a new seed (x , y , B ), called the seed obtained by mutation in the direction k as follows: 1. The entries of B = (b i j ) are given by 2. The elements of the n-tuple y = (y 1 , . . . , y n ) are given by where we are using the notation [b] + = max(b, 0). 3. The elements of the n-tuple x = (x 1 , . . . , x n ) are given by

Definition 22
We denote by T n an n-regular tree with edges labeled by the numbers 1, . . . , n in such a way that the n edges emanating from any vertex have distinct labels. A cluster pattern is an assignment of a labeled seed Σ t = (x t , y t , B t ) to every vertex t ∈ T n so that if t and t are vertices connected by an edge labeled k, then Σ t is obtained from Σ t by a mutation in the direction k. We will use the following notation for the elements of Σ t : x t = (x 1;t , . . . , x n;t ), y t = (y 1;t , . . . , y n;t ), B t = (b t i j ).
Definition 23 Given a cluster pattern t → (x t , y t , B t ), we form the set of all cluster variables in all seeds of the cluster pattern: Then the cluster algebra with coefficients in P is the ZP-subalgebra of F generated by elements in this set S.

Principal coefficients
In [10], Fomin and Zelevinsky define a cluster algebra with principal coefficients at a vertex t 0 ∈ T n to be a cluster algebra with P = Trop(y 1 , . . . , y n ) and y t 0 = (y 1 , . . . , y n ). Let A be such a cluster algebra, and let Σ t 0 = (x t 0 , y t 0 , B t 0 ) be its initial seed with . By iterating the exchange relations, we can express any cluster variable x l;t as a subtractionfree rational function of the variables x 1 , . . . , x n , y 1 , . . . , y n . We will denote this subtractionfree rational function by X l;t ∈ Q sf (x 1 , . . . , x n , y 1 , . . . , y n ).
By the Laurent phenomenon theorem of Fomin and Zelevinsky, X l;t is a Laurent polynomial in x 1 , . . . , x n whose coefficients are integral polynomials in y 1 , . . . , y n , and F l;t is an integral polynomial in y 1 , . . . , y n . We will refer to X l;t and F l;t as the X -and F-polynomials.
In addition to the X -and F-polynomials, Fomin and Zelevinsky define a Z n -grading on the ring where e i is the ith standard basis vector in Z n and b 0 j = i b 0 i j e i is the jth column of B t 0 . By a result of [10], each X -polynomial is homogeneous with respect to this Z n -grading. The degree is called the g-vector of the cluster variable x l;t . The notions of F-polynomials and g-vectors are important because they allow us to express an arbitrary cluster variable in terms of the variables x 1 , . . . , x n and y 1 , . . . , y n of the initial seed Σ t 0 . To see this, we need one more piece of notation. It is a fact that any subtractionfree rational identity that holds in the semifield Q sf (u 1 , . . . , u n ) will remain valid when we replace the u i by elements of an arbitrary semifield P. Thus if f is a subtraction-free rational expression in u 1 , . . . , u n , there is a well defined element f | P (y 1 , . . . , y n ) of P obtained by evaluating f at y 1 , . . . , y n ∈ P. Proposition 9 ([10], Corollary 6.3) Let A be a cluster algebra over an arbitrary semifield P of coefficients. Then a cluster variable x l;t can be expressed in terms of the cluster variables at an initial seed as

Relation to the symplectic double
Let us now specialize to the case where P = Q sf (X 1 , . . . , X n ) is the semifield of subtractionfree rational functions in X 1 , . . . , X n .

Proposition 11
If P = Q sf (X 1 , . . . , X n ), then a mutation in the direction k transforms the n-tuples (X 1 , . . . , X n ) and (B 1 , . . . , B n ) into n-tuples (X 1 , . . . , X n ) and (B 1 , . . . , B n ) given by Proof The second formula obviously follows from the general mutation formula. To prove the first formula, observe that Thus we recover the mutation formulas for the symplectic double in the special case where P = Q sf (X 1 , . . . , X n ). In this case, we will denote a cluster algebra with coefficients in P by the symbol D and call it a cluster D-algebra.

Construction of cluster algebras
In [7] (see also [8]), Fomin, Shapiro, and Thurston discuss the relationship between cluster algebras and the combinatorics of decorated surfaces. Here we will review their work and apply it to the cluster D-algebra that we defined above.
The idea of [7] is to associate to a decorated surface S a corresponding cluster algebra. This cluster algebra is defined in such a way that each seed corresponds to a "tagged triangulation" of the surface S. An ordinary ideal triangulation is a special case of a tagged triangulation provided there are no self-folded triangles. Fomin, Shapiro, and Thurston assume that the surface S is not a sphere with one, two, or three punctures, a monogon with zero or one puncture, or a bigon or triangle without punctures. According to Lemma 2.13 of [7], such a surface always admits an ideal triangulation T with no self-folded triangles.
If T is an ideal triangulation of S with no self-folded triangles, then we get an exchange matrix b i j = ε ji (i, j ∈ J ), indexed by the internal edges of T . To each internal edge i of T , we associate variables x i and y i . This defines a labeled seed, and hence a cluster algebra. This is the cluster algebra that Fomin, Shapiro, and Thurston associate to the surface S.
If c is any arc on S which is an internal edge for some ideal triangulation and does not cut out a once punctured monogon, then there is a cluster variable x c in this cluster algebra corresponding to c. In particular, this means that for any such arc c on S there is an associated F-polynomial F c (y 1 , . . . , y n ) and a g-vector g c .
We can apply the results of [7] in the special case where the semifield of coefficients is a semifield of subtraction-free rational functions P = Q sf (X 1 , . . . , X n ). In this way, we get a cluster D-algebra associated to a surface S. Applying Proposition 9 to this cluster algebra, we obtain the following result. the initial variables B 1 , . . . , B n and X 1 , . . . , X n by the formula

Proposition 12 Let D be the cluster D-algebra associated to a surface S, and let B c be a cluster variable of D corresponding to an arc c on S. Then B c can be expressed in terms of
In Sect. 6, we will discuss an extension of this result which will allow us to completely understand the canonical pairing between D-laminations and points of the Teichmüller Dspace. In order to prove this result, we will need to understand the g-vectors associated to arcs in S.

Calculation of g-vectors
As part of their work on the positivity conjecture for cluster algebras from surfaces, Musiker, Schiffler, and Williams [12] gave a formula for computing the g-vector associated to an arc. Their construction associates, to any arc c, a graphḠ T,c in the plane with labeled edges. This graph is obtained by gluing together "tiles" of the form Indeed, suppose c is an arc on a triangulated unpunctured surface. (We refer the reader to [12] for the case of a surface with punctures, which is similar.) Assume that this arc is not an edge of the triangulation. The illustration below shows an example of such a curve on a disk with ten marked points.
Choose an orientation for c, and label the arcs that c crosses in order by τ i 1 , . . . , τ i d . For any index j, let Δ j−1 and Δ j be the two triangles on either side of τ i j . Then we can associate a tile G j as above to each τ i j . It consists of two triangles with edges labeled as in Δ j−1 and Δ j and glued together along the edge labeled τ i j so that the orientations of these triangles both agree or both disagree with those of Δ j−1 and Δ j . Note that there are two possible planar embeddings of the graph G j .
The two arcs τ i j and τ i j+1 are edges of the triangle Δ j . We will write τ [c j ] for the third arc in this triangle. Then we can recursively glue together the tiles in order from 1 to d so that G j+1 and G j are glued along the edges labeled τ [c j ] and if the orientation of the triangles of G j agrees with the orientation of Δ j−1 and Δ j then the orientation of G j+1 disagrees with the orientation of Δ j and Δ j+1 , and vice versa. We denote the resulting graph byḠ T,c .
For example, the graphḠ T,c corresponding to the above example is Write G T,c for the graph obtained fromḠ T,c by removing the diagonal in every tile. Recall that for any graph G, a perfect matching of G is a collection P of edges such that every vertex of G is incident to exactly one edge in P. It is easy to show that the graph G T,c constructed in [12] has exactly two perfect matchings consisting only of boundary edges. These perfect matchings are called the minimal matching and maximal matching and are denoted P − = P − (G T,c ) and P + = P + (G T,c ), respectively. In the above example, the maximal matching P + is the matching that contains the horizontal edge at the bottom of the graphḠ T,c .
If the edges of a perfect matching P are labeled τ j 1 , . . . , τ j r , then we define the weight x(P) of P as the product x τ js of the cluster variables associated to τ j 1 , . . . , τ j r . Similarly, if τ i 1 , . . . , τ i d is the sequence of arcs in T that c crosses, then we define the crossing monomial cross(T, c) of c with respect to T as the product Note that the arcs τ i 1 , . . . , τ i d in this definition also appear as the labels on the diagonal edges in the graphḠ T,c .

Proposition 13 ([12]) Let c be an arc on a decorated surface S. Then the g-vector associated to c is given by the formula
.
For an alternative approach to computing g-vectors, see [16], Proposition 5.2. Consider a curve c i for i odd. Lifting this curve to the upper half plane, we obtain a geodesic connecting two points on the boundary of H. Choose a horocycle around each of these boundary points, and define A c i as the exponentiated signed half length of the portion of the lifted curve between these horocycles. Next consider c i for i even. Lifting to the upper half plane, we again get a geodesic connecting two points on the boundary of H, and the horocycles already chosen determine a pair of horocycles around these points. We define A • c i as the exponentiated signed half length of the portion of the lifted curve between these horocycles. This defines the canonical map in the special case where the orientation of any γ i that meets a curve agrees with the orientation of the surface S. If the orientation of γ i disagrees with the orientation of S, then we can define I D (l) by modifying slightly the above definition.
To do this, suppose that l is a point in D L (S, Z) for which the function I D (l) has been defined. Suppose the orientation that l provides for γ i agrees with the orientation of S, and let l be the lamination obtained from l by reversing the orientation of γ i . We will define I D (l )(m) by considering two possibilities for m ∈ D + (S). First, let us assume that m is chosen so that the monodromy around γ i is hyperbolic. In this case, we define m to be the point of D + (S) obtained from m by reversing the orientation of γ i , and we put For the second possibility, assume m is chosen so that the monodromy around γ i is parabolic. In this case, we note that there is a natural invariant associated to γ i . Indeed, fix an ideal triangulation T of S, and lift this to an ideal triangulationT of the universal coverS. Consider the triangles t 1 , . . . , t N of T that meet the puncture in S corresponding to γ i . We can find an ideal polygon inS, formed by N triangles ofT , which projects onto the union of the triangles t 1 , . . . , t N . We will label the edges of this ideal polygon as in the diagram below.
Choose a horocycle at each vertex of this polygon. There is a similar polygon in the universal coverS • of S • , and the horocycles already chosen determine the corresponding collection of horocycles associated to the vertices of this polygon. We denote the corresponding edges of the triangulation of this new polygon by the same symbols η 1 , . . . , η N +1 and ζ 1 , . . . , ζ N , and we write A • j for the invariant associated to the edge j. We can then form the expression Then we define I D (l ) as I D (l) multiplied by a factor of κ i for each curve of weight 1 of l that meets γ i . We will see below that the functions I D (l) defined in this way are independent of the lifts and horocycles that were chosen in the construction and are given by algebraic expressions in the B j and X j for any choice of triangulation.

Intersecting curves
We will prove the formula from Theorem 1 in several steps. We begin by examining the special case where l is an intersecting curve. In this case, we will find that the formula involves the F-polynomials of Fomin and Zelevinsky.
Fix an ideal triangulation T of S, and a point m ∈ D + (S). Then the universal cover of S can be identified with a subset of the hyperbolic plane H, and the triangulation T can be lifted to a triangulationT of the universal cover. Using the natural map S • → S, we can draw all of the curves c i on the surface S. We can then lift each curve to a geodesicc i in the universal cover in such a way thatc i andc i+1 share a common endpoint. Let P be a triangulated ideal polygon, formed from triangles inT , which includes all of the triangles that the curvesc i pass through. Let T (P) be the triangulation of P provided by the triangulationT . Choose a horocycle around each vertex of T (P). Then we can define A i as the exponentiated signed half length of an edge i of an ideal triangle between the chosen horocycles.
In exactly the same way, the universal cover of S • can be identified with a subset of the hyperbolic plane, and the triangulation T provides a triangulationT • of this universal cover. The polygon P gives rise to a polygon P • in this universal cover. The latter polygon has a triangulation T (P • ) provided by the triangulationT • . The horocycles that we already chose around the vertices of T (P) provide horocycles around the vertices of T (P • ). We can define A • i as the exponentiated signed half length of any edge i of an ideal triangle between these horocycles.
It is convenient at this point to adopt a kind of multi-index notation. If v = (v i ) is a vector indexed by the edges of the triangulation T (P), then we will write Similarly, if v = (v i ) is indexed by the edges of T (P • ), then we will write Since there is a natural bijection between the edges of T (P • ) and the edges of T (P), the indexing sets for these vectors can be identified.

Lemma 4 For each i, there is an F-polynomial F c i and an integral vector g c i , indexed by the edges of the triangulation T (P), such that
Proof Let i 1 , . . . , i m be the edges of T (P). Associated to the polygon P, there is a cluster algebra generated by the variables A i over the trivial semifield P = {1}. Applying Proposition 9 to this cluster algebra, we see that for some integers g i 1 , . . . , g i m . Now for any internal edge k of T (P), the product j A ε k j j equals the coordinate X k associated to the corresponding edge k of T . Moreover, by the matrix formula of [14], this F c i is a polynomial only in the variables associated to edges thatc i crosses, which are all internal edges. Therefore we can write it as F c i (X 1 , . . . , X n ), a polynomial in the X -coordinates. This proves the first equation. The proof of the second equation is similar. In this case, one uses the fact that Recall that the variables X k are defined as cross ratios X k = A i A m A j A l where i, j, l, m are the edges of the quadrilateral with diagonal k. Here we will consider additional variables associated to the edges i ofT . Consider a triangle Δ inT that includes i as one of its edges, and label the other edges of this triangle as follows: Then we define the variable associated to i by Note that this depends on the chosen triangle as well as the edge i.
Fix an edge i of the triangulation T (P). For any vertex v of i, there is a collection of edges inT that start at v and lie in the counterclockwise direction from i. Consider a curve i that goes diagonally across i, intersecting finitely many of these edges transversely before terminating on one of them. An example is illustrated below.
Given such a curve i , let E i be the set of all edges in T (P) that i crosses. Then we can form the product where i 0 and i 1 are the edges on which i terminates. One can check that this expression equals A 2 i . We will use this fact to prove the following result.

Lemma 5 Let s = i even g c i − i odd g c i . Then there exists a half integral vector h = (h i ) i∈J , indexed by the internal edges of the triangulation T , such that
Proof Consider an arcc i in T (P). If this arc coincides with an edge i of the triangulation, then the associated g-vector equals the standard basis vector e i . Otherwisec i intersects one or more edges of T (P), and we can compute the corresponding g-vector g c i using Proposition 13. In this case, g c i is given by the formula By definition of a perfect matching, we know that any endpoint of a diagonal in the graphḠ T,c i meets exactly one edge of the minimal perfect matching P − . It follows that the vector g c i is an alternating sum of standard basis vectors corresponding to the edges of a path in the graph G T,c i . Consider the path formed by thec i in P. An example of such a path is illustrated below.
Let s and t be the endpoints of the path formed by thec i . Consider the closed path on the surface S obtained by drawing all the c i on S using the natural map S • → S. The horocycle at t is obtained from the one at s by applying the monodromy around this path. Let Δ t be the triangle in P that contains t and is the last triangle that the lifted arcs c i pass through. Let Δ s be the preimage of this triangle under the monodromy.
By the above discussion, the vector s is an alternating sum of standard basis vectors associated to the edges of a path in T (P). To each edge i on this path, we associate a curve i as above so that i and j terminate on a common edge whenever i and j terminate on a common vertex. We can choose these curves so that the first and last ones terminate at corresponding edges i s of Δ s and i t of Δ t . One can show in this case that W i s ,Δ s = W i t ,Δ t . It follows from the remark immediately preceding the statement of Lemma 5 that where s = (s i ). Since s is an alternating sum, all W -factors cancel on the left hand side of the equation. Therefore the left hand side is a product of the X i , and the lemma follows by taking square roots on both sides.
We can now prove our formula for I D (l) in the case where l is an intersecting curve. Proof By Lemma 4, we know that

Proposition 14 Let l be a D-lamination represented by a single intersecting curve of weight 1, and suppose that the orientation of each component of γ agrees with the orientation of S. Then
Inserting these expressions into the formula in the definition of I D , we obtain where we have defined g even = i even g c i and g odd = i odd g c i . Substituting A • i = B i A i into this expression, we obtain Finally, by Lemma 5, we can write the last factor as A g even −g odd = X h for some half integral vector h. This completes the proof.
Note that the exponents of the B i in Proposition 14 are given by a sum of g-vectors. Note also that the proof of Lemma 5 gives an explicit description of the product X h l,1 1 . . . X h l,n n appearing in this proposition. In proving the lemma, we have essentially described a cycle η l with Z/2Z-coefficients on S such that this monomial equals X . . , i s are the edges of T that η l intersects. This fact will be important below when we discuss rational functions obtained from laminations.

Other curves
We will now derive formulas for I D (c) in special cases where c is a closed curve on S D that is not an intersecting curve. The following simple lemma will be used repeatedly for calculations.

If c is a loop on S, then the monodromy around c is represented by a product of the matrices
one for each edge i of T that the loop intersects. Proof 1. This monodromy can be computed using the method described in Sect. 2.4.2. We first retract the curve c to the graph described there. If the resulting path turns to the left before crossing the edge i, then the monodromy includes a factor 0 X

If c is a loop surrounding a hole and the orientation of this hole agrees with the orientation of S, then the smallest eigenvalue of the monodromy around c is X
If it turns to the right before crossing i, then the monodromy includes a factor 0 X The entire path can be decomposed into consecutive left and right turns. 2. By part 1, the monodromy around c is given by The eigenvalues of this matrix are the diagonal elements X If the orientation of the hole agrees with the orientation of S, then X i 1 . . . X i s < 1, and hence the first of these products is smaller. If the orientation of the hole disagrees with the orientation of S, then X i 1 . . . X i s > 1, and hence the second product is smaller. Proof Let c be a D-lamination satisfying the hypotheses of the proposition. In this case, I D (c) is defined as the absolute value of the trace of the kth power of the monodromy around c. By Lemma 6, this monodromy is a product of matrices

Proposition 15 Let c be a D-lamination consisting of a single loop of weight k that lies entirely in S • and is not retractible to the simple lamination. Then
one for each edge i that c intersects. These matrices factor as Consider the product l j B ε i l j j . Let i be any edge of the triangulation. Using the definition of the exchange matrix given in Sect. 2, it is easy to show that the total degree of B i in this product is even. Hence   where each h c,i is a half integer. In fact, the proofs of these propositions provide a more explicit description of this product: It is obtained by multiplying one factor X ±k/2 i each time the curve c crosses an edge i. This fact will be important below when we discuss rational functions obtained from laminations.

The general case
We will now combine the above results to get general expressions for the functions I D (l). To state our result, we will need the following notation. Any D-lamination l ∈ D L (S, Z) can be represented by a collection of curves of weight 1. If this collection contains homotopic curves of weights a and b which are not intersecting curves, let us replace these by a single curve of weight a + b. In this way, we obtain a new collection of curves representing l. If we now cut the surface along the image of ∂ S, we obtain a collection C • of curves on S • and a collection C of curves on S. Theorem 3 Let l ∈ D L (S, Z) and suppose that the orientation of the curve γ i agrees with S whenever γ i meets a curve of l. Then Proof If c is a closed curve which is homotopic to a loop in the simple lamination, we set F c = 1. Then the above formula for I D (l) is an immediate consequence of Propositions 15,16,17,18, and 14 and the multiplicativity of I D .
The following result is closely related to Lemma 10.14 in [8]. To complete the proof, we must show that for any j ∈ J , the pullbacks τ * X j and τ * B j are given by rational expressions in the coordinates. By Lemma 12.3 of [1], we know that τ * X j is given by a rational expression in the X -coordinates. We will adapt the methods of the proof of this result to show that τ * B j is rational as well. In particular, we will use the correspondence described in [1] between horocycles and vectors in R 2 . To describe this correspondence, we identify ∂H = R ∪ {∞} with RP 1 by identifying x ∈ R with the line through are vectors corresponding to horocycles at x 1 and x 2 , respectively, then the exponentiated signed half distance between these horocycles is (See [3] and [1].) Let m ∈ D + (S) and suppose the curve γ s is not shrunk to a node in the hyperbolic structure defined by m. We will study how the B-coordinates change when we reverse the orientation of γ s . Fix an ideal triangulation T of S, and let j ∈ J be an edge of T such that exactly one end of j terminates at the puncture corresponding to γ s . Lift T to a triangulationT of the universal cover of S in H. Let t be a triangle ofT such that one of the edges of t projects to j. We can assume that the vertices of t are −1, 0, and ∞ with the lift of j connecting 0 and ∞. These vertices correspond under the identification ∂H ∼ = RP 1 to the lines in R 2 containing −1 1 , 0 1 , and 1 0 , respectively. Let us choose horocycles around the endpoints of t and write A e for the exponentiated signed half distance between the horocycles at the ends of an edge e. One can check that the horocycles around the vertices of t correspond to the vectors indicated in the diagram below.
There is a corresponding triangle t • in the universal cover of S • in H, and we can assume that its vertices are −1, 0, and ∞. The horocycles already chosen determine a unique triple of horocycles around the vertices of t • , and we write A • e for the exponentiated signed half distance between the horocycles at the ends of an edge e of t • .
Let us assume that the curve γ s corresponds to the vertex of t at 0 ∈ ∂H. Let η 1 , . . . , η N be the edges of T that spiral into γ s in clockwise order with η 1 = j, and write ζ r for the third edge of the triangle having edges η r and η r +1 . It is shown in the proof of Lemma 12.3 of [1] that if we reverse the orientation of γ s , then the vertex of t moves from 0 ∈ ∂H to β = (X η 1 . . .
Under our identification ∂H ∼ = RP 1 , this corresponds to the line in R 2 containing β 1 . We Let us write A j for the exponentiated signed half distance that we get by replacing v by v , and let us write (A • j ) for the similar quantity associated with the triangle t • . Thus we have and similarly It follows that when we reverse the orientation of γ s , the coordinate B j = A • j /A j is replaced by which is a rational function of the B-and X -coordinates. If both ends of j terminate at the puncture corresponding to γ s , then we can apply the above argument successively to the two ends of the lifted edge, and we get a similar rational expression with additional factors. This proves that the pullback τ * B j is given by a rational expression when restricted to points of D + (S) where the curve γ s is not shrunk to a node.
It remains to show that τ * B j is given by the same rational expression when applied to a point m ∈ D + (S) for which the curve γ s is shrunk to a node. Note that we have X η 1 . . . X η N = X η 1 . . . X η N , and therefore this rational expression is Using the definition of the X -coordinates as cross ratios, one can check that and likewise Thus, at the point m, the above rational function reduces to It follows from Theorem 3 and Proposition 19 that I D (l) is given by an algebraic expression in the B-and X -coordinates for all l ∈ D L (S, Z). It is given by a rational expression if and only if the exponents h l,i in Theorem 3 are integers.

Expansion of cluster variables
Theorem 3 is an extension of Proposition 12, which gives a formula expressing the B-variables of the cluster D-algebra in terms of the B-and X -variables of an initial seed.
To see this, suppose T is an ideal triangulation of S with no self-folded triangles. This triangulation determines an initial seed for the cluster algebra D. Let c be an arc of some other triangulation with no self-folded triangles. By gluing this arc to its image under the map S → S • , we get an intersecting curve l on S D . Choose the orientations of the curves γ i to agree with the orientation of S. Then the canonical function I D (l) associated to this intersecting curve is simply the B-coordinate B c corresponding to the arc c. Suppose there is a sequence of regular flips taking the triangulation T to the triangulation containing c. By Proposition 12, we can write where the B j and X j are the coordinates associated to the internal edges of T . The Fpolynomials in this formula can be computed using the matrix formulas of Musiker and Williams [14]. Since T has no self-folded triangles, one gets the same polynomials by lifting the arc c and triangulation T to the universal cover and applying the results of Musiker and Williams there. This implies that the F-polynomials appearing in this formula are the same ones we get from Theorem 3.

Generalized F-polynomials
Notice that if c is any arc connecting loops in the simple lamination on S D , then the polynomial F c appearing in Theorem 3 is an F-polynomial in the sense of Fomin and Zelevinsky. On the other hand, if c is a closed loop, then F c does not arise in this way. This suggests that the polynomials appearing in this theorem should be seen as generalizing the F-polynomials. Such generalized F-polynomials have appeared previously in the work of Musiker, Schiffler, and Williams [13,14] where they are defined in terms of perfect matchings of a graph. Indeed, suppose T is an ideal triangulation of S with no self-folded triangles. It follows from Lemma 2.13 of [7] that such a triangulation always exists for the surfaces that Musiker and Williams consider in [14]. Let c be a loop on S D that lies entirely in S and is not homotopic to a loop in the simple lamination. The monodromy around such a loop was computed in the proof of Proposition 17 as a product of matrices. By Proposition 4.12 of [14], the absolute value of the trace of this monodromy is given by their expressionχ c,T with the substitutions x i = 1 and y i = X i . Using the notation from [14], we have with x i = 1 and y i = X i . For a triangulation without self-folded triangles, Musiker and Williams show that this last expression equals the generalized F-polynomial that they associate to the curve c.
If the curve c lies on S • instead of S, then the same argument with the variables X i replaced by X i shows that our expressions F c ( X 1 , . . . , X n ) agree with the generalized F-polynomials introduced by Musiker, Schiffler, and Williams.

Rational functions from laminations
Theorem 3 and Proposition 19 allow us to completely characterize the function I D (l) associated to a D-lamination l ∈ D L (S, Z). However, the exponents h i are only half integral, so an element of D L (S, Z) does not give rise to a rational function in the B i and X i in general. In analogy with the classical case of Aand X -laminations, we expect that I D (l) is a rational function of the variables B i and X i if and only if l has integral coordinates. This expectation turns out to be correct, and we will prove it in several steps. In addition, we will give a homological condition on a D-lamination l which is equivalent to the integrality of the coordinates of l.
To state the relevant homological condition, we first use the natural map S • → S to draw all of the curves in C or C • on the surface S. For example, the intersecting curve illustrated in the introduction gives the following picture.

S
In this way, we get a collection of curves on S, and any arc in this collection that connects two holes can be viewed as a singular 1-simplex with Z/2Z-coefficients. Similarly, if c is a closed loop in this collection, then we can view this loop as a 1-cycle with Z/2Z-coefficients. This cycle consists of a single 0-simplex in the interior of each triangle that c intersects in a fixed ideal triangulation T together with a 1-simplex connecting each pair of consecutive 0-simplices. Let σ l be sum of all the 1-simplices obtained in this way from arcs and closed loops. Then σ l is a cycle representing an element [σ l ] of the singular homology H 1 (S, Z/2Z) of S with coefficients in Z/2Z. With this notation, one has the following result.
Theorem 4 Let l ∈ D L (S, Z) be a D-lamination. The following are equivalent:

I D (l) is a rational function in the variables B j and X j .
Proof To simplify notation, we will denote σ l simply by σ . We assume that the ideal triangulation T has been drawn on S in such a way that the edges spiral into the holes of S in the direction specified by l.
Step 1. 1 ⇒ 2 Suppose l ∈ D L (S, Z) is a lamination with integral coordinates. The 1-simplices that make up σ may intersect the triangulation in infinitely many points. We will begin by constructing a homologous cycle σ that intersects each edge of the triangulation in a finite, and in fact an even, number of points. We will then show that [σ ] = 0 ∈ H 1 (S, Z/2Z).
To define this cycle σ , consider any hole in S that meets one of the simplices of σ . Modify the cycle σ near this hole as illustrated below so that the simplices meet at an edge of the triangulation spiraling into the hole rather than at a point of ∂ S. Doing this near every hole gives the desired cycle σ . Let g be the boundary of a hole in S, and letg be an arc in the universal cover that projects to g. Then the preimage of σ near g consists of infinitely many curves meetingg as illustrated above on the left. These curves are alternately preimages of α or β. By definition, the coordinate b i is obtained by choosing, near each endpoint p ofĩ, a distinguished pair of preimagesα p andβ p of α and β, respectively. We then count the number n i of preimages of curves from S that intersectĩ between the distinguished curves and the number n • i of preimages of curves from S • that intersectĩ between the distinguished curves. Then b i is given by Since we are assuming b i ∈ Z for all i, we know that n • i − n i ∈ 2Z, or equivalently that n • i + n i ∈ 2Z. When we modify σ to get the cycle σ , the preimage of σ inS is modified as in the illustration above. The distinguished curvesα p andβ p that we chose above determine preimagesα p andβ p of α and β , respectively. As before, we can count the number of intersections betweenĩ and the preimages of 1-simplices of σ . The total number of such intersections differs from n • i + n i by an even number. Hence the total number of these intersections is even. But this number equals the number of intersections of σ with the edge i. This proves that σ intersects each edge of the triangulation in an even number of points.
It remains to show that [σ ] = 0 ∈ H 1 (S, Z/2Z). If σ c is the summand of σ obtained from a closed loop c on S or S • , we can modify this summand to get a homologous cycle whose vertices all lie on edges of T . In general, the simplices of the resulting cycle may intersect, and we will deform these arcs so that each of the intersections occurs on an edge of the ideal triangulation. We will consider the refinement of the resulting cycle whose 1-simplices are the intersections of the 1-simplices with the triangles of the ideal triangulation. Abusing notation, we will denote this refinement also by σ . We want to show that this σ represents the zero class in homology.
Consider a triangle on the surface with sides i, j, and k. The simplices of σ contained in this triangle are arcs connecting adjacent sides of the triangle so that the total number of arcs that terminate on a given side is always even. Let α be an arc joining two sides, say i and j. We may assume that there are no additional arcs between α and the vertex u that it surrounds. u There is an even number of arcs that meet the edge j. It follows that α cannot be the only one and hence there is another arc β that terminates on this edge. By our choice of α, this arc must not lie between α and u, so β looks like one of the arcs illustrated above depending on whether it ends on i or k.
First consider the case where β ends on i. In this case, there is a cycle formed by the arcs α and β together with the portions of i and j between the endpoints of these arcs. This cycle is obviously zero in H 1 (S, Z/2Z). Now consider the case where β joins the edges j and k. We can assume that there are no arcs between β and the vertex v that it surrounds. Since the total number of arcs that meet the edge k is even, there is another arc γ that meets k. By our choice of β, this arc must not lie between β and v. Moreover, we can assume that it does not join k and j because this case was already treated above. It follows that γ joins k and i as illustrated above. There is a cycle formed by the arcs α, β, and γ together with the portions of i, j, and k between their endpoints. This cycle is again zero in H 1 (S, Z/2Z).
Thus we define for any triangle a cycle with Z/2Z-coefficients. Consider the sum of this cycle with σ in the space of all such cycles. It is another cycle representing the same homology class as σ . It consists of arcs on the edges of the triangulation together with arcs connecting different edges, and the total number of arcs of the latter type that meet at a given edge is always even. Thus we can iterate the above construction and continue adding cycles to get new cycles homologous to σ . At each step, the number of arcs connecting different edges decreases, so eventually we are left with zero. This proves that σ is homologous to zero.
Step 2. 2 ⇒ 1 Suppose our cycle satisfies [σ ] = 0 ∈ H 1 (S, Z/2Z). Since l ∈ D L (S, Z), we can realize l as a collection of curves on S D with integral weights. Then the portion of l that lies on S ⊆ S D is a collection of curves with integral weights. Since X L (S, Z) = X (Z t ), it follows that l has integral x-coordinates. Thus we only need to show that l has integral b-coordinates.
To prove this fact, we first modify σ as in Step 1 to get a new cycle σ . In general, the interiors of two 1-simplices of σ may intersect. If such an intersection point lies on an edge i of T , let us deform this edge slightly to avoid the intersection without changing the number of intersections between i and the interior points of 1-simplices of σ . We then take a refinement of σ in which every point of self intersection is a 0-simplex. Abusing notation, we will denote this refinement also by σ .
Since σ is homologous to σ , our assumption implies [σ ] = 0 ∈ H 1 (S, Z/2Z). We can realize S as a two-dimensional simplicial complex Δ such that every simplex of σ is included in Δ. This simplicial complex defines a simplicial homology group H Δ 1 (S, Z/2Z) with coefficients in Z/2Z. There is an isomorphism ) between simplicial and singular homology, and so σ also represents the zero class in simplicial homology. This means there is a chain η of simplices in Δ with σ = ∂η. Since σ does not meet a marked point or hole on S, we know that η does not meet a marked point or hole S. It follows that the endpoints of an edge i of T cannot lie on η. If i crosses σ into the interior of a 2-simplex of η, then it must leave η by crossing σ again.
It follows that i intersects σ in an even number of points. As we showed in Step 1, this number of intersections differs by an even number from n • i + n i , so we have n • i + n i ∈ 2Z and hence n • i − n i ∈ 2Z. Hence b i = 1 2 (n • i − n i ) ∈ Z as desired.
Step 3. 2 ⇒ 3 Suppose the cycle σ satisfies [σ ] = 0 ∈ H 1 (S, Z/2Z). By Proposition 19, we may assume that the orientation of the curve γ i agrees with S whenever γ i meets a curve of l. As in Steps 1 and 2, we will begin by replacing σ by a homologous cycle.
Let c be a closed curve in C or C • . Then Propositions 15, 16, 17, and 18 give an expression for I D (c) in terms of the B-and X -coordinates. This expression includes a factor which is a monomial in the X -coordinates with half integral exponents. By the remarks following Proposition 18, we know that this monomial has the form X It is easy to see that σ c is homologous to σ c for any intersecting curve c. Thus for an arbitrary D-lamination l, we can replace σ by a homologous cycle σ in which every summand of σ of the form σ c for c an intersecting curve is replaced by σ c . Our assumption that [σ ] = 0 ∈ H 1 (S, Z/2Z) implies that [σ ] = 0 as well. Arguing as in Step 2, we find that each edge of T intersects σ in an even number of points.
Theorem 3 gives an expression for I D (l) in terms of B-and X -coordinates for such a D-lamination l. This expression includes a factor which is a monomial in the X -coordinates with half integral exponents h l,i , and we want to show that each h l,i is in fact an integer.
Since I D (l) is the product of the functions I D (c) where c is an intersecting curve in l or a loop in C or C • , this follows immediately from the fact that any edge i of the triangulation T intersects σ in an even number of points.
Step 4. 3 ⇒ 2 Suppose I D (l) is a rational function in the variables B j and X j . Then each of the exponents h l,i arising from Theorem 3 is an integer. This means that each edge of the ideal triangulation T intersects the cycle σ constructed in Step 3 in an even number of points. Arguing as in Step 1, we can recursively add cycles to σ to prove that [σ ] = 0 ∈ H 1 (S, Z/2Z). Since σ is homologous to σ , this implies [σ ] = 0 ∈ H 1 (S, Z/2Z).

Further properties
Note that there is a natural map ϕ : A 0 × A 0 → D taking the product of two copies of the cluster A-variety into the symplectic double. It is given in coordinates by the formulas where A • i are the coordinates on the second copy of A 0 . This map induces maps ϕ : , which we denote by the same symbol ϕ. Concretely, these maps are defined by gluing together hyperbolic surfaces or laminations, respectively.
There is also a natural projection π : D → X × X given in coordinates by the formulas where X i are the coordinates on the second copy of X . This projection induces maps π : D + → X + ×X + and π : D(Z t ) → X (Z t )×X (Z t ), which we denote by the same symbol π. Concretely, these maps are defined by cutting the surface S D to recover the surfaces S and S • . We will write Fun(D + ) for the set of all functions D + → R >0 that are rational in the B-and X -coordinates. We will likewise denote by Fun(A + 0 × A + 0 ) the set of all functions that are rational in the coordinates on the two copies of A + 0 , and we will denote by Fun(X + × X + ) the set of all functions X + × X + → R >0 that are rational in the coordinates on the two copies of X + . We have seen that the multiplicative canonical pairing provides a map There is a map I A 0 ×A 0 : A 0 (Z t ) × A 0 (Z t ) → Fun(X + × X + ) which takes a pair (l, l • ) of laminations to the function I(l • )/I(l). There is a similar map I X ×X : X (Z t ) × X (Z t ) → Fun(A + 0 × A + 0 ) which takes a pair (l, l • ) to the function I(l • )/I(l). The following proposition shows that the map I D is naturally compatible with the classical canonical pairings. It follows immediately from the definitions.

Proposition 20 There is a commutative diagram
In [1], Fock and Goncharov proved a number of special properties of the classical canonical pairings. In particular, they showed that the canonical functions provided by these pairing are expressible in any coordinate system as Laurent polynomials with positive integral coefficients. By Theorem 3, Proposition 19, and Theorem 4, we see that each function I D (l) for l ∈ D(Z t ) can be expressed as a subtraction-free rational function in the B-and Xcoordinates.
One of the main results of [1] states that the Laurent polynomials I(l) for l ∈ A(Z t ) an A-lamination on a punctured surface provide a canonical vector space basis for the algebra of regular functions on the cluster X -variety. This basis has the special property that the structure constants for multiplication of basis elements are positive integers. Since the functions I D (l) defined in the present paper for l ∈ D(Z t ) are rational rather than regular functions, we do not have a similar canonical basis parametrized by D-laminations. Understanding the precise relationship between the construction described here and canonical bases is an interesting problem for future research.

The intersection pairing
In addition to the multiplicative canonical pairing I D : D L (S, Z) × D + (S) → R >0 , we have a canonical map I D : D L (S, Z) × D L (S, Z) → Q defined as follows.
Suppose we are given an intersecting curve l on S D . Deform this curve so that it intersects the image of ∂ S in the minimal number of points. Then, starting from a component of this image which we may call γ 1 , there is a segment c 1 of the curve l which lies entirely in S and connects the component γ 1 to another component which we may call γ 2 . Starting from this component, there is a segment c 2 of l which lies entirely in S • and connects γ 2 to a component γ 3 . Continue labeling in this way until the curve closes. Now suppose we are given a point m ∈ D L (S, Z). Draw this lamination on the same copy of S D as l and deform its curves so that they intersect the image of ∂ S in the minimal number of points. Cut the surface S D along ∂ S. Then each c i is a curve that connects two boundary components of S or S • . We can wind the ends of c i around the holes infinitely many times in the direction prescribed by the orientations from m.
Consider a curve c i for i odd. Lifting this curve to the universal cover of S, we obtain a geodesicc i connecting two points on the boundary of H. Choose a distinguished curve intersectingc i near each of these boundary points, and define a c i as half the number of intersections of the lifted curves between the distinguished curves. Next consider c i for i even. Lifting to the universal cover of S • , we again get a geodesic connecting two points on the boundary of H, and the distinguished curves already chosen determine a pair of distinguished curves near these points. We define a • c i as half the number of intersections of the lifted curves between the distinguished curves.
In the same way, we can consider the portion of m that intersects S • . Lifting these curves to the universal cover, we get a collection of (possibly infinitely many) curves on the polygon P • . The distinguished curves α p that we chose near the vertices of P determine corresponding curves α • p near the the vertices of P • . For each p, delete all of the curves on P • between α • p and p. In this way, we remove all but finitely many curves and get a lamination v • ∈ A L (P • ).
For any edge i of the triangulation of P, write a i for the corresponding coordinate of the lamination v. For any edge i of the triangulation of P • , write a • i for the corresponding coordinate of the lamination v • . Consider the point e Cv of A + (P) with coordinates A i = e Ca i and the point e Cv • of A + (P • ) with coordinates A • i = e Ca • i . Since the cross ratios of the numbers A i are simply the coordinates X j introduced above, we know that the point e Cv ∈ A + (P) determines the same hyperbolic structure on P that we get from the point e Cm . Similarly, the point e Cv • ∈ A + (P • ) determines the same hyperbolic structure on P • that we get from e Cm . It follows that Proof Let m ∈ D L (S, Z) be a D-lamination with coordinates b j and x j ( j ∈ J ), and let e Cm denote the point of D + (S) with coordinates B j = e Cb j and X j = e Cx j .
If l lies entirely on S • and is not homotopic to a curve in the simple lamination, then we define u to be the point of A L (S • ) obtained by cutting S D . On the other hand, suppose l is homotopic to a loop γ i in the simple lamination and l and m provide the same orientation for this loop. If the orientation of γ i agrees with the orientation of S • , then we define u to be the point of A L (S) obtained by shifting l onto the surface S and cutting S D . If the orientation agrees with that of S, then we define u to be the point of A L (S • ) obtained by shifting l onto S • and cutting. Now let v be the point of X L (S) or X L (S • ) that we get by drawing the lamination m on S D and cutting. Let e Cv denote the point of X + (S) or X + (S • ) whose coordinates are obtained by scaling the coordinates of v by C and exponentiating. By construction, we have Applying the result from the classical theory of the Aand X -spaces, we see that the last expression is k/2 times the minimal number of intersections between l and m.
If l lies entirely on S and is not homotopic to a curve in the simple lamination, then we define u to be the point of A L (S) obtained by cutting S D . On the other hand, suppose l is homotopic to a loop γ i in the simple lamination and l and m provide different orientations for this loop. If the orientation that l provides for γ i agrees with the orientation of S, then we define u to be the point of A L (S) obtained by shifting l onto the surface S and cutting. If the orientation agrees with that of S • , then we define u to be the point of A L (S • ) obtained by shifting l onto S • and cutting.
Let v and e Cv be as above. Then by construction, we have Applying the result from the classical theory once again, we see that this last expression is minus k/2 times the minimal number of intersections between l and m.
Proposition 23 Let l, m ∈ D L (S, Z). If γ i is a component of γ that meets a curve of l, assume that the orientation that l provides for γ i agrees with the orientation of S. Then I D (l, m) = (I D (l)) t (m).
Proof Let l ∈ D L (S, Z). Then we can write l = l 1 + · · · + l d where l 1 , . . . , l d are mutually nonintersecting and nonhomotopic closed curves. We then have We can naturally extend I D to a pairing D L (S, Z) × D L (S, Z) → Q using the tropicalization of the rational map τ appearing in Proposition 19.