JOURNAL OF MODERN DYNAMICS doi: 10.3934/jmd.2008.2.581 VOLUME 2, NO. 4, 2008, 581–627

SYMBOLIC DYNAMICS FOR THE FLOW ON HECKE SURFACES

DIETER MAYER AND FREDRIK STRÖMBERG (Communicated by Jens Marklof)

ABSTRACT. In this paper we discuss a coding and the associated symbolic dy- namics for the geodesic flow on Hecke triangle surfaces. We construct an ex- plicit cross-section for which the first-returnmap factors through a simple (ex- plicit) map given in terms of the generating map of a particular continued- fraction expansion closely related to the Hecke triangle groups. We also obtain explicit expressions for the associated first return times.

CONTENTS 1. Introduction 581 2. The geodesic flow on T 1M 583 3. λ-Continued fraction expansions 584 4. Construction of the cross-section 607 5. Construction of an invariant measure 619 6. Lemmas on continued-fraction expansions and reduced 622

1. INTRODUCTION Surfaces of negative curvature and their geodesics have been studied since the 1898 work of Hadamard [15] (see in particular the remark at the end of §58). Inspired by the work of Hadamard and Birkhoff [6], Morse [31] introduced a cod- ing of geodesics essentially corresponding to what is now known as “cutting se- quences” and used this coding to show the existence of a certain type of recur- rent geodesics [32]. Further ergodic properties of the geodesic flow on surfaces of constant neg- ative curvature given by Fuchsian groups were shown by, e.g., Artin [5], Nielsen [36], Koebe [26], Löbell [29], Myrberg [33], Hedlund [16, 17, 18, 19], Morse and

Received January 23, 2008, revised June 17, 2008. 2000 Subject Classification: Primary: 37D40, Secondary: 37E05, 11A55, 11K50. Key words and phrases: geodesic flow, symbolic dynamics, Hecke triangle groups, continued fractions. DM: This work has been supportedby the German Research Foundation (DFG) under contract Ma 633/16-1.

INTHEPUBLICDOMAINAFTER 2036 581 ©2008AIMSCIENCES 582 DIETER MAYER AND FREDRIK STRÖMBERG

Hedlund [30] and Hopf [20, 21]. In this sequence of papers one can see the sub- ject of symbolic dynamics emerging. For a more up-to-date account of the er- godic properties of the geodesic flow on a surface of constant negative curvature formulated in a modern language see, e.g., the introduction in Series [47]. Artin’s[5] approach was novel in thathe used continued fractions to code geo- desics on the modular surface. Since Artin, coding and symbolic dynamics on the modular surface have been studied by e.g., Adler and Flatto [1, 2, 3] and Se- ries [48]. For a recent review of different aspects of coding of geodesics on the modular surface, see for example the expository papers by Katok and Ugarcovici [24, 25]. Other important references for the theory of symbolic dynamics and coding of the geodesic flow on hyperbolic surfaces are, e.g., Adler–Flatto [4], Bowen and Series [7] and Series [47]. In the present paper, we study the geodesic flow on a family of hyperbolic surfaces with one cusp and two marked points, the so-called Hecke triangle sur- faces, generalizing the modular surface. Symbolic dynamics for a related billiard have also been studied by Fried [12]. We now give a summary of the paper. Sec- tions 1 and 2 contain preliminary facts about hyperbolic geometry and geodesic flows. In Section 3 we develop the theory of λ-fractions connected to the coding of the geodesic flow on the Hecke triangle surfaces. The explicit discretization of the geodesic flow in terms of a Poincaré section and Poincaré map is developed in Section 4. As an immediate application we derive invariant measures for cer- tain interval maps in Section 5. Some rather technical lemmas are confined to the end in Section 6. 1.1. Hyperbolic geometry and Hecke triangle surfaces. Recall that any hyper- bolic surface of constant negative curvature 1 is given as a quotient (orbifold) − dz M H /Γ. Here H z x i y y 0, x R together with the metric ds | | = = = + | > ∈ = y is the hyperbolic upper half-plane and Γ PSL2(R) SL2(R)/{ I } is a Fuchsian © ⊆ ª =∼ ± group. Here SL2(R) is the group of real two-by-two matrices with determinant 1, I 1 0 and PSL (R) is the group of orientation-preserving isometries of H . = 0 1 2 The boundary of H is ∂H R R { }, H H ∂H . If g a b PSL (R). ¡ ¢ ∗ ∗ c d 2 az b = = ∪ ∞ = ∪ = ∈ then g z + H for z H , g x ∂H for x ∂H and we say that g is elliptic, = cz d ∈ ∈ ∈ ∈ ¡ ¢ hyperbolic or+parabolic depending on whether Tr g a d 2, 2 or 2. = | + | < > = The same notation applies for fixed points of g. In the following we identify ¯ ¯ the element g PSL2(R) with the map it defines¯ on¯ H ∗. Note that the type of ∈ 1 fixed point is preserved under conjugation g Ag A− by A PSL (R). A para- 7→ ∈ 2 bolic fixed point is a degenerate fixed point, belongs to ∂H , and is usually called a cusp. Elliptic points appear in pairs, z, z¯ with z H and z¯ belonging to the ∈ lower half-plane H −, and Γz , the stabilizer subgroup of z in Γ, is cyclic of finite order. Hyperbolic fixed points appear also in pairs with x, x∗ ∂H , where x∗ is ∈ said to be the conjugate point of x. A geodesic γ on H is either a half-circle orthogonal to R or a line parallel to the imaginary axis and the endpoints of γ are denoted by γ ∂H . We identify ± ∈ the set of geodesics on H with G ξ,η ξ η R∗ and use γ ξ,η to denote = | 6= ∈ JOURNAL OF MODERN DYNAMICS ©¡ ¢ VªOLUME 2, NO.¡ 4 (2008),¢ 581–627 SYMBOLICDYNAMICSFORTHEGEODESICFLOWON HECKE SURFACES 583 the oriented geodesic on H with γ ξ and γ η. Unless otherwise stated + = − = all geodesics are assumed to be parametrized with hyperbolic arc length with γ(0) either at height 1 if γ is vertical or the highest point on the half-circle. The tangent of γ at γ(t) is denoted by γ˙ (t). Itis knownthat z H and θ [ π,π) S1 ∈ ∈ − =∼ determine a unique geodesic (cf. Lemma 62) passing through z whose tangent at z makes an angle θ with the positive real axis. This geodesic is denoted by γz,θ. It is also well known that a geodesic γ ξ,η is closed if and only if ξ and η ξ∗ are = conjugate hyperbolic fixed points. 1¡ ¢ The unit tangent bundle of H , T H z H ~v TzH ~v 1 is the collec- = ∈ ∈ | | | = tion of all unit vectors in the tangent planes of H with base points z H , which 1H ~ F © ª ∈ we denote by Tz . By identifying v with its angle θ with respect to the positive real axis, we can view T 1H as the collection of all pairs (z,θ) H S1. We may ∈ × 2 also view this as the set of geodesics γz,θ on H or equivalently as G R∗ . ⊆ 1 Let π: H M be the natural projection map z Γz, and let π∗ : T H 1 → 1 7→ → T M be the extension of π to T H . Then γ∗ πγ is a closed geodesic on M if = and only if γ and γ are fixed points of the same hyperbolic map gγ Γ. For a + − ∈ more comprehensive introduction to hyperbolic geometry and Fuchsian groups see e.g., [23, 27, 41].

DEFINITION 1. For an integer q 3, the Hecke triangle group G PSL (R) is ≥ q ⊆ 2 the group generated by the maps S : z 1/z and T : z z λ, where λ 7→ − 7→ + = λ 2cos π/q [1,2). The corresponding orbifold (Riemann surface) is M q = ∈ q = G \H , which we sometimes identify with the standard fundamental domain of q ¡ ¢ Gq , F {z H z λ/2, z 1}, q = ∈ | |ℜ | ≤ | | ≥ πi with sides pairwise identified. Let ρ ρ e q and ρ ρ. We define the = + = − = − following oriented boundary components of Fq : L0 is the circular arc from ρ − to ρ . L1 is the vertical line from ρ to i and L 1 is the vertical line from i to + + ∞ − ∞ ρ . Thus ∂Fq L 1 L0 L1 is the positively oriented boundary of Fq . − = − ∪ ∪ REMARK 2. G is a realization of the Schwarz triangle group π/ ,π/q,π/2 , and q ∞ it is not hard to show (see, e.g., [27, VII]) that G , for q 3, is a cofinite Fuchsian q ≥ ¡ ¢ group with fundamental domain Fq and the only relations (1) S2 (ST )q Id – the identity in PSL (R). = = 2 Hence Gq has one cusp, that is the equivalence class of parabolic points, and two elliptic equivalence classes of orders 2 and q respectively. Note that G 3 = PSL2(Z)—the modular group—and that G4, G6 are conjugate to congruence sub- groups of the modular group. For q 3,4,6 the group G is nonarithmetic (cf. 6= q [23, pp. 151–152]), but in the terminology of [9, 46] it is semiarithmetic, meaning that it is possible to embed Gq as a subgroup of a Hilbert modular group.

2. THE GEODESIC FLOW ON T 1M We briefly recall the notion of the geodesic flow on a Riemann surface M 1 1 = Γ\H with Γ PSL2(R) a Fuchsian group. To any (z,θ) T H H S we can ⊂ ∈ =∼ × JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 584 DIETER MAYER AND FREDRIK STRÖMBERG associate a unique geodesic γ γ on H such that γ(0) z and γ˙ (0) eiθ. = z,θ = = The geodesic flow on T 1H can then be viewed as a map Φ : T 1H T 1H t → with Φt γz,θ Φt (z,θ) γz,θ (t),γ˙z,θ (t) , t R, satisfying Φt s Φt Φs. The = 1 = ∈ + = ◦ geodesic flow Φ∗ on T M is then given by the projection Φ∗ π∗ (Φ ). ¡ ¢ ¡ ¢ t = t A more abstract and general description of the geodesic flow, which can be ex- tended to other homogeneous spaces, is obtained by the identification T 1H =∼ PSL2(R). Under this representation the geodesic flow corresponds to right mul- 1 et/2 0 R tiplication by the matrix at− t/2 in PSL2( ) (cf. ,e.g., [11, Ch. 13]). = 0 e− ³ ´ DEFINITION 3. Let Υ be a set of geodesics on H . A hypersurface Σ T 1H is ⊆ said to be a Poincaré section or cross-section for the geodesic flow on T 1H for Υ if any γ Υ intersects Σ ∈ (P1): transversely, i.e., nontangentially, and (P2): infinitely often, i.e., Φ γ Σ for an infinite sequence of t . t j ∈ j → ±∞ The corresponding first-return map is the map T : Σ Σ such that T (z,θ) ¡ ¢ → = Φ (z,θ) Σ and Φ (z,θ) Σ for 0 t t . Here t t (z,θ) 0 is called the first t0 ∈ t ∉ < < 0 0 = 0 > return time. Poincaré sections were first introduced by Poincaré [40] to show the stability of periodic orbits. For examples of cross-section maps in connection with the geodesic flow on hyperbolic surfaces, see e.g., [4, 1]. The previous definition extends naturally to T 1M with Υ and Σ replaced by Υ∗ π(Υ) and Σ∗ π∗ (Σ). The first-returnmap T is used to obtain a discretiza- = = Φ Φ tion of the geodesic flow, e.g., . we replace t (z,θ) by tk (z,θ) , where tk (z,θ) is a sequence of consecutive first returns. Incidentally, this provides a reduction © ª of the dynamics from three to two dimensions and it turns out that in our ex- ample the first-return map also has a factor map, which allows us to study the three-dimensional geodesic flow with the help of an interval map (see Sections 4.3 and 5).

3. λ-CONTINUED FRACTION EXPANSIONS 3.1. Basic concepts. Continued fraction expansions connected to the groups Gq , the so-called λ-fractions, were first introduced by Rosen [42] and subse- quently studied by Rosen and others, cf. ,e.g., [43, 44, 45]. For thepurposesof nat- ural extensions (cf. Section 3.4), the results of Burton, Kraaikamp and Schmidt [8] are analogous to ours and we occasionally refer to their results. Our definition of λ-fractions is equivalent to Rosen’s definition (cf. ,e.g., [42, §2]). To a sequence of integers, a Z and a Z∗ Z\{0}, j 1 (finite or infinite), 0 ∈ j ∈ = ≥ we associate a λ-fraction x Ja ; a , a ,...K. This λ-fraction is identified with the = 0 1 2 point 1 a0 a1 an x a0λ lim T ST ST 0 = − a λ 1 = n ··· 1 − . →∞ a λ .. 2 − if the right-hand side is convergent. When there is no risk of confusion, we sometimes write x x. For any m 1, we define the head x and the tail = ≥ (m) JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 SYMBOLICDYNAMICSFORTHEGEODESICFLOWON HECKE SURFACES 585

(m) (m) x of x by x Ja0; a1,..., amK and x Jam 1, am 2,...K. Note that x (m) = = + + − = J a ; a , a ,...K. If a 0, we usually omit the leading J0;K. Repetitions in − 0 − 1 − 2 0 = a sequence are denoted by a power, e.g., Ja, a, aK Ja3K, and an infinite repeti- = tion is denoted by an overline, e.g., Ja ,... a , a ,..., a ,...K Ja ,..., a K. Such 1 k 1 k = 1 k a λ-fraction is said to be periodic with period k, while an eventually periodic λ- fraction has a periodic tail. Two λ-fractions x and y are said to be equivalent if they have the same tail. In this case it is easy to see that, if the fractions are convergent, then x Ay for some A G . = ∈ q The sole purpose for introducing λ-fractions is to code geodesics by identify- N ing the λ-fractions of their endpoints with elements of Z . For reasons that will Z be clear later (Section 3.4), we also have to consider bi-infinite sequences Z and N Z Z N view Z as embedded in Z with a zero-sequence to the left. On Z and Z we ˜ ˜ 1 always use the metric h defined by h {ai }i∞ ,{bi }i∞ 1 n , where ai bi =−∞ =−∞Z = +N = for i n and an bn or a n b n. In this metric Z and Z have the topo- | | < 6= − 6= − ¡ ¢ Z Z logical structure of a Cantor set and the left- and right shift maps σ± : Z Z , → σ± a j a j 1 are continuous. We also set σ+Ja1, a2,...K Ja2, a3,...K. = ± = 3.2.© Regularª © λ-fractions.ª In the set of all λ-fractions we choose a “good” sub- set, in which almost all x R have unique λ-fractions and in which infinite λ- ∈ fractions are convergent. The first step is to choose a “fundamental region” Iq for the action of T : R R, namely I [ λ/2,λ/2]. Then it is possible to express → q = − one property of our “good” subset as follows: If in the fraction x Ja ; a , a ,...K = 0 1 2 the first entry a 0, then x I . That means that we do not allow sequences 0 = ∈ q with a 0 to correspond to points outside I . 0 = q A shift-invariant extension of this property leads to the following definition of regular λ-fractions:

DEFINITION 4. Let x Ja0; a1, a2,...K be a finite or infinite convergent λ-fraction j = and let x σ x J0; a j , a j 1,...K, j 1, be the j -th shift of x. Let x j be the j = = + ≥ corresponding point. Then x is said to be a regular λ-fraction if and only if (*) x I for all j 1. j ∈ q ≥ A regular λ-fraction is denoted by [a0; a1,...], the space of all regular λ-fractions is denoted by A and the subspace of infinite regular λ-fractions with a 0 is q 0 = denoted by A0,q . For a finite fraction x Ja ; a ,..., a K, we get x J0;K and x 0 I for = 0 1 n j = j = ∈ q j n. > We will see later that regular λ-fractions can be regarded as nearest λ-multiple continued fractions. In the cases q 3 or λ 1, nearest integer continued frac- = = tions were already studied by Hurwitz [22] in 1889. An account of Hurwitz reduc- tion theory can be found in Fried [13] (cf. also the H-expansions in [24, 25]). For general q this particular formulation of Rosen’s fractions was studied by Nakada [35]. q 3 q 2 For the remainder of the paper we let h − if q is odd and h − if q is = 2 = 2 even. The following Lemma is an immediate consequence of [8, (4)].

JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 586 DIETER MAYER AND FREDRIK STRÖMBERG

