Extensions in Jacobian Algebras and Cluster Categories of Marked Surfaces

In the context of representation theory of finite dimensional algebras, string algebras have been extensively studied and most aspects of their representation theory are well-understood. One exception to this is the classification of extensions between indecomposable modules. In this paper we explicitly describe such extensions for a class of string algebras, namely gentle algebras associated to surface triangulations. These algebras arise as Jacobian algebras of unpunctured surfaces. We relate the extension spaces of indecomposable modules to crossings of arcs in the surface and give explicit bases of the extension spaces for indecomposable modules in almost all cases. We show that the dimensions of these extension spaces are given in terms of crossing arcs in the surface. Our approach is new and consists of interpreting snake graphs as indecomposable modules. In order to show that our basis is a spanning set, we need to work in the associated cluster category where we explicitly calculate the middle terms of extensions and give bases of their extension spaces. We note that not all extensions in the cluster category give rise to extensions for the Jacobian algebra.


Introduction
In this paper we study extension spaces in the module category of Jacobian algebras and cluster categories associated to marked surfaces. More precisely, given two distinct string modules over a Jacobian algebra associated to a surface with marked points on the boundary, we use the snake graph calculus developed in [CS] to determine whether there exist non-split extensions between the string modules and we also use it to construct these extensions explicitly. In the associated cluster category, the generalised arcs in the surface correspond to string objects [BZ], and every crossing of two arcs gives rise to a non-split triangle [ZZZ]. We show that the middle terms of a triangle corresponding to a particular crossing of two distinct arcs are given by the string objects corresponding to the arcs obtained by smoothing the crossing. Combining this result with the correspondence between string modules over Jacobian algebras and generalised arcs in the surface [ABCP], we obtain a dimension formula for the extensions between two distinct string modules in terms of the number of crossings of the corresponding arcs in the surface.
The smoothing of a crossing of two arcs has an interpretation in the setting of cluster algebras from surfaces where it induces the so-called skein relations [MW]. Cluster algebras were introduced by Fomin and Zelevinsky in 2002 in [FZ1] in order to give an algebraic framework for the study of the (dual) canonical bases in Lie theory. This work was further developed in [FZ2,BFZ,FZ4]. Cluster algebras are commutative algebras given by generators, the cluster variables, and relations. The construction of the generators is a recursive process from an initial set of data. In general, even in small cases, this is a complex process. However, there is a class of cluster algebras coming from surfaces [FST, FT] where this process is encoded in the combinatorial geometry of surface triangulations. Surface cluster algebras are an important part of the classification of (skew-symmetric) cluster algebras in terms of mutation type, namely almost all cluster algebras of finite mutation type are surface cluster algebras [FeShTu].
For a surface cluster algebra, the cluster variables are in bijection with arcs in the surface [FST]. Moreover, in a given triangulation, each arc corresponds to a combinatorial object called snake graph [MSW, MS, Pr]. Snake graphs have proved to be an important element in the understanding of surface cluster algebras, for example, in [MSW2] snake graphs (and band graphs) were used to show that certain collections of loops and (generalised) arcs comprise vector space bases for surface cluster algebras. Snake graphs have also been instrumental in the proof of the positivity conjecture for surface cluster algebras [MSW]. Note that the conjecture has since been proved for all skew-symmetric cluster algebras [LS]. The snake graph calculus, developed in [CS,CS2], has been an important tool to show that the cluster algebra and the upper cluster algebra associated to certain type of surfaces coincide [CLS].
If two (generalised) arcs γ 1 and γ 2 in a marked surface (S, M ) cross then the geometric operation of smoothing the crossing is given by locally replacing the crossing × with the pair of segments ⌣ ⌢ or with the pair of segments ⊃⊂. This gives rise to four new arcs γ 3 , γ 4 and γ 5 , γ 6 corresponding to the two different ways of smoothing the crossing. The corresponding elements x γ1 , . . . , x γ6 in the cluster algebra satisfy the skein relations given by x γ1 x γ2 = y − x γ3 x γ4 + y + x γ5 x γ6 where y − , y + are some coefficients [MW].
In general, given a triangulation T of a marked surface (S, M ), the corresponding Jacobian algebra J(Q, W ) with potential W is defined in [L1]. This result builds on an earlier work of [DWZ]. For some surface triangulations there exist different potentials leading to non-isomorphic Jacobian algebras, that might even have distinct representation type [GLS]. However, in almost all cases, Jacobian algebras are tame [GLS]. In particular, this is the case for Jacobian algebras arising from triangulations of surfaces with marked points on the boundary where J(Q, W ) coincides with the gentle algebra defined in [ABCP].
The cluster category C T corresponding to (S, M, T ) is defined in [A]. It follows from [FST,KY,L1] that if T ′ is another triangulation of (S, M ) then C T and C T ′ are triangle equivalent. Thus the cluster category does not depend on the triangulation of (S, M ) and can be written as C(S, M ) or C for short.
Suppose from now on that (S, M ) is a marked surface such that all marked points are in the boundary of S and let T be a triangulation of (S, M ). All arcs are considered to be generalised, that is they might have self-crossings, unless otherwise specified. The abstract snake graph calculus developed in [CS] applies in this setting and gives a combinatorial interpretation in terms of snake graphs of the arcs resulting from the smoothing of two crossing arcs. We will use this combinatorial description to study the extension space over the associated Jacobian algebra J(Q, W ) and over the cluster category C(S, M ). The string modules over J(Q, W ) are in bijection with the arcs in the surface [ABCP], and the arcs in the surface correspond in turn to snake graphs [MSW]. Therefore there is a bijective correspondence associating a snake graph corresponding to an arc in (S, M, T ) to the string module corresponding to the same arc and this defines a sign function on the snake graph, see Proposition 2.13.
Based on the snake graph calculus [CS], given two string modules, we define three types of crossings of modules corresponding to the different types of crossings of the associated snake graphs. Namely if the snake graphs cross with an overlap then we say that the corresponding string modules cross in a module. If the snake graphs cross with grafting and s = d then we say that the corresponding string modules cross in an arrow and finally if the snake graphs cross with grafting and s = d then the corresponding string modules cross in a 3-cycle. Our first result is then to determine when two distinct crossing string modules M 1 and M 2 give rise to a non-zero element in Ext 1 J(Q,W ) (M 1 , M 2 ). Note that there is a direction in the crossing of modules, that is 'M 1 crosses M 2 ' is different from 'M 2 crosses M 1 ' and that this distinction does not appear in terms of crossings of the corresponding arcs, see section 3 for more details.
We remark that skein relations for string modules have been announced in [GLS2] in the setting of Caldero-Chapoton algebras.
In the cluster category C(S, M ), the indecomposable objects correspond to arcs and (non-contractible) loops in (S, M ) and therefore they are referred to as string and band objects, respectively [BZ]. It follows from the results on AR-triangles in [BZ] that all triangles in C(S, M ) have at most two middle terms. For triangles corresponding to extensions between string objects, we explicitly describe these middle terms in terms of string objects. We remark that an important factor in the proof is the geometric interpretation of Iyama-Yoshino reduction given by Marsh-Palu [IY, MP].
Theorem B. Let γ 1 and γ 2 be two distinct string objects in C(S, M ). Let γ 3 , γ 4 , γ 5 , γ 6 be the string objects corresponding to the smoothing of a crossing of the arcs associated to γ 1 and γ 2 . Then there are two non-split triangles in C(S, M ) given by and If any of the arcs corresponding to γ 3 , γ 4 , γ 5 , γ 6 are boundary arcs in (S, M ) then the corresponding objects in C(S, M ) are zero.
In [ZZZ] the dimension of the extension group of two string objects in the cluster category is shown to be equal to the number of crossings of the corresponding arcs. Therefore it follows that the triangles in Theorem B give bases of the spaces Ext 1 C (γ 1 , γ 2 ) and Ext 1 C (γ 2 , γ 1 ) and that these bases consist of triangles in string objects. Theorem A together with Theorem B and the dimension formula in [ZZZ], result in the following dimension formula for extensions in the Jacobian algebra. Here Int(γ, δ) is the minimal number of intersections of two arcs γ and δ.
Corollary C. Let M, N be two distinct string modules over J(Q, W ) and let γ M and γ N be the corresponding arcs in (S, M ). Then where k is the number of crossings of M and N in a 3-cycle.

