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^\circ$ be the same surface equipped with the opposite orientation. We consider the double $S_\mathcal{D}$ obtained by gluing the surfaces $S$ and $S^\circ$ 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 [FG1,FG3]. These are called the Teichmüller A-and 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 [P]. It arises as the set of positive real points of a certain algebraic variety constructed in [FG1]. 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 [FG1].
In addition to the Teichmüller A-and X -spaces, Fock and Goncharov studied two types of laminations on a surface [FG1,FG3]. The two types of laminations are called A-and Xlaminations, 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 [Th]. A rational lamination is defined in [FG1,FG3] 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 [FG1].
In [FG1,FG3], 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 [P], 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 [GSV,FG1] 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 [FZI].
Similarly, there are coordinates a i (i ∈ I) and x i (i ∈ I) on A L (S) and X L (S) [FG1,FG3]. 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 [FG1]. 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 I : X L (S, Z) × A + (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 [FG1], 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 [FG4] and found that its properties are related to the geometry of a doubled surface [FG6]. 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 [FG6], 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 [FG6] 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 [FG4] 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 Dlaminations. 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.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 A-and 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 A-and 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 a rational function in the variables B i and X 1/2 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 Section 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 [FZIV]. 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 j .
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 [FZIV]. 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.2 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 [MW,MSW2] 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. 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 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 Section 2, we review the results that we will need from [FG1,FG2,FG3,P], 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 Section 3, we review the results of [FG4,FG6] 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 its basic properties proved in [FG4]. We conclude this section with a description of the problem we wish to solve.
In Section 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 [FG5].
In Section 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 [FZIV,FST,MSW1]. In addition, we introduce a particular cluster algebra that we call the cluster D-algebra.
Finally, in Section 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 for 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.
2 Background on cluster varieties 2.1 Teichmüller spaces

Preliminaries on surfaces
In this section, we review the basic theory of cluster varieties [FG1,FG2,FG3] and formulate the problem we wish to solve. 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.1. 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 ε ij (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 ε ij 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 2.2. 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 ′ .
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 2.4. 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.
Definition 2.5. The Teichmüller X -space X + (S) of S is the ι-invariant subspace of X + (S ′ ). 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 2.6. 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 [P], Chapter 1, Corollary 4.8, there exists an ideal triangle u 0 in H and horocycles around the endpoints of u 0 realizing the Acoordinates 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 [P], 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 LS(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 . Remove a small 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 ij = e l ij /2 where l ij 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.
Proposition 2.7. 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 ′ obtained by removing a small neighborhood of each oriented hole in S. The edges of T correspond to arcs on this surface S ′ . If an arc ends on a hole, we can wind its endpoint around the hole infinitely many times in the direction prescribed by the orientation. This gives a triangulation of S ′ . We can lift this 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 ′ , 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 X-coordinate 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 LS(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 ε ij by the formula p * (X i ) = j∈I A ε ij j .

Lamination spaces 2.2.1 Aand X -laminations
Let S be a decorated surface. By a curve on S we mean a curve without self-intersections, either closed or connecting punctures or points on the boundary 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 2.8. A rational A-lamination on S is the homotopy class of a collection of finitely many simple nonintersecting 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 contractible curve or 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 2.9. A rational X -lamination on S is the homotopy class of a collection of finitely many simple nonintersecting curves on S with positive rational weights and a choice of orientation for each puncture in S that meets a curve. These data are subject to the following conditions and equivalence relations: 1. A lamination containing a contractible or special curve is equivalent to the lamination with this curve removed.
2. 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 2.10. 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 a 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 [FG3], 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 ij 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 all choices made in the construction. It is the number associated to the edge k.
Proposition 2.11. 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 ′ obtained by removing a small neighborhood of each oriented puncture. The edges of T correspond to arcs of this surface S ′ . If an arc ends on a hole, we can wind its endpoint around the hole infinitely many times in the direction prescribed by the orientation. This gives a triangulation of S ′ . We can lift this 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 ′ , 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 [P], 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 A-and 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 ε ij by the formula p * (x i ) = j∈I ε ij a j .

Cluster varieties 2.3.1 Aand X -varieties
We will now define the cluster A-and X -varieties. These are algebro-geometric objects defined using the transformation formulas given above.
The function ε ij 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, ε ij , 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 2.13. Let i = (I, J, ε ij , d i ) be a seed and k ∈ J a non-frozen element. Then we define a new seed µ k (i) = i ′ = (I ′ , J ′ , ε ′ ij , d ′ i ), called the seed obtained by mutation in the direction k by setting A seed mutation also induces maps on the seed A-and X -tori defined by the formulas where A ′ i and X ′ i are the coordinates on A i ′ and X i ′ . In addition to mutations, we define an automorphism of a seed i = (I, J, ε ij , d i ) to be a permutation of I that preserves all the data of the seed. An automorphism σ induces maps on tori given by σ * X ′ σ(i) = X i and σ * A ′ σ(i) = A i . We define a cluster transformation between seeds (or between tori) to be a composition of automorphisms and mutations. Two seeds will be called equivalent if they are related by a cluster transformation, and we will denote the equivalence class of a seed i by |i|.
For any scheme Y , the affine closure of Y is the spectrum of the ring of regular functions on Y .
Definition 2.14. The cluster A-variety A = A |i| is a scheme over Z obtained by gluing all seed A-tori for seeds equivalent to the seed i using the birational isomorphisms above and then taking the affine closure. The cluster X -variety X = X |i| is obtained by gluing all seed X -tori for seeds equivalent to the seed i using the birational isomorphisms above and then taking the affine closure.
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 2.15. 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: Examples 2.16.
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 The set of P-points X (P) of the cluster X -variety is defined similarly.
Since the coordinates of the Teichmüller A-and X -spaces are positive by construction, we see that the sets A(R >0 ) and X (R >0 ) are identified with the Teichmüller A-and Xspaces. 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 A-and 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.

Canonical pairings 2.4.1 Multiplicative canonical pairings
As explained in [FG1] and [FG3], 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.
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.

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, and let m ∈ X + . Then I(l, m) is the absolute value of the trace of the kth power of the monodromy around l.

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, and let m ∈ X + . Then I(l, m) is the absolute value of the largest (respectively, smallest) 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 I(l, m) = exp I(l, m).

Let l ∈ A 0
L (S, Z) be a lamination consisting of a collection of open curves of integral weights on S, and let m ∈ X + . Then I(l, m) = exp I(l, m).
6. Let l 1 and l 2 be laminations such that no curve from l 1 intersects or is homotopic to a curve from l 2 . Then I(l 1 + l 2 , m) = I(l 1 , m)I(l 2 , m).
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 n is the number of holes in the surface, then there is a natural action of the group (Z/2Z) n on the space of Xlaminations where the generator of the ith factor of Z/2Z acts by changing the orientation of the ith hole. There is also an action of (Z/2Z) n on the Teichmüller A-space defined in [FG1]. We can therefore extend the canonical mapping to all X -laminations by requiring that it be equivariant with respect to these group actions.

Laurent polynomials from laminations
In [FG1] and [FG3], Fock and Goncharov describe a method for computing the functions I(l) in terms of the coordinates on the Teichmüller A-or X -space. We will review the method here 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 This matrix satisfies M(e i ) 2 = −1 in SL(2, R) and hence M(e i ) = M(e i ) −1 in P SL(2, R).
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 ρ(γ) = M(e n ) . . . M(e 1 ) ∈ P SL(2, R).
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 this construction, we choose a pair of points on each edge of T and for each triangle of T connect these points to form a hexagon. In this way, we associate a graph Γ to the triangulation as illustrated below.
We orient the edges of this graph Γ near the vertices of T so that they go around these vertices in the clockwise direction.
Let γ be an oriented closed loop based at a vertex of Γ and deform γ 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 is an unoriented edge parallel to an edge k of T , then the matrix we assign to this edge is On the other hand, if e i is one of the oriented edges of Γ, let a and b be the two edges of T that meet e i , and let c be the remaining edge of the triangle that e i passes through. If the orientation of e i agrees with that of γ, then If the orientation disagrees, then M(e i ) is the inverse of this matrix. As before, we can express the monodromy around any loop by multiplying the matrices M(e i ) associated to the edges of the path. In [FG1], Fock and Goncharov use this construction to compute I(l) when l is an A-or 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 Section 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 2.18. Let l ∈ A 0 L (S, Z) and m ∈ X L (S, Z). If a curve of l ends on a boundary segment, drag the endpoint of this curve in the counterclockwise direction until it hits a marked point and then 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). The map To understand the relationship between the intersection pairing and the multiplicative canonical pairings, we recall the notion of the tropicalization of a subtraction-free rational function [FG3]. 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 lim C→∞ log(e Cv 1 + · · · + e Cvn ) C = max(v 1 , . . . , v n ), 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 I(l, m) = (I(m)) t (l) so that the intersection pairing is the tropicalization of the multiplicative canonical pairings. In Section 6, we will give a similar characterization of the tropicalization of the canonical mapping I D on D-laminations.

The symplectic double 3.1 Teichmüller D-space
We now describe the moduli space from [FG6]. Let Σ be an oriented punctured surface. 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 . FG6]). The set X + Σ;γ;p 1 ,...,p k parametrizes points ρ ∈ T (Σ p 1 ,...,p k ) of the Teichmüller space of Σ p 1 ,...,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.
When there is no possibility of confusion, we will denote the Teichmüller D-space by D + .

Construction of coordinates 3.2.1 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 3.4. 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. Proof. SinceS is simply connected, the compositionS → S ι → S • induces the zero map on fundamental groups. Hence, by the lifting criterion, there exists a mapι :S →S • making the above diagram commutative. Ifι ′ :S →S • is any other map with this property, thenι andι ′ are both lifts of the compositionS → S ι → S • . It follows that they coincide up to a deck transformation.
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 S D (possibly with some curves of the simple lamination shrunk to nodes), which we represent by a hyperbolic structure such that 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. (The construction is similar if one or both of the endpoints are punctures.) Choose a pair of geodesics g 1 and g 2 in the upper half plane H which project to these boundary components. 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 3.5, there is a corresponding point on g • k and thus a corresponding horocycle c • k . The map constructed in Lemma 3.5 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 One can show that the |J| numbers obtained in this way are independent of all choices made in the construction. 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 3.6. 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 1. Definition of ψ : R 2|J| >0 → D + (S). 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. Then for every edge i, there is a number A i defined as the exponentiated signed half length between the horocycles at the ends of i. If B i is the number corresponding to the edge i, define 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 [P], 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 partition the entire hyperbolic plane into ideal triangles. The illustration below shows an example of how the spacesS andS • may be glued together in the disk model of the hyperbolic plane.SS 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 ρ : π 1 (S D ) → P SL(2, R) representing a point in T (S D ). 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.
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 3.7. 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 ij 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 • ij 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 .

The symplectic double and its properties
We will now use the transformation rules stated above to define the symplectic double. For any seed i = (I, J, ε ij , 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 3.8. The symplectic double D is a scheme over Z obtained by gluing the tori D i using the above maps and then taking the affine closure.
1. There is a map ϕ : A × A → D given in any cluster coordinate system by the formulas where A • i are the coordinates on the second factor of A.
2. There is a map π : D → X × X given in any cluster coordinate system by the formulas 3. There are commutative diagrams where ∆ X denotes the diagonal in X × X .
4. There is an involutive isomorphism ι : D → D which interchanges the two components of the map π and is given in any cluster coordinate system by the formulas Proof. See [FG4], Sections 2 and 3.

Description of the problem
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 A-and X -laminations are related to the cluster A-and 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 In addition to these properties, we would like to have a pairing defined in some natural way in view of Definition 2.17. As in the case of A-and Xlaminations, we will view this pairing as a map that takes a D-lamination l to a function defined by I D (l)(m) = I(l, m). This function I D (l) should have a nice description as a rational function in the B-and X-coordinates for at least some choices of l, just as the canonical pairing for A-and X -laminations can be expressed in terms of Laurent polynomials with positive integral coefficients.

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. By a curve on S D , we mean a closed curve disjoint from the marked points. By a homotopy, we mean a homotopy 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 marked point.
As before, a simple lamination on such a surface is a finite collection γ = {γ i } of simple noncontractible nonspecial disjoint nonisotopic loops considered up to isotopy. The surface S D comes equipped with a simple lamination given by the image of the boundary loops of S in S D .
Definition 4.1. A rational D-lamination on S D is the homotopy class of a collection of finitely many simple, nonintersecting closed curves with positive rational weights and a choice of orientation for each component of γ which meets or is homotopic to a curve. These data are subject to the following conditions and equivalence relations: 1. A lamination containing a contractible or special curve is equivalent to the lamination with this curve removed.
2. 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 .

Construction of coordinates 4.2.1 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. 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. Points on ∂S that project to points on the curves of the lamination are mapped bijectively to points on ∂S • that project to points on the curves, and this bijection preserves the natural order of these points.
Proof. The lifting criterion ensures that there is a mapι :S →S • lifting the compositioñ S → S → S • . It is easy to check that this map has the required properties.

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. (The construction is similar if one or both of the endpoints are punctures.) 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 4.2, 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 f : {vertices v α } → {vertices v • α } 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 b i = a • i − a i . One can show that the |J| coordinates obtained in this way are independent of all choices made in the construction.
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). 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 partition the hyperbolic plane into ideal triangles together with infinitely many curves. Quotienting this space by the group of deck transformations, we recover the surface with a D-lamination.
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 this 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 4.4. 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 ij to the geodesic connecting i and j. There is a corresponding ideal quadrilateral in the universal cover of S • and a number a • ij 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 .
Similarly, the number a • 13 transforms to Applying these rules to the difference 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 .

Real D-laminations
Since the transformation rules in Proposition 4.4 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 [FG5], 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.
5 Cluster algebras and F -polynomials

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.
Definition 5.1. A labeled seed (x, y, B) consists of a skew-symmetrizable n × n integer matrix B = (b ij ), 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 5.2. 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: 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 5.3. 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 ij ). Definition 5.4. 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 [FZIV], 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 Z[x ±1 1 , . . . , x ±1 n , y 1 , . . . , y n ] by deg( where e i is the ith standard basis vector in Z n and b 0 j = i b 0 ij e i is the jth column of B t 0 . By a result of [FZIV], 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 , 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 subtraction-free 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 5.5 ( [FZIV], 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 5.7. 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 [FST], 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 [FST] 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 [FST], 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 ij = ε 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 [FST] 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 5.5 to this cluster algebra, we obtain the following result.
Proposition 5.8. 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 the initial variables B 1 , . . . , B n and X 1 , . . . , X n by the formula In Section 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 [MSW1] 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 [MSW1] 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 [MSW1] 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 , . . . , τ jr , then we define the weight x(P ) of P as the product x τ js of the cluster variables associated to τ j 1 , . . . , τ jr . 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 5.9 ( [MSW1]). Let c be an arc on a decorated surface S. Then the g-vector associated to c is given by the formula g c = deg x(P − ) cross(T, c) .
6 The canonical pairing 6.1 The multiplicative canonical pairing A simple closed curve l on S D will be called an intersecting curve if every curve in its homotopy class intersects the image of ∂S in S D . 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 any 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 + (S). This determines a point in the Teichmüller space of S D which we can represent by a hyperbolic structure on S D such that ∂S ⊆ S D is geodesic. 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 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. Definition 6.1. Fix a point m ∈ D + (S).
1. Let l be an intersecting curve of weight k on S D . Then 2. Let l be a curve of weight k on S D which is not an intersecting curve and is not homotopic to a loop in the simple lamination. If l lies in S • , then I D (l, m) is defined as the absolute value of the trace of the kth power of the of the monodromy around l. If l lies in S then I D (l, m) is the reciprocal of this quantity.
3. Let l be a curve of weight k on S D which is homotopic to a loop γ i in the simple lamination. If l and m provide different orientations for γ i , then I D (l, m) is defined as the absolute value of the kth power of the largest eigenvalue of the monodromy around l. If l and m provide the same orientation for γ i , then I D (l, m) is the reciprocal of this quantity.
4. Let l 1 and l 2 be laminations on S D such that no curve from l 1 intersects or is homotopic to a curve from l 2 . Then I D (l 1 + l 2 , m) = I D (l 1 , m)I D (l 2 , m).
Given a D-lamination l, consider the function I D (l) on D + (S) given by I D (l)(m) = I D (l, m). Our goal below is to express the function I D (l) in terms of the B-and X-coordinates on D + (S). We will see that in general I D (l) can be written as a rational function in the variables B j and X 1/2 j . This expression involves the combination as well as certain polynomials that generalize Fomin and Zelevinsky's F -polynomials. We will show that if l has integral coordinates, then I D (l) is in fact a rational function in the coordinates B j and X j .
6.2 Expression in terms of F -polynomials 6.2.1 Intersecting curves We will prove our formula for I D (l) 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 geodesic c 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 6.2. 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 5.5 to this cluster algebra, we see that for some integers g i 1 , . . . , g im . Now for any internal edge k of T (P ), the product j A ε kj j equals the coordinate X k associated to the corresponding edge k of T . Moreover, by the matrix formula of [MW], 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 Am A j A l where i, j, l, m are the edges of the quadrilateral with diagonal k. Here we will consider additional variables 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. (For simplicity, we draw the triangles like Euclidean rather than hyperbolic triangles.) 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.
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 the results of [MSW1] that we reviewed above. 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Ḡ 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 that 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 is,∆s = W it,∆t . It follows from the above discussion 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.
Proposition 6.4. If l is any D-lamination represented by a single intersecting curve of weight 1, then where the g l,i are integers and the h l,i are half integers.
Proof. By Lemma 6.2, we know that 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 6.3, we can write the last factor as A geven−g odd = X h for some half integral vector h. This completes the proof.
Notice that the proof of Lemma 6.3 actually gives an explicit description of the product X h l,1 1 . . . X h l,n n appearing in this theorem. 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. Proof. 1. This monodromy can be computed using the method described in Subsection 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 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 1/2 If the orientation of the hole agrees with the orientation of S, then X i 1 . . . X is < 1, and hence the second of these products is larger. If the orientation of the hole disagrees with the orientation of S, then X i 1 . . . X is > 1, and hence the second product is smaller.
Proposition 6.6. 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 where F c is a polynomial, the g c,i are integers, and the h c,i are half integers.
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.5, this monodromy is a product of matrices one for each edge i that c intersects. These matrices factor as . . , i s are the edges that c intersects and M is a matrix with polynomial entries. Let us write F c ( X 1 , . . . , X n ) for the trace of the matrix M k . Then we have 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 Section 2, it is easy to show that the total degree of B i in this product is even. Hence On the other hand, if the orientation provided by c disagrees with the orientation of S, then the orientation provided by m disagrees with that of S • , and Lemma 6.5 implies The same argument that we used in the proof of Proposition 6.6 can be used to show that the kth powers of these expressions have the form B for some integers g c,i and half integers h c,i . Proposition 6.8. 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 where F c is a polynomial and the h c,i are half integers.
Proof. Let c be a D-lamination satisfying the hypotheses of the proposition. In this case, I D (c) is defined as the reciprocal of the absolute value of the trace of the kth power of the monodromy around c. By Lemma 6.5, this monodromy is an element of P SL(2, R) represented by a product of the matrices one for each edge i that c intersects. These matrices factor as where i 1 , . . . , i s are the edges that c intersects and M is a matrix with polynomial entries. Let us write F c (X 1 , . . . , X n ) for the trace of the matrix M k . Then we have Proof. Let c be a D-lamination satisfying the hypotheses of the proposition. In this case, I D (c) is defined as the inverse absolute value of the kth power of an eigenvalue of the monodromy around c. Let i 1 , . . . , i s be the edges of the triangulation that spiral into this loop in the simple lamination. If the orientation provided by c agrees with that of S, then so does the orientation provided by m, and Lemma 6.5 implies On the other hand, if the orientation provided by c disagrees with the orientation of S, then so does the orientation provided by m, and Lemma 6.5 implies Thus I D (c) has the desired form.
Propositions 6.6, 6.7, 6.8, and 6.9 provide expressions for I D (c) in the cases where the curve c is not an intersecting curve. In each case, the expression includes a product of the form X h c,1 1 . . . X hc,n n 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 an expression for the function I D (l) valid for an arbitrary D-lamination l.
To state this 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 6.10. Let l ∈ D L (S, Z). Then where the F c are polynomials, the g l,i are integers and the h l,i are half integers.
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 6.6, 6.7, 6.8, 6.9, and 6.4 and the multiplicativity of I D .

Expansion of cluster variables
Theorem 6.10 is an extension of Proposition 5.8, which gives a formula expressing the Bvariables 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 . 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 5.8, 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 [MW]. 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 6.10.

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 6.10 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 [MW,MSW2] 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 [FST] that such a triangulation always exists for the surfaces that Musiker and Williams consider in [MW]. 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 6.8 as a product of matrices. By Proposition 4.12 of [MW], 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 [MW], 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 Fpolynomials introduced by Musiker, Schiffler, and Williams.

Rational functions from laminations
Theorem 6.10 allows us to completely characterize the function I D (l) associated to a Dlamination 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 A-and 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 6.11. Let l ∈ D L (S, Z) be a D-lamination. The following are equivalent: 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 σ ′ . It is easy to see that σ ′ is homologous to σ. We claim that it intersects each edge of the triangulation of S in an even number of points. (Here the number of intersections is counted with multiplicity so that if two 1-simplices intersect an edge i at the same point, then we say there are two intersections.) Indeed, consider the preimages of σ and σ ′ in the universal coverS of S.
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.
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 that [σ ′ ] = 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 H ∆ 1 (S, Z/2Z) ∼ = H 1 (S, Z/2Z) 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.
Let c be a closed curve in C or C • . Then Propositions 6.6, 6.7, 6.8, and 6.9 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 6.9, we know that this monomial has the form X ±k/2 i 1 . . . X ±k/2 is where i 1 , . . . , i s are the edges of T that σ c intersects. Similarly, if c is an intersecting curve on S D , then Proposition 6.4 gives 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. In proving Proposition 6.4, we essentially constructed a cycle σ ′ c with Z/2Zcoefficients such that this monomial has the form X ±1/2 i 1 . . . X ±1/2 is where i 1 , . . . , i s are the edges of T that σ ′ c intersects. 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. Now Theorem 6.10 gives an expression for I D (l) in terms of B-and X-coordinates for any D-lamination l. It 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 in Theorem 6.10 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).

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. 3. Let l be a curve of weight k on S D which is homotopic to a loop γ i in the simple lamination. If l and m provide different orientations for γ i , then I D (l, m) is defined as half the minimal number of intersections between l and m. If l and m provide the same orientation for γ, then I D (l, m) is minus this quantity.
4. Let l 1 and l 2 be laminations on S D such that no curve from l 1 intersects a curve from l 2 . Then I D (l 1 + l 2 , m) = I D (l 1 , m) + I D (l 2 , m).
In the classical setting of A-and X -laminations, the intersection pairing is the tropicalization of the multiplicative canonical pairing. We will now prove the analogous result for D-laminations.
Proposition 6.13. Let l be an intersecting curve of weight 1 on S D . Then I D (l, m) = (I D (l)) t (m) for any m ∈ D L (S, Z).
Proof. Let m ∈ D L (S, Z) be a D-lamination with coordinates b j and x j for 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 for j ∈ J. This point e Cm ∈ D + (S) determines hyperbolic structures on S and S • , so we can view the universal coversS andS • as subsets of the hyperbolic plane. Cut the intersecting curve l along the image of ∂S and then, using the natural map S • → S, draw all of the resulting curves on S. These curves form a cycle on S which we can lift to a path in the universal coverS connecting points on ∂H. Choose an ideal triangulation T of S, and lift this to a triangulationT ofS. Let P be a triangulated ideal polygon, formed from the triangles ofT , that contains all of the triangles that intersect this path. The curves of the path that project to curves from S determine a lamination u ∈ X L (P ).
In exactly the same way, we can lift S • to its universal coverS • , and the triangulatioñ T and polygon P determine a triangulationT • and a polygon P • inS • . The curves of the path in P • that project to curves from S • determine a lamination u • ∈ X L (P • ). Now 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 . Let p be any vertex of P . If there are infinitely many curves connecting the sides 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 and get a lamination v ∈ A L (P ).
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 I D (l)(e Cm ) = I(u • , e Cv • ) I(u, e Cv ) .
Using the definition of tropicalization and the result from the classical theory of the A-and X -spaces, we see that (I D (l)) t (m) = lim Proposition 6.14. Let l be a loop of weight k on S D which is not an intersecting curve. Then I D (l, m) = (I D (l)) t (m) for any m ∈ D L (S, Z).
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 different orientations for this loop. If the orientation that m 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 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 A-and X -spaces, we see that the last expression is half 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 the same orientation for this loop. If the orientation that m 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 one half of the minimal number of intersections between l and m.
Theorem 6.15. For any laminations l, m ∈ D L (S, Z), we have I D (l, m) = (I D (l)) t (m).