LEMMA 5. The points λ/2 have finite regular λ-fractions given by ∓ [( 1)h], for q even, ± λ/2 h h ∓ = ([( 1) , 2,( 1) ], for q odd. ± ± ± LEMMA 6. If q isodd,thepoint x 1 has the finite regular λ-fraction = 1 [1;1h ]. = h h 1 1 h Proof. Since a [1;1 ] T (ST ) 0, one has also a T − ST − 0. From iden- = = − = tity (1) we get ¡ ¢ h 1 1 h 2 1 1 h 1 1 1 h Sa (ST ) + 0 T − S + 0 T − ST − ST − S0 T − ST − 0, = = = = and hence 1/a a.¡ Since ¢a 0, this implies¡ that¢ a 1. ¡ ¢ − = − > = DEFINITION 7. Let x be the floor function defined by ⌊ ⌋ x n n x n 1 for x 0 and n x n 1 for x 0, respectively ⌊ ⌋ = ⇔ < ≤ + > ≤ < + ≤ and let x : x 1 be the corresponding nearest λ-multiple function. Then 〈 〉λ = λ + 2 define F : I I by q q →¥ q ¦ 1/x 1/x λλ, x Iq \{0}, Fq x − −〈− 〉 ∈ = (0, x 0. = LEMMA 8. For x R the following algorithm gives a finite or infinite regular λ- ∈ fraction c (x) [a ; a ,...] corresponding to x: q = 0 1 (i) Set a0 : x λ and x1 x a0λ. =〈 〉 1= − (ii) Set x j 1 : Fq x j /x j a j λ, j 1, with a j 1/x j λ, j 1. + = = − − ≥ = 〈− 〉 ≥ If x 0 for some j, the algorithm stops and gives a finite regular λ-fraction. j = a j Proof. By definition we see that x j 1 T − Sx j , j 1, and it follows that x + = ≥ = T a0 ST a1 ST an x for any n 1. If x [a ; a ,....], then for j 1, x σj x ··· n ≥ = 0 1 ≥ j = = [0; a j ,...] corresponds to the point x j and condition (*) of Definition 4 is fulfilled, since F maps I to itself and x I . q q 1 ∈ q REMARK 9. We say that Fq is a generating map for the regular λ-fractions. It is also clear from Lemma 8 that Fq acts as a shift map on the space A0,q , i.e., c F x σc (x). q q = q ¡An immediate¢ consequence of Lemma 8 is the following corollary:

COROLLARY 10. If x hasaninfiniteregular λ-fraction,then it is unique and equal to cq (x) as given by Lemma 8.

The above choice of floor function implies that Fq is an odd function and that λ/2 λ 0 in agreement with Lemma 5. The ambiguity connected to the choice 〈± 〉 = 2 1 1 of floor function at integers affects only the points x where − = λ(1 2k) xλ + 2 = k Z and F x (k k )λ λ/2 λ/2. By Lemma 5 we conclude− that any point ∈ q = − ⌊ ⌋ − = ± that has more than one regular λ-fraction is F -equivalent to λ/2 and hence q ± has a finite λ-fraction.

JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 SYMBOLICDYNAMICSFORTHEGEODESICFLOWON HECKE SURFACES 587

We can produce in this way a regular λ-fraction c (x) as a code for any x R. q ∈ For the purposes of symbolic dynamics, we prefer to have an intrinsic descrip- tion of the members of the space A0,q , formulated in terms of so-called forbid- den blocks, i.e., certain subsequences which are not allowed. From Definition 4 it is clear which subsequences are forbidden and how to remove them by rewrit- ing the sequence using the fraction with a leading a 0 for any point outside I 0 6= q instead of a 0. 0 = LEMMA 11. Let q beevenwithq 2h 2. Then the blocks J( 1)h , mK, for m 1 = + ± ± ≥ are forbidden. The block Ja,( 1)h , m,bK, with a 1 and b 1 if m 1, can ± ± 6= ± 6= ± = be rewritten as [a 1,( 1)h , m 1,b], if m 2, ∓ ∓ ± ∓ ≥ h h 1 Ja,( 1) , m,bK [a 1,( 1) − ,b 1], if m 1 and h 2, ± ± →  ∓ ∓ ∓ = ≥ [a 1,b 1], if m 1 and h 1. ∓ ∓ = = Proof. Since, by Lemma 5,λ/2 [( 1)h], the blocks J( 1)h , mK for m 1 are ∓ =2h±2 ± ± ≥ forbidden. Using the relation (ST ) + I , we can restrict ourselves to the case = where the number of consecutive 1’s is at most h 1. Then the rewriting rules 2h 2 + follow immediately from the relation (ST ) + I . = REMARK 12. Obviously the rewritten block Ja 1,b 1K is forbidden itself if h 1, ∓ ∓ = i.e., q 4 and a 2 and b 2 or a 2 and b 2 in the case of minus and plus = = ≥ = − ≤ − sign respectively. We will discuss how to get allowed blocks in this case after repeated rewriting in Lemma 19. h 1 LEMMA 13. Let q 5 be odd with q 2h 3. Then the blocks J( 1) + K and h h ≥ = + ±h 1 J( 1) , 2,( 1) , mK with m 1 are forbidden. The block Ja,( 1) + ,bK, for ± ± ± ± ≥ ± a 1,b 1, can be rewritten as 6= ± 6= ± h 1 h Ja,( 1) + ,bK [a 1,( 1) ,b 1], ± → ∓ ∓ ∓ the blocks Ja,( 1)h , 2,( 1)h , m,bK with a 1 can be rewritten as ± ± ± ± 6= ± h h 1 [a 1,( 1) , 2,( 1) − ,b 1], if m 1, h h ∓ ∓ ∓ ∓ ∓ = Ja,( 1) , 2,( 1) , m,bK h h ± ± ± ± → ([a 1,( 1) , 2,( 1) , m 1,b], if m 2. ∓ ∓ ∓ ∓ ± ∓ ≥ For q 3, the blocks J 1K and J 2, mK with m 1 are forbidden. The block = ± ± ± ≥ Ja, 1,bK with a 1, 2 and b 1 can be rewritten as ± 6= ± ± 6= ± Ja, 1,bK Ja 1,b 1K. ± → ∓ ∓ The block Ja, 2, m,bK with a 1, 2 can be rewritten as ± ± 6= ± ± Ja 1,b 2,K, if m 1, Ja, 2, m,bK ∓ ∓ = ± ± → (Ja 1, 2, m 1,bK, if m 2. ∓ ∓ ± ∓ ≥ 2h 3 Proof. Since (ST ) + I we can again restrict ourselves to blocks with no more = than h 1 consecutive 1’s. From Lemma 5 we know that λ/2 [1h,2,1h ] and + − = λ/2 [( 1)h, 2,( 1)h ], hence the forbidden blocks follow immediately. Using = − − 2h− 3 the relation (ST ) + I again gives the rewriting rules. = JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 588 DIETER MAYER AND FREDRIK STRÖMBERG

REMARK 14. In the first rewriting rule for q 3, the rewritten block Ja 1,b 1K = ∓ ∓ is forbidden if a 3 and b 2 or a 3 and b 2 (in the case of minus and = ≥ = − ≤ − plus signs, respectively) or if b 2. The rewritten block Ja 1, 2, m 1,bK is = ± ∓ ∓ ± ∓ itself forbidden if m 2 or m 3 and b 1, respectively b 1 (in the case of = = ≥ ≤ − minus and plus signs, respectively) or b 1. The rewritten block Ja 1,b 1K = ± ∓ ∓ is forbidden in this case if a 3 and b 3 or if a 3 and b 3 (in the case = ≥ = − ≤ − of minus and plus signs, respectively). How to get allowed blocks in these cases after repeated rewriting will be discussed in the proofs of Lemmas 18 and 20.

REMARK 15. It is easy to see that Rosen’s λ-fractions [42] can be expressed as words in the generators T , S and JS of the group G∗ G , J PGL (R), where q =〈 q 〉 ⊆ 2 J : z z is the reflection in the imaginary axis, i.e., JSx 1/x for x R∗. Since 7→ − 1 = ∈ J is an involution of G , e.g., JT J T − and JS J S, it is easy to see that Rosen’s q = = and our notions of λ-fractions are equivalent: e.g., in the Gq -word identified with a a our λ-fraction we replace any T − by JT J, a 1. Algorithmically, this means ≥ for a λ-fraction with entries a j that the corresponding Rosen fraction has entries (ǫj , a j ) where ǫ1 sign(a1) and ǫj sign(a j 1a j ) for j 2. | | = − = − − ≥ From the definition of regular λ-fractions it is clear that Rosen’s reduced λ- fractions [42, Def. 1] correspond to a fundamental interval [0,λ/2] for the action of the group T, J together with the choices made for finite fractions in [42, Def. 〈 〉 1 (4)-(5)]. It is easy to verify, for example using the forbidden blocks, that a finite fraction not equivalent to λ/2 or an infinite regular λ-fraction correspond to ± a reduced λ-fraction of Rosen. The main difference between our regular and Rosen’s reduced λ-fractions is that any λ-fraction equivalent to λ/2 has two ± valid regular λ-fractions. The root of this nonuniqueness is our choice of a closed interval Iq which is in turn motivated by our Markov partitions in Section 3.5. It is then clear that those results of [42] and [8] pertaining to infinite reduced λ-fractions can be applied directly to our regular λ-fractions.

LEMMA 16. An infinite λ-fraction without forbidden blocks is convergent. Proof. This follows from [42, Thm. 5] and Remark 15. An immediate consequence of Definition 4 and Lemmas 11, 13 and 16 is the following

COROLLARY 17. A λ-fraction is regular if and only if it does not contain any for- bidden block. Rewriting a forbidden block may produce new forbidden blocks. By rewriting a forbidden block completely we mean that we also rewrite all new forbidden blocks that arise. For the reduction procedure (cf. Section 3.6) it is important that rewriting a forbidden block completely can be done in most cases without affecting the head of the λ-fraction (up to some point).

LEMMA 18. Suppose that the λ-fraction x Ja ; a ,...K has the first forbidden = 0 1 block beginning at an,n 2. If q 5 or q 4 and the forbidden block is not of 2 ≥ ≥ = the type J1 K, then the head of x up to n 2, i.e., x Ja0; a1,..., an 2K is not − (n 2) = − affected by rewriting this forbidden block completely.−

JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 SYMBOLICDYNAMICSFORTHEGEODESICFLOWON HECKE SURFACES 589

Proof. For simplicity consider an initial forbidden block containing 1’s; the + blocks with 1’s are treated analogously. By using the relation (ST )q 1 we − = may assume that there are no blocks of consecutive 1’s of length greater than ± q/2. The analog of Lemmas 11 and 13 in this case is simple: Ja,1j ,bK Ja q j 2 → − 1,( 1) − − ,b 1K for any j q/2. − − > Suppose first that q is even and that the first forbidden block begins with an, i.e.,

h x Ja0; a1,..., an 2, an 1,1 , an h, an h 1,...K, an 1 1, an h 1. = − − + + + − 6= + ≥ By applying Lemma 11 we rewrite x into either

h Ja0; a1,..., an 2, an 1 1,( 1) , an h 1, an h 1,...K if an h 2, or − − − − + − + + + ≥ h 1 Ja0; a1,..., an 2, an 1 1,( 1) − , an h 1 1, an h 2,...K if an h 1 − − − − + + − + + + = (here an h 1 1). If this rewriting did not produce a new forbidden block we are + + 6= done, so suppose that a new forbidden block was created. Note that unless q 4 = and an an 1 1 (this case will be treated in Lemma 19), we have an h 2 and = + = + ≥ h 1 or an h 1 and h 2. In this case there is a nonempty block of 1’s starting ≥ + = ≥ − at position n and any new forbidden block has to either end before or begin after the block of 1’s. − If the new forbidden block appears to the left of position n it clearly has to end with an 1 1, but sign(an 1) sign(an 1 1), so any such forbidden block also − − − = − − had to be forbidden before the rewriting, contradicting the assumption about the position of the first forbidden block in x. Any new forbidden block beginning directly after the 1’shas to begin with 1, so rewriting it will only change the last − + 1 to 2 and there are at least two digits between an 2 and any new forbidden − − − blocks. Now suppose that q 5 is odd. There are two different types of forbidden ≥ blocks, but their treatments are similar. Assume first that we have

h 1 x Ja0; a1,..., an 2, an 1,1 + , an h 1,...K, an 1, an h 1 1, = − − + + − + + 6= then by Lemma 13 we rewrite x into

h x1 Ja0; a1,..., an 2, an 1 1,( 1) , an h 1 1,...K. = − − − − + + −

There are four possibilities for the creation of a new forbidden block in x1: 1. If the forbidden block ends at an 1 1, then it was also forbidden in x, − − since sign(an 1) sign(an 1 1), contradicting the assumption that the − = − − first forbidden block began with an. 2. If the forbidden block ends at ( 1)h, then x Ja ; a ,...,( 1)h , 2,( 1)h , − 1 = 0 1 − − − an h 1 1,...K, with an h 1 2 and an 1 an 2 h 1, so the for- + + − h 1 + + ≤ − − =···= − − = − bidden block J( 1) + K beginning at an 2 h would have been present in x, − − − also contradicting the assumption on the first forbidden block. h 3. If the new forbidden block begins at ( 1) , then we have an 2h 2 2 − h 2 + + ≤ − (an 2h 2 1, since otherwise x contains J( 1) + K and h 2 q/2) and + + 6= − − + > JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 590 DIETER MAYER AND FREDRIK STRÖMBERG

h h x1 Ja0; a1,..., an 2, an 1 1,( 1) , 2,( 1) , an 2h 2,...K. Rewriting gives = − − − − − − + + h h x2 Ja0; a1,..., an 2, an 1,1 , 2,1 , an 2h 2 1,...K. = − − + + +

Since an 1 1, any new forbidden block in x2 must begin with an 2h 2 − 6= + + + 1 1, in which case rewriting it only changes = − h h h h 1 J..., an 1,1 ,2,1 ,...K to J..., an 1,1 ,2,1 − ,2,...K − −

andthere are at least four digitsbetween an 2 and any new forbidden block. − 4. If the forbidden block begins after the ( 1)h, then − h h 1 x Ja0; a1,..., an 2, an 1 1,( 1) ,1 + ,...K, or 1 = − − − − h h h x Ja0; a1,..., an 2, an 1 1,( 1) ,1 ,2,1 , an 3h 2 ...K 1 = − − − − + + with an 3h 2 1. Rewriting this forbidden block thus changes the last 1 + + ≥ − to 2 and there are at least two digits between an 2 and any new forbidden − − block. In the second case, assume that we have

h h x Ja0; a1,..., an 2, an 1,1 ,2,1 , an 2h 1,...K, an 1 1, an 2h 1 1. = − − + + − 6= + + ≥ Then by Lemma 13, we can rewrite x into either

h h x2 Ja0; a1,..., an 2, an 1 1,( 1) , 2,( 1) , an 2h 1 1,...K = − − − − − − + + − if an 2h 1 2 or + + ≥ h h 1 x3 Ja0; a1,..., an 2, an 1 1,( 1) , 2,( 1) − , an 2h 2 1,...K = − − − − − − + + − if an 2h 1 1. If x2 or x3 contains a new forbidden block, a similar argument as + + = above tells us that it must begin with either with an 2h 1 1 1 or an 2h 2 1 1, + + − = + + − = in which case rewriting it will only change the last 1toa 2 if h 2 or the 2 − − ≥ − to a 3 if h 1. In all cases there are at least 3 digits between an 2 and any new − = − forbidden block. We have shown that we can rewrite any forbidden block without changing an 2 or anydigit totheleft of it andafterthis rewritinganynew forbidden blocks − are separated from an 2 by at least 2 digits. A recursive application of the above − argument thus shows that in any case any further rewriting will not change the head x(m 2). − LEMMA 19. Let q 4 and suppose that = l 2 k x Ja0; a1, a2,..., an l 1,( 2) ,( 1) ,( 2) , an k 2,...K = − − ± ± ± + + has preciselyone forbidden block, which begins with an an 1 1, and suppose = + = ± that an l 1, an k 2 2. Then a complete rewriting of this forbidden block does − − + + 6= ± not affect the head x Ja0; a1,..., an mK, where m 0 if l 0, m 3 if l 1 (n m) = − = = = ≥ and k 0 and m min−(k 3,l 3) otherwise. In all cases we assume that n m. = = + + ≥ JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 SYMBOLICDYNAMICSFORTHEGEODESICFLOWON HECKE SURFACES 591

Proof. Suppose without loss of generality that

l 2 x Ja0; a1,..., an l 1,2 ,1 , an 2,...K = − − + with n l 1 1, an an 1 1, an l 1 2 and an 1 1. If l 0 then an 1 1. ≥ + ≥ = + = − − 6= − 6= = − 6= The case of ( 1)2 is analogous. − If l 0, then one rewriting of x produces x Ja0; a1,..., an 1 1, an 2 1,...K, = 0 = − − + − which does not contain a new forbidden block unless an 2 2. If an 2 2 and + = + = an 3 2, the new forbidden block is of the type covered in Lemma 18 and rewrit- + ≥ ing it completely does not change x(n 2). If an 2 2and an 3 1, then an 4 1 2 − + = + = + ≤ − and x Ja0; a1,..., an 1 1,1 , an 4 ...K, which is rewritten into x Ja0; a1,..., 0 = − − + 1 = an 1 2, an 4 1,...K; this contains no forbidden block, and hence x is not − − + − (n 2) changed. − Suppose that l 1. If an 2 1, one rewriting produces Ja0; a1,..., an l 1, l 1 ≥ + ≤ − − − 2 − ,1, an 2 1,...K, which contains no forbidden block and does not change + − x(n 2). − If an 2 3, then two rewritings produce Ja0; a1,..., an 2 1, 1, an 2 2,...K if + ≥ l 2 − − − + − l 1 and x2 Ja0; a1,..., an l 1,2 − ,1, 1, an 2 2,...K if l 2. The first rewrit- = = − − − + − ≥ ten λ-fraction does not contain any forbidden block but the second may contain a new forbidden block if an 2 3 and an 3 1. If an 2 3 and an 3 2 this is a + = + ≥ + = + ≥ forbidden block of the type J1,mK with m 2 and by Lemma 18 we can rewrite ≥ it completely without changing x . If an 2 3 and an 3 1, then an 4 1 (n 3) + + + − l=2 = ≤ − and we can rewrite x2 into Ja0; a1,..., an l 1,2 − ,1, 2, an 4 1,...K, which con- − − − + − tains no forbidden block, without changing x(n 3). − The remaining case is when an 2 2. Assume that + = l 2 k x Ja0; a1,..., an l 1,2 ,1 ,2 , an k 2,...K = − − + + 2 with an l 1, an k 2 2 and k 1. It is easy to see that J2,1 ,2K is rewritten 2− − + + 6= ≥ l k 2 into J1 K, so if l k we rewrite x in k steps into x3 Ja0; a1,..., an l 1,2 − ,1 , ≥ = − − an k 2,...K, which, as has been shown above, can be rewritten completely with- + + 2 out changing x n k 3 (the last 2 before the 1 is an (k 1)). If l k, we rewrite x ( ) − + − − 2 k l < in l steps into Ja0; a1,..., an l 1,1 ,2 − , an k 2,...K, which is then rewritten into − −k l 1 + + x4 Ja0; a1,..., an l 1 1,1,2 − − , an k 2,...K. If either k l 2 or k l 1 and = − − − + + ≥ + = + an k 2 3, then x4 contains a new forbidden block of the type J1,mK with m 2 + + ≥ ≥ which, by Lemma 18, can be rewritten completely without changing x(n l 2). − − 2 If k l 1 and an k 2 1, then an k 3 1 and x4 Ja0; a1,..., an l 1 1,1 , = + + + = + + ≤ − = − − − an k 3,...K, which we have shown can be rewritten completely without changing + + x(n l 2). − − l 2 k We have shown that the forbidden block in x Ja0; a1,..., an l 1,2 ,1 ,2 , = − − an k 2 ...K can be rewritten completely without changing x(n m , where m 2 + + ) = if l 0 and m 3 if l 1 and k 0, respectively, m min(−l 3,k 3) other- = = ≥ = = + + wise. (Of course we can do better in certain cases but we are mainly interested in whether m is finite or not.)

JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 592 DIETER MAYER AND FREDRIK STRÖMBERG

LEMMA 20. Let q 3 and suppose that x Ja ; a ,...K has only one forbidden = = 0 1 block, which begins at a . Assume x contains at most one digit 1. Then a com- n ± plete rewritingof x does not change the head x , wherem min(l 3,k 4), (n m) = + + if − l k x Ja0; a1,..., an l 1,( 3) , 2, 1,( 3) , an k 2,...K, l,k 0, = − − ± ± ± ± + + ≥ with an l 1 2, 3 and an k 2 3 and m 3 otherwise. We assume in all − − 6= ± ± + + 6= ± = cases that n m. ≥ Proof. Assume without loss of generality that a 1. The case of a 1 is n ≥ n ≤ − analogous. There are three different forbidden blocks to consider. Suppose first that x Ja0; a1,..., an 2, an 1,1, an 1,...K, = − − + where an 1 1,2, an 1 1 and if an 1 2 then sign(an 2) 1. By Lemma − 6= + 6= ± + = ± + = ∓ 13, we rewrite x into x Ja0; a1,..., an 2, an 1 1, an 1 1, an 2,...K. Then, 0 = − − − + − + since sign(an 1) sign(an 1 1), there can be no new forbidden block ending − = − − at an 1 1, so there are only three possibilities to create a new forbidden block: − − either an 1 3 and an 1 2 or an 1 3 and an 2 2 or an 1 2: − = + ≥ + = + ≥ + = 1. If an 1 3, then x Ja0; a1,..., an 2,2, an 1 1, an 2,...K, and if an 1 − = 0 = − + − + + ≥ 3, we rewrite x into x Ja0; a1,..., an 2 1, 2, an 1 2, an 2,...K and if 0 1 = − − − + − + an 1 2 into x Ja0; a1,..., an 2 1, an 2 2, an 3,...K. Since an 2 1 + = 2 = − − + − + − 6= − and an 2 2 in x , there can not be any new forbidden blocks in x . Since + ≤ − 2 2 the tail Jan 1, an 2,...K does not contain any more forbidden blocks, we + + can only obtain a new forbidden block in x if an 1 4 and an 2 2 or 1 + = + ≥ an 1 3. + = (a) If an 1 4 and an 2 2, then x Ja0; a1,..., an 2 1, 2,2, an 2,...K, + = + ≥ 1 = − − − + which is rewritten as Ja0; a1,..., an 2 1, 3, 2, an 2 1,...K, and there − − − − + − are at least 3 digits between an 3 and any new forbidden block. − (b) If an 1 3, then x Ja0; a1,..., an 2 1, 2,1, an 2,...K, which is rewrit- + = 1 = − − − + ten as Ja0; a1,..., an 2 1, 3, an 2 1, an 3,...K, and there are at least 2 − − − + − + digits between an 3 and any new forbidden block. − 2. If an 1 3, an 1 3, and an 2 2, then x Ja0; a1,..., an 2, an 1 1,2, − 6= + = + ≥ 0 = − − − an 2,...K is rewritten as x Ja0; a1,..., an 2, an 1 2, 2, an 2 1,...K and + 3 = − − − − + − there are at least 3 digits between an 3 and any new forbidden block. − 3. If an 1 3, an 1 2, then x Ja0; a1,..., an 2, an 1 1,1, an 2,...K is rewrit- − 6= + = 0 = − − − + ten as x Ja0; a1,..., an 2, an 1 2, an 2 1, an 3,...K and, since an 2 2, 4 = − − − + − + + ≤ − there are at least 3 digits between an 3 and any new forbidden block. − We have shown that a single rewriting of a forbidden block of the type 1 does ± not change the λ-fraction more than two steps to the left of the beginning of the forbidden block. The second type of forbidden block is:

x Ja0; a1,..., an 1,2, an 1, an 2,...K, an 1 1,2, = − + + − 6= ± an 1 2, and we rewrite x into x Ja0; a1,..., an 1 1, 2, an 1 1, an 2,...K. + ≥ 5 = − − − + − + Then any new forbidden block in x must begin with an 1 2 or an 1 3 and 6 + = + = an 2 2. For an 1 2 rewriting leads to x Ja0; a1,..., an 1 1, 3, an 2 + ≥ + = 6 = − − − + − JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 SYMBOLICDYNAMICSFORTHEGEODESICFLOWON HECKE SURFACES 593

1, an 3,...K, which does not contain any new forbidden block since an 2 2. + + ≤ − For an 1 3, rewriting leads to x Ja0; a1,..., an 1 1, 3, 2, an 2 1, an 3,...K, + = 7 = − − − − + − + hence any more rewriting of newly appearing forbidden blocks does not change the head x(n 2). We have shown− that rewriting a single forbidden block of the type J1K or J2,bK with b 2 does not change the head x(n 3). ≥ − The third and most complicated type of forbidden block occurs when an 2 l k = and an 1 1. Suppose that x Ja0; a1,..., an 1 l ,3 ,2,1,3 , an 2 k,...K, with + = = − − + + l,k 0, an 1 l 2,3, an 2 k 3. By Lemma 13, it is clear that J3,2,1,3K is rewrit- ≥ − − 6= + + 6= ten into J2,1K and using this recursively we get different three cases depending on if l k, k or k. < = > l k 1. If l k, then x is rewritten first into J..., an 1 l ,3 − ,2,1, an 2 k ,...K and > l k 1 − − + + then into y Ja0; a1,..., an 1 l ,3 − − ,2, an 2 k 2,...K, which may con- 0 = − − + + − tain a new forbidden block beginning with the 2, but an 2 k 2 1, and + + − 6= we have shown above that a forbidden block of the type J2,mK with m 2 ≥ can be rewritten without changing any element in the sequence more than two steps to the left of the forbidden block. Hence we can rewrite any new

forbidden block without changing the head x(n k 4). 2. If l k, then x is first rewritten into − − < k l J..., an 1 l ,2,1,3 − , an 2 k,...K, − − + + k l 1 next into Ja0; a1,..., an 1 l 1,1,3 − − , an 2 k,...K, and then finally into − − − + + k l 2 y Ja0; a1,..., an 1 l 2,2,3 − − , an 2 k,...K 1 = − − − + +

if k l 2 or y Ja0; a1,..., an 1 l 2, an 2 k 1, an 3 k,...K if k l 1. ≥ + 2 = − − − + + − + + = + k l 3 (a) If k l 2, we rewrite y into y Ja0; a1,..., an 1 l 3, 2,3 − − , > + 1 3 = − − − − an 2 k,...K, which can only contain a new forbidden block if k l 3 + + = + and an 2 k 2, and so we have shown that rewriting such a forbid- + + ≤ − den block does not affect the sequence more than two steps to the left.

Thus any further rewriting can not change the head x(n 3 l). − − (b) If k l 2 and an 2 k 2, we rewrite y Ja0; a1,..., an 1 l 2,2, = + + + ≥ 1 = − − − an 2 k,...K into y Ja0; a1,..., an 1 l 3, 2, an 2 k 1,...K, so any + + 4 = − − − − + + − new forbidden block in y either begins with an 2 k 1 1 or with 4 + + − = an 1 l 3 1. If it begins with an 1 l 3 1, then y is rewritten − − − = − − − = 4 as y Ja0; a1,..., an 2 l 1, 3, an 2 k 1,...K, which can only have 5 = − − − − + + − a new forbidden block beginning with an 2 k 1 1 1. In the case + + − − = where an 2 k 1 1 1, we have shown that rewriting such a forbidden + + + − = block does not affect the sequence more than two steps to the left and

thus, in both cases, a complete rewriting will not change x(n 3 l). − − 3. If k l, then x is first rewritten into Ja0; a1,..., an 1 l ,2,1, an 2 k,...K, then = − − + + into z0 Ja0; a1,..., an 1 l 1, an 2 k 2,...K, and since an 1 l 2,3 and = − − − + + − − − 6= an 2 k 3, any new forbidden block must either begin with an 2 k 2 + + 6= + + − = JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 594 DIETER MAYER AND FREDRIK STRÖMBERG

0,2. In the case where an 2 k 2, we get + + =

z1 Ja0; a1,..., an 1 l an 3 k 1, an 4 k,...K and an 4 k 2, = − − + + + − + + + + ≤ − so any new forbidden block has to be of the form an 1 l an 3 k 1 − − + + + − = 1 or an 1 l an 3 k 1 2. In both cases we have a forbidden block ± − − + + + − = − which we have shown is possible to rewrite without changing the sequence more than two steps to the left, hence rewriting does not change the head

x(n 4 l). − − We conclude that for all three types of forbidden blocks, a complete rewriting of the initial forbidden block leaves the head x unchanged with m 3 unless (n m) = m min(l 3,k 4) and − = + + l k x Ja0; a1,..., an 1 l ,3 ,2,1,3 , an 2 k,...K. = − − + +

3.3. Dual regular λ-fractions. To encode the orbits of the geodesic flow in terms of a discrete invertible it turns out that we still need another kind of λ-fraction, the so-called dual regular λ-fraction. In the case q 3 this = was already introduced by Hurwitz [22], see also [25, p. 102]. Consider the set of λ-fractions y J0;b ,...K which do not contain any re- = 1 versed forbidden block, i.e., a forbidden block given in Definitions 11 or 13 read in reversed order. Let R be the largest number in this set and define r R λ and I [ R,R]. To = − R = − give an explicit expression for R we need to investigate the connection between ordering of points and their corresponding λ-fractions.

LEMMA 21. Let x, y I with c (x) [a , a ,...] and c y [b ,b ,...] and sup- ∈ q q = 1 2 q = 1 2 pose that x and y are notG -equivalent to λ/2 and that a b . Then x y if q ± ¡ ¢ 1 6= 1 < and only if b 0 a or b a 0 and a b . For one-digit λ-fractions, this 1 < < 1 1 1 > 1 < 1 ordering is simply given by

[1] [2] 0 [ 2] [ 1]. < <···< <···< − < − n 1 Proof. Consider ϕn (x) ST (x) nλ− x . Then = = + 2 2 ϕn Iq − , − [ln,rn] = λ(2n 1) λ(2n 1) = · ¸ ¡ ¢ − + and the intervals [ln,rn] only overlap at their endpoints, which are images of λ/2. It is also easy to verify that r r if and only if m 0 n or mn 0 and ± n < m < < > n m. Since x ϕ I and y ϕ I , the lemma follows. < ∈ a1 q ∈ b1 q

LEMMA 22. Let x Ja¡ 1,...,¢ an 1, aK, y¡ ¢Ja1,..., an 1,bK,andx, y the correspond- = − = − ing points. If [a2,..., an 1, a] and [a2,..., an 1,b] are both regular, then x y if − − < andonlyif b 0 a orab 0 and a b. < < > < Furthermore, if y Ja1,..., an 1K then x y ifandonlyif a 0. = − < >

JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 SYMBOLICDYNAMICSFORTHEGEODESICFLOWON HECKE SURFACES 595

m 1 2 Proof. First consider ϕm (x) ST x − . Then ϕ′ (x) (mλ x)− 0 = = mλ x m = + > for all x mλ, so ϕ is increasing and positive+ in ( , mλ) and increasing 6= − m −∞ − and negative in ( mλ, ). Hence ϕ (x) ST mx ϕ y ST m y if and only if − ∞ m = < m = either y mλ x or x y. ¡ ¢ < − < a j < To prove the last equivalence, define z A (0) and proceed as above: j = j A ST a (0) A (0) ST a1 x ST a1 z 1 < 1 ⇔ 1 < 1 ⇔ ··· an 1 a an 1 a ST − ST (0) ST − (0) ST (0) 0 a 0. ⇔ < ⇔ < ⇔ >

Using Lemmas 21 and 22 it is easy to prove the following Lemma.

LEMMA 23. Let x, y R have the following infinite λ-fractions: ∈ c (x) [a ; a , a , a ,...] and c y [b ;b ,b ,b ,...]. q = 0 1 2 3 q = 0 1 2 3 Then x y if and only if either a b or a¡ ¢ b for i 0,...,n 1 and either < 0 < 0 i = i = − b 0 a or a b 0 and a b for some n 1. n < < n n n > n < n ≥ Proof. For j 1, define ≥ a j a j 1 am b j b j 1 bm x j lim ST ST + ST and y j lim ST ST + ST m m = →∞ ··· = →∞ ··· and observe that we have x , y I for all j 1. It is clear that if a b , then j j ∈ q ≥ 0 < 0 x y, and if a b , then x y. Suppose that a b . If x y then there exists a < 0 > 0 > 0 = 0 6= smallest n 1 such that a b and a b for 0 i n 1. Hence, just as in the ≥ n 6= n i = i ≤ ≤ − previous proof of Lemma 22, x y if and only if x y x y . Since < 1 < 1 ⇔··· ⇔ n < n x , y I have infinite λ-fractions we can apply Lemma 21 to see that x y n n ∈ q n < n b 0 a or a b 0 and a b . ⇔ n < < n n n > n < n LEMMA 24. The number R is given by the regular λ-fraction

h 1 [1;1 − ,2], for q even, h h 1 R [1;1 ,2,1 − ,2], for q 5odd, =  ≥ [1;3], for q 3. =  Proof. To obtain the largest number without reversed forbidden blocks we use Lemma 22 recursively, i.e., the largest one-digit λ-fraction is J 1K and J( 1)2K is − − the largest two-digit λ-fraction, etc. For q 3 J( 1)hK is the largest h-digit λ- 6= − h 1 fraction without reversed forbidden blocks, but since J( 1) + K is forbidden and − JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 596 DIETER MAYER AND FREDRIK STRÖMBERG reversely forbidden the largest h 1-digit λ-fraction without reversed forbidden + blocks is J( 1)h , 2K. Continuing like this inductively and observing that the λ- − − fraction without the first 1 is always regular,we obtain the following expressions − for R: R J0;( 1)h , 2,( 1)h 1K for even q, = − − − − R J0; 2, 3K for q 3, and = − − = R J0;( 1)h , 2,( 1)h , 2,( 1)h 1K for odd q 5. = − − − − − − ≥ The Lemma then follows by rewriting these λ-fractions recursively into regular λ-fractions using Lemmas 11 and 13.

LEMMA 25. For even q we have the identityR 1. = Proof. Consider the action of S on R:

SR [0;1h,2,1h 1] [ 1;( 1)h 1 , 2] R. = − = − − − − = − Hence 1/R R and since R 0 we must have R 1. − = − > = LEMMA 26. For odd q we have λ/2 R 1 and < < h 1 a) R (TS) + R, − = b) R2 (2 λ)R 1 0 + − − = Proof. From the explicit expansions of λ/2 and 1 in Lemmas 5 and 6 together with the expansions of R in Lemma 24, it follows from Lemmas 22 and 23 that λ/2 R 1. By rewriting as in Lemma 13 for q 5 we get < < ≥ h 1 h 1 h h 1 h h 1 SR J0;1 + ,2,1 ,2,1 K [ 1;( 1) − , 2,( 1) , 2,( 1) , 2] = − = − − − − − − − − 1 1 h 1 2 1 h 1 and deduce that R ST − ST − − ST − T ( R) ST − + ( R), and hence h 1 = − = − R (TS) + R, which is identity a). A similar rewriting works for q 3. Using − = ¡ ¢ ¡ ¢ = the following explicit formula for the matrix (TS)n (cf. ,e.g., [8, p. 1279])

n 1 Bn 1 Bn nπ (2) (TS) + − , whereBn sin = sin2 π/q Bn Bn 1 = q µ − − ¶ h 1 R 1 and some elementary trigonometry gives (TS) + R − + R which = R λ 1 = − implies identity b). See also [8, Lemma 3.3]. − + −