Notations and definitions
Throughout let k be an algebraically closed field.
2.1. Bordered marked surfaces. In this section we follow [CS, MSW]  A generalised arc may cross itself a finite number of times.
A boundary segment is the isotopy class of a curve that lies in the boundary and connects two (not necessarily distinct) neighbouring marked points on the same boundary component. Note that a boundary segment is not considered to be an arc. However, we sometime refer to it as a boundary arc.
Definition 2.2. For two arcs γ, γ ′ in (S, M ), let Int(γ, γ ′ ) be the minimal number of crossings of curves α, α ′ where α and α ′ range over the isotopy classes of γ and γ ′ , respectively. We say that arcs γ, γ ′ are compatible if Int(γ, γ ′ ) = 0.  From now on we will not make a distinction between arcs and generalised arcs and we will simply call them arcs unless otherwise specified.

Gentle algebras from surface triangulations.
In this section we recall the definition of gentle algebras and introduce some related notation which we will be using throughout the paper.
Let Q = (Q 0 , Q 1 ) be a quiver, denote by kQ its path algebra and for an admissible ideal I, let (Q, I) be the associated bound quiver. Denote by mod A the module category of finitely generated right A-modules of an algebra A.
Definition 2.5. An algebra A is gentle if it is Morita equivalent to an algebra kQ/I such that (S1) each vertex of Q is the starting point of at most two arrows and is the end point of at most two arrows; (S2) for each arrow α in Q 1 there is at most one arrow β in Q 1 such that αβ is not in I and there is at most one arrow γ in Q 1 such that γα is not in I; (S3) I is generated by paths of length 2; (S4) for each arrow α in Q 1 there is at most one arrow δ in Q 1 such that αδ is in I and there is at most one arrow ε in Q 1 such that εα is in I.
For α ∈ Q 1 , let s(α) be the start of α and t(α) be the end of α.
For each arrow α in Q 1 we define the formal inverse α −1 such that s(α −1 ) = t(α) and for all 1 ≤ i ≤ n − 1 and if no subword of w or its inverse is in I. Let s(w) = s(ε 1 ) and t(w) = t(ε n ). We consider strings up to inverses, that is w ∼ w −1 for a string w.
A string w is a direct string if w = α 1 α 2 . . . α n and α i ∈ Q 1 for all 1 ≤ i ≤ n and w is an inverse string if w −1 is a direct string.
The terminology of string modules, in particular, the notions of hooks and cohooks were first defined in [BR]. However, the definitions of hooks and cohooks we give here differ slightly from the usual definitions. More precisely, our hooks and cohooks do not necessarily satisfy the maximality conditions on direct and inverse strings appearing in the standard literature.
Given a string w, define four substrings h w, w h , c w, w c of w as follows: We say h w is obtained from w by deleting a hook on s(w) where if w is an inverse string, h w where h w is obtained from w by deleting the first direct arrow in w and the inverse string preceding it.
We say c w is obtained from w by deleting a cohook on s(w) where c w where c w is obtained from w by deleting the first inverse arrow in w and the direct string preceding it.
We say w h is obtained from w by deleting a hook on t(w) where if w is a direct string, w h where w h is obtained from w by deleting the last inverse arrow in w and the direct string succeeding it.
We say w c is obtained from w by deleting a cohook on t(w) where if w is an inverse string, w c where w c is obtained from w by deleting the last direct arrow in w and the inverse string succeeding it.
Let T be a triangulation of (S, M ) and let J(Q, W ) be the associated Jacobian algebra as defined by [L1]. As recalled in the introduction, this algebra coincides with the gentle algebra defined in [ABCP]. Let S be the set of all strings in J(Q, W ). Given a string w ∈ S we denote by M (w) the corresponding string module in J(Q, W ). Conversely, given a string module M we denote by w M its string that is M = M (w M ). Given an arc γ in the surface we denote by w γ the corresponding string and by M (γ) = M (w γ ) the associated string module. Conversely, given a string module M we denote by γ M the corresponding arc in (S, M, T ).