REMARK 27. Using the representation (2), one can also show that the map Ar fixing r R λ is given by = − 2 h 1 h 1 2 2λ λ 2λ Ar (ST ) + T (ST ) T − − 2 for odd q = = (2 λ)2 λ 2 λ − µ + ¶ and 2 3 h 1 2 1 2 λ 5λ 3λ Ar (ST ) − ST − − 2 for even q. = = 4sin2 π/q λ 2 λ µ + ¶

JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 SYMBOLICDYNAMICSFORTHEGEODESICFLOWON HECKE SURFACES 597

DEFINITION 28. Let y Jb0;b1,...K be a finite or infinite λ-fraction. Set y = 1 = j 1 J0;b1,...K, y σ − y J0;b j ,...K and y j , j 1, the corresponding point in R. j = 1 = ≥ Then y is said to be a dual regular λ-fraction if and only if it has the following properties: (D1) if b 0 y I , 0 = ⇒ ∈ R (D2) if b 0 y sign(b )[r,R], and 0 6= ⇒ 1 ∈ 0 (D3) y j 1 sign y j [r,R] for all j 1. + ∈ − ≥ A dual regular λ-fraction is denoted¡ by¢ [b0;b1,...]∗, the space of all dual regular A A λ-fractions by q∗, and the subspace of all infinite sequences in q∗ with leading A 0 by 0,∗q . Uniqueness of a subset of dual regular λ-fractions is again established using a generating map.

DEFINITION 29. Let be the floor function from Definition 7 and consider the ⌊·⌋ shifted nearest λ-multiple function y ∗ y/λ R/λ if y 0and y ∗ y/λ r/λ 〈 〉λ = ⌊ + ⌋ ≤ 〈 〉λ = ⌊ − ⌋ if y 0. For I [ R,R], we define the map F ∗ : I I by > R = − q R → R 1 y 1 y / / λ∗λ, y IR\{0}, Fq∗ y − −〈− 〉 ∈ = (0, y 0. = LEMMA 30. For y R, the following algorithm produces a finite or infinite dual ∈ regular λ-fraction c∗ y [b ;b ,...]∗ corresponding to y: q = 0 1 (i) Let b0 y λ∗ and¡ ¢ y1 y b0λ. =〈 〉 1= − 1 (ii) Set y j 1 Fq∗ y j b j λ, i.e., b j ∗, j 1. + = = − y j − = 〈− y j 〉λ ≥ If y 0 for some j the algorithm stops and one obtains a finite dual regular λ- j = fraction.

Proof. It is easy to verify that y ∗ 0 if and only if y I and that in general 〈 〉λ = ∈ R x x ∗ [r,R] for x R and x x ∗ [ R, r ] for x R. It is thus clear that −〈 〉λ ∈ ≥ −〈 〉λ ∈ − − ≤ − (D1) and (D2) are automatically fulfilled and it follows that F ∗ maps [ R,0] into q − [r,R] and [0,R] into [ R, r ]. Hence condition (D3) is also satisfied. − − REMARK 31. We say that Fq∗ is a generating map for the dual regular λ-fractions A and it is easily verified that Fq∗ acts as a left shift map on 0,∗q . It is easily seen that the points affected by the choice of floor function appear- ing in ∗ (e.g., λ/2 in the regular case) are exactly those that are equivalent to 〈·〉λ ± r . Hence we obtain the following corollary. ± COROLLARY 32. If y has an infinite dual regular λ-fraction expansion which is not equivalent to the expansion of r, then it is uniqueand is equalto c∗ y . ± q LEMMA 33. A λ-fraction y Jb ;b ,...K is dual regular if and only if the sequence¡ ¢ = 0 1 y does not contain any reversed forbidden blocks. Therefore y y if b0 0 and 0 0 = = y S y J0;b0,b1,...K if b0 0. 0 = = 6=

JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 598 DIETER MAYER AND FREDRIK STRÖMBERG

Proof. For both even and odd q, we use Lemma 21, 22, and 23 to compare points based on their λ-fractions. We give the details for the case of forbidden blocks containing 1’s. The case of 1’s is analogous. + − Consider q even and a reversed forbidden block of the form Jm,1hK with m h ≥ 1. If y contains such a forbidden block, we have y Jb j ,1 ,bh j 1,...K 0 for 0 j = + + < h h 1 some j 0 and b j 1. Hence y J1 ,bh j 1,...K [1 − ,2] r , i.e., y j 1 ≥ ≥ j 1 = + + < = + ∉ [r,R] so by Definition 28 (D2) (if j + 0) or (D3) (if j 0) y is not dual regular. = > h 1 Consider q odd. If y contains a reversed forbidden block of the form J1 + K, 0 h 1 h h h 1 then y is not dual regular since J1 + K [1 ,2,1 ,2,1 ]∗ R. If y con- 0 < − = − 0 tains a reversed forbidden block of the form Jm,1h,2,1h K with m 1, then y ≥ j = h h h h Jb j ,1 ,2,1 ,b j 2h 2,...K 0 for some b j 1 and j 0. Hence y J1 ,2,1 , + + j 1 < ≥ ≥ + = b j 2h 1,...K r , i.e., y j 1 [r,R], so by Definition 28 (D2) (if j 0) or (D3) (if + + < + ∉ = j 0) y is not dual regular. > In the other direction, suppose that y Jb ;b ,...K does not contain any re- = 0 1 versed forbidden blocks. It is clear that if b0 0, then y y and y y0 [ R,R] = 0 = = ∈ − so y is dual regular. Suppose that b0 0. Then y Jb0,b1,b2,...K and y 6= 0 = j = Jb j ,b j 1,...K. Suppose that y does not contain any reversed forbidden block + 0 h h 1 and that b j 0. If q is odd, then y J1 ,2,1 − ,2,...K r , and if q is even, > j 1 > ≥ h 1 + then y J1 − ,2,...K r . Hence y j 1 [r,R]. Similarly, if b j 0 we see that j 1 + + > ≥ ∈ < y j 1 [ R, r ]. + ∈ − − LEMMA 34. An infinite λ-fraction without reversed forbidden blocks converges. Proof. This follows from the convergence of infinite regular λ-fractions using re- writing. Note that the only case in which rewriting gives a divergent λ-fraction is if we produce an infinite sequence of new forbidden blocks all beginning at the same position. From the proofs of Lemmas 18, 19, and 20, it is easy to see that this only occurs for the λ-fraction x if either q 4 and x has the tail J12,2,1K or = q 3 and x has the tail J1,3K. These two tails both contain reversed forbidden = blocks and hence can not occur.

REMARK 35. Just as the regular λ-fractions are equivalent to the reduced Rosen λ-fractions, one can show that the dual regular λ-fractions are essentially equiv- alent to a particular instance of so-called α-Rosen λ-fractions, see [10] and [34] (in the case where q 3). Note that y ∗ y/λ 1 R/λ for y 0. Hence F ∗x = 〈 〉λ = ⌊ + − ⌋ > q = T (x) with α R for x 0, where T is the generating map of the α-Rosen frac- α = λ < α tions of [10]. 3.4. Symbolic dynamics and natural extensions. An introduction to symbolic dynamics and coding can be found in e.g., [28]. One may see also [4, 47]or[4, Appendix C]. Our underlying alphabet is infinite, N Z∗ Z\{0}. The dynam- N Z N = = ical system + ,σ+ is called the one-sided full shift. Since the forbidden − blocks (cf. Definitions 11 and 13) imposing the restrictions on A and A all ¡ ¢ 0,q 0,∗q JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 SYMBOLICDYNAMICSFORTHEGEODESICFLOWON HECKE SURFACES 599

A A have finite length, it follows that 0,q ,σ+ and 0,∗q ,σ+ are both one-sided sub- shifts of finite type (cf. [4, Thm. C7]). ¡ ¢ ¡ ¢ One can show that c : I A and c∗ : I A ∗, as given by Lemmas 8 q q → q q R → q and 30, are continuous (with respect to the metric h˜ defined in Section 3.1) and we call these the regular and dual regular coding map, respectively. Let

R∞ x R c∗ (x) infinite R\G ( ) be the set of “G -irrational points” and = ∈ | q = q ∞ q set I ∞n Iα R∞ for α q,Ro. Since the set Gq ( ) of cusps of Gq is countable, it is α = ∩ = ∞ clear that the Lebesgue measure of I ∞ is equalto thatof I , α q,R. By Corollar- α α = ies 10 and 32, it follows that the restrictions c : I ∞ A and c∗ : I ∞ A ∗ are q q → 0,q q R → 0,q c c 1 A c c 1 A homeomorphisms. Since σ+ q Fq −q on 0,q and σ+ ∗q Fq∗ ∗q − on 0,∗q , = ◦ ◦ A A = ◦ ◦ it follows that the one-sided subshifts 0,q ,σ+ and 0,∗q ,σ+ are topologically conjugate to the abstract dynamical systems¡ Iq∞¢ ,Fq ,¡ and IR∞¢,Fq∗ , respectively (see [4, p. 319]). ³ ´ ³ ´ Z Consider the set of regular bi-infinite sequences B A ∗ A Z con- q ⊂ 0,q × 0,q ⊂ sisting of precisely those [...,b2,b1  a1, a2,...] which do not contain any forbid- den blocks. Then Bq ,σ is a two-sided subshift of finite type extending the one- 1 sided subshift A ,σ+ , where σ σ+ and σ− σ−. If c∗ y [b ,b ,...]∗ ¡0,q ¢ = = q = 1 2 ∈ A ∗ and c (x) [a , a ,...] A , we define the coding map 0,q q ¡= 1 2 ¢ ∈ 0,q ¡ ¢ Z C: I I Z by C x, y c∗ y c (x) [...,b ,b  a , a ,...]. q × R → = q q = 2 1 1 2 For a given bi-infinite sequence¡ ζ¢ [...,¡b¢,b  a , a ,...], we let ζ [a , a ,...] = 2 1 1 2 ( ) = 1 2 and ζ [b ,b ,...] denote the “future” and “past” respectively.+ In the next ( ) 1 2 ∗ − = section we will see that there exists a domain Ω I I such that C ↾Ω : Ω∞ ⊂ q × R ∞ → B is one-to-one and continuous (here Ω∞ Ω I ∞ I ∞, i.e., we neglect points q = ∩ q × R x, y where either x or y has a finite λ-fraction). The natural extension, F˜q , of Fq to Ω∞ is defined by the condition that Bq ,σ is topologically conjugate to ¡ ¢ 1 1 1 Ω∞,F˜ , i.e., by the relations σ+ C F˜ C− and σ− C F˜− C− , meaning q = ◦ q ◦¡ ¢ = ◦ q ◦ 1 ˜ 1 ˜ 1 that¡ Fq ¢x, y Fq x, − with a1 1/x λ and Fq− x, y − ,Fq∗ y = y a1λ = 〈− 〉 = x b λ + µ + 1 ¶ with b ¡ ¢1/y³∗. ´ ¡ ¢ 1 = 〈− 〉λ

3.5. Markov partitions for the generating map Fq . To construct a Markov par- tition of the interval Iq with respect to Fq we consider the orbits of the endpoints λ/2. For x I or y I we define the F -orbit and F ∗-orbit of x and y, respec- ± ∈ q ∈ R q q tively, as O j Z O j Z (x) {Fq x j } and ∗ y {Fq∗ y j }. = | ∈ + = | ∈ + By Lemma 5, it is clear that O ( λ/2) is a finite¡ ¢ set. Define κ #{O (λ/2)} 1 q 2 ± = − = − h for even q and κ q 2 2h 1 for odd q. Let λ/2 φ φ φ 2 = = − = + − = 0 < 1 <···< κ = 0 be an ordering of O ( λ/2) and set Ij φj 1,φj and I j Ij for 1 j κ. − = − − = − ≤ ≤ It is easy to verify that the closure of the intervals form a of I £ ¢ q for Fq , i.e., I j covers Iq , overlaps only at endpoints and Fq maps endpoints to endpoints.n Sinceo the alphabet N is infinite, there also exists another Markov

JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 600 DIETER MAYER AND FREDRIK STRÖMBERG

2 2 N partition of the form Jn λ(2−n 1) , λ(2−n 1) [ λ/2,0] J n with n and if = − + ∩ − = − − ∈ q 4 then n 1 and if q h 3 then n 2.i The map 1/x nλ restricted to Jn > ≥ = ≥ − − is expanding and bijective and maps the interval J for n 2 in the case q 3, n = = respectively for n 1 if q 3, not onto the entire interval I , which means the = > q Markov partition is not proper. 1 From the explicit formula of F˜q − it is clear that we also need to consider the orbits of the endpoints of [r,R]. From Lemmas 25 and 26 we see that ± # O ∗ ( R) κ 1. Set r R and let 0 r r r r R r be an − = + 0 = − > 1 > 2 >···> κ = > − = 0 ordering of O ∗ ( R) r j . One can verify that rκ 1 j Ij , 1 j κ. Define the © ª − = + − ∈ ≤ ≤ intervals R j r j ,R R j , 1 j κ, the rectangles Ωj Ij R j , 1 j κ = =© −ª − ≤ ≤ = × ≤ ≤ and finally the domain Ω Ω . We also set Ω Ω I I . £ ¤ j κ j ∞ q∞ R∞ ¯ ¯ = | |≤ = ∩ ∩ ¯ ¯ S h h 1 REMARK 36. For even q we have φ0 λ/2 [1 ], r [1 − ,2] and κ h where q 2 = − = = = h − (see Lemmas 5 and 24). For 1 j h it is then easy to verify that = 2 ≤ ≤ j h j φj Fq φ0 φ j [1 − ], = = − − = h j j 1 h 1 r F −¡ (r¢) [1 − ,2,1 ], j = q = − h 1 j h j Ij φj 1,φj 1 + − , 1 − I j , = − = = − − hh i h i´ R j £r j ,R ¢ R j . = = − −

£ ¤ h h h h 1 REMARK 37. For odd q 5 we have φ0 λ/2 [1 ,2,1 ], r [1 ,2,1 − ,2] and q 3≥ = − = = κ 2h 1 where h − (see Lemmas 5 and 24). It is then easy to verify that = + = 2 j h j h φ F φ [1 − ,2,1 ], 0 j h, 2j = q 0 = ≤ ≤ h j h 1 j φ2j 1 Fq +¡ φ¢ 0 [1 + − ], 1 j h 1, − = = ≤ ≤ + j h 1 h r2j 1 [1 ,2,¡1 −¢ ,2,1 ,2], 0 j h, + = ≤ ≤ j 1 h h 1 r [1 − ,2,1 ,2,1 ,2], 1 j h. 2j = − ≤ ≤ Hence

h j h h j I2j 1 φ2j ,φ2j 1 [1 − ,2,1 ],[1 − ] , 0 j h, + = + = ≤ ≤ £ ¢ h h 1 j h j ´h I2j φ2j 1,φ2j [1 + − ],[1 − ,2,1 ] , 1 j h, = − = ≤ ≤ Rk £[rk,R] R¢ kh,´ 1 k 2h 1. = = − − ≤ ≤ + For q 3 we have κ 1, φ 1/2 [2], φ 0 and r r [3]. Hence I = = 0 = − = 1 = 1 = = 1 = [ 1/2,0) I 1 and R1 [r,R] R 1. − = − − = = − −

To establish the sought correspondence between the domain Ω∞ and Bq , we first need a lemma.

LEMMA 38. r is thesmallestnumber y in I such that C x, y B for all x I . R ∈ q ∈ κ

JOURNAL OF MODERN DYNAMICS VOLUME¡ ¢2, NO. 4 (2008), 581–627 SYMBOLICDYNAMICSFORTHEGEODESICFLOWON HECKE SURFACES 601

h 1 Proof. Let q be even. We know from Lemma 24 and its proof that r [1 ,2]∗, = − h 1 B R [1,1 − ,2]∗ and φκ 1 φh 1 [1]. Hence C φh 1,r q and for R y − c = h − = C − = − ∈ −h 1≤ < r , ∗q y [1 ,bh 1,...]∗ and φh 1, y contains the forbidden block J1 + K. = + − ¡ ¢ h h 1 h 1 h Let¡ q¢ 5 be odd. Then r [¡1 ,2,1 ¢− ,2]∗, R [1,1 − ,2,1 ,2]∗ and φκ 1 ≥ h C =B − = c h h − = φ2h [2,1 ]. So φ2h,r q and if R y r , ∗q y [1 ,2,1 ,b2h 2,...]∗ = ∈ − ≤ < = + C h h and φ2h, y contains¡ the¢ forbidden block J1 ,2,1 ,2¡K.¢ We have shown that r is the smallest number such that C φκ 1,r does not contain a forbidden block ¡ ¢ − and it is also easy to show that C(x,r ) Bq for any x Iκ φκ 1,0 . The same ¡ ∈ ¢ ∈ = − argument applies to q 3. = £ ¢ LEMMA 39. x, y Ω∞ C x, y B . ∈ ⇔ ∈ q Proof. Just as¡ in the¢ proof of Lemma¡ ¢ 38, itis nothardtoverifythat r j is the small- est number in IR with a dual regular expansion which can be prepended to the regular expansion of φ and hence of all x φ ,0 . j ∈ j DEFINITION 40. To determine the first-return£ map¢ we introduce a “conjugate” region Ω∗ S˜(Ω∞), where S˜ x, y Sx, y , i.e., setting = = − I ∗ S I I ∞ ,¡ R¢∗ ¡ R ¢I ∞ and Ω∗ I ∗ R∗, j = j ∩ j j = − j ∩ R j = j × j ³ ´ we get Ω∗ Ω∗. = ∪ j

Thus Ω with Ω∞ as a dense subset is the domain of the natural extension F˜q of Fq . An example of Ω and Ω∗ is given in Figure 1. See[35] for another choice of 1 a “conjugate” Ω∗ of Ω using the maps x, y− and also [8] for the corresponding domain for the reduced Rosen fractions. In the case q 3, the domain Ω∗ was ¡ ¢ = considered also by Hurwitz in his reduction process for pairs of points under his continued-fraction expansion.

∗ ∗ ΩL Ω ΩR

FIGURE 1. Domains Ω and Ω∗ Ω∗ Ω∗ for q 7 = L ∪ R =

3.6. Reduction of λ-fractions. As a first step in our construction of a cross-sec- tion for the geodesic flow, we select a set of geodesics on H which contains at least one lift of each geodesic on M H /G , i.e., a set of “representative” or q = q “reduced” geodesics modulo Gq . For an overview and a discussion of different reduction procedures in the case of PSL2(Z), see [25, Sect. 3].

JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 602 DIETER MAYER AND FREDRIK STRÖMBERG

LEMMA 41. Let u v R∞ both have infinite λ-fractions. Then there exists B G 6= ∈ ∈ q such that (Bu,Bv) Ω∗. ∈ Proof. Set u′ Su 1/u and v′ Jv v. Assume without loss of generality = = − = = − that c u′ [a ; a , a ,...] and c∗ v′ [0;b ,b ,...]∗. We now extend the do- q = 0 1 2 q = 1 2 1 1 1 main of¡ definition¢ of F˜− from Iq I¡R to¢ R∞ IR by setting F˜− x, y − ,F ∗ y , q × × q = x bλ q 1 + b 1/y ∗. Note that x bλ 0 for x R∞, so F˜− x, y is well-defined.³ Then ´ = 〈− 〉λ + 6= ∈ q ¡ ¢ 1 b b ¡ ¢ F˜− u′, v′ ST 1 u′,T − 1 Sv′ , q = 1 2 ¡ ¢ ³ b2 b1 b´2 b1 (F˜− ) u′, v′ ST ST u′,T − ST − Sv′ , q = ¡ ¢ . ³ ´ . 1 n (F˜− ) u′, v′ S A Su′, J A Jv′ S˜ A (u, v) for n 1, q = n n = ◦ n ≥

bn ¡ bn 1 ¢ ¡ b1 ¢ m m where A T ST − S T S. It is easy to verify that JT J T − for any n = ··· = m Z. ∈ If a j b j 1, j 0,...,k 1 and ak bk 1 0, andwe take n k,it isclear that = − + = − + + 6= > un′ S AnSu′ has the formal λ-fraction un′ J0;bn,...,bk 2,bk 1 ak, ak 1,...K = = + + + + and vn′ J An Jv′ has the dual regular λ-fraction v′ [bn 1,bn 2,...]∗. To sim- = n = + + plify the notation, we assume k 0, i.e., a b 0. Since c u′ A and = 0 + 1 6= q ∈ q c∗ v′ A ∗, it is clear that any forbidden block in u′ must include the term q ∈ q n ¡ ¢ a b . Let n 1 be larger than the length of the largest forbidden block. If 0¡+ ¢1 0 ≥ q 5, then by Lemma 18 it is clear that we may choose n n large enough so ≥ ≥ 0 rewriting un′ into a regular λ-fraction does not change the beginning of ul′ ,upto bn n . − 0 If q 4 and it is not the case that u′ [ 1 b ;( 2)] and v′ [b , 1,( 2)]∗ = = ± − 1 ± = 1 ± ± for some b 1 (i.e., u′ and v′ have the same tail as r ), then by Lemma 19 ± 1 ≤ − ± we know that we can choose n large enough so we can rewrite un′ completely without changing the head u′ for some n0 0. (n n0) ≥ If q 3, then a 1 for j −0 and b 1 for all j . Hence there are only three = j 6= ± 6= j 6= ± kinds of forbidden blocks possible in u′ for q 3. Either the forbidden block n = starts with b 2 and (b a ) 1 or it starts with b a 1 or b a 2 2 = ± ± 1 + 0 ≥ 1 + 0 = ± 1 + 0 = ± and a 2. We can thus apply Lemma 20 and if v′ and u′ are not of the form ± 1 ≥ v′ [b ,2,3]∗ and u′ [1 b ;3] for some b 1, we can choose n large enough = 1 = − 1 1 ≤ − that rewriting u′ does not change the head u′ for some n0 0. n (n n0) ≥ After a complete rewriting (if necessary) which− does not change the head of A un′ up to bn n0 , we may assume that un′ [bn,bn 1,...,bn n0 , a˜1, a˜2,...] q and − A = − − ∈ v′ [bn 1,bn 2,...]∗ q∗. Hence n = + + ∈ C un′ , vn′ [...,bn 2,bn 1  bn,...,bn n0 , a˜1, a˜2,...], = + + − and because n0 ¡is larger¢ than the length of any forbidden block, it is clear that C u′ , v′ B , i.e., u′ , v′ Ω or equivalently S˜ u′ , v′ Ω∗. Hence S˜ u′ , v′ n n ∈ q n n ∈ n n ∈ n n = Ω bn bn 1 b1 S˜ S˜(A u, A v) (A u, A v) ∗ with A T ST − S T S G . ¡ n ¢ n = ¡ n n¢ ∈ n = ¡ ¢ ··· ∈ q¡ ¢ JOURNAL¡ OF MODERN¢ DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 SYMBOLICDYNAMICSFORTHEGEODESICFLOWON HECKE SURFACES 603

We now have to treat the special cases which are left. Without loss of general- ity we assume that we have forbidden blocks containing a 1, i.e., we assume the plus sign in the statement of the theorem. The case of a minus sign is analogous. Suppose that q 3, v′ [b1,2,3]∗, and u′ [1 b1;3] with b1 2 (since A = = = − ≤ − v′ q∗). Then we can rewrite v′ into the regular λ-fraction [b1 1, 3]. Hence ∈ 1 b − − u Su′ v′ v ST − 1 (r ), but we assumed that u v, so this case can not = = − = = 6= happen. Suppose that q 4, v′ [b1,1,2]∗, and u′ [1 b1;2] with b1 1 (since A = = = − ≤ − v′ q∗). Then we can rewrite v′ into the regular λ-fraction [b1 1, 2]. Hence ∈ 1 b − − u Su′ v′ v ST − 1 (r ), but we assumed that u v, so this case can not = = − = = 6= happen.

REMARK 42. In the previous lemma, we actually showed that for any u R∞, ∈ which in the cases q 3 or 4 is not G -equivalent to r , there exists a B G = q ± ∈ q such that (Bu,Bu) Ω∗. ∈

REMARK 43. For q 3 the previous lemma and remark should be compared with = Hurwitz [22, §7].

In fact, one can do slightly better than the previous Lemma by using the im- portant property of the number r that r and r are G -equivalent but not orbit- − q equivalent, i.e., O ∗ (r ) O ∗ ( r ) (cf. Lemmas 25 and 26). Using the explicit map 6= − identifying r and r , one can show that it is possible to reduce any geodesic to − one with endpoints in Ω∗ without the upper horizontal boundary.

LEMMA 44. If x, y Ω∗ and y has a dual regular expansion with the same tail ∈ as r thenthereexists A G such that Ax, Ay Ω∗ and Ay hasthesametailas − ¡ ¢ ∈ q ∈ r . ¡ ¢

Proof. Using F˜q we may assume that y r and Sx Iκ. Consider q even. Let 1 1 = − ∈ A : T − ST − with A ( r ) r (recall that R SR). Set y′ Ay r and x′ = − = − = = = 1 = Ax. By Remark 36, Iκ Ih [ 1/λ,0); hence if Sx Ih, then x λ, T − x 1 1 1 = = − 1 1∈ ≥ ≥ 0, ST − x 0, T − ST − x λ, and finally ST − ST − x (0,1/λ) I h. Hence < < − ∈ ⊆ − Sx′, y′ Ω∞. − ∈ Consider q 5 odd. There are three cases to consider if y r and Sx I¡ I ¢ ≥ 1 c = − ∈ κ 2h 1 φ2h,0 λ− 1 ,0 (cf. Remark 37): we have q (Sx) [a1, a2,...] = + = c = + j = with either a1 £ 3 or q¢ (Sx£) [2,1¢ , a j 2,...] for some 0 j h 1 for a j 2 1 or h≥ = + ≤ ≤ − 1 + 6=1 cq (Sx) [2,1 , ah 2,...] for ah 2 1. In the first case, set A T − , y′ T − y = 1 + + ≤ − =1 = = R and x′ T − x. Then Sx [ 1/3λ,0), x [3λ, ), x′ T − x [2λ, ), and − = ∈ − ∈ ∞ = ∈ ∞ Sx′ [ 1/2λ,0) [ λ/2,0). Hence Sx′,R Ω∞. In the second case, unless ∈ − ⊆ − ∈ 1 j h 1, ah 1 2, ah 2 a2h 1 1, and a2h 2 1, we also set A T − , = − + = + =···= +¡ = j 1¢ + ≥ = y′ R and x′ Ax. Thus cq Sx′ [1 + , a j 2,...] A0,q and it follows that = − = = + ∈ Sx′ [ λ/2,0) and Sx′,R Ω∞. ∈ − ∈ ¡ ¢ JOURNAL OF MODERN DYNAMICS¡ ¢ VOLUME 2, NO. 4 (2008), 581–627 604 DIETER MAYER AND FREDRIK STRÖMBERG

1 1 h 2 In the remaining two cases, set A T − ST − ST − , y′ Ay r and x′ = = = = Ax. Then ¡ ¢

1 h 1 2 2 j a2 j Sx′ S Ax ST − + ST − T (ST ) ST + (0) = = ··· 1 h 1 j a2 j a3 j ¡ ¢ ST − + − T + ST + (0). = ··· If j h, then cq Sx′ [a j 2 1,...] A0,q and¡ if j ¢h 1, ah 1 2, ah 2 = = + − ∈ h 1 = − + = + =···= a2h 1 1, and a¡2h 2¢ 1, then Sx′ J 1,1 + , a2h 1,...K, which is rewritten into + = h + ≥ = − + J 2,( 1) , a2h 1 1,...K. This is either regular or contains a new forbidden block − − + − beginning at a2h 1 1 1. In any case, by Lemma 18 it is clear that after rewriting + − = any forbidden block in Sx′ completely we get h h 1 cq Sx′ [ 2,( 1) , a2h 1 1,...] or cq Sx′ [ 2,( 1) − , 2,...], = − − + − = − − − and in both¡ ¢ cases C Sx′, y′ B◦ . ¡ ¢ − ∈ q If q 3 and y r then there are two possibilities: either Sx ( 1/2, 1/3) = = −¡ ¢ 1 2 ∈ − − or Sx [ 1/3,0). In the first case, we let A T − ST − so y′ Ay r and Sx′ 1 ∈ −2 = = = = ST − ST − x. Since x (2,3), ∈ 1 2 1 1 ST − ST − x ST − S (0,1) ST − ( , 1) S ( , 2) (0,1/2) , ∈ = −∞ − = −∞ − = 1 hence Sx′, y′ Ω∞. In the second case, let A T − . Then y′ r 1 R − 1 ∈ 1 = = − − = − and Sx′ ST − x ST − (3, ) S (2, ) ( 1/2,0), so Sx′, y′ Ω∞. ¡ = ¢ ∈ ∞ = ∞ = − − ∈ In all cases we have shown that Sx′, y′ Ω∞, i.e., x′, y′ Ω∗ and y′ R − ∈ ¡ ∈¢ = − or r . ¡ ¢ ¡ ¢ 3.7. Geodesics and geodesic arcs. If γ ξ,η is a geodesic in H oriented from η to ξ (cf. Section 1.1)and A PSL (R), we define the geodesic Aγ as Aγ γ Aξ, Aη . ∈ 2 ¡ ¢ = If ξ,η Ω∗, we associate to γ ξ,η a bi-infinite sequence (code) C˜ γ , ∈ ¡ ¢ ¡ ¢ C˜ γ : C ¡S˜ ξ,¢η c∗ (Sξ)c η B . ¡ ¢ = ◦ = q q − ∈ q DEFINITION 45. For an¡ ¢ oriented¡ geodesic¢ arc c on¡H ,¢ we let c denote the unique geodesic containing c and preserving the orientation, e.g., L {λ/2 i y y 0} 1 = + | > oriented upwards. Let c± denote the forward and backward end points of c and let c denote the geodesic arc with endpoints c±. Here c should not to be − − − 1 confused with the geodesic c with reversed orientation, denoted by c− . For z, w H ∂H , denote by [z, w] the geodesic arc oriented from z to w ∈ ∪ including the endpoints in H .

DEFINITION 46. Let B B n c q◦ ζ q (σ− ζ)( ) ∗q ( r ), n 0 = ∈ | − 6= − ∀ ≥ n o be the set of bi-infinite sequences which do not have the same past as r and let − Υ γ C˜ γ B◦ . = | ∈ q n ¡ ¢ o LEMMA 47. The coding map C˜ : Υ B◦ is a homeomorphism. → q

JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 SYMBOLICDYNAMICSFORTHEGEODESICFLOWON HECKE SURFACES 605

Proof. Υ is identified with the set of endpoints in Ω∗, the map S˜: Ω∗ Ω∞ in → Definition 40 is a continuous bijection, and by Corollaries 10 and 32 (respec- tively, Lemmas 39 and 44), it is clear that C: Ω∞ B is well-defined, continu- → q ous, and that each point ξ,η Ω∞ has a unique code unless η is equivalent to ∈ r , in which case it might have two codes. Since one of these is disregarded in ± ¡ ¢ the definition of B◦ , it is clear that C˜ C S˜: Υ B◦ is a homeomorphism. For q = ◦ → q the case of G PSL (Z), see also [25, p. 105]. q = 2

The set Υ contains representatives of all geodesics on H /Gq . This property is a corollary of the following lemma, which also provides a reduction algorithm.

LEMMA 48. Let γ be a geodesic on the hyperbolicupper half-plane with endpoints γ ,γ R∞, γ γ and γ [b0;b1,...]∗. Then there exists an integer n 0 and − + ∈ − 6= + − = ≥ A G such that ∈ q b b b γ′ AT − n S T − 1 ST − 0 γ = ··· 1 1 1 and C˜ γ′ B◦ . Here A is one of the maps Id, T − and T − ST − for even q, ∈ q 1 1 h 2 respectively¡ ¢ T − ST − ST − for odd q. Proof. This lemma¡ is¢ an immediate consequence of Lemmas 41 and 44. Note b0 n b0 bn b1 b0 that T − γ [b1,b2,...]∗ and Fq∗ T − γ T − S T − ST − γ . − = − = ··· −

COROLLARY 49. If γ∗ is a geodesic on H /Gq with all lifts having endpoints in 1 R∞, then Υ contains an element of π− γ∗ .

LEMMA 50. If, for ξ I , c (ξ) [a ,...,¡ a ¢] A , then ξ is the attracting fixed ∈ q q = 1 n ∈ 0,q point of the hyperbolic map A ST a1 ST a2 ST an with conjugate fixed point 1 c = A··· ξ∗ η− , where ∗q η [an, an 1,..., a1]∗ ∗ . Conversely, if ξ is an hyperbolic = = − ∈ 0,q fixed point of B G , then c (ξ) is eventually periodic. ∈ ¡ q¢ q 1 1 Proof. It is not hard to show that Aξ ξ and Aη− η− . Since η I , with = = ∈ R R 1 2/λ it is clear that ξ∗ ξ and hence A is hyperbolic. The other statement ≤ < 6= in the lemma is easy to verify by writing B in terms of generators, rewriting any forbidden blocks, and going through all cases of disallowed sequences, e.g., if B ends with an S.

Since the geodesic γ ξ,η is closed if and only if ξ and η are conjugate hy- perbolic fixed points and since r and r are G -equivalent, we conclude from ¡ ¢ − q Lemma 50 that there is a one-to-one correspondence between closed geodesics on M H /G and the set of equivalence classes, under the shift map, of purely q = q periodic regular λ-fractions except for the one containing r . − REMARK 51. Because Ω∞ only contains points with infinite λ-fractions, the set Υ does not contain lifts of geodesics which disappear out to infinity, i.e., with one or both endpoints equivalent to . The neglected set however corresponds to a ∞ set in T 1M of measure zero with respect to any probability measure invariant under the geodesic flow. See e.g., the introduction of [24].

JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 606 DIETER MAYER AND FREDRIK STRÖMBERG

B The subshift of finite type q◦ ,σ is conjugate to the invertible dynamical sys- tem Υ,F˜q . Here F˜q : Υ Υ³ is the´ map naturally induced by F˜q acting on Ω∞, →1 1 1 i.e., if γ γ ξ,η , then F˜± γ γ ξ′,η′ where ξ′,η′ S˜ F˜± S˜− ξ,η . Using ¡ = ¢ q = = ◦ q ◦ the same notation for both maps should not lead to any confusion. ¡ ¢ ¡ ¢ ¡ ¢ ¡ ¢ ¡ ¢ 3.8. Reduced geodesics.

DEFINITION 52. A geodesic γ ξ,η with ξ,η R∞ is said to be reduced if C˜ γ ∈ ∈ B◦ and ξ 3λ/2 or ξη 0. Denote by Υ the set of reduced geodesics and by q | | > < ¡ ¢ r ¡ ¢ Ω Ω Ω ˜ Ω Ω Ω Ω r∗ the corresponding set of ξ,η ∗. Then r∞ : S r∗ ∞ and r r∞ 2 ∈ = ⊆ = the closure of Ω∞ in R , i.e., Ω∞ Ω Ω∞, and B◦ C(Υ ) B◦ . r ¡ r =¢ r ∩ q,r =¡ ¢ r ⊆ q h 1 REMARK 53. We observe that for odd q, by Lemma 6, φκ 1 [2,1 ] − and − = = λ 1 thus 2/3λ φκ 1. For even q,on theother hand, φκ 1 1/λ and since+ 1/λ − < − − = − − < 2/3λ, we have φκ 1 2/3λ. Hence the shape of − − < − Ω∞ (u, v) Ω∞ u 2/3λor uv 0 r = ∈ | | | ≤ < differs slightly between even© and odd q. Set ª Λ : ( λ/2,0) [0,R], Λ : (0,2/3λ) [0, r ] for even q, 1 = − × 2 = × − and

Λ2 : 0,φκ 1 [0, r ], Λ3 : φκ 1,2/3λ [0,rκ 1] for odd q. = − × − = − × − Then ¡ ¢ ¡ ¢

Ω Ω r r (q = 6) (q = 5)

FIGURE 2. Domain of reduced geodesics Ωr

k Ωr Λj Λj , = j 1 ∪− [= with k 2 for even and 3 for odd q. See also Figure 2, where Ω is displayed for = r q 5 and q 6 as a subset of Ω. An even more convenient description of the = = JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 SYMBOLICDYNAMICSFORTHEGEODESICFLOWON HECKE SURFACES 607 set of reduced geodesics is in terms of the bi-infinite codes of their base points ξ,η :

B◦ [...b ,b  a , a ,...] B◦ a 2, or a b 0 . ¡ ¢ q,r = 2 1 0 1 ∈ q | | 0| ≥ 0 1 > n o LEMMA 54. If γ is a geodesic on H with C˜ γ B◦ , then there exists an integer ∈ q k 0 such that F˜kγ is reduced. ≥ q ¡ ¢ Proof. For k 0, let γk : F˜k γ and write ≥ = q c k c k q γ [ak; ak 1,...] and ∗q γ [ak 1,..., a0,b1,...]∗. + = + − = − ³ ´ k ³ ´ k k If ak 2, then γ 3λ/2, and if ak 1ak 0, then γ γ 0. In both cases, by | | ≥ + > − < + − < definition, F˜k γ Υ . Since an infinite sequence of 1’s or 1’s is forbidden, it is q ∈¯ r¯ − clear that there exists¯ ¯ a k 0 such that one of these conditions apply. ≥ Combining the above lemma with Lemma 41, we have shown the following:

LEMMA 55. Let γ ξ,η be a geodesic on the hyperbolic upper half-plane with ξ 6= η R∞. Then γ is G -equivalent to a reduced geodesic. ∈ ¡ q ¢ 4. CONSTRUCTIONOFTHECROSS-SECTION As a cross-section for the geodesic flow on the unit tangent bundle T 1M of M , which can be identified with F S1 modulo the obvious identification of q × points on ∂F S1, we will take a set of vectors with base points on the boundary q × ∂Fq directed inwards with respect to Fq . The precise definition will be given be- low. For a different approach to a cross-section related to a subgroup of Gq , see [14]. For the sake of completeness we include the case q 3 in our exposition, = but it is easy to verify that our results in terms of the cross-section, first-return map, and return time agree with the statements in [24, 25]. 4.1. The cross-section.

DEFINITION 56. Consider the fundamental domain Fq and its boundary arcs L0 and L 1 as in Definition 1. For the construction of the cross-section we use the ± 1 1 additional arcs L 2 ρ,λ T ± SL 1 and L 3 ρ,ρ λ T ± L0 . ± = ± = ± ± = ± + = DEFINITION 57. We define£ the¤ following subsets of T£1M : ¤ Γ (z,θ) L S1 γ˙ (s) directed inwards at z , r 0, 1, r = ∈ r × | z,θ = ± Σj ©(z,θ) Γ γ γ ξ,η Υ, ξ 3λ/2orξηª 0 , 1 j 1, = ∈ j | z,θ = ∈ | | > < − ≤ ≤ 2 1 Σ± ©(z,θ) Γ 1 γz,θ Υ¡, γ ¢ T ± Sγz,θ Υ, 3λ/2 γª λ 1 , = ∈ ± | ∉ = ∈ < + ≤ + 3 1 Σ± ©(z,θ) Γ γ Υ, γ T ± γ Υ . ª = ∈ 0 | z,θ ∉ = z,θ ∈ If q is© even, let Σ : 2 Σj , and if q 5ª is odd, let Σ : 3 Σj . If q 3, we = j 2 ≥ = j 3 = =− 2 =−2 j drop the restriction on γ in the definition of Σ± and set Σ Σ . S + S= j 2 We will show that there is a one-to-one correspondence betwe=−en Σ and the S set of reduced geodesics.

JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 608 DIETER MAYER AND FREDRIK STRÖMBERG

LEMMA 58. There exists a bijection P : Υ Σ defined through P γ : (z,θ) Σ r → = ∈ with z γ(s) ∂F for some s R and θ given by Arg γ˙ (s) θ. = ∈ q ∈ = ¡ ¢ Proof. Consider Figure 3 and a geodesic γ ξ,η from η [ R, r ) to ξ 3λ/2. It 1 ∈ − − > ¡ ¢

L−1 L1

L0 L3

γ1 L−3

L−2 L2

−R 0 −r λ 3λ λ + 1 2

FIGURE 3. Cross-Section (q 5) = is clear that either γ1 intersects L 1 L0 inwards or L2 from the left to the right. − ∪ Let z γ(s) be this intersection and set θ Arg γ˙ (s). In the first case we get = 1 0 = 2 P γ (z,θ) Σ− Σ . In the second case we either get P γ (z,θ) Σ if ξ = ∈ ∪ = 3 ∈ ∈ (3λ/2,λ 1) or, if q is odd and ξ λ 1, we get P γ z′,θ′ Σ , where z′ + > + = ∈ = γ s′ L and θ′ Arg γ˙ s′ , since by Lemma 93 γ must intersect L . Remember ∈ 3 = ¡ ¢ 3 that for q even, r 1 λ, so γ can not intersect L to the right of λ/2. Consider ¡ ¢ = − ¡ ¢ 3 next a geodesic γ ξ,η with η [ R,0) and ξ (2/λ,3λ/2). Since the geodesic ∈ − ∈ SL 1 from 0 to 2/λ intersects ρ, the intersection point of γ and L1 must lie above − ¡ ¢ 1 0 ρ. Hence γ intersects either L 1 or L0 inwards, i.e., P γ Σ− Σ . − 1∈ ∪ The case ξ 0 is analogous and the inverse map P − : Σ Υr is clearly given 1 < j →1 1 by P − (z,θ) γ if (z,θ) Σ , j 1, respectively P − (z,θ) T ± Sγ if = z,θ ∈ ≤ = z,θ (z,θ) Σ 2, and P 1 (z,θ) T 1γ if (z,θ) Σ 3. ± − ± z,¯θ ¯ ± ∈ = ¯ ¯ ∈ DEFINITION 59. For ξ,η Ω∗ we define P : Ω∗ Σ by, P ξ,η : P γ ξ,η . ∈ r r → = A consequence of¡ Lemma¢ 54 is that for any reduced geodesic¡ ¢ we can¡ find¢ an f f infinite number of reduced geodesics in its forward and backward F˜q -orbit (with infinite repetitions if the geodesic is closed). Furthermore, since the base-arcs L 1 and L0 of Σ consist of geodesics, none of whose extensions are in Υr , it is ± clear that any reduced geodesic intersects Σ transversely. The set Σ thus fulfills the requirements (P1) and (P2) of Definition 3 and is a Poincaré (or cross-) sec- tion with respect to Υr . Since any geodesic γ∗ on Mq which does not go into infinity has a reduced lift, we also have the following lemma. 1 LEMMA 60. π∗ (Σ) is a Poincaré section for the part of the geodesic flow on T M which does not disappear into infinity.

JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 SYMBOLICDYNAMICSFORTHEGEODESICFLOWON HECKE SURFACES 609

Σ Ω P From the identification of and r∗ via the map , we see that the natural extension F˜q of the continued-fraction map Fq induces a return map for Σ, i.e., n 1 if z (z,θ) Σ, then P F˜ P − z Σ for an infinite numberf of n 0. We give a = ∈ ◦ q ◦ ∈ 6= geometric description of the first-return map for Σ and we will later see that this map is in fact also inducedf byfF˜q .

DEFINITION 61. The first-return map T : Σ Σ is defined as follows (cf. Figure Σ P 1 Υ → 4): if z0 and γ − z0 r , let {wn}n Z be the ordered sequence of intersec- ∈ = ∈ ∈

′ −2 γ = Fqγ = ST γ −2 z1 = ST w3 γ > (z1,θ1) = T (z0,θ0)

w1

L−1 L0 L1

w0 = z0 T w2

z1 w3 ′ L2 w−1 γ ρ

γ γ −1 λ 0− λ 1 λ + − 2 2

FIGURE 4. Illustration of the first-return map tions in the direction from γ to γ between γ and the Gq -translates of ∂F with − + w0 given by z0. Since γ and γ have infinite λ-fractions, they are not cusps of + − G and the sequence w is bi-infinite. For each w , let A G be the unique q n n n ∈ q map such that w ′ A w ∂F and γ′ A γ intersects ∂F at w ′ in the inwards n = n n ∈ = n n direction. If γ′ Υr and P γ′ z′, we say that z′ Σ is a return of γ to Σ. If n0 0 is the ∈ = ∈ Σ > smallest integer such that wn0 gives a return to , we say that the corresponding P Σ T Σ Σ point An0 γ z1 is the first return and the first-return map : is T = ∈ T →Ω defined by z0 z1, where z1 is the first return after z0. Sometimes : r∗ Ω T =P 1 T P → r∗, given by − , is also called the first-return map. = ◦ ◦ f After proving some useful geometric lemmas in the next section, we will show f f f in Section 4.3 that the first-return map T is given explicitly by powers of F˜q . 4.2. Geometric lemmas.

LEMMA 62. The map z (z,θ) γz,θ, s ξ,η, s , where γz,θ γ ξ,η , γz,θ (s) = 7→ =∼ = = z, and Arg γ˙ (s) θ is a diffeomorphism for θ π/2. z,θ = ¡ ¢ ¡ 6= ±¢ ¡ ¢ Proof. Let z x i y, y 0, and θ [ π,π) be given. First we want to show = + > ∈ − that there exist ξ,η R∗ and s R such that for the geodesic γ γ ξ,η , one ∈ ∈ = finds γ(s) z and Arg γ˙ (s) θ. Without loss of generality we may assume that = = ¡ ¢ θ ( π/2,π/2), so η ξ. Set c 1/2 η ξ , r 1/2 ξ η and parametrize γ as ∈ − < = + = − JOURNAL OF MODERN DYNAMICS ¡ ¢ ¡ VOLUME¢ 2, NO. 4 (2008), 581–627 610 DIETER MAYER AND FREDRIK STRÖMBERG

γ(t) c reit , 0 t π. It is easy to verify that if c x y tanθ, r y/cosθ, = + < < = + = and t0 θ π/2, then γ(t0) z and Arg γ˙ (t0) θ (see Figure 5). To find the arc- = + = = z (c r ) length parameter s, we use the isometry A : z − + − mapping γ to iR+, 7→ z (c r ) 1 − + Aγ(t) i (tant/2)− , and A (c ir ) i. It is then an easy computation to see that = + = s (θ) d (z,c ir ) d (i/tant/2,i) lntant/2 lntan(θ/2 π/4). From the above = + = = = + formulas, one can easily deduce differentiability of the map (z,θ) ξ,η, s , as → well as its inverse, away from θ π/2. = ± ¡ ¢

γ = γz,θ

γ γ θ z = (t0) = (s) r

t0 η c ξ

FIGURE 5.

COROLLARY 63. The map x, y,θ ξ,η, s of Lemma 62 gives a change of vari- → ables on T 1H which is diffeomorphic away from θ π/2. Explicitly, ¡ ¢ ¡ ¢ = ± y y θ π ξ x y tanθ , η x y tanθ , s lntan , = + + cosθ = + − cos θ = 2 + 4 | | | | µ ¶ ∂(x,y,θ) 2 and the corresponding Jacobian is 1/2 cos θ. ∂(ξ,η,s) = ¯ ¯ Proof. This follows from the proof¯ of Lemma¯ 62 and a trivial computation. ¯ ¯ DEFINITION 64. For z H and ξ R, define ∈ ∈ z ξ 2 g (z,ξ) | − | , = z ℑ and for γ a geodesic with endpoints γ and γ , set g z,γ g z,γ . + − = + LEMMA 65. If A PSL (R), then g (Az, Aξ) g (z,ξ) A¡′ (ξ).¢ ¡ ¢ ∈ 2 = a b z z ξ 2 Proof. Let A . Then Az ℑ , Az Aξ 2 | − | , = c d ℑ = 2 | − | = 2 2 µ ¶ cz d cz d cξ d and since ξ R, | + | | + | | + | ∈ 2 g (Az, Ax) g (z,ξ)(cξ d)− g (z,ξ) A′ (ξ). = + =

LEMMA 66. Let γ γ ξ,η be a geodesic with ξ,η R, η ξ, and suppose that z , = ∈ < j j 1,2, with η z z ξ, are two points on γ. Then = ≤ ℜ 1 <¡ ℜ ¢2 ≤ 2 z2 z1 ξ d (z1, z2) ln g (z1,ξ) ln g (z2,ξ) ln ℑ − . = − = z z ξ · 1 ¯ 2 ¯ ¸ ℑ ¯ − ¯ ¯ ¯ JOURNAL OF MODERN DYNAMICS VOLUME¯ 2, N¯O. 4 (2008), 581–627 SYMBOLICDYNAMICSFORTHEGEODESICFLOWON HECKE SURFACES 611

w η − R Proof. It is easy to verify that the hyperbolic isometry B : w ξ w maps γ to i + 7→ − b d y and, if a b, then d (ia,ib) ln(b/a). Thus, if z j y j , we get < = y = ℑ = Za 2 y2 z1 ξ d (z1, z2) d (B z1,B z2) d (i B z1,i B z2) ln − . = = ℑ ℑ = y z ξ · 1 ¯ 2 ¯ ¸ ¯ − ¯ ¯ ¯ ¯ ¯ LEMMA 67. Let γ γ ξ,η be a geodesic with ξ,η R, η 0 ξ and let z γ iR = ∈ < < = ∩ be the intersection of γ with the imaginary axis. Then ¡ ¢ z i ξη. = − q Proof. With r 1/2 ξ η and c 1/2 ξ η , any point on γ is given by γ(t) = − = + = c reit for some 0 t π. Suppose z γ(t ). Then γ(t ) c r cos t 0 + ¡≤ ≤¢ ¡ = ¢ 0 ℜ 0 = + 0 = and hence cos t c/r . But then sin2 t 1 c2/r 2 and therefore z ir sin t 0 = − 0 = − = 0 = ipr 2 c2 i ξη. − = − LEMMA 68. Letp γ γ ξ,η be a geodesic with ξ,η R, η ξ. For ω a geodesic = a b ∈ < intersecting γ at w H ,let A PSL (R) be suchthat Aω iR+. Then ∈ ¡ ¢ = c d ∈ 2 = 1¡ ¢ w w ξ,η acξη bd ǫi l (ξ)l η = = − + − A A ad bc ac ξ η · ¸ ¡ ¢ + + + q ¡ ¢ and ¡ ¢

2 w ξ l A (ξ) g w,γ | − | ξ η , = w = − s−l A η ¡ ¢ ℑ ¡ ¢ where l (ξ) (aξ b)(cξ d) and ǫ sign ad¡ ¢bc ac ξ η . A = + + = + + + Proof. According to Lemma 65, ¡ ¡ ¢¢ 1 1 1 g w,γ g A− z, A− γ′ g z,γ′ A− ′ (Aξ), = = where γ′ Aγ and¡z ¢Aw ¡ iR. By Lemma¢ 67¡ , z ¢ i ξ η with ξ′ Aξ and = = ∈ = − ′ ′ = η′ Aη. We choose A, i.e., the orientation of γ′, such that η′ 0 ξ′ and hence = p < < sign(aξ b) sign(cξ d) and sign aη b sign cη d . Then + = + + = − + ¡ ¢ i A¡ξAη ¢ab cd AξAη 1 di AξAη b w A− i AξAη − − − − q 2 2 = − = a pci AξAη = ¯ a ¯ c AξAη ¯ ¯ ³ q ´ − − ¯ +¯ ¯ ¯ ab cξ d cη d cdpaξ b aη b i l ¯(ξ)l ¯η − | + | + + | + | + + − A¯ A ¯ = ¡ c2 (¯aξ b)¯ aη b a2¯ cξ d¯¢ cηqd ¡ ¢ ¯ + ¯ + + ¯ | + ¯| + ǫ ab (cξ d)¯ cη d ¡ dc (aξ¢¯ b) aη b ¯ i ¯l (ξ)l η + ¯ + − ¯+ + ¯+ −¯ A A = ¡ c2ǫ¡(aξ b¢) aη b a2ǫ¡(cξ d¢¢) cηqd ¡ ¢ + + − + + i l A (ξ)l A η ǫ ξη¡ ca bd¢ acξη bd¡ iǫ ¢ l A (ξ)l A η − − − − − − , = q ǫ ξ η ¡ca¢ (cb£ ad) ¤ = ac ξ η q(ad bc) ¡ ¢ − + + + + + +

JOURNAL OF MODERN£¡ DYNAMICS¢ ¤ ¡ VOLUME¢ 2, NO. 4 (2008), 581–627 612 DIETER MAYER AND FREDRIK STRÖMBERG where ǫ : sign (aξ b) aη b sign ac ξ η ad bc since w H . For = + + = − + + + ∈ the function g, we now have ¡ ¡ ¢¢ ¡ ¡ ¢ ¢

2 2 z ξ′ ξ′ ξ′η′ ξ′ g z,γ′ − − ξ′ η′ . = ¯ z ¯ = ξ′η′ = − s η′ ¡ ¢ ¯ ℑ ¯ − ¡ ¢ − 1 2 p 2 Since A− ′ (Aξ) ( c Aξ a)− (cξ d) , Lemma 65 implies that = − + = +

aξ b + ξ′ 2 aξ b aη b cξ d 2 g w,γ ξ′ η′ (cξ d) + + + (cξ d) v aη b = − s η′ + = cξ d − cη d u + + − µ + + ¶u cη d ¡ ¢ ¡ ¢ u + t (aξ b)(cξ d) (aξ b) cη d aη b (cξ d) + + = + + − + + s aη b cη d ¡ ¡ ¢ ¡ ¢ ¢ + + (aξ b)(cξ d) ¡l A (ξ) ¢¡ ¢ ξ η + + ξ η . = − s aη b cη d = − s−l A η ¡ ¢ + + ¡ ¢ ¡ ¢¡ ¢ ¡ ¢

Applications of the previous lemma to vertical or circular geodesics yields the following corollaries:

COROLLARY 69. Let γ ξ,η be a geodesic with η ξ. Then < a) if η a ξ for some a R, then γ and the vertical geodesic ω a iR+ < < ¡ ¢ ∈ v = + intersect at

Z ξ,η a i (ξ a) η a H , v = + − − + ∈ q and ¡ ¢ ¡ ¢ ξ a gv ξ,η g Zv ,γ ξ η − ; = = − s−η a ¡ ¢ ¡ ¢ ¡ ¢ − b)if η c ρ ξ c ρ for somec R and ρ R+, then γ and the circular geodesic < − < < + ∈ ∈ ωc with center c and radius ρ intersect at the point