Cluster categories of marked surfaces.
Cluster categories were first introduced in [BMRRT] for acyclic quivers and independently in [CCS] for type A. Generalised cluster categories were defined in [A]. Given a quiver with potential (Q, W ) such that the Jacobian algebra J(Q, W ) is finite dimensional, denote by Γ := Γ(Q, W ) the associated Ginzburg dg-algebra. Consider the perfect derived category per Γ which is the smallest triangulated subcategory of the derived category D(Γ) containing Γ which is stable under taking direct summands and consider the bounded derived category D ♭ (Γ) of Γ. The generalized cluster category C(Q, W ) is the quotient per Γ/D ♭ (Γ). It is shown in [A] that C(Q, W ) is Hom-finite, 2-Calabi-Yau, the image of Γ in C(Q, W ) is a cluster tilting object T Γ , and the endomorphism algebra of T Γ is isomorphic to the Jacobian algebra J(Q, W ). By [KR] the functor Hom C(Q,W ) (T Γ [−1], −) gives an equivalence of the categories C(Q, W )/T Γ and mod J(Q, W ), see also [IY, KZ]. Now let (S, M ) be a marked surface, T, T ′ triangulations of (S,M), and let (Q, W ) and (Q ′ , W ′ ) be the quivers with potential associated with T and T ′ , respectively. It follows from [FST,KY,L1] that C(Q, W ) and C(Q ′ , W ′ ) are triangle equivalent and hence the cluster category is independent of the triangulation of (S, M ). We will thus denote the cluster category by C(S, M ) or C.
In [BZ] the cluster category C(S, M ) associated to a surface with marked points on the boundary is explicitly described. In particular, a parametrization of the indecomposable objects of C(S, M ) is given in terms of string objects and band objects. The string objects correspond bijectively to the homotopy classes of non-contractible curves in (S, M ) that are not homotopic to a boundary segment of (S, M ) and subject to the equivalence relations γ ∼ γ −1 . The band objects correspond bijectively to the elements of are the invertible elements of the fundamental group of (S, M ) and where ∼ is the equivalence relation generated by γ ∼ γ −1 and cyclic permutation of γ.
Furthermore, it is shown in [BZ] that the AR-translation of an indecomposable object γ corresponds to simultaneously rotating the start and end points of γ in the orientation of (S, M ).
Unless otherwise stated we will not distinguish between arcs and the corresponding indecomposable objects in C(S, M ).
The following theorem plays a crucial role in our results.
Theorem 2.6. [ZZZ,Theorem 3.4] Let γ and δ be two (not necessarily distinct) arcs in (S, M ). Then 2.4. Snake Graphs. For the convenience of the reader we recall in this section all relevant results on snake graphs that we refer to in later sections. We define snake graphs associated to triangulations of surfaces as in [MSW] and [CS,CS2]. Below, we closely follow the exposition in [CS2] adapting it to snake graphs associated to surface triangulations.
Let T be a triangulation of (S, M ) and γ be an arc in (S, M ) which is not in T . Choose an orientation of γ. Let τ i1 , . . . , τ i d be the arcs of T crossed by γ in the order given by the orientation of γ. Note that it is possible that τ ij = τ i k for j = k. For an arc τ ij , let ∆ j−1 and ∆ j be the two triangles in (S, M, T ) that share the arc τ ij and such that γ first crosses ∆ j−1 and then ∆ j . Note that each ∆ j always has three distinct sides, but that two or all three of the vertices of ∆ j might be identified. Let G j be the graph with 4 vertices and 5 edges, having the shape of a square with a diagonal that satisfies the following property: there is a bijection of the edges of G j and the 5 distinct arcs in the triangles ∆ j−1 and ∆ j and such that the diagonal in G j corresponds to the arc τ ij . That is, G j corresponds to the quadrilateral with diagonal τ ij formed by ∆ j−1 and ∆ j in (S, M, T ).
Given a planar embeddingG j of G j , we define the relative orientation rel(G j , T ) ofG j with respect to T to be 1 or −1 depending on whether the triangles inG j agree or disagree with the (common) orientation of the triangles ∆ j−1 and ∆ j in (S, M, T ).
Using the notation above, the arcs τ ij and τ ij+1 form two edges of the triangle ∆ j . Let σ j be the third arc in this triangle. We now recursively glue together the tiles G 1 , . . . , G d one by one from 1 to d in the following way: choose planar embeddings of the G j such that rel(G j , T ) = rel(G j+1 , T ). Then glueG j+1 toG j along the edge labelled σ j .
After gluing together the d tiles G 1 , . . . , G d , we obtain a graph (embedded in the plane) which we denote by G ∆ γ .
Definition 2.7. The snake graph G γ associated to γ is obtained from G ∆ γ by removing the diagonal in each tile. If τ ∈ T then we define the associated snake graph G τ to be the graph consisting of one single edge with two distinct vertices (regardless of whether the endpoints of τ are distinct or not).
The labels on the edges of a snake graph are called weights. Sometimes snake graphs with weights are referred to as labelled snake graphs. See Figure 1 for an example of a labelled snake graph associated to an arc.
The d − 1 edges corresponding to the arcs σ 1 , . . . , σ d−1 which are contained in two tiles are called interior edges of G γ . Denote this set by Int(G γ ). The edges of G γ not in Int(G γ ) are called boundary edges. We define a subgraph G γ [i, i + t], for 1 ≤ i ≤ d and for 0 ≤ t ≤ d − i, to be the subgraph of G γ consisting of the tiles (G i , . . . , G i+t ).
Let SW G γ (resp. G N E γ ) be the set containing the 2 elements corresponding to the south and west edge of G 1 (resp. the north and east edge of If e is an edge in SW G γ then G γ \ Succ(e) = {e}. If all tiles of a snake graph G γ are in a row or a column, we call G γ straight and we call it zigzag if no three consecutive tiles are straight.
Note that there is a notion of abstract snake graphs as combinatorial objects introduced in [CS]. However, all snake graphs we consider here are snake graphs associated to arcs in triangulated surfaces as introduced above. In general, we will use the notation G if we do not need to refer to the associated arc or if the arc is clear from the context.
Extend the sign function to all edges of G by the following rule: opposite edges have opposite signs and the south side and east side of each tile have the same sign as do the north and west side of each tile.
Note that for every snake graph there are two sign functions, f and A crossing of two arcs γ 1 , γ 2 has an interpretation in terms of the associated snake graphs as given in [CS] and as further explored in [CS2]. Depending on the triangulation and the arcs, there are three different ways in which the two arcs can cross, see Figure 2.
In terms of snake graphs these crossings correspond to a crossing overlap, grafting with s = d and grafting with s = d. We will later see in Section 3 that these correspond to three types of module crossings, namely crossing in a module, arrow crossing, and 3-cycle crossing, respectively.
We start by defining an overlap of two snake graphs. Figure 2. The leftmost figure corresponds to an overlap crossing in terms of snake graphs and a module crossing in terms of string modules, the middle figure corresponds to grafting with s = d in terms of snake graphs and an arrow crossing in terms of string modules, and the rightmost figure corresponds to grafting with s = d in terms of snake graphs and a 3-cycle crossing in terms of string modules.
Definition 2.9. [CS2,Section 2.5 be two snake graphs. We say that G 1 and G 2 have an overlap G if G is a snake graph consisting of at least one tile and if there exist two embeddings i 1 : G → G 1 , i 2 : G → G 2 which are maximal in the following sense: If there exists a snake graph G ′ with two Two snake graphs might have several overlaps with respect to same and different snake sub-graphs G.
We will see below, in Theorem 2.11, that a crossing overlap corresponds to a crossing of the arcs in the surface. The smoothing of a crossing of two arcs γ 1 and γ 2 such that the associated snake graphs G 1 and G 2 cross in an overlap is called the resolution of the overlap in terms of snake graphs [CS2].
Let f 5 be a sign function on G ′ 5 and f 6 a sign function on G ′ 6 .
We define four connected subgraphs as follows.
where the gluing of the two subgraphs is induced by G 2 ; where the gluing of the two subgraphs is induced by G 1 ; such that f 6 (σ) = f 6 (σ t ).
In the above definition we write Res G (G 1 , G 2 ) = (G 3 ⊔ G 4 , G 5 ⊔ G 6 ) for the resolution of the crossing of G 1 and G 2 .
(1) γ 1 , γ 2 cross with a nonempty local overlap (τ is , (2) The snake graphs of the four arcs obtained by smoothing the crossing of γ 1 and γ 2 in the overlap are given by the resolution Res G (G 1 , G 2 ) of the crossing of the snake graphs G 1 and G 2 at the overlap G.
We now consider the case that two arcs γ 1 and γ 2 cross in a point x but that this crossing does not correspond to a crossing overlap in the associated snake graphs G 1 and G 2 . This situation occurs exactly if the crossing of γ 1 and γ 2 occurs in a triangle in (S, M, T ). In particular, one (or both) of the arcs will have at least one endpoint coinciding with a vertex in that triangle. Following [CS2] there are two cases to consider.
be two snake graphs such that G s = G ′ 1 for some 1 ≤ s ≤ d and let f 1 be a sign function on G 1 . Let δ be the unique common edge in G NE s and SW G ′ 1 . Let f 2 be a sign function on G 2 such that f 2 (δ) = f 1 (δ). Then define four snake graphs as follows.
Case 2. Suppose that s = d.
where the two subgraphs are glued along the edge δ; where the two subgraphs are glued along the edge σ s .
In the above definitions we write Graft s,δ (G 1 , G 2 ) = (G 3 ⊔ G 4 , G 5 ⊔ G 6 ) and we call it grafting of G 2 on G 1 at s.
Theorem 2.12. [CS2,Theorem 6.4] Let γ 1 and γ 2 be two arcs which cross in a triangle ∆ with an empty overlap, and let G 1 and G 2 be the corresponding snake graphs. Assume the orientation of γ 2 is such that ∆ is the first triangle γ 2 meets. Then the snake graphs of the four arcs obtained by smoothing the crossing of γ 1 and γ 2 in ∆ are given by the resolution Graft s,δ (G 1 , G 2 ) of the grafting of G 2 on G 1 at s, where 0 ≤ s ≤ d is such that ∆ s = ∆ and if s = 0 or s = d then δ is the unique side of ∆ that is not crossed by either γ 1 or γ 2 .
Given a triangulation of (S, M ), we now establish a one-to-one correspondence between the set of snake graphs with a sign function and the set of string modules of the associated Jacobian algebra J(Q, W ). Let M (w γ ) be the string module corresponding to an arc γ and let G γ be the associated snake graph. Then the arrows and their formal inverses uniquely define a sign function f γ on G γ . Namely, let w γ = ε 1 . . . ε d−1 and let (σ 1 , . . . , σ d−1 ) be the interior edges of G γ . Define a sign function f γ on G γ by setting The following result is immediate.
Proposition 2.13. There is a bijection between the set of strings S over J(Q, W ) and the set R given by the map that associates (G γ , f γ ) to the string w γ for every arc γ in (S, M, T ).
Such a correspondence has also been noted in the setting of a triangulation of the oncepunctured torus in [R].

Crossing String Modules and Smoothing of Crossings for String Modules
In this section we interpret the crossing of arcs in terms of the corresponding string modules in J(Q, W ). We do this by using the characterization of crossing arcs in terms of snake graphs introduced in Section 2.4 and the snake graph and string module correspondence given in Proposition 2.13.
3.1. Crossing String Modules. Given two arcs in a surface (S, M ), recall that there are three types of configurations in which these arcs can cross, see Figure 2.
Each of these crossings gives rise to a different structure of the corresponding string modules which leads to Definition 3.1.
We use the notation Pred(α) for the substring preceding an arrow α in a string w and similarly we use the notation Succ(α) for the substring succeeding an arrow α in a string w. (1) in a module if there exists a string w ∈ S such that w M and w N do not both start at s(w) or do not both end at t(w) and if where α, β, ε, δ are arrows in Q 1 ; (2) in an arrow if there exists an arrow α in Q 1 such that w M α −→ w N ∈ S; (3) in a 3-cycle if there exists a 3-cycle in Q such that α is in w M and s(w N ) = c and w N does not start or end with δ or β nor their inverses.

Remark. (1) In Definition 3.1 we consider strings or their inverses and we do not distinguish between them in our notation.
(2) Crossings in modules as described in 3.1(1) have also been considered in [BZ,GLS2,ZZZ]. It also immediately follows from [CB] that there is a non-zero homomorphism from N to M in that case. Proof: We will prove this by examining the three different types of crossings and by relating them to the corresponding crossings for the associated snake graphs G M and G N with interior edges, say (σ 1 , . . . , σ d−1 ) and (σ ′ 1 , . . . , σ ′ d ′ −1 ) respectively.
Assume that M crosses N in a module. Then Let f M and f N be the sign functions on G M and G N respectively, induced by the string modules M and N , respectively.
We will now show that the overlap G w is a crossing overlap.
Suppose first that s = s(w M ) and t = t(w M ). Then w M does not start or end with w and there are arrows α and β such that α directly precedes w in w M and β −1 directly succeeds w in w M . Then α corresponds to the interior edge σ s−1 in G M and thus f M (σ s−1 ) = + and β −1 corresponds to the interior edge σ t in G M and thus f M (σ t ) = −. Therefore by Definition 2.10(1), G w is a crossing overlap and hence by Theorem 2.11, γ M and γ N cross.
Suppose now that s ′ = s(w N ) and t ′ = t(w N ). Similarly to the previous case, we obtain f N (σ ′ s ′ −1 ) = − and f N (σ ′ t ′ ) = +. Therefore γ M and γ N cross.

✷
We now show the existence of some arrows that occur if M crosses N in a module. These arrows will be needed in Definition 3.4 (1) below. Proof: Let u = u 1 µ1 u 2 µ2 u 3 · · · u r µr u r+1 . Then αµ 1 ∈ S and γ −1 µ 1 ∈ S and αγ is a non-zero path in Q. Since either µ 1 ∈ Q 1 or µ −1 1 ∈ Q 1 we have either αµ 1 ∈ kQ and αµ 1 / ∈ I or µ −1 1 γ ∈ kQ and µ −1 1 γ / ∈ I. Since J(Q, W ) is special biserial, by (S2) we have αγ ∈ I. Since J(Q, W ) is a gentle algebra coming from a surface triangulation this implies that there exists an arrow σ such that αγσ is a 3-cycle in Q and that γσ ∈ I and σα ∈ I, see Figure 3. A similar argument proves the existence of the 3-cycle containing ρ. ✷

3.2.
Smoothing of crossings for string modules. Given two arcs in (S, M ) that cross, the smoothing of a crossing gives rise to four new arcs as in Figure 4. We interpret these arcs in terms of string modules.
(2) Suppose M 1 crosses M 2 in an arrow α. Suppose without loss of generality that s(α) = t(w 1 ) and t(α) = s(w 2 ). Define (3) Suppose M 1 crosses M 2 in the 3-cycle s( We will see that this allows us in conjunction with Theorem 4.1 to fully classify the extensions of M 2 by M 1 , see Corollary 4.2. First we show the following result. (1) If M 1 crosses M 2 in a module then the modules M 3 and M 4 defined in Definition 3.4(1) above give a non-split short exact sequence in mod J(Q, W ) of the form (2) If M 1 crosses M 2 in an arrow then the module M 3 defined in Definition 3.4(2) above gives a non-split short exact sequence in mod J(Q, W ) of the form Proof: We use the notation of Definition 3.4.
(3) Since dim M ( c ( α −→ Succ(α)) < dim M ( α −→ Succ(α)) it is immediate by comparing the dimensions of M 1 ⊕ M 2 and M 3 ⊕ M 4 that these four modules cannot give rise to a short exact sequence in mod J(Q, W ). ✷

Remark.
(1) In general, M 5 and M 6 as defined above never give rise to an element in (2) If M 2 = M (γ) and M 1 = M ( s γ e ) for an arc γ in (S, M ) where s γ e is the arc rotated by the elementary pivot moves as defined in [BZ] then in Theorem 3.5(i) and (ii) above we recover the AR-sequences described in [BZ].
4. Triangles in the cluster category C(S, M ) and dimension formula for J(Q, W ) In Theorem 4.1 we explicitly describe the middle terms of triangles in C(S, M ). By [ZZZ] all triangles arise from the crossings of two arcs in (S, M ) and we show that the middle terms of the triangles arising from the crossings of two distinct arcs are given by the string objects corresponding to the arcs resulting from the smoothing of the crossings.
Let M 1 = M (γ 1 ) and M 2 = M (γ 2 ) be two distinct string J(Q, W )-modules corresponding to the string objects γ 1 and γ 2 in C(S, M ). Furthermore, one can give an orientation to an arc γ. We call s(γ), the marked point at which γ starts and t(γ) the marked point at which γ ends. It follows immediately from Theorem 3.5 that (*) if M 1 crosses M 2 in a module and if M 3 = M (γ 3 ) and M 4 = M (γ 4 ) are defined as in Definition 3.4(1) then there is a non-split triangle in C(S, M ) given by (**) if M 1 crosses M 2 in an arrow α and if M 3 = M (γ 3 ) is defined as in Definition 3.4(2) then there is a non-split triangle in C(S, M ) given by where γ 4 = 0 if and only if γ 4 is not a boundary arc.
Theorem 4.1. Let γ 1 and γ 2 be two distinct string objects in C(S, M ) such that their corresponding arcs cross in (S, M ). Let γ 3 , γ 4 , γ 5 , γ 6 be the string objects corresponding to the smoothing of a crossing of γ 1 and γ 2 . Then there are two non-split triangles in C(S, M ) given by and Combining Theorem 3.5 with Theorem 4.1 and [ZZZ,Theorem 3.4] we obtain a formula for the dimensions of the first extension group over the Jacobian algebra. (2) Directly follows from [ZZZ], Theorem 3.5 and the remarks thereafter, and the proof of (1) above. ✷ Our general strategy for the proof of Theorem 4.1 is as follows.
We consider each type of crossing separately. That is, given a fixed triangulation T of (S, M ) and two string objects γ 1 and γ 2 in C(S, M ) corresponding to two crossing arcs in (S, M ), we treat the different crossings of the corresponding string modules M 1 = M (w 1 ) and M 2 = M (w 2 ) one by one.
If the crossing under consideration is a crossing in a module then by (*) above we obtain one triangle with two middle terms given by the string objects γ 3 and γ 4 . The other triangle is obtained by possibly flipping the overlap to an orthogonal overlap (see Case 1 below for the definition). However, sometimes this is not possible. In this case we adapt a strategy similar to the one in [ZZZ]. That is, we increase the number of marked points in the surface by one or two points to obtain a surface (S, M ′ ) where M ⊂ M ′ . We triangulate (S, M ′ ) by adding one or two diagonals and flip the -now bigger -overlap to an orthogonal overlap. This gives rise to triangles from γ 1 to γ 2 with middle terms γ 5 and γ 6 in C(S, M ). Then by flipping the new (orthogonal) arc and using the cutting procedure described in [MP] which is compatible with Iyama-Yoshino reduction [IY], we obtain the triangles involving the arcs γ 5 and γ 6 in C(S, M ).
If the crossing under consideration is an arrow crossing then by (**) above we obtain a triangle with middle terms corresponding to the arcs γ 3 and γ 4 . The other triangle is then obtained by either flipping an arc in the triangulation and thus creating an overlap (i.e. a module crossing) which we can flip to an orthogonal overlap or if this is not possible by adding a marked point to obtain a surface (S, M ′ ) with M ⊂ M ′ and completing it to a triangulation of (S, M ′ ). In which case we obtain an overlap which we can flip to an orthogonal overlap. This gives rise to a triangle in C(S, M ′ ). By cutting according to [MP], we obtain the corresponding triangle in C(S, M ) with middle terms γ 5 and γ 6 .
If the crossing is a crossing in a 3-cycle then none of the triangles in C(S, M ) are obtained from non-split short exact sequences in the Jacobian algebra corresponding to the given triangulation T . Instead we change the triangulation to create a crossing in a moduleby possibly adding a marked point. Once we are in the case of a module crossing we can adapt the described strategy for module crossings above.

Module crossing.
Here we consider the case that M 1 = M (w 1 ) crosses M 2 = M (w 2 ) in a module. In terms of snake graphs a crossing in a module corresponds to a crossing in an overlap G. Therefore as explained above there always is a non-split triangle in C(S, M ) given by In order to prove the existence of the triangle involving γ 5 and γ 6 , there are several cases to consider depending on where the arcs γ 1 and γ 2 start and end with respect to the overlap.
Let w 1 = P 1 wS 1 and w 2 = P 2 wS 2 where w corresponds to the overlap G.
Let τ 1 , τ 2 , . . . , τ n be the arcs corresponding to the overlap, that is s(w) = τ 1 and t(w) = τ n . In (S, M ) this corresponds to the local configuration as in Figure 5.
Furthermore, M 1 crosses M 2 such that s(w 1 ) = τ 1 and s(w 2 ) = τ 1 and t(w 1 ) = τ n and t(w 2 ) = τ n . There exists a triangulation T ′ with one of its arcs given by τ AB corresponding to the segment AB and such that all other arcs in the overlap in T ′ are connected to A. Locally the segment AB is embedded in T ′ as in Figure 6. We denote by J(Q ′ , W ′ ) the Jacobian algebra with respect to the new triangulation T ′ . Let M ′ 1 and M ′ 2 be the string modules in J(Q ′ , W ′ ) corresponding to the arcs γ 1 and γ 2 . Now M ′ 2 crosses M ′ 1 in a new overlap corresponding to τ AB . We call this new overlap an orthogonal flip of the overlap G.
(a) Suppose P 2 is not a direct string. In this case we have the local configuration as in Figure 7. Since P 2 is not a direct string, s(γ 2 ) = A and the segment s(γ 1 )s(γ 2 ) does not correspond to the boundary segment s(γ 1 )A. Also by assumption t(γ 1 ) = B and t(γ 2 ) = B. Thus there exists a triangulation T ′ of (S, M ) containing the segment AB as one of its internal arcs similar to Case 1 above.
Therefore by Theorem 3.5(i) we obtain a non-split short exact sequence ) is the string module over J(Q ′ , W ′ ) corresponding to the arc γ 5 (resp. γ 6 ) with respect to T ′ . Thus in C(S, M ) there is a triangle (b) Suppose now that P 2 is a direct string. Then there is boundary segment with endpoints s(γ 1 ) and s(γ 2 ) corresponding to the local configuration as in the left hand side of Figure 8.
The arc corresponding to the segment s(γ 1 )B does not cross γ 1 since one of their endpoints coincides at s(γ 1 ). Similarly the arc corresponding to the segment s(γ 2 )B does not cross γ 2 . Thus the method from part (a) cannot be applied.
Consider instead the surface (S, M ′ ) where M ′ has exactly one more marked point A lying on the boundary segment s(γ 1 )s(γ 2 ), see the right hand side of Figure 8. Complete T to a triangulation T ′ on (S, M ′ ) by adding one new arc τ corresponding to the segment AX. In (S, M ′ ) the segment s(γ 1 )s(γ 2 ) is not a boundary segment. Therefore the same method as in part (a) can be applied and we obtain a triangle in C(S, M ′ ) Since M ⊂ M ′ , whenever we have an arc in (S, M ′ ) between marked points a, b ∈ M ′ such that a, b ∈ M , by a slight abuse of notation we use the same notation for this arc as an arc in (S, M ) and as an arc in (S, M ′ ). Now flip the arc τ to an arc τ ′ (the other diagonal in the corresponding quadrilateral) to obtain a triangulation T ′′ . Then there is a triangle s(γ 1 )s(γ 2 )A in T ′′ and τ ′ is the arc γ 5 . Cutting τ ′ as defined in [MP] gives a surface isotopic to (S, M ) since we delete any component homeomorphic to a triangle after the cut.
Note that by [MP] the arcs in (S, M ′ ) not crossing τ ′ are in bijection with the arcs in (S, M ). Since γ 5 is a boundary segment in (S, M ) the corresponding object in C(S, M ) is the zero object. Thus by Proposition 5 in [MP] we obtain a triangle in C(S, M ) Case 2 (ii): P 1 = 0, S 1 = 0 and P 2 = 0, S 2 = 0 follows from Case 2(i) by changing the orientation of γ 1 and γ 2 .
Case 2 (iii) and (iv): The case P 2 = 0 and P 1 , S 1 , S 2 non-zero and the case S 2 = 0 and P 1 , S 1 , P 2 non-zero follow by similar arguments as above.
(a) Suppose that neither P 2 nor S 1 is a direct string. Therefore neither the segment s(γ 1 )s(γ 2 ) nor the segment t(γ 1 )t(γ 2 ) is a boundary segment. Thus by a similar argument as in Case 2(i)(a) there are marked points A and B such that there is a triangulation T ′ of (S, M ) containing an arc corresponding to the segment AB and we obtain a triangle in C(S, M ) γ 1 −→ γ 5 ⊕ γ 6 −→ γ 2 −→ γ 1 [1].
(b) Suppose that P 2 is a direct string and that S 1 is not a direct string. Then s(γ 1 )s(γ 2 ) is a boundary segment and we use a similar argument as in case 2(i)(b) above to obtain a triangle in C(S, M ) γ 1 −→ γ 6 −→ γ 2 −→ γ 1 [1].
(c) Suppose that P 2 is not a direct string and that S 1 is a direct string. Then t(γ 1 )t(γ 2 ) is a boundary segment and in a similar way to the above we obtain a triangle in C(S, M ) (d) Suppose both P 2 and S 1 are direct strings. Then s(γ 1 )s(γ 2 ) and t(γ 1 )t(γ 2 ) are boundary segments.
In this case consider a surface (S, M ′ ) where M ′ contains 2 more marked points than M , one in each of the boundary segments s(γ 1 )s(γ 2 ) and t(γ 1 )(γ 2 ). As before this gives rise to a triangle in C(S, M ′ ) Applying the construction in [MP] and cutting twice, we obtain the trivial triangle in C(S, M ) Note that in the configuration considered in this case, we already have by [BZ] that γ 2 −→ γ 3 ⊕ γ 4 −→ γ 1 −→ γ 2 [1] is an Auslander-Reiten triangle. And, as above, the other triangle always corresponds to a trivial triangle.
Case 3 (ii): P 1 = 0 and P 2 = 0 and S 1 and S 2 non-zero, follows from the above by changing the orientation of γ 1 and γ 2 .

Case 3 (iii) and (iv):
The case P 1 = 0 and P 2 = 0 and S 2 and P 2 non-zero, and the case P 2 = 0 and S 2 = 0 and P 1 and S 1 non-zero, follow by similar arguments to the above.

Arrow crossing.
Here we consider the case that M 1 crosses M 2 in an arrow.
Case 1: Suppose the crossing occurs in an inner triangle of T . Let τ be the arc corresponding to the segment s(γ 2 )t(γ 1 ) = BC, see Figure 9. Flipping τ to τ ′ in its quadrilateral gives rise to an overlap given by τ ′ and we use the module crossing methods above to obtain a triangle in C(S, M ) We remark that the points A, B and C are not necessarily distinct.
Case 2: Suppose the crossing occurs in a triangle of T where the segment s(γ 2 )t(γ 1 ) = BC is a boundary segment.
Consider the surface (S, M ′ ) where M ′ = M ∪ {X} and X lies on the boundary segment BC, see Figure 10. We complete T to a triangulation of (S, M ′ ) by adding an arc τ corresponding to the segment AX. This gives rise to an overlap given by τ . Again we use the module crossing methods above to obtain a triangle in C(S, M ′ ) Figure 10. Case 2: Arrow crossing in a triangle where BC is a boundary segment.
We apply the construction in [MP] and cut along τ ′ . Then γ 6 corresponds to a boundary segment and as above we obtain a triangle in C(S, M ) Note that the points B and C may coincide.

3-cycle crossing.
Here we consider the case that M 1 crosses M 2 in a 3-cycle.
Case 1: Supoose that s(γ 1 ) = s(γ 2 ), see Figure 11. Remark that s(γ 1 ) and s(γ 2 ) may or may not lie in the same boundary component of (S, M ). In either case we can add a marked point X to obtain a surface (S, M ′ ) such that the segment XC lies between the segments AC and BC. We flip the arc corresponding to the segment AB. This gives rise to a crossing of γ 1 and γ 2 with overlap corresponding to XC. Applying the module crossing methods described above, we obtain two triangles in C(S, M ′ ). By [MP] we obtain the corresponding triangles in C(S, M ).
There must be at least one marked point such as the point D on some boundary component as in Figure 12 above since otherwise there would not be a 3-cycle crossing. Then there exists a triangulation T ′ containing the arc corresponding to CD. Thus γ 1 crosses γ 2 in an overlap containing at least CD. The rest follows as in Case 1 for module crossings.
Both in case 1 and 2 above the points A, B and C may coincide two by two.
This completes the proof of Theorem 4.1.