2 2 ξη ρ c i 2 2 2 2 Zc ξ,η + − (ξ c) ρ ρ η c H , = ξ η 2c + ξ η 2c r − − − − ∈ ¡ ¢ + − + − ¡ ¢³ ¡ ¢ ´ ¯ ¯ and ¯ ¯ (ξ c)2 ρ2 gc ξ,η g Zc ,γ ξ η − − . = = − v− 2 2 u η c ρ ¡ ¢ ¡ ¢ ¡ ¢u − − t The subscripts “v” and “c” above refer to intersections¡ with¢ vertical and circular geodesics respectively.

JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 SYMBOLICDYNAMICSFORTHEGEODESICFLOWON HECKE SURFACES 613

COROLLARY 70. Let γ γ ξ,η be an arbitrary geodesic on H with ξ,η R. For = ∈ Z ξ,η γ L ,set g ξ,η g Z ,γ , 3 j 3. If Z ξ,η exists, the follow- j = ∩ j j ¡ =¢ j − ≤ ≤ j ing formulas hold: ¡ ¢ ¡ ¢ ¡ ¢ ¡ ¢ 1 2 2 Z0 ξ,η 1 ξη ǫi ξ 1 1 η , ǫ sign ξ η , = ξ η + + − − = + µ ¶ ¡ ¢ + q¡ ¢¡ ¢ ¡ ¢ Z 1 ξ,η λ/2 i (ξ λ/2) η λ/2 , ± = ∓ + ∓ − ± q ¡ ¢ ¡ ¢ 2 ξη ρ2 c2 ǫi (ξ c)2 ρ2 ρ2 η c + − + ∓ − − ∓ Z j ξ,η µ r ³ ´¶, ± = ¡ξ η 2c ¢ ¡ ¢ ¡ ¢ + ∓ where j 2,3 and ǫ sign x y 2c . Furthermore, = = + ∓ ¡ ¢ξ2 1 g0 ξ,η ξ η − , = − s1 η2 ¡ ¢ ¡ ¢ − ξ λ/2 g 1 ξ,η ξ η ∓ , ± = − s−η λ/2 ¡ ¢ ¡ ¢ ∓ (ξ c)2 ρ2 g j ξ,η ξ η ∓ − , j 2,3. ± = − v− 2 2 = u η c ρ ¡ ¢ ¡ ¢u ∓ − t Here ρ,c (λ 1/λ,1/λ) for j 2 and¡(1,λ)¢for j 3. = − = = ¡ ¢ 1 1 1 1 λ/2 1 1 c ρ Proof. Taking A0 − , A 1 ∓ and A 2 − ± − , = p 1 1 ± = 0 1 ± = 1 c ρ 2 µ ¶ µ ¶ 2ρ µ ∓ − ¶ it is easy to verify that A L iR+ preserving the orientation. j j = p LEMMA 71. Let γ γ ξ,η bea geodesicwith ξ,η R. Then γ intersectsthe vertical = ∈ arc L if and only if η λ/2 ξ and δ ξ,η 0, where 1 ¡< ¢ < < ξλ 2 δ ξ,η ¡ η ¢ − . = − 2ξ λ − ¡ ¢ h 1 For even q we have, in particular, δ ξ,η η (TS) + ξ. = − Proof. It is clear that γ intersects ¡L if¢ and only if the intersection with L 1 1 = λ/2 iR+ is at a height above sinπ/q ρ. By Lemma 69, the point of inter- + = ℑ section is given by w ξ,η λ/2 i (ξ λ/2) η λ/2 . We thus need to check = + − − + 2 the inequality (ξ λ/2) η λ/2 sinq π/q. With η λ/2 ξ, it is clear that w − ¡ − ¢+ > ¡ < ¢ < ℑ decreases as η increases for ξ fixed. Using λ/2 cosπ/q, we see that ¡ ¢ = λ λ λ2 4 λ2 λξ 2 ξ η sin2 π/q 1 λ 2η − η − Aξ, − 2 2 − = = − 4 ⇔ − = 2ξ λ ⇔ = 2ξ λ = µ ¶µ ¶ − − 1 λ 2 where A − SL2(R). Hence w sinπ/q η Aξ δ ξ,η 0. = 4 λ2 2 λ ∈ ℑ > ⇔ < ⇔ < − µ − ¶ Observe that Aρ ρ and A2 Id, i.e., A is elliptic of order 2. The¡ stabilizer¢ = = Gq,ρ of ρ in Gq is a cyclic group with q elements generated by TS. For even

JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 614 DIETER MAYER AND FREDRIK STRÖMBERG

h 1 q 2h 2, one can use the explicit formula (2) to verify that A (TS) + G . = + = ∈ q For odd q,ontheotherhand,thereisnoelementoforder2in G , so A G . q,ρ ∉ q COROLLARY 72. Let γ γ ξ,η be a geodesic with ξ,η R. Set = ∈ δ¡ n ξ¢,η : δ ξ nλ,η nλ . = − − n Then γ intersects the line T L¡ if¢ and only¡ if η (n ¢1/2)λ ξ and δ ξ,η 0. 1 < + < n < 4.3. The first-return map. Our aim in this section is to obtain an explicit¡ ¢ ex- pression for the first-return map T : Σ Σ. The notation is as in Definition 61, → see also Figure 4. The main idea is to use geometric arguments to identify possi- ble sequences of intersections {wn} and then to use arguments involving regular and dual regular λ-fractions to determine whether a particular wn corresponds to a return to Σ or not. j j 1 LEMMA 73. If ξ [1;1 , a j 1, a j 2] with cq (Sξ) [1 + , a j 1,...] A0,q , then = + + = + ∈ j j j 1 j ξ (TS) λ,(TS) 3λ/2 if a j 1 1 and ξ (TS) + 3λ/2,(TS) λ if a j 1 2. ∈ + ≤ − ∈ + ≥ ³ ´ j ³ ´ Proof. Note that ξ (TS) ξ′, where cq ξ′ [1; a j 1, a j 1,...]. If a j 1 1, then = = + + + ≤ − ξ′ (λ,3λ/2), and since T Sx λ 1/x is strictly increasing there, ∈ = − ¡ ¢ j j j j ξ (TS) ξ′ (TS) (λ,3λ/2) (TS) λ,(TS) 3λ/2 . = ∈ = ³ 1 ´ j If on the other hand, a j 1 2, then ξ′′ ST − ξ′ (3λ/2, ) and ξ (TS) ξ′ j 1 + ≥ = ∈ ∞ = = (TS) + ξ′′ and therefore j 1 j 1 j ξ (TS) + (3λ/2, ) (TS) + 3λ/2,(TS) λ . ∈ ∞ = ³ ´

DEFINITION 74. Define the geodesic arcs j j 1 χj : (TS) L2 (TS) + T L 1, 0 j h, = = − ≤ ≤ j j 1 ω : (TS) L (TS) + L , 0 j h 1 j = 3 = 0 ≤ ≤ + and set α : (TS)j λ, β : (TS)j 3λ/2, and δ : (TS)j (λ 1). Then χ ρ,α , j = j = j = + j = j ω ρ,(TS)j ρ λ ρ,δ and α β δ , 0 j h 1. Notethat α λ/2 j = + ⊂ j j < j < j ≤ ≤ + h£ = ¤ and χh L′ for even q while δh 1 λ/2 and ωh 1 L′ for odd q (see Figure 6). £ = 1 ¡ ¢¤ £ ¤ + = + ⊆ 1 j LEMMA 75. If γ γ ξ,η Υ, with cq (ξ) [1;1 , a j 1,...], then γ has the follow- = ∈ = + ing sequence of intersections withG ∂F after passing L : ¡ ¢ q 1 ω0,χ0,...,ωj 1,χj 1,ωj if ξ αj ,βj and a j 1 1 − − ∈ + ≤ − and ¡ ¢ ω0,χ0,...,ωj ,χj if ξ βj 1, αj and a j 1 2. ∈ + + ≥ Proof. See Figure 6. Since all arcs involved¡ are¢ hyperbolic geodesics, it is clear that γ does not intersect any other χi ’s or ωi ’s than those mentioned. Suppose that ξ αj ,βj . Then after χj 1, the geodesic γ may intersect either ωj or its ∈ − extension, i.e., [(TS)j ρ λ ,δ ]. If it intersects this extension it has to pass ¡ ¢ + j JOURNAL OF MODERN DYNAMICS¡ ¢ VOLUME 2, NO. 4 (2008), 581–627 SYMBOLICDYNAMICSFORTHEGEODESICFLOWON HECKE SURFACES 615

ω 0 ω0

ρ χ ρ 0 χ χ ω 0 2 ω χ 1 ω 2 1 χ 1 ω 1 χ2 2 ρ∗ α α α 2 β2δ2 1 β1δ1 0 β δ α β δ α β δ α 0 0 2 1 2 1 1 1 0 β0 δ0

FIGURE 6. Geodesics through the point ρ for q 7and8(h 2 = = and 3)

j first through the arc [(TS) T ρ,αj 1]. But the completion of this arc is clearly j − (TS) T L1 βj ,αj 1 and hence γ can not intersect this arc and must pass = − through ωj . The second case is analogous, except that we do not care about £ ¤ j 1 whether the next intersection is at ωj 1 or (TS) + T L1. + Υ c j T ˜ j 1 LEMMA 76. If γ ξ,η r and q (ξ) [1;1 , a j 1,...], then γ ξ,η Fq+ γ ξ,η . ∈ = + = ¡ P¢ ¡ ¢ ¡ ¢ Proof. Let (z,θ) ξ,η . Then z L 1 L0 and by Lemmaf 75 the subsequent = ∈ − ∪ intersections are w0, w1, w2, ..., w2j 1, w2j 2 if a j 1 1 and w0, w1, w2, ..., ¡ ¢ + + + ≤ − w2j 2, w2j 3 if a j f1 2. It is also easy to verify, that the corresponding maps + + + ≥ 1 1 i 1 i 1 are A2i 1 T − ST − and A2i ST − . Note that A2i 1 T − A2i and that + =i = + = A2i γ F˜q γ, 0 i j 1. It is thus clear that A2i γ Υ and A2i 1γ Υ for 1 i = ≤¡ ≤ +¢ ¡ ¢ ∈ + ∉ ≤ ≤ j 1. If ξ ,η A ξ, A η , then + i i = i i c j i c i ¡ q¢ (ξ2¡i ) [1;1 ¢− , a j 1,...] and ∗q η2i [( 1) ,b1,...]∗, = + = − and hence A2i γ Υr for 1 i j but A2j 2γ¡ Υr¢. Thus, in both cases, the first ∉ ≤ ≤ + ∈ j 1 return is given by w2j 2 and the return map is T F˜q + . + = K R N n R Z Z DEFINITION 77. Define : \Iq and :f\Iq as follows: if a0 ∗, k 1 → → ∈ ǫ sign(a ), and ξ [a ;(ǫ) − , a ,...] with k 1, then K (ξ) : k and = 0 = 0 k ≥ = ǫ 3, k h 1, q odd, · = + n ǫ 2, k h, ah 2, q even, (ξ) :  · = ≥ = ǫ 1, k h 1, q even,  · = + 0, otherwise.   We also have to consider the return map for the second type of reduced geo- desics.

1 LEMMA 78. For z Σ with P − z ξ,η Ω∗ and ξ 3λ/2, one has ∈ = ∈ r | | > k 1 n T z P¡ F˜¢ P − z Σ , f = ◦ q ◦ ∈ where k K (ξ) and n n(ξ). = = JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 616 DIETER MAYER AND FREDRIK STRÖMBERG

L−1 L1

w2

γA w1

w3

γB γD L0 L3 w0

L2 ρ Tρ γC

−R 0 −r λ

FIGURE 7. Geodesics leaving the Poincaré section (q=7)

Proof. Consider z0 P γ Σ with γ γ ξ,η Υr and assume without loss of = ∈ = j ∈ generality that ξ 0 with cq (ξ) [a0;1 , a j 1,...] for some j 0, a j 1 1 and > = ¡ +¢ ≥ + 6= a j 1 1 if j 0 (the case of 1’s is analogous). Recall the notation in Definition + 6= ± = − 61, in particular, the sequence {wn}n Z and the corresponding maps An Gq . It ∈ ∈ is clear that wn gives a return if and only if Anγ Υr . ∈ 1 0 1 There are two cases to consider: either z0 Σ− Σ , respectively z0 Σ− 0 3 2 ∈ ∪ ∈ ∪ Σ Σ in the case of odd q, or z0 Σ . In Figure 7 these different possibilities ∪ 1 ∈ 0 2 3 are displayed, P γA Σ− , P γB Σ ,P γC Σ and P γD Σ . It is clear that 2 ∈ ∈ ∈ ∈ if z0 Σ , then w0 T Sz0 L2 and the sequence of {wn} is essentially different ∈ =2 ∈ from the case z0 Σ when w0 z0. 6∈ 2 = n Case 1: If z0 Σ (see geodesics γA, γB and γD in Figure 7), then wn T L 1 6∈ ∈ 0,1− for 1 n k 1 and k a0 1, a0 or a0 1, depending on whether z0 Σ 3≤ ≤ − = − + a0 a0 1 ∈ or Σ and whether the next intersection is on T L0 or T − L0. Then either a0 a0 1 wk T L0 or wk T − L0 (see geodesics γE and γF in Figure 8). Since An n∈ n ∈ n = T − for wn T L 1 and, as we will show in Lemma 88, T − γ Υ, none of the n ∈ − ∉ wn T L 1 for 1 n k 1 gives a return to Σ. There are now two possibilities: ∈ − ≤ ≤ − a0 a0 (i) If wk T L0, then Ak ST − and γk Akγ F˜q γ. If j 0 it is clear that ∈ = 0 = = = γ′ Υ and T z P F˜ γ Σ . If j 1, by Lemma 76 applied to γ′, we get ∈ r 0 = ◦ q ∈ ≥ j j 1 n(ξ) T z P F˜ γ′ P F˜ + γ Σ . 0 = ◦ q = ◦ q ∈ a0 1 (ii) If wk T − L0, then we will show in Lemmas 90 and 94 that none of the ∈ a 1 arcs emanating from T 0− ρ gives a return (cf. Figures 8 and 6) except for a0 1 1 h 1 the next return at T − ST − + L1. Furthermore, it follows that T z0 k 1 n = P F˜ P − z Σ with k K (ξ) (here h or h 1) and n n(ξ). ◦ q ◦ 0 ∈ ¡ = ¢ + = Case 2: If z Σ2, then 3λ/2 ξ λ 1 and γ must intersect T L below T ρ. 0 ∈ < < + 1 By the same arguments as in Case 1, we conclude that the first return is given

JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 SYMBOLICDYNAMICSFORTHEGEODESICFLOWON HECKE SURFACES 617

wa0

γE γF

wa0−1

wa0+1

wa0

q − 2 { w = wa0+q−1

(a0 − 1)λ a0λ

FIGURE 8. Geodesics returning to the Poincaré section (q 8) =

1 h 1 T P ˜k P 1 Σn K by wq 1 T ST − + L1 and z0 Fq − z0 , where k (ξ) and − ∈ = ◦ ◦ ∈ = n n(ξ) as in Case 1 (ii). In all cases we see that the first-return map T : Σ Σ = ¡ ¢ k 1 k → is given by T P F˜ P − or alternatively by T F˜ where k 1, h, or h 1 = ◦ q ◦ = q = + depending on ξ. f By combining Lemmas 76 and 78 it is easy to see that the first-return map P is determined completely in terms of the coordinate ξ: f 1 k 1 n PROPOSITION 79. If z Σ with P − z ξ,η Ω∗ then T z P F˜ P − z Σ ∈ = ∈ r = ◦ q ◦ ∈ where k K (ξ) and n n(ξ). ¡ ¢ = = f f f Having derived explicit expressions for the first-return map, for the next step we want to get explicit formulas for the first return time, i.e., the hyperbolic length between the successive returns to Σ.

4.4. The first return time.

k 1 LEMMA 80. Let γ γ ξ,η Υ with ξ [a ;(ǫ) − , a ,...] (ǫ sign(a )) and = ∈ r = 0 k = 0 P γ z (z ,θ ) and let z T z . For w γ, the point corresponding to z , = 0 = 0 0 ¡ ¢1 = 0 0 ∈ 1 i.e., w G z , one has 0 ∈ q 1 d (z , w ) lng z ,γ ln g z ,T γ 2lnF γ , 0 0 = 0 − 1 + ³ ´ k ¡K ¢ ¡ ¢ j where F γ j 1 ξj with k (ξ) as in Definitionf 77 and ξj SFq Sξ. = = = = ¡ ¢ Q j ¯ ¯ Proof. Set γ : F˜ γ¯ ¯B γ and w : B w . By Lemma 65, j = q = j j = j 0 1 1 2 g w ,γ g B − w ,B − γ g w ,γ ξ− . 0 = 1 1 1 1 = 1 1 1 JOURNAL OF MODERN DYNAMICS¡ ¢ ¡ ¢ ¡ VOLUME¢ 2, NO. 4 (2008), 581–627 618 DIETER MAYER AND FREDRIK STRÖMBERG

Applying the same formula to g w ,γ for j 1,...,k, we get j j = ¡ ¢ k ln g w0,γ ln g z1,T γ 2ln ξj . = − j 1 ¡ ¢ ³ ´ Y= ¯ ¯ The statement then follows by Propositionf79 and Lemma¯ ¯66.

LEMMA 81. If γ γ ξ,η is a reduced closed geodesic with minimal period n, = j c (Sξ) [a ,..., a ], and ξ SF Sξ, then the hyperbolic length of γ is given by q = 1 n ¡ ¢j = q n n 2 (3) l γ 2 ln ξj ln [a j 1,..., an, a1,..., a j ] . = j 1 = − j 1 + ¡ ¢ X= ¯ ¯ Y= ¯ ¯ ¯ ¯ ¯ ¯ Proof. Denote by z j ,θj Σ the successive returns of γ to Σ and let w j 1 γ be ∈ − ∈ the point on γ corresponding to z j . If γ is closed, the set z j j 0 is finite with ¡ ¢ ≥ N 1 elements for some N 1 n, i.e., zN 1 z0. It is clear that the length of γ + + ≤ + = © ª is given by adding up the lengths of all pieces between the successive returns to Σ and a repeated application of Lemma 80 gives us

N N j j l γ d z j , w j ln g z j ,T γ ln g w j ,T γ = j 0 = j 0 − ¡ ¢ X= ¡ ¢ X= ³ ³ ´ ³ ´´ N f f j j 1 j ln g z j ,T γ ln g z j 1,T + γ 2lnF T γ = j 0 − + + X= ³ ³ ´ ³ ´ ³ ´´ f fN f n T j i 2 lnF γ 2ln SFqSξ . = j 0 = i 1 = ³ ´ = ¯ ¯ X Y ¯ ¯ f ¯ ¯

REMARK 82. Formula (3) can also be obtained by relating the length of γ ξ,η to the axis of the hyperbolic matrix fixing ξ and observing that this matrix must be n ¡ ¢ given by the map Fq acting on ξ. In the case of PSL2(Z) and the Gauss (regular) continued fractions, the for- mula (3) is well-known.

We are now in a position to discuss the first return time. By Lemma 66, it 2 w j ξ is clear that we need to calculate the function g j ξ,η − , where w j = ¯ v j ¯ = u iv Z ξ,η , for all the intersection points in¡ Corollary¢ ¯ 70.¯ j + j = j ¡ ¢ 2 λz DEFINITION 83. Let B PSL2(R) be given by B z − . Set ∈ = λ 2z n n − δ ξ,η : η T BT − ξ, n = − ¡ Ξ ¢ Ω : ξ,η r∗ δ x λ 1 ξ,η 0 , and + = ∈ 〈 〉 − ≥ n ¯ o Ξ ¡ ¢ Ω ¯ ¡ ¢ : ξ,η r∗ δ x λ 1 ξ,η 0 . − = ∈ ¯ 〈 〉 − < n ¯ o ¡ ¢ ¯ ¡ ¢ JOURNAL OF MODERN DYNAMICS ¯ VOLUME 2, NO. 4 (2008), 581–627 SYMBOLICDYNAMICSFORTHEGEODESICFLOWON HECKE SURFACES 619

PROPOSITION 84. The first return time r for the geodesic γ ξ,η is given by the function ¡ ¢ K (ξ) r ξ,η ln g ξ,η ln gn F˜ γ ξ,η 2lnF γ ξ,η for ξ 0, = A − (ξ) q + > ¡ ¢ ¡ ¢ ³ ¡ ¢´ ¡ ¢ respectively

r ξ,η r ξ, η , for ξ 0. = − − < Therefore¡ A ¢ A(ξ,¡η) is given¢ by = 1, R η λ/2, ξ B η , − − ≤ < − > − − 0, R η λ/2, ξ B ¡ η¢ or λ/2 η r, ξ B η , A  − ≤ < − < − − − ≤ < − ≥ = 2, 3/4λ 1/λ η r, 3λ/2 ξ B η λ 1,  − < < − ¡< ¢< < + ¡ ¢ 3, λ 1 η r, λ 1 ξ B η ,¡ ¢  − < < − + < <  K (ξ) andn(ξ) are as in Definition 77, whereas¡ ¢ the functions g j ξ,η g z j ,γ = for z L are as in Corollary 70 and F γ is as in Lemma 80. j ∈ j ¡ ¢ ¡ ¢ Proof. Consider γ γ ξ,η Υ with ¡ξ ¢ 0 and suppose that P γ z Σ and = ∈ r > = 0 ∈ T z z Σ with w γ corresponding to z . Since geodesics are parametrized 0 = 1 ∈ ∈¡ ¢ 1 by arc length, the first return time is simply the hyperbolic length between z0 and w, i.e., r ξ,η d (z , w) ln g z ,γ ln g w,γ ln g z ,γ ln g z ,F˜ γ 2lnF γ = 0 = 0 − = 0 − 1 q + by¡ Lemma¢ 80. If z L¡, we¢ set g z¡ ,γ ¢ g ξ,¡η as¢ given¡ in Corollary¢ 70.¡ By¢ 0 ∈ j 0 = j Corollary 72, it is easy to verify that the sets in the definition of A ξ,η corre- ¡ ¢ ¡ ¢ spond exactly to the cases z0 L 1,L0,L2 and L3, respectively, where the last set ∈ − ¡ ¢ is empty for q even. It is also easy to see that B (3/4λ 1/λ) 3λ/2 and B (λ 1) − = − = λ 1. The statement of the proposition now follows from the explicit formula for + F γ in Lemma 80 and the domains in Proposition 79 for which T F˜k. That = q r ξ, η r ξ,η follows from the invariance of the cross-section with respect ¡−¢ − = to reflection in the imaginary axis. f ¡ ¢ ¡ ¢

5. CONSTRUCTIONOFANINVARIANTMEASURE By Liouville’sTheorem, we know that the geodesic flow on T 1H preserves the measure induced by the hyperbolic metric. This measure, the Liouville measure, 2 1 1 is given by dm y− dxdydθ in the coordinates x i y,θ H S on T H . = + ∈ × Using the coordinates ξ,η, s R3 given by Corollary 63, we write the Liouville ∈ ¡ ¢ measure in these coordinates: ¡ ¢ dxdydθ ∂ x, y,θ 2 2dξdηds dm dξdηds . = 2 = 2 2 = 2 y ¯ ∂¡ξ,η, s ¢¯ r cos θ η ξ ¯ ¯ − ¯ ¯ The time discretization of the¯ geodesic¡ ¢ ¯ flow on T 1M in terms¡ of the¢ cross-section 2dξdη Σ T Σ Σ and the first-return map : thus preserves the measure dm′ 2 → = η ξ − JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008),¡ 581–627¢ 620 DIETER MAYER AND FREDRIK STRÖMBERG on Ω∗. We prefer to work with the finite domain Ω∞ Ω∞. Hence the measure r r ⊆ dµ(u, v) dm′ ξ,η given by = ¡ ¢ 2dudv dµ = (1 uv)2 − Ω T ˜ K (u) on r∞ is invariant under (u, v) Fq (u, v) f1 (u), f2 (v) , where f1 (u) K (u) 1 = = = Fq u Au and f2 (v) A− v. Because dµ is equivalent¡ to the¢ Lebesgue mea- = = f K (u) sure, we deduce that dµ isinfactan F˜ -invariant measure on Ω . If π x, y q r x = x, it is clear that π T (u, v) f (u) f π (u, v), so f is a factor map of T . x ◦ = 1 = 1 ◦ x 1 ¡ ¢ An invariant measure µ˜ of f : I I can be obtained by integrating dµ in the 1 q → q v-direction. We get differentf alternatives depending on whether q is 3, even,f or odd greater than 3.

K U U V 5.1. q 3. In this case Fq Fq and if we set 1 [ 1/2,0] 1 and 1 = = = − = − − = [r,R], then dµ˜ χU1 dµ1 χU 1 dµ 1, where = + − − R v R 2dudv 1 = dµ1 (u) 2 du = r (1 uv) = u (1 uv) v r Z − · − ¸ = 1 1 1 ur 1 uR 1 du − − + du du = u (1 uR) − u (1 ur ) = u (1 uR)(1 ur ) = (1 uR)(1 ur ) − − − − − − 1 p5 3 and dµ 1 (u) dµ1 ( u) du. Here r − and R r 1 − = − − = (1 uR)(1 ur ) = 2 = + = p5 1 + + − . 2 5.2. Even q 4. Here U [ λ/2, 2/3λ], U [ 2/3λ,0], V [0,R] and V ≥ 1 = − − 2 = − 1 = 2 = [r,R]. Hence R dµ1 2dv 1 1 R (u) 2 , du = 0 (1 uv) = u (1 uR) − u = 1 uR Z R − − − dµ2 2dv 1 1 (u) 2 du = r (1 uv) = u (1 uR) − u (1 ur ) Z − − − R r λ − , = (1 uR)(1 ur ) = (1 uR)(1 ur ) − − − − dµ j dµj − (u) ( u) du = du − K and the invariant measure µ˜ of Fq for even q is given by

3

dµ˜ (u) χU j (u)dµj (u), = j 3 X=− U where χIj is the characteristic function for the interval j . This measure is piecewise differentiable and finite. The finiteness is clear since uR and ur 1 1 6= for u Iq . If dµ˜ (u) c, then dµ˜ is a probability measure on Iq . ∈ Iq = c JOURNAL OF MODERNR DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 SYMBOLICDYNAMICSFORTHEGEODESICFLOWON HECKE SURFACES 621

5.3. Odd q 5. Let U [ λ/2, 2/3λ], U [ 2/3λ, 1/2λ], U [ 1/2λ,0], ≥ 1 = − − 2 = − − 3 = − V1 [0,R], V2 [rκ 1,R], and V3 [r,R]. Then = = − = R dµ1 2dv 1 1 R (u) 2 , du = 0 (1 uv) = u (1 uR) − u = 1 uR Z − − R − dµ2 2dv 1 1 R rκ 1 − − (u) 2 , du = rκ 1 (1 uv) = u (1 uR) − u (1 urκ 1) = (1 uR)(1 urκ 1) Z − − − − − − − − dµ3 R r λ (u) − , du = (1 uR)(1 ur ) = (1 uR)(1 ur ) − − − − dµ j dµj − (u) ( u) du = du − K and the invariant measure µ˜ of Fq for odd q is given by 3

dµ˜ (u) χU j (u)dµj (u), = j 3 X=− U where χIj is the characteristic function for the interval j . This measure is piecewise differentiable and finite. The finiteness is clear since uR, ur , and 1 urκ 1 1 for u Iq . If I dµ˜ (u) c, then /cdµ˜ is a probability measure on − 6= ∈ q = I . q R REMARK 85. The geodesic flow on finite surfaces of constant negative curvature has been shown by Ornstein and Weiss [39] to be Bernoulli with respect to Li- ouville measure. Since our cross-section is also smooth, the Poincaré map T is Bernoulli [38] with respect to the induced measure dµ. But the factor map of a Bernoulli system is again Bernoulli [37]. Hence the map f : I I is Bernoulli 1 q → q with respect to the measure µ˜.

REMARK 86. For another approach leading to an infinite invariant measure, see e.g., Haas and Gröchenig [14]. 2 5.4. Invariant measure for F . Itiseasytocheckthat dm ξ,η 2dξdη/ ξ η q = − is invariant under Möbius transformations, i.e., if A PSL (R)then dm Aξ, Aη ∈ 2¡ ¢ ¡ ¢= dm ξ,η . By considering the action of F˜ on Ω , i.e., q ∗ ¡ ¢ ¡ ¢ S˜ 1 n n F˜ ξ,η S˜ F˜q S˜ ξ,η SFq Sξ, ST − ξ,ST − η , q = ◦ ◦ = nλ η = µ − ¶ ¡ ¢ ¡ ¢ S˜ ¡ ¢ it is clear that dm is invariant under F˜ : Ω∗ Ω∗, and letting u Sξ and v η q → = = − it is easy to verify that dµ(u, v) 2dudv/(1 uv)2 is invariant under F˜ : Ω Ω. = − q → We can thus obtain corresponding invariant measure dµ˜ for Fq by projecting on the first variable. Let dµ˜ (u) dµ (u) for u I . Then = j ∈ j R dµj dv (u) 2 2 du = r (1 uv) Z j − R 1 2 1 1 2 R r j 2 − = u (1 uv) r = u 1 Ru − 1 r j u = (1 Ru) 1 r u · − ¸ j · − − ¸ − ¡ −¢ j

JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008),¡ 581–627¢ 622 DIETER MAYER AND FREDRIK STRÖMBERG and the invariant measure µ˜ of Fq is given by κ

dµ˜ (u) χIj (u)dµj (u), = j κ =−X I where χIj is the characteristic function for the interval j . This measure is piecewise differentiable and finite. If c dµ˜, then 1 dµ˜ is a probability mea- = Iq c 1 1 cosπ/q sure on I . It turns out that c 1/4C whereR C − ln + for even q and q = = sinπ/q 1 C − ln(1 R) for odd q (see [8, Lemma 3.2 and 3.4]).³ ´ = +

6. LEMMAS ON CONTINUED-FRACTION EXPANSIONS AND REDUCED GEODESICS This section contains a collection of rather technical lemmas necessary to show that the first-return map on Σ in Lemma 78 is given by powers of F˜q .

Υ a0 1 LEMMA 87. If γ with γ λ a0 intersects T − L0, then ∈ 〈 +〉 = h 1 l h [a0; 1 − ,2 ,1 , a(l 1)h 1,...] for some 0 l , a(l 1)h 1 1, q even, γ + + ≤ ≤ ∞ + + ≤ − h + = ([a0;1 , ah 1,...], with ah 1 2, q odd. ¡ + ¢ + ≥

a0 1 Proof. Let x γ a0λ. By convexity, γ does not intersect T − L0 more than = + − h once. Hence x ( λ/2,1 λ]. If q is odd, then cq (1) [1;1 ] and cq ( λ/2) h h ∈ − − h =h h − = [1 ,2,1 ] according to Lemmas 6 and 5; hence [1 ,2,1 ] cq (x) [1 ] and by < h < the lexicographic ordering (see proof of Lemma 24), cq (x) [1 , ah 1,...] with = + h h 1 ah 1 2. If q is even, then cq ( λ/2) [1 ]and1 λ r with cq (r ) [1 − ,2] so + ≥ − = − = = [1h] c (x) [1h 1,2]. By the lexicographic ordering, we therefore have c (x) < q ≤ − q = h 1 l h [ 1 − ,2 ,1 , a(l 1)h 1,...] for some l 0 (l is allowed) and a(l 1)h 1 1 if + + ≥ = ∞ + + ≤ − l . ¡< ∞ ¢ Υ sign(a0)n Υ LEMMA 88. Let γ with γ λ a0. ThenT − γ for n 1. ∈ 〈 +〉 = ∉ ≥ n n Proof. Without loss of generality, assume a 1 and let γ T − γ for n 1. 0 ≥ = ≥ Then γn γ nλ γ and γn γ nλ. Since γ Υ, + = + + > + − = − + ∈ γ R γn nλ R r (n 1)λ r. − ≥ − ⇒ − ≥ − = − + − ≥ − n n Hence γ [ R, r ), so γ Υ. The case of a0 1 is analogous. − ∉ − − ∉ ≤ − Υ n n Υ LEMMA 89. If γ , then γ ST − γ ifandonlyif n a0 γ λ. ∈ = ∈ = =〈 +〉 n Υ n Proof. By definition, if γ then Sγ γ nλ Iq∞, so ∈ + = + − ∈ γ (nλ λ/2,nλ λ/2) n a0. + ∈ − + ⇒ = It is also clear that γa0 F˜ γ Υ. = q ∈ LEMMA 90. Suppose q is even. If γ γ ξ,η Υ with a0 γ λ 2 intersects a 1 = ∈ K (ξ) =〈 +〉 1 ≥ n(ξ) T 0− L , then the first-return map is T ξ,η F˜ ξ,η P − Σ , where 0 ¡ ¢= q ∈ K (ξ) and n(ξ) are as in Definition 77. ¡ ¢ ¡ ¢ ¡ ¢ f f JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 SYMBOLICDYNAMICSFORTHEGEODESICFLOWON HECKE SURFACES 623

Proof. Consider Figures 6 and 8 showing the arcs around the point ρ. The pic- ture is symmetric with respect to z λ/2 and invariant under translation, so it ℜ = a0 1 applies in the present case. After passing through T − L0, the geodesic γ will in- tersect a sequence of translates of the arcs χj and ωj , which are the reflections of χ and ω in z λ/2, exactly as in Lemma 76, except that it now passes through j j ℜ = every arc. Note that even the argument why γ intersects ωj and not its extension a 1 applies. Let w and A be as in Definition 61, except that now w T 0− L . n n 0 ∈ 0 a0 1 a0 1 1 j a0 1 So w2j T − ωj T − ST − SL0 for 0 j h, and w2j 1 T − χj ∈ = ≤ ≤ + ∈ = 1 j 1 j 1 1 a0 ST − + L1 for 0 j h, with¡ corresponding¢ maps A2j 1 (TS) + T − and j 1 a≤ ≤ + = A (ST ) ST − 0 . Set γ : A γ and ξ : A ξ for 0 k 2h 1. There are ¡ 2j = ¢ k = k k = k ≤ ≤ + three cases when the point wk can define a return to Σ: 1 a) if γ2j 1 Υr and z P γ2j 1 Σ , + ∈ = + ∈ b) if γ2j 1 Υr but γ′ TSγ2j 1 Υr with ξ′ (3λ/2,λ 1) and z − ∉ 2j 1 = − ∈ 2j 1 ∈ + = P Σ2 − − γ2′ j 1 , or − ∈ c) ifγ Υ and z P γ Σ0. 2j ∈ r = 2j ∈ a0 1 h 1 By Lemma 87, we get T − ξ (λ/2,1] and cq (ξ) [a0;1 − , ah, ah 1,...], with ∈ = + h h h 1 ah 2 or ah 1 ah 1. Also, λ/2 [( 1) ]and1 R [( 1) , 2,( 1) − ]∗. = = ≤ − + = − = = − − − Hence ξ2j 1 φj 1, rh j Iq γ2j 1 Υ for 1 j h 1 (cf. Remark + ∈ − + − − ⊆ ⇒ + ∉ ≤ ≤ − h 1 1 a0 1 h a0 36). Also note that¡ A2h 1 (TS¤ ) + T − ST − ST − . This implies that 1 +˜ h= = Υ γ2h 1 A2h 1γ ST − Fq γ and hence γ2h 1¡ unless¢ ah 1, in which case + = h+1 = 1 + ∉ = γ2h 1 F˜q + γ Υr and P γ2h 1 Σ . + = ∈ + ∈ For γ′ TSγ2j 1 γ2j 3, we conclude γ′ Υ for 0 j h 2. For ah 2j 1 = + = + 2j 1 ∉ ≤ ≤ − = + + 2 1, we find γ′ γ2h 1 Υr , but ξ′ 0andhencewedonotgetapointof Σ . 2h 1 = + ∈ 2h 1 < − − Υ ˜ h Υ If ah 2, on the other hand, then γ2′ h 1 r , but γ2′ h 1 TSγ2h 1 Fq γ r = P Σ2 − ∉ + = + = ∈ and ξ2′ h 1 3λ/2 so γ2′ h 1 . + > + ∈ For γ2j Sγ2j 1, we get ξ2j S φj , rh 1 j λ φj 1, λ rh j and = − ∈ − − + − = − − + − − − therefore 3 /2 /2 for 0 j h 1. Since T 1 a0 R, we have λ ξ2j λ ¡ ¢ ¡ − η ¢η2j j − < < − ≤ ≤ − < − ∈ S (TS) ( , R) φh j ,r j ; that is, η2j 0. Hence γ2j Υr for 0 j h 1. −∞ − = − < ∉ ≤ ≤ − Note F hξ 2/λ implies q > ¡ ¢

1 1 h 1 1 λ ξ2h T − ST − F ξ T − ST − (2/λ, ) λ, λ = q ∈ ∞ = − − + λ2 2 µ − ¶ for q 4 and ξ ( , λ) for q 4. In any case, ξ 0 and since η r , it is > 2h ∈ −∞ − = 2h < 2h < clear that γ Υ. 2h ∉ We conclude that the first return is given by w2h 1 and + h 1 1 1 F˜ + ξ,η P − Σ if ah 1 T ξ,η q ∈ = ˜h P 1 Σ2 = (Fq ξ,¡η ¢ − ¡ ¢ if ah 2. ¡ ¢ ∈ f = f ¡ ¢ K (ξ) ¡ ¢1 n(ξ) This can be written in the form T F˜ f P − Σ with K (ξ) and n(ξ) as = q ∈ in Definition 77. ¡ ¢ f f

JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 624 DIETER MAYER AND FREDRIK STRÖMBERG

LEMMA 91. For q even, consider ξ ( λ/2,1 λ) with regular λ-fraction cq (ξ) ∈ − − 3 = h 1 λ 4λ [0;1 − , ah, ah 1,...]. Then ah 1 if and only if ξ − λ . + = < λ2 4 = − + λ2 4 + + Proof. By Lemma 87, we know either ah 1 and ah 1 1 or ah 2. It is clear = + ≤ − = that the boundary point between these two cases is given by ξ [0;1h ,( 1)h] 0 = − = (ST )h (λ/2). Using (2), one can show that λ2 2 λ λ λ3 h − 2 + − ξ0 (ST ) (λ/2) 2 . = = ¡ λ λ¢ 2 = 4 λ − 2 − +

The following corollary is easy to verify by estimating the intersection of the a 1 h geodesic γ( r,(a 1/2)λ) and T 0− L . It implies that the case T F˜ does not − 0 − 0 = q occur for {ξ} 3. λ ≥ Υ COROLLARY 92. Let q be even and suppose that γ γ ξ,η with a0 {ξ}λ 3. a0 1 h = ∈ = ≥ If γ intersects T − L0, then cq (ξ) [a0;1 , ah 1,...] with ah 1 1. = + ¡ ¢ + ≤ − LEMMA 93. Suppose q isoddandthat γ Υ. Letl bethegeodesicarc ρ λ,1 λ , ∈ + + i.e., the continuation of L . Then γ does not intersect l outwardly (i.e., in the 3 ± £ ¤ direction from 0 to ). ±∞ Proof. Take γ γ ξ,η Υ and assume ξ 0. Suppose that γ intersects l in the = ∈ > outward direction. Since γ can not intersect the geodesic TSL 1 [λ,λ 2/λ] ¡ ¢ − = + more than once, we have ξ (λ 1,λ 2/λ), and because γ Υ, we have R ∈ + + ∈ 3λ − ≤ η r . If w ξ,η is the intersection between γ and the line T L iR+, then < − 1 = 2 + w ξ,η w (ξ, r ) w (λ 1, r ). To show that w T ρ ρ sinπ/q, ℑ > ℑ¡ ¢ − ≥ ℑ + − ℑ > ℑ = ℑ = it is enough to bound w (λ 1, r ) from below. By Lemma 69, we have ¡ ¢ ℑ + − 2 3λ 3λ 5λ w (λ 1, r ) λ 1 r (1 λ/2) R ℑ + − = + − 2 2 − = − 2 − µ ¶µ ¶ µ ¶ 2 2 (1 λ/2)(1 λ/2 (2λ R 1)) sin π/q (1 λ/2)(2λ R 1) sin π/q, = − + + − − = + − − − > since 2λ R 1and1 λ/2 0. Hence w ξ,η sinπ/q and γ does not intersect > + − > ℑ > l in the direction from 0 to . An analogous argument for ξ 0 concludes the ∞ ¡ ¢ < lemma. Υ LEMMA 94. For q odd, let γ γ ξ,η r be reduced with a0 {ξ}λ 2. If γ a 1 = h 1∈ 1 3 = ≥ intersects T 0− L , then T ξ,η F˜ + ξ,η P − Σ . 0 =¡ q ¢ ∈ Proof. Consider once more¡ Figure¢ 6 showing¡ ¢ the arcs¡ around¢ ρ. Analogously to f f a 1 a 1 1 j the proof of Lemma 90, we have w T 0− ω T 0− ST − SL , for 0 j 2j ∈ j = 0 ≤ ≤ a0 1 a0 1 1 j 1 h 1, and w2j 1 T − χj T − ST − + L1, for 0 ¡ j h¢, with the corre- + + ∈ = ≤ ≤ j 1 1 a0 j 1 a0 sponding maps A2j 1 (TS) + T − and A2j (ST ) ST − . Set γj : A j γ and + = ¡ ¢ = = ξ : A ξ. There are now four possible ways to produce a return to Σ: j = j 1 a) if γ2j 1 Υr and z P γ2j 1 Σ , + ∈ = + ∈ 2 b) if γ2j 1 Υ but TSγ2j 1 Υr and z P TSγ2j 1 Σ , − ∉ + ∈ = + ∈ JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 SYMBOLICDYNAMICSFORTHEGEODESICFLOWON HECKE SURFACES 625

0 c) if γ2j Υr and z P γ2j Σ , ∈ 1= ∈ 3 d) if γ Υ but T ± γ Υ and z P γ Σ± . 2j ∉ 2j ∈ r = 2j ∈ 1 a We will see that most of these cases do not give a return. Since T − 0 ξ (λ/2,1), h ∈ Lemma 87 shows that cq (ξ) [a0;1 , ah 1,...] with ah 1 2. Suppose also that = + + ≥ c∗ η [0;b ,b ,...]∗. For the following arguments, it is important to remember q = 1 2 H R 1 that¡ the¢ action of TS on ∂ ∼ ∗ ∼ S is monotone as a rotation around ρ. Since j 1 1 a0 = = γ2j 1 (TS) + T − γ, we have + = j 1 ξ2j 1 (TS) + (λ/2,1) φ2j 2, φ2j 1 Iq + ∈ = − + − + ⊆ and hence γ2j 1 Υ for 0 j h 1. Furthermore,¡ ξ2h ¢1 TS φ2h, φ2h 1 + ∉ ≤ ≤ − + ∈ − − + ( 1,0), and therefore ξ2h 1 2/λ, so also γ2h 1 Υ. = − | + | < + ∉ ¡ ¢ If γ′ TSγ2j 1 γ2j 3, then γ′ Υ for 1 j h 1, and since we have 2j 1 = + = + 2j 1 ∉ ≤ ≤ − + h + h 2 1 a0 1 a0 ˜h 1 Υ A2h 3 (TS) + T − ST − ST − , clearly γ2h 3 A2h 3γ Fq + γ r + = = + = + = ∈ and we have a return at w2h 1 with z1 L2! j 1 a¡ + ¢ ∈ Since γ (ST ) ST − 0 γ, obviously 2j = j ξ2j S (TS) (λ/2,1) S φ2j ,S φ2j 1 λ φ2j 2,φ2j 1 , ∈ = − − − = − − + + 1 a so 3λ/2 ξ λ/2. But T¡ −¡0 η ¢r ¡λ R¢¢, so ¡ ¢ − < 2j < − < − − = − j η2j (ST ) S ( , R) φ2(h j) 1,r2j 1 for 0 j h ∈ −∞ − = − + + ≤ ≤ (cf. Remark 37) (respectively, we have³ ´

η2h 2 ST φ1,r2h 1 ST (1 λ,r ) S (1,R) ( 1, 1/R) + ∈ + = − = = − − and therefore η2j 0 and¡ γ2j Υ¢ r for 0 j h 1). <1 ∉ ≤ ≤ + 1 Finally, since T − η2j r2j 1 λ R and T ξ2j Iq , it is clear that T ± γ2j Υ < + − < − ∈ ∉ for 0 j h 1. ≤ ≤ +

Acknowledgments. The authors appreciate the many helpful discussions with Tobias Mühlenbruch on different aspects of this paper. We would also like to thankthe anonymous referee for his or her careful reading and several very help- ful remarks.

REFERENCES

[1] R. L. Adler and L. Flatto, Cross section maps for geodesic flows. I. The modular surface, In “ and Dynamical Systems, II (College Park, Md., 1979/1980),” volume 21 of “Progr. Math.”, 103–161, Birkhäuser Boston, Mass., 1982. [2] R. L. Adler and L. Flatto, The backward continued fraction map and geodesic flow, Ergodic Theory Dynam. Systems, 4 (1984), 487–492. [3] R. L. Adler and L. Flatto, Cross section map for the geodesic flow on the modular surface, In “Conference in Modern Analysis and Probability (New Haven, Conn., 1982),” volume 26 of “Contemp. Math.”, 9–24, Amer. Math. Soc., Providence, RI, 1984. [4] R. L. Adler and L. Flatto, Geodesic flows, interval maps, and symbolic dynamics, Bull. Amer. Math. Soc. (N.S.), 25 (1991), 229–334. [5] E.Artin, Ein mechanisches System mit quasiergodischen Bahnen, Hamb. Math. Abh., 3 (1924), 170–177.

JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 626 DIETER MAYER AND FREDRIK STRÖMBERG

[6] D. Birkhoff, Quelques théorèmes sur le mouvement des systèmes dynamiques, Bull. Soc. Math. France, 40 (1912), 305–323. [7] R. Bowen and C. Series, Markov maps associated with Fuchsian groups, Inst. Hautes Études Sci. Publ. Math., 50 (1979), 153–170. [8] R. M. Burton, C. Kraaikamp and T. A. Schmidt, Natural extensions for the Rosen fractions, Trans. Amer. Math. Soc., 352 (2000), 1277–1298. [9] Paula Cohen and J. Wolfart, Modular embeddings for some nonarithmetic Fuchsian groups, Acta Arith., 56 (1990), 93–110. [10] K. Dajani, C. Kraaikamp and W. Steiner, Metrical theory for α-Rosen fractions, Feb. 2007. arXiv:math/0702516 [11] M. Einsiedler and T. Ward, Ergodic theory: with a view towards number theory, In preparation. [12] D. Fried, Symbolic dynamics for triangle groups, Invent. Math., 125 (1996), 487–521. [13] D. Fried, Reduction theory over quadratic imaginary fields, J. Number Theory, 110 (2005), 44– 74. [14] K. Gröchenig and A. Haas, Backward continued fractions, Hecke groups and invariant mea- sures for transformations of the interval, Ergodic Theory Dynam. Systems, 16 (1996), 1241– 1274. [15] J. Hadamard, Les surfaces à courbures opposées et leurs lignes géodésiques, J. Math. Pures et Appl., 5 (1898), 27–73. [16] G. A. Hedlund, On the measure of the non-special geodesics on a surface constant negative curvature, Proc. Natl. Acad. Sci. USA, 19 (1933), 345–348. [17] G. A. Hedlund, On the metrical transitivity of the geodesics on closed surfaces of constant neg- ative curvature, Ann. of Math. (2), 35 (1934), 787–808. [18] G. A. Hedlund, Two-dimensional manifolds and transitivity, Ann.of Math.(2), 37 (1936), 534– 542. [19] G. A. Hedlund, Fuchsian groups and mixtures, Ann. of Math. (2), 40 (1939), 370–383. [20] E.Hopf, Fuchsian groups and ergodic theory, Trans. Amer. Math. Soc., 39 (1936), 299–314. [21] E. Hopf, Statistik der geodätischen Linien in Mannigfaltigkeiten negativer Krümmung, Ber. Verh. Sächs. Akad. Wiss. Leipzig, 91 (1939), 261–304. [22] A. Hurwitz, Über eine besondere Art der Kettenbruch-Entwickelung reeller Grössen, Acta Math., 12 (1889), 367–405. [23] S. Katok, “Fuchsian Groups,” Chicago Lectures in Mathematics, University of Chicago Press, Chicago, IL, 1992. [24] S. Katok and I. Ugarcovici, Arithmetic coding of geodesics on the modular surface via contin- ued fractions, In “European Women in Mathematics—Marseille 2003”, volume 135 of “CWI Tract”, 59–77. Centrum Wisk. Inform., Amsterdam, 2005. [25] S. Katok and I. Ugarcovici, Symbolic dynamics for the modular surface and beyond, Bull. Amer. Math. Soc. (N.S.), 44 (2007), 87–132 (electronic). [26] P. Koebe, Riemannsche Mannigfaltigkeiten und nichteuklidische Raumformen. IV: Verlauf geodätischer Linien, Sitzungsberichte Akad. Berlin, 1929 (1929), 414–457. [27] J. Lehner, “Discontinuous Groups and Automorphic Functions,” Mathematical Surveys, No. VIII. American Mathematical Society, Providence, R.I., 1964. [28] D. Lind and B. Marcus, “An Introduction to Symbolic Dynamics and Coding,” Cambridge University Press, Cambridge, 1995. [29] F. Löbell, Über die geodätischen Linien der Clifford-Kleinschen Flächen, Math. Z., 30 (1929), 572–607. [30] G. A. Morse, M. Hedlund, Symbolic dynamics, Amer. J. Math., 60 (1938), 815–866. [31] H.M.Morse, A one-to-one representation of geodesics on a surface of negative curvature, Amer. J. Math., 43 (1921), 33–51. [32] H. M. Morse, Recurrent geodesics on a surface of negative curvature, Trans. Amer. Math. Soc., 22 (1921), 84–100.

JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627 SYMBOLICDYNAMICSFORTHEGEODESICFLOWON HECKE SURFACES 627

[33] P. J. Myrberg, Ein Approximationssatz für die Fuchsschen Gruppen, Acta Math., 57 (1931), 389–409. [34] H. Nakada, Metrical theory for a class of continued fraction transformations and their natural extensions, Tokyo J. Math., 4 (1981), 399–426. [35] H. Nakada, Continued fractions, geodesic flows and Ford circles, In “Algorithms, Fractals, and Dynamics (Okayama/Kyoto, 1992)”, 179–191. Plenum, New York, 1995. [36] J. Nielsen, Om geodætiske linier i lukkede mangfoldigheder med konstant negativ krumning, Mat. Tidsskrift B, 1925 (1925), 37–44. [37] D. Ornstein, “Ornstein Theory,” Scholarpedia, 2008, 3(3):3957. [38] D. Ornstein and B. Weiss, On the Bernoulli nature of systems with some hyperbolic structure, Ergodic Theory Dynam. Systems, 18 (1998), 441–456. [39] D. S. Ornstein and B. Weiss, Geodesic flows are Bernoullian, Israel J. Math., 14 (1973), 184–198. [40] H. Poincaré, Mémoire sur les courbes définies par une équation differentielle, J. Math. Pures Appl., 3 (1882), 251–296. Ch. V-IX. [41] J. G. Ratcliffe, “Foundations of Hyperbolic Manifolds,” Graduate Texts in Mathematics, 149, Springer-Verlag, New York, 1994. [42] D. Rosen, A class of continued fractions associated with certain properly discontinuous groups, Duke Math. J., 21 (1954), 549–563. [43] D. Rosen and T. A. Schmidt, Hecke groups and continued fractions, Bull. Austral. Math. Soc., 46 (1992), 459–474. [44] D. Rosen and C. Towse, Continued fraction representations of units associated with certain Hecke groups, Arch. Math. (Basel), 77 (2001), 294–302. [45] T. A. Schmidt, Remarks on the Rosen λ-continued fractions, In “Number Theory with an Em- phasis on the Markoff Spectrum (Provo, UT, 1991)”, volume 147 of “Lecture Notes in Pure and Appl. Math.”, 227–238. Dekker, New York, 1993. [46] P. Schmutz Schaller and J. Wolfart, Semi-arithmetic Fuchsian groups and modular embed- dings, J. London Math. Soc. (2), 61 (2000), 13–24. [47] C. Series, Symbolic dynamics for geodesic flows, Acta Math., 146 (1981), 103–128. [48] C. Series, The modular surface and continued fractions, J. London Math. Soc. (2), 31 (1985), 69–80.

DIETER MAYER : Institut für Theoretische Physik, Techni- sche Universität Clausthal, Abteilung Statistische Physik und Nichtlineare Dynamik, Arnold Som- merfeld Straße 6, 38678 Clausthal–Zellerfeld, Germany

FREDRIK STRÖMBERG :Fachbereich Mathematik, AG AGF,Technische Universität Darmstadt, Schloßgartenstraße 7, 64289 Darmstadt, Germany

JOURNAL OF MODERN DYNAMICS VOLUME 2, NO. 4 (2008), 581–627