Structure of attractors for (a,b)-continued fraction transformations

We study a two-parameter family of one-dimensional maps and related (a,b)-continued fractions suggested for consideration by Don Zagier. We prove that the associated natural extension maps have attractors with finite rectangular structure for the entire parameter set except for a Cantor-like set of one-dimensional Lebesgue zero measure that we completely describe. We show that the structure of these attractors can be"computed"from the data (a,b), and that for a dense open set of parameters the Reduction theory conjecture holds, i.e. every point is mapped to the attractor after finitely many iterations. We also show how this theory can be applied to the study of invariant measures and ergodic properties of the associated Gauss-like maps.


Introduction
The standard generators T (x) = x + 1, S(x) = −1/x of the modular group SL(2, Z) were used classically to define piecewise continuous maps acting on the extended real lineR = R ∪ {∞} that led to well-known continued fraction algorithms. In this paper we present a general method of constructing such maps suggested by Don Zagier, and study their dynamical properties and associated generalized continued fraction transformations.
Let P be the two-dimensional parameter set and consider the map f a,b :R →R defined as Using the first return map of f a,b to the interval [a, b), denoted byf a,b , we introduce a two-dimensional family of continued fraction algorithms and study their properties. We mention here three classical examples: the case a = −1/2, b = 1/2 gives the "nearest-integer" continued fractions considered first by Hurwitz in [5], the case a = −1, b = 0 described in [19,7] gives the "minus" (backward) continued fractions, while the situation a = −1, b = 1 was presented in [17,8] in connection with a method of symbolically coding the geodesic flow on the modular surface following Artin's pioneering work [3]. Also, in the case b − a = 1, the class of one-parameter maps f b−1,b with b ∈ [0, 1] is conceptually similar to the "α-transformations" introduced by Nakada in [14] and studied subsequently in [12,13,15,16,18].
The main object of our study is a two-dimensional realization of the natural extension map of f a,b , F a,b :R 2 \ ∆ →R 2 \ ∆, ∆ = {(x, y) ∈R 2 |x = y}, defined by The map F a,b is also called the reduction map. Numerical experiments led Don Zagier to conjecture that such a map F a,b has several interesting properties for all parameter pairs (a, b) ∈ P that we list under the Reduction theory conjecture.
(1) The map F a,b possesses a global attractor set D a,b = ∩ ∞ n=0 F n (R 2 \ ∆) on which F a,b is essentially bijective.
(2) The set D a,b consists of two (or one, in degenerate cases) connected components each having finite rectangular structure, i.e. bounded by nondecreasing step-functions with a finite number of steps. (3) Every point (x, y) of the plane (x = y) is mapped to D a,b after finitely many iterations of F a,b . Figure 1 shows the computer picture of such a the set D a,b with a = −4/5, b = 2/5. It is worth mentioning that the complexity of the domain D a,b increases as (a, b) approach the line segment b − a = 1 in P, a situation fully analyzed in what follows. The main result of this paper is the following theorem.
Main Result. There exists an explicit one-dimensional Lebesgue measure zero, uncountable set E that lies on the diagonal boundary b = a + 1 of P such that: (a) for all (a, b) ∈ P \ E the map F a,b has an attractor D a,b satisfying properties (1) and (2) above; (b) for an open and dense set in P \ E property (3), and hence the Reduction theory conjecture, holds. For the rest of P \ E property (3) holds for almost every point ofR 2 \ ∆. We point out that this approach gives explicit conditions for the set D a,b to have finite rectangular structure that are satisfied, in particular, for all pairs (a, b) in the interior of the maximal parameter set P. At the same time, it provides an effective algorithm for finding D a,b , independent of the complexity of its boundary (i.e., number of horizontal segments). The simultaneous properties satisfied by D a,b , attracting set and bijectivity domain for F a,b , is an essential feature that has not been exploited in earlier works. This approach makes the notions of reduced geodesic and dual expansion natural and transparent, with a potential for generalization to other Fuchsian groups. We remark that for "α-transformations" [14,12], explicit descriptions of the domain of the natural extension maps have been obtained only for a subset of the parameter interval [0, 1] (where the boundary has low complexity).
The paper is organized as follows. In Section 2 we develop the theory of (a, b)continued fractions associated to the map f a,b . In Section 3 we prove that the natural extension map F a,b possesses a trapping region; it will be used in Section 6 to study the attractor set for F a,b . In Section 4 we further study the map f a,b . Although it is discontinuous at x = a, b, one can look at two orbits of each of the discontinuity points. For generic (a, b), these orbits meet after finitely many steps, forming a cycle that can be strong or weak, depending on whether or not the product over the cycle is equal to the identity transformation. The values appearing in these cycles play a crucial role in the theory. Theorems 4.2 and 4.5 give necessary and sufficient conditions for b and a to have the cycle property. In Section 5 we introduce the finiteness condition using the notion of truncated orbits and prove that under this condition the map F a,b has a bijectivity domain A a,b with a finite rectangular structure that can be "computed" from the data (a, b) (Theorem 5.5). In Section 6 we define the attractor for the map F a,b by iterating the trapping region, and identify it with the earlier constructed set A a,b assuming the finiteness condition (Theorem 6.4). In Section 7 we prove that the Reduction theory conjecture holds under the assumption that both a and b have the strong cycle property, and that under the finiteness condition property, (3) holds for almost every point ofR 2 \ ∆.
In Section 8 we prove that the finiteness condition holds for all (a, b) ∈ P except for an uncountable set of one-dimensional Lebesgue measure zero that lies on the boundary b = a + 1 of P, and we present a complete description of this exceptional set. We conclude by showing that the set of (a, b) ∈ P where a and b have the strong cycle property is open and dense in P. And, finally, in Section 9 we show how these results can be applied to the study of invariant measures and ergodic properties of the associated Gauss-like maps.
2. Theory of (a, b)-continued fractions Consider (a, b) ∈ P. The map f a,b defines what we call (a, b)-continued fractions using a generalized integral part function ⌊x⌉ a,b : for any real x, let where ⌊x⌋ denotes the integer part of x and ⌈x⌉ = ⌊x⌋ + 1.
Let us remark that the first return map of f a,b to the interval [a, b),f a,b , is given by the function We prove that any irrational number x can be expressed in a unique way as an infinite (a, b)-continued fraction x = n 0 − 1 n 1 − 1 n 2 − 1 . . . which we will denote by ⌊n 0 , n 1 , . . . ⌉ a,b for short. The "digits" n i , i ≥ 1, are non-zero integers determined recursively by (2.2) n 0 = ⌊x⌉ a,b , x 1 = − 1 x − n 0 , and n i = ⌊x i ⌉ a,b , x i+1 = − 1 In what follows, the notation (α 0 , α 1 , . . . , α k ) is used to write formally a "minus" continued fraction expression, where α i are real numbers.
Theorem 2.1. Let x be an irrational number, {n i } the associated sequence of integers defined by (2.2) and r k = (n 0 , n 1 , . . . , n k ) .
Then the sequence r k converges to x.
Proof. 1 We start by proving that none of the pairs of type (p, 1), (−p, −1), with p ≥ 1 are allowed to appear as consecutive entries of the sequence {n i }. Indeed, if n i+1 = 1, then The authors proved initially the convergence statement assuming −1 ≤ a ≤ 0 ≤ b ≤ 1, and two Penn State REU students, Tra Ho and Jesse Barbour, worked on the proof for a, b outside of this compact triangular region. The unified proof presented here uses some of their ideas.
Properties (i)-(iii) show that r k = p k /q k for k ≥ 0. Moreover, the sequence r k is a Cauchy sequence because Hence r k is convergent.
Remark 2.3. It is easy to see that if the (a, b)-continued fraction expansion of a real number is eventually periodic, then the number is a quadratic irrationality.
It is not our intention to present in this paper some of the typical number theoretical results that can be derived for the class of (a, b)-continued fractions. However, we state and prove a simple version about (a, b)-continued fractions with "bounded digits". For the regular continued fractions, this is a classical result due to Borel and Bernstein (see [4,Theorem 196] for an elementary treatment). We are only concerned with (a, b)-expansions that are written with two consecutive digits, a result explicitly needed in Sections 7 and 8. Proof. First, notice that if m = 1, then the set Γ (1) a,b has obviously zero measure, since the pairs (2, 1) and (−2, −1) are not allowed in the (a, b)-expansions.
The length of this interval is Now we estimate the ratio . This proves that for every k ≥ 1 Therefore, in all cases, l(I for every k ≥ 1, the proposition follows.

Attractor set for F a,b
The reduction map F a,b defined by (1.2) has a trapping domain, i.e. a closed set Θ a,b ⊂R 2 \ ∆ with the following properties: (i) for every pair (x, y) ∈R 2 \ ∆, there exists a positive integer N such that Theorem 3.1. The region Θ a,b consisting of two connected components (or one if is the trapping region for the reduction map F a,b . Proof. The fact that the region Θ a,b is F a,b -invariant is verified by a direct calculation. We focus our attention on the attracting property of Θ a,b . Let (x, y) ∈ R 2 \ ∆, write y = ⌊n 0 , n 1 , . . . ⌉ a,b , and construct the following sequence of real pairs {(x k , y k )} (k ≥ 0) defined by x 0 = x, y 0 = y and: If y is rational and its (a, b)-expansion terminates y = ⌊n 0 , n 1 , . . . , n l ⌉ a,b , then y l+1 = ±∞, so (x, y) lands in Θ a,b after finitely many iterations. If y has an infinite (a, b)-expansion, then y k+1 = ⌊n k+1 , n k+2 , . . . ⌉ a,b , and y k+1 ≥ −1/a or y k+1 ≤ −1/b for k ≥ 0. Also, where ε k → 0. This shows that for k large enough x k+1 ∈ [−1, 1]. We proved that there exists N > 0, such that Let us study the next iterates of (x,ỹ) . Notice that if a = 0, then y k+1 ≤ −1/b for all k ≥ 0 (so Θ u a,b = ∅) and if b = 0, then y k+1 ≥ −1/a for al k ≥ 0 (so Θ l a,b = ∅). Using the trapping region described in Theorem 3.1 we define the associated attractor set are also bijectivity domains for the corresponding maps F a,b . Therefore, in these cases the attractor D a,b coincides with the trapping region Θ a,b , so the properties mentioned in the introduction are obviously satisfied. In what follows, all our considerations will exclude these degenerate cases.

Cycle property
In what follows, we simplify the notations for f a,b , ⌊, ·⌉ a,b ,f a,b and F a,b to f , ⌊, · ⌉,f and F , respectively, assuming implicitly their dependence on parameters a, b. We will use the notation f n (orf n ) for the n-times composition operation of f (orf ). Also, for a given point x ∈ (a, b) the notationf (k) means the transformation of type T i S (i is an integer) such that The map f is discontinuous at x = a, b, however, we can associate to each a and b two forward orbits: to a we associate the We use the convention that if an orbit hits one of the discontinuity points a or b, then the next iterate is computed according to the lower or upper location: for example, if the lower orbit of b hits a, then the next iterate is T a, if the upper orbit of b hits a then the next iterate is Sa.
Now we explore the patterns in the above orbits. The following property plays an essential role in studying the map f . T −1 f −k1 f m1 S = Id, we say that a has strong cycle property, otherwise, we say that a has weak cycle property.
Similarly, we say that b has cycle property if for some non-negative integers m 2 , k 2 We will refer to the set {Sb, f Sb, . . . , f k2−1 Sb} as the lower side of the b-cycle, to the set as the upper side of the b-cycle, and to c b as the end of the b-cycle. If the product over the b-cycle equals the identity transformation, i.e.
T f −m2 f k2 S = Id, we say that b has strong cycle property, and otherwise we say that b has weak cycle property.
It turns out that the cycle property is the prevalent pattern. It can be analyzed and described explicitly by partitioning the parameter set P based on the first digits of Sb, ST a, and Sa, ST −1 b, respectively. Figure 3 shows a part of the countable partitions, with B −1 , B −2 , . . . denoting the regions where Sb has the first digit −1, −2, . . . , and A 1 , A 2 , . . . , denoting the regions where Sa has the first digit 1, 2, . . . . For most of the parameter region, the cycles are short: everywhere except for the very narrow triangular regions shown in Figure 3 the cycles for both a and b end after the first return to [a, b). However, there are Cantor-like recursive sets where the lengths of the cycles can be arbitrarily long. Part of this more complex structure, studied in details in Section 8, can be seen as very narrow triangular regions close to the boundary segment b − a = 1.  The structure of the set where the cycle property holds for b is described next for the part of the parameter region with 0 < b ≤ −a < 1. We make use extensively of the first return mapf .
(I) Suppose that there exists n ≥ 0 such that , a + 1 for k < n, andf n T m Sb ∈ a, b b + 1 . Proof. (I) In the case m = 1, and assuming a < T Sb < a + 1 we have and the cycle relation for b can be explicitly described as In the particular situation that T Sb = a, the lower orbit of b hits a and continues to a + 1, while the upper orbit hits b 1−b = −1/a. This means that the iterates will follow the lower and upper orbits of a, respectively, thus statement (ii) holds. Since the second inequality (4.1) is strict, the case (iii) cannot occur.
For the case m = 2 (and assuming T 2 Sb = a) we analyze the following situations: if b < 1 2 , then 2 − 1 b < 0, and the cycle relation is since we must also have 2 − 1 b < a + 1, i.e. b ≤ 1 1−a , and the cycle relation is The above cycles are strong. If b = 1 2 the cycle relation is It is easy to check that this cycle is weak. In the particular situation when T 2 Sb = a, the lower orbit of b hits a, and continues with a + 1, while the upper orbit still hits b 1−2b = −1/a. This means that the iterates will follow the lower and upper orbits of a, respectively, and statement (ii) holds. The relation 2 that does not have the cycle property and the orbits of Sb and T −1 b are periodic; this is the only possibility for (iii) to hold.
The situation for m ≥ 3 is more intricate. First we will need the following lemmas.
Proof. Applying ST S to the corresponding inequalities we obtain where the last inequality is valid for a ≤ 1−  <f k T m Sb < a + 1. Proof.
(1) Applying T m S to the inequality (4.6), we obtain (2) In order to determine the upper side of the b-cycle, we will use the following relation in the group SL(2, Z) obtained by concatenation of the "standard" relations (from right to left) and Lemma 4.3 repeatedly. The proof is by induction on n. For the base case n = 1 we have b b + 1 < T m Sb < a + 1.
which means that on the upper side of the b-cyclef (1) = T −1 andf (i) = T −2 S for 1 < i ≤ m − 1. Using (4.8) for i = m we obtain i.e. (4.7) holds with p = m − 2. Now suppose the statement holds for n = n 0 , and for all k < n 0 + 1 we have b b + 1 <f k T m Sb < a + 1.

Now we complete the proof of the theorem. In what follows we introduce the notations
and write I ℓ , I u for the corresponding closed intervals.
(I) Iff n T m Sb ∈ I ℓ , then condition (b) of Lemma 4.3 is satisfied, and It follows thatf (p+1) = T −2 S, therefore (4.7) can be rewritten as which means that we reached the end of the cycle. More precisely, . In this case c b > Sa. Since the cycle relation in both cases is equivalent to the identity (4.7), the cycle property is strong, and (i) is proved.
is the end of the cycle; for j < p, b − 1 <f j T −1 b < a 1−a . In this case the cycle ends "before" the identity (4.7) is complete, therefore the product over the cycle is not equal to identity, and the cycle is weak.
(ii) Iff n T m Sb = a, then following the argument in (i) and using relation (4.7) we obtain that the upper orbit of b hits T −1 Sf p T −1 b = Sf n T m Sb = Sa = −1/a, while the lower orbit hits the value a + 1, hence b satisfies the cycle property if and only if a does.
(iii) Iff n T m Sb = b b+1 , then following the argument in (i) we obtain However, one needs to apply one more T −1 to follow the definition of the map f , hencef (p+1) = T −3 S, not T −2 S, and the cycle will not close. One also observes that in this case the (a, b)-expansions of Sb and T −1 b will be periodic, and therefore the cycle will never close.
This means that for all images under the original map f on the lower orbit of b we have while for the images on the upper orbit of b Since these ranges do not overlap, the cycle cannot close, and b has no cycle property.
A similar result holds for the a-cycles. First, if Sa has the first digit 1, i.e. b ≤ Sa < b + 1, then one can easily write the a-cycle, similarly to (4.1). For the rest of the parameter region we have: Proof. The proof follows the proof of Theorem 4.2 with minimal modifications. In particular, the relation (4.7) should be replaced by relation , on the lower side we have T Sf n T m ST a = Sb, and on the upper side, using (4.12), . Therefore a has (strong or weak) cycle property if and only if b does.
Let us now describe the situation when a ≤ −1. Proof. It is easy to see that a = −1 has the degenerate weak cycle: while a < −1 satisfies the following strong cycle relation: In order to study the orbits of b, let m ≥ 0 such that a ≤ T m Sb < a + 1. If m = 0, then Sb = a (since Sb ≤ a), and the cycle of b is identical to the one described by (4.13). If m ≥ 1, then one can use relation (4.8) to construct the b-cycle. More precisely, if a < T m Sb < a + 1, then we have: If T m Sb = a, then it happens again that the lower orbit of b hits a, and then T a, while the upper orbit hits Sa. Following now the cycle of a described by (4.14), we conclude that b satisfies the strong cycle property.
If T m Sb = 0, i.e. b = 1/m, then a minor modification of the above b-cycle gives us the following weak cycle relation: The following corollaries are immediate from the proof of Theorems 4.2, 4.5, 4.6.

Finiteness condition implies finite rectangular structure
In order to state the condition under which the natural extension map F a,b has an attractor with finite rectangular structure mentioned in the Introduction, we follow the split orbits of a and b if a has no cycle property lower part of a-cycle if a has strong cycle property lower part of a-cycle ∪{0} if a has weak cycle property, if a has no cycle property upper part of a-cycle if a has strong cycle property lower part of a-cycle ∪{0} if a has weak cycle property, and, similarly, L b and U b by if b has no cycle property lower part of b-cycle if b has strong cycle property lower part of b-cycle ∪{0} if b has weak cycle property,  Similar statements hold for the sets L a , U a and U b as well.
Proof. The two properties follow from Theorem 4.2 and its proof. If b does not have the cycle property, but its lower orbit is eventually periodic, then one uses Lemma 4.4 to conclude that the upper orbit of b has to be eventually periodic. (A1) The set A a,b consists of two connected components each having finite rectangular structure, i.e. bounded by non-decreasing step-functions with a finite number of steps.
Proof. (A1) We will construct a set A a,b whose upper connected component is bounded by a step-function with values in the set U a,b = U a ∪ U b that we refer to as upper levels), and whose lower connected component is bounded by a step-function with values in the set L a,b = L a ∪ L b that we refer to as lower levels. Notice that each level in U a and U b appears exactly once, but if the same level appears in both sets, we have to count it twice in U a,b . The same remark applies to the lower levels. Now let y ℓ ∈ L a,b be the closest y-level to Sb with y ℓ ≥ Sb, and y u ∈ U a,b be the closest y-level to Sa with y u ≤ Sa. Since each level in U a and in L b appears only once, if y u = Sa, y u can only belong to U b , and if y ℓ = Sb, y ℓ can only belong to L a .
We consider the rays [−∞, where x a and x b are unknown, and "transport" them (using the special form of the natural extension map F a,b ) along the sets L b , U b , L a and U a respectively until we reach the levels y u and y ℓ (see Figure 4). Now we set-up a system of two fractional linear equations by equating the right end of the segment at the level Sb with the left end of the segment at the level y ℓ , and, similarly, the left end of the segment at the level Sa and the right end of the level y u . Lemma 5.6. The system of two equations at the consecutive levels y u and Sa, and y ℓ and Sb, has a unique solution with x a ≥ 1 and x b ≤ −1.
Proof. In what follows, we present the proof assuming that 0 < b ≤ −a < 1. The situation a ≤ −1 is less complex due to the explicit cycle expressions described in Theorem 4.6 and will be discussed at the end. Let m a , m b be positive integers such that a ≤ T ma ST a < a + 1 and a ≤ T m b Sb < a + 1. For the general argument we assume that m a , m b ≥ 3, the cases m a or m b ∈ {1, 2} being considered separately. The level y u may belong to U a or U b , and the level y ℓ may belong to L a or L b , therefore we need to consider 4 possibilities. Case 1: y u ∈ U a , y ℓ ∈ L a . Then we have − is a product of factors T −i S (that appear on the upper orbit of a) with i = 2 or 3, andf n2 + is a product of factors T i S (that appear on the lower orbit of a) with i = m or m + 1. Using (4.12) we rewrite the first equation as Sincef k1 + is a product of factors T i S with i = m or m + 1, m ≥ 3, we conclude that T x a has a finite formal continued fraction expansion starting with m ′ ≥ 3, i.e. T x a > 2, and x a > 1. Furthermore, from the second equation . Like in Case 1 we see that x a > 1, and has a formal continued fraction expansion starting with m ′ ≥ 3, and therefore is > 2.
, and using the second equation and simplifying, we obtain . Since all its factors are of the form T i S with i ≥ 3, the matrixf k2 T m+1 Sf n2 + is hyperbolic and its attracting fixed point T x a has periodic formal continued fraction expansion starting with m ′ ≥ 3 (see Theorem 3.1 of [9]), hence x a > 1. Finally, as in Case 1, . From the second equation we obtain Now we analyze the particular situations when m a or m b ∈ {1, 2}, using the explicit cycle descriptions that exist for these situations as described by Theorems 4.2 and 4.5.
(i) If m a = m b = 1, then relation (4.2) for the b-cycle and a similar one for the a-cycle shows that y ℓ = − 1 b + 1 and y u = − 1 a − 1, therefore x a = 1 and x b = −1.
(ii) If m a = 1, m b = 2, following the explicit cycles given by (4.3) we obtain y ℓ = −1/b + 1, and (iii) If m a = 1, m b ≥ 3, using the cycle structure in Theorem 4.2 we obtain y ℓ = 1/b + 1 and (iv) If m a = 2, m b = 2, using the cycle structure in Theorems 4.2 and 4.5 we obtain y ℓ = − 1 a+1 + 1 and y u = − 1 b−1 − 1, and a calculation in this particular case, like in Lemma 5.6, Case 3 implies that x a > 1 and Definition 5.7. We say that two consecutive levels y 1 ≤ y 2 of L a,b , respectively, U a,b , are called connected by a vertical segment (we will refer to this as connected) if the x-coordinate of the right end point of the horizontal segment on the level y 1 is equal to the the x-coordinate of the left end point of the horizontal segment on the level y 2 .
We will prove that all levels of L a,b and all levels of U a,b are connected.We first look at the levels in L a,b . By Lemma 5.6 the levels y u and Sa, and the levels Sb and y ℓ are connected. Proof. Suppose there is y ∈ L a,b such that ST a ≤ y ≤ Sb. Then y ∈ L a or L b . In either case, since by Lemmas 4.8 and 4.7 the truncated orbits L a , L b do not have repeated values, neither ST a = y nor y = Sb is possible. Thus the only case we need to consider is ST a < y < Sb.
Then, either y = Sy ′ for some y ′ ∈ L a,b (0 < y ′ ≤ a + 1) or y = T y ′′ for some y ′′ ∈ L a,b . These would imply that either y ′ > T a, which is impossible, or T y ′′ < Sb, i.e. y ′′ < T −1 Sb, which is also impossible (if y ′′ < T −1 Sb then y = T y ′′ must be the end of the a-cycle, by Theorem 4.5). The x-coordinate of the right end point of the segment at the level ST a and of the left end point of the segment at the level Sb is equal to 0.The second part of the proof is similar.
The following proposition will be used later in the proof.
Proposition 5.9. Suppose that the set L a,b is finite and y ∈ L a,b with y > ST a.
Proof. Suppose that y ∈ L a and a satisfies the cycle property. It follows that such an n 0 exists or f n0 y is the end of the a-cycle. We will show that the latter is possible only if f n0 y = 0, i.e. it is the end of a weak cycle. Suppose f n0 y is the end of the a-cycle. Then if we must have f n0−1 y < 0 since otherwise the cycle would not stop at S, but f n0−1 (ST a) > 0 since for ST a we have not reached the end of the cycle. This contradicts the monotonicity of f n0−1 and the original assumption y > ST a, thus is impossible. The other possibility is But this either implies that f n0−1 y < T −1 Sb, and by monotonicity of Sb, which implies that we have reached the end of the cycle of ST a as well, a contradiction, or, f n0 y = 0, i.e. it is the end of a weak cycle. Now suppose y ∈ L b . Then by Lemma 5.8 y ≥ Sb, but since each level in L b appears only once, we must have but y > Sb. Now the argument that f n0 y cannot be the end of the b-cycle is exactly the same as for the a-cycle.
In the periodic case, let us assume that no such n 0 exists. Then, in case (1) = (a 1 , a 2 , . . . , a k , a k+1 , a k+2 , . . . a k+n ) is an eventually periodic symbolic sequence with the minimal period n and invariant under a left shift by m, then σ is purely periodic and m is a multiple of n.
By the uniqueness property of (a, b)-expansions, this would imply that y = ST a or y = Sb, a contradiction.
Let y − b , y + b ∈ U a,b be two consecutive levels with y − b ≤ b < y + b , and y − a , y + a ∈ L a,b be two consecutive levels with y − a < a ≤ y + a . Lemma 5.10. There is always one level connected with level a + 1, and the levels y − a and y + a are connected by the vertical segment at x a . Proof. By Lemmas 5.6 and 5.8, we know that three consecutive levels ST a ≤ Sb ≤ y ℓ are connected. Moreover, their images remain connected under the same transformations in SL(2, Z). Since each level in U a and in L a appears only once, at least one of the two inequalities must be strict, i.e. if ST a = Sb, then ST a = Sb < y ℓ , and if Sb = y ℓ , then ST a < Sb = y ℓ .
First we prove that y ℓ < T Sb. Suppose y ℓ ≥ T Sb. Its pre-image must be y ′ ℓ = T −1 y ℓ since for any y, 0 < y < T a, Sy < ST a ≤ Sb < T Sb, and we would have Sb ≤ y ′ ℓ < y ℓ that contradicts the assumption that y ℓ is the next level above Sb. Therefore, if the first digit in the (a, b)-expansion of Sb is −m, then the first digit of y ℓ is −(m − 1) or −m. In the first case, the three levels T m−1 Sb < a ≤ T m−1 y ℓ are connected and satisfy T m−1 Sb = y − a , T m−1 y ℓ = y + a . Therefore, the levels T m Sb and a + 1 are connected.
For the second case, we know that Sb ≤ y ℓ and a ≤ T m Sb ≤ T m y ℓ < a + 1.
If Sb = y ℓ , then y ℓ ∈ L a , and ST a < y ℓ . If Sb < y ℓ , then y ℓ ∈ L b , or y ℓ ∈ L a and ST a < y ℓ .
Let us assume that y ℓ belongs to L a . Since ST a < y ℓ , by Proposition 5.9, there are two possibilities: (1) f n0 y ℓ is the end of a weak cycle.
(2) There exists n 0 such that ρ(f n y ℓ ) = ρ(f n ST a) for all n < n 0 , and ρ(f n0 y ℓ ) = ρ(f n0 ST a). In the first case, we have f n0 ST a = y − a and f n0 Sb = y + a , or f n0 Sb = y − a and f n0 y ℓ = y + a . Therefore, either f n0+1 ST a or f n0+1 Sb is connected with level a + 1. In the second case, we notice that in contradiction with the choice of n 0 . Further, there are two possibilities: In case (i) we obtain f n0 y ℓ < a ≤ f n0 ST a which contradicts the monotonicity of f and the original assumption y ℓ > ST a. Thus the only possibility is By using the monotonicity of f n0 we have and conclude that f n0 ST a = y − a and f n0 Sb = y + a , or f n0 Sb = y − a and f n0 y ℓ = y + a . Therefore, either f n0+1 ST a or f n0+1 Sb is connected with level a + 1. The case when y ℓ belongs to L b is very similar, and in this case f n0 Sb = y − a , f n0 y ℓ = y + a , and f n0+1 Sb is connected with a + 1. By construction, in both cases the common x-coordinate of the end points is equal to x a .
After an application of S the level connected with a + 1 will be connected with ST a, and now, instead of 3 connected levels ST a ≤ Sb ≤ y ℓ (with at least one strict inequality) we have at least 4 connected levels y ′ ≤ ST a ≤ Sb ≤ y ℓ (with no more than two equalities in a row).
The process continues with a growing number of connected levels, the highest being a + 1. Since on each step we cannot have more than two equalities in a row, the number of distinct levels in this sequence will also increase. Therefore, we obtain a sequence of connected levels It is evident from the construction that there are no unaccounted levels y ∈ L a,b , a + 1 ≥ y ≥ y s+1 . Now we prove a similar result for U a,b .
Lemma 5.11. There is always one level connected with level b − 1, and the levels y − b and y + b are connected by a vertical segment at x b . Proof. By Lemmas 5.6 and 5.8 we know that the three consecutive levels y u ≤ Sa ≤ ST −1 b are connected. It is easy to see that the first digit in (a, b)-expansion of ST −1 b is 2, and the first digit in (a, b)-expansion of Sa is either 1 or 2. Therefore, the first digit in (a, b)-expansion of y u is either 1 or 2. In the first case either In the second case, we know that y u ≤ Sa and If y u = Sa, y u must belong to U b , in which case y u < ST −1 b. If y u < Sa, then y u ∈ U a , or y u ∈ U b and y u < ST −1 b. Let us assume that y u belongs to U b . Since y u < ST −1 b, by Proposition 5.9 there are two possibilities: (1) f n0 y u is the end of a weak cycle, In the first case we obtain which contradicts the monotonicity of f n0 and the original assumption y u < ST −1 b. Thus the only possibility is By monotonicity of f n0 we have The case when y u belongs to the a-cycle is very similar, and in this case f n0 y u = y − b and f n0 Sa = y + b and T −1 f n0 Sa is connected with level b − 1. By construction, in both cases the common x-coordinate of the end points of the segments at the levels After an application of S the levels (2) will be connected with ST −1 b, and now, instead of 3 connected levels y u ≤ Sa ≤ ST −1 b we have at least 4 connected levels The process continues with a growing number of connected levels, the lowest being b − 1. Also the number of distinct levels will increase, and we obtain a sequence of connected levels It is evident from the construction that there are no unaccounted levels y ∈ U a,b , b − 1 ≤ y ≤ȳ t+1 . Now we complete the proof that all levels of L a,b are connected. For that it is sufficient to find a sequence of connected levels with the distance between the highest and the lowest level ≥ 1 and the lowest level ≥ T −1 Sb. This is because the set of levels in y ∈ L a,b satisfying T −1 Sb ≤ y ≤ a + 1 is periodic with period 1, and each y ∈ L a,b uniquely determines a horizontal segment on level y, as was explained just before Lemma 5.8.
If y s+1 ≤ a, then all levels in L a,b are connected. Suppose now that y s+1 > a. If y s+1 = y + a , then, since y + a is already connected with y − a , all levels of L a,b are connected. Now assume that y s+1 > y + a . Then either In the first case either T Sy s+1 = y ℓ = Sb (this can only happen if y s+1 ∈ L a ), or T Sy s > Sb is the next level above Sb, and hence T Sy s = y ℓ . In either case Sy s+1 ≤ Sy s ≤ · · · ≤ ST a ≤ Sb = T Sy s+1 are the connected levels with the distance between the lowest and the highest equal to 1, thus we conclude that all levels of L a,b are connected.
In the second case, the two levels y + a < y s+1 will produce the ends of the cycles (one of them can be weak if one of y + a or y s+1 is equal to 0). By the cycle property (Proposition 4.4(ii)), there exists a level z ∈ U a,b , a 1−a < z < b such that z = (ST S)y s+1 . We claim that z = y − b . Suppose not, and z < y − b . Then y − b gives rise to the second cycle, and again by the cycle property, there exists y ∈ L a,b , y < b b+1 , such that y − b = ST Sy. Since ST S(z) = − z z−1 is monotone increasing for z < 1, we conclude that y > y s+1 in contradiction with (5.2). Thus y − b = (ST S)y s+1 . Then T Sy s+1 = Sy − b which implies that the right end of the segment at the level Sy − b , which is equal to the right end of the segment at the level Sb, is equal to the right end of the segment at the level T Sy s+1 (notice that this level may belong to L a,b , U a,b or be at infinity if y s+1 = 0). Since y s and y s+1 were connected, the left end of the segment at the level T Sy s is equal to the right end of the segment at the level T Sy s+1 even though they may belong to the boundaries of different connected components. Since T Sy s ∈ L a,b , we conclude that the segment at the level T Sy s is adjacent to the segment at the level Sb, i.e. T Sy s = y ℓ . Thus Sy s ≤ Sy s−1 ≤ · · · ≤ ST a ≤ Sb ≤ T Sy s are the connected levels with the distance between the lowest and the highest equal to 1, and therefore all levels in L a,b are also connected. The proof for U a,b follows exactly the same lines.
(A2) In order to prove the bijectivity of the map F on A a,b we write it as a union of the upper and lower connected components, A a,b = A u a,b ∪ A ℓ a,b , and subdivide each component into 3 pieces: be their images under the transformation F (see Figure 5). x Figure 5. Bijectivity of the map F a,b Since the set A a,b is bounded by step-functions with finitely many steps, each of the pieces U i , L i have the same property, and so do their images under F . By the construction of the set A a,b we know that the levels corresponding to the ends of the cycles c a and c b , if the cycles are strong, do not appear as horizontal boundary levels; the corresponding horizontal segments, let us call them the locking segments lie in the interior of the set A a,b . Furthermore, the images of all levels except for the levels next to the ends of the cycles, f k1−1 T a, f m1−1 Sa, f m2−1 Sb, and f k2−1 T −1 b, also belong to U a,b ∪ L a,b . The exceptional levels are exactly those between 0 and b and above T Sa in U a,b , and between a and 0 and below T −1 Sb in L a,b . The images of the horizontal segments belonging to these levels are the locking segments. Notice that the exceptional levels between 0 and b and between a and 0 constitute the horizontal boundary of the regions U 3 and L 3 .
Transporting the rays [−∞, x b ] and [x a , ∞] (with x a and x b uniquely determined by Lemma 5.6), along the corresponding cycles, and using the strong cycle property, we see that the "locking segment" in the horizontal boundary of U ′ 1 coincides with the locking segment of the horizontal boundary of L ′ 3 , and the locking segment in the horizontal boundary of L ′ 1 coincides with the locking segment of the horizontal boundary of U ′ 3 . It can happen that both "locking segments" belong to A u a,b or A ℓ a,b . If only one of the numbers a or b has the strong cycle property, then there will be only one locking segment.
If the cycle property is weak or the (a, b)-continued fraction expansion of one or both a and b is periodic, then all levels of L a , L b , U a and U b will belong to the boundary of A a,b , and there will be no locking segments. In these cases , where x 1 = x a . Let x 2 be the x-coordinate of the right vertical boundary segment of U 2 . Then the x-coordinate of the right vertical boundary segment of U 1 is −1/x 2 . Let us denote the highest level in U a,b by y 2 . Since y 2 ≤ −1/a + 1, y 2 − 1 ≤ −1/a is the next level after −1/a in U a,b . This is since if we had y ∈ U a,b such that y 2 − 1 < y < −1/a, its preimage y ′ = T y would satisfy y 2 < y ′ < −1/a + 1, a contradiction. By construction of the region A a,b the segments at the levels y 2 − 1 and −1/a are connected, therefore Sx 1 = T −1 Sx 2 . This calculation shows that L ′ 3 and U ′ 1 do not overlap and fit together by this vertical ray.
Thus in all cases the images This proves the bijectivity of the map F on A a,b except for some images of its boundary. This completes the proof in the case 0 < b ≤ −a < 1. Now we return to the case a ≤ −1 dropped from consideration before Lemma 5.6. The explicit cycle relations for this case have been described in Theorem 4.6. Notice that all lower levels are connected, and T m Sb is connected with a + 1. Therefore y ℓ = T Sb, and this implies that x a = m. The upper levels in the positive part are  and all upper level will be connected by an argument similar to one described obove. To prove the bijectivity of F on A a,b one proceeds the same way as above, the only modification being that level L 2 does not exist, and L 3 = {(x, y) ∈ A ℓ a,b , a ≤ y ≤ a + 1}.
The following corollary is evident from the proof of part (ii) of the above theorem.

Finite rectangular structure of the attracting set
Recall that the attracting set D a,b was defined by (3.1): starting with the trapping region Θ a,b described in Theorem 3.1, one has Lemma 6.1. Suppose that the map f satisfies the finiteness condition. Then, for each n ≥ 0, D n is a region consisting of two connected components, the upper one, D u n , and the lower one, D ℓ n , bounded by non-decreasing step-functions. Proof. The proof is by induction on n. The base of induction holds by the definition of the trapping region Θ a,b . For the induction step, let us assume that the region D n consists of two connected components, the upper one D u n and the lower one D ℓ n , bounded by non-decreasing step-functions. We will show that the region D n+1 consists of two connected components, D u n+1 and D ℓ n+1 , bounded by non-decreasing step-functions.
In what follows, we present the proof assuming that 0 < b ≤ −a < 1. The situation a ≤ −1 is less complex due to the explicit cycle expressions described in Theorem 4.6 and can be treated similarly with some minor modifications.
We decompose the regions D u n and D ℓ n as follows By induction hypothesis, the regions U 12 , U 3 n , U 21 n and U 22 n are bounded below and above, and U 11 n only below, by a ray and on the right by a non-decreasing stepfunction. Similarly, the regions L 12 n , L 3 n , L 21 n and L 22 n bounded above and below, and L 11 n only above, by a ray and on the left by a non-decreasing step-function. If B ⊂ D u n is one of the upper subregions, let ∂B be the union of the boundary components of B that belong to the boundary of D u n , and, similarly, if B ⊂ D ℓ n is one of the lower subregions, let ∂B be the union of the boundary components of B that belong to the boundary of D ℓ n . Since Θ a,b is a trapping region, F (Θ a,b ) ⊂ Θ a,b , D n+1 = F (D n ) ⊂ D n , and hence D u n+1 ⊂ D u n and D ℓ n+1 ⊂ D ℓ n . The natural extension map F is piecewise fractional-linear, hence it maps regions bounded by non-decreasing step-functions to regions bounded by non-decreasing step-functions. More precisely, we have . In order to show that the region D u n+1 , is connected, we notice that the region . Therefore, they either intersect by a ray of the y-axis, or are disjoint. In the first case, either T −1 ST −1 b < Sa, which implies that S(L 3 n ) is inside the connected region S(U 22 n ∪ U 21 n ) ∪ T −1 (U 11 n ∪ U 12 n ), or Sa ≤ T −1 ST −1 b which implies that the level Sa belongs to the boundary of the trapping region, and again S(L 3 n ) is inside the connected region S(U 22 n ∪ U 21 n ) ∪ T −1 (U 11 n ∪ U 12 n ). Now suppose that the regions T −1 (U 11 n ∪ U 12 n ) and S(U 22 n ∪ U 21 n ) are disconnected. Notice that the right vertical boundary of the region S(L 3 n ) is a ray of the y-axis, thus S(L 3 n ) ∪ S(U 22 n ∪ U 21 n ) is a connected region bounded by a non-decreasing step-function. Since T −1 (U 12 n ) ∩ S(L 3 n ) = ∅, the non-connectedness situation may only appear from the intersection of T −1 (U 11 n ) and S(L 3 n ), i.e. inside the strip [−1, 0] × [−1/a, ∞]. Since f satisfies the finiteness condition, Theorem 5.5 is applicable, and the set A a,b constructed there belongs to each D n . This is because The set A a,b has finite rectangular structure and contains the strip [−1, 0]×[−1/a, ∞]. Thus the connectedness of the region D u n+1 is proved. Moreover, this argument shows that ∂T −1 (U 11 n ) is inside D u n+1 and therefore does not contribute to its boundary, and ∂U u n+1 = ∂(T −1 (U 12 n )) ∪ ∂(S(U 22 n ∪ U 21 n ) ∪ S(L 3 n )). Since ∂(T −1 (U 12 n ) and ∂(S(U 22 n ∪ U 21 n ) ∪ S(L 3 n )) are given by non-decreasing stepfunctions, one < Sa, and the other ≥ Sa, it follows that ∂U u n+1 is also given by a non-decreasing step-function. A similar argument proves that D ℓ n+1 is connected and bounded by a non-decreasing step-function. For the induction step we assume that (1) holds for k = n − 1, and prove that it holds for k = n. Let y ∈ ∂D n be a horizontal segment of the boundary, y ≥ ST −1 b, and y ∈ U a,b . Then y = Sy ′ , where y ′ ∈ ∂D n−1 , b − 1 ≤ y ′ < 0. By inductive hypothesis, y ′ ∈ ∂D n , hence y = Sy ′ ∈ ∂D n+1 . Now let y ∈ ∂D n be a horizontal segment of the boundary, b − 1 ≤ y < Sa. Then y = T −1 y ′ , where y ′ ∈ ∂D n−1 , 0 < y ′ < T Sa. By inductive hypothesis, y ′ ∈ ∂D n , hence y = Sy ′ ∈ ∂D n+1 .
The level y = Sa appears as a boundary segment of D u n since T −1 (∂(U 11 n−1 ) ∪ ∂(U 12 n−1 )) and S(∂(L 3 n−1 )) do not overlap. Then y = Sy ′ , where y ′ = a is the y-coordinate of the horizontal lower boundary of L 3 n−1 . Since L 3 n ⊂ L 3 n−1 and U 11 n ∪ U 12 n ⊂ U 11 n−1 ∪ U 12 n−1 , we get that T −1 (∂(U 11 n ) ∪ ∂(U 12 n )) and S(∂(L 3 n )) do not overlap, and y = Sa will appear as a boundary segment of D u n+1 . On the other hand, assume y ∈ ∂D n+1 was not a horizontal level of ∂D n . Then y = Sy ′ for some y ′ ∈ ∂(U 22 n ∪ U 21 n ), y = T −1 y ′ for some y ′ ∈ ∂(U 12 n ), or y = Sa. In all cases y ∈ U a,b by the structure of the sets U a and U b established in Theorems 4.5 and 4.2.
(2) We start with level − 1 b−1 which belongs to the boundary of the trapping region Θ a,b by definition. We have seen that if T −1 ST −1 b ∈ U b , then the level appears in the boundary of D u Using the structure of the set U b established in Theorem 4.2 we see that all levels of the set U b appear as boundary levels of some D u n . We use the same argument for level − 1 a which appears for the first time in the boundary of some D u n0 , to see that all elements of the set U a appear as boundary levels of all successive sets D u n . The same argument works for the lower boundary.
(3) Thus starting with some n, all sets D n have two connected components bounded by non-decreasing step-functions whose y levels coincide with the sets U a,b and L a,b . Therefore, the attractor D a,b = ∩ ∞ n=0 D n has the same property. (4) The surjectivity of the map F on D a,b follows from the nesting property of the sets D n .
A priori the map F on D a,b does not have to be injective, but in our case it will be since we will identify D a,b with an earlier constructed set A a,b . Proof. We proved in Theorem 5.5 that the set A a,b constructed there is uniquely determined by the prescribed set of y-levels U a,b ∪ L a,b . By Corollary 6.3, the set D a,b has finite rectangular structure with the same set of y-levels. Now we look at the x-levels of the jumps of its boundary step-functions. Take the vertex (x, b − 1) of D a,b . From the surjectivity of F on D a,b , there is a point z ∈ D a,b s.t. F (z) = (x, b − 1). Then z must be the intersection of the ray at the level b with the boundary of D a,b , i.e. z = (x b , b), hence x =x b − 1. Continue the same argument: look at the vertex at the level −1/(b − 1). It must be F (x b − 1, b − 1), etc. Since each y-level of the boundary has a unique "predecessor" in its orbit, all x-levels of the jumps obtained by "transporting" the rays [−∞,x b ] and [x a , ∞] over the corresponding cycles, satisfy the same equations that defined the boundary of the set A a,b of Theorem 5.5. Thereforex a = x a ,x b = x b , the step-functions that define the boundaries are the same, and D a,b = A a,b .

Reduction theory conjecture
Don Zagier conjectured that the Reduction Theory properties, stated in the Introduction, hold for every (a, b) ∈ P. He was motivated by the classical cases and computer experimentations with random parameter values (a, b) ∈ P (see Figures  1 and 6 for attractors obtained by iterating random points using Mathematica program).
The following theorem gives a sufficient condition for the Reduction Theory conjecture to hold: Proof. Every point (x, y) ∈R 2 \∆ is mapped to the trapping region by some iterate F N1 . Since the sets D n are nested and contain D a,b , for large N , F N (x, y) will be close to the boundary of D a,b . By Corollary 5.12, for any boundary component h of D a,b there exists N 2 > 0 such that F N2 (h) is inside D a,b . Therefore, there exists a large enough N > 0 such that F N (x, y) will be in the interior of D a,b .
The strong cycle property is not necessary for the Reduction theory conjecture to hold. For example, it holds for the two classical expansions (−1, 0) and (−1, 1) that satisfy only a weak cycle property. In the third classical expansion (−1/2, 1/2) that also satisfies a weak cycle property, property (3) does not hold for some points (x, y) with y equivalent to r = (3 − √ 5)/2. Proof. Let (x, y) ∈ R 2 with y irrational and y = ⌊n 0 , n 1 , n 2 , . . . ⌉ a,b . In the proof of Theorem 3.1, we showed that there exists k > 0 such that . Thus we are left with analyzing the situation when the sequence of iterates . Assume that we are in the first situation: y j+1 ∈ [−1/a, −1/a + 1] for all j ≥ k. This implies that all digits n j+1 , j ≥ k are either ⌊−1/a⌉ or ⌊−1/a⌉ + 1. In the second situation, the digits n j+1 , j ≥ k are either ⌊−1/b⌉ or ⌊−1/b⌉ − 1. Therefore the continued fraction expansion of y is written with only two consecutive digits (starting from a certain position). By using Proposition 2.4 and Remark 2.5 we obtain that the set of all such points has zero Lebesgue measure. This proves our result. Remark 7.3. In the next section we show that there is a non-empty Cantor-like set E ⊂ ∆ belonging to the boundary segment b = a + 1 of P such that for (a, b) ∈ E the set U a,b ∪ L a,b is infinite. Therefore, for (a, b) ∈ E either the set D u n or D ℓ n is disconnected for some n > 0, or, by Lemma 6.2(3), the attractor D a,b consists of two connected components whose boundary functions are not step-functions with finitely many steps.

Set of exceptions to the finiteness condition
In this section we study the structure of the set E ⊂ P of exceptions to the finiteness condition. We write E = E b ∪ E a where E b (resp., E a ) consists of all points (a, b) ∈ P for which b (resp., a) does not satisfy the finiteness condition, i.e. either the truncated orbit U b or L b is infinite (resp., U a or L a ).
We analyze the set E b . Recall that, by Proposition 5.3(2), the set U b is infinite if and only if L b is infinite, therefore it is sufficient to analyze the condition that the orbit U b is not eventually periodic and its values belong to the interval ( b b+1 , a + 1). As before, we restrict our analysis (due to the symmetry considerations) to the parameter subset of P given by b ≤ −a and write , a + 1). By Theorem 4.2 and its proof, it follows that if b ∈ E m b , then the first digit of the (a, b)-continued fraction expansion of Sb is −m and all the other digits are either −m or −(m + 1).
We describe a recursive construction of the exceptional set E m b . One starts with the 'triangular' set The range of possible values of b in T m b is given by the interval [b,b] where T m Sb =b and T m Sb = b/(b + 1). Since and the function T m Sb is monotone increasing, we obtain that b <b, and b is the horizontal boundary of T m b , whileb is the b-coordinate of its 'vertex'. At the next stage we obtain the following regions: By the same argument as above each region is 'triangular', i.e. the b-coordinate of its lower (horizontal) boundary is less than the b-coordinate of its vertex. We show that its intersection with the triangular region obtained on the previous step is either empty or has 'triangular' shape. The horizontal boundary of T m,m b has the b-coordinate given by the relation T m ST m Sb = b/(b + 1) (call itb). We have are disjoint and non-empty. The situation becomes more complicated as we proceed recursively. Let T n1,n2,...,n k b be one of the regions obtained after k steps of this construction, with n 1 = m and n i ∈ {m, m + 1} for 2 ≤ i ≤ k. At the next step we get two new sets (possible empty) (see Figure 7): As in the base case, the inequality T m ST n k S . . . T n1 Sb ≤ a + 1 of T n1,n2,...,n k ,m b is satisfied by all points of T n1,n2,...,n k b because of the monotone increasing property of T, S and the fact that T n k S . . . T n1 Sb ≤ a + 1 implies Thus the lower boundary of T n1,n2,...,n k ,m+1 b (if nonempty) is part of the lower boundary of T n1,n2,...,n k b . Therefore, we can describe the above sets as is non-empty and (a, b) belongs to it, then b is uniquely determined from the (a, b)-expansion of Sb = ⌊−n 1 , −n 2 , . . . ⌉.
Definition 8.2. We say that two sequences (finite or infinite) σ 1 = (n i ) and σ 2 = (p j ) of positive integers are in lexicographic order, σ 1 ≺ σ 2 , if on the first position k where the two sequences differ one has n k < p k ,or if the finite sequence (n i ) is a starting subsequence of (p j ).
The next lemma provides necessary conditions for a set E to be non-empty. Denote by l m the length of the initial block of m's and by l m+1 the length of the first block of (m + 1)'s in (n i ). is non-empty then the sequence (n i ) contains no consecutive m's and the length of any block of (m + 1)'s is equal to l m+1 or l m+1 + 1.
In what follows, we describe in an explicit manner the symbolic properties of a sequence (n i ) for which E with l m ≥ 2, l m+1 ≥ 1. In both situations A (1) ≺ B (1) . One could think of A (1) as being the new 'm' and B (1) the new 'm + 1', and treat the original sequence of m's and m + 1's as a sequence of A (1) 's and B (1) 's. Furthermore, the next lemma shows that such a substitution process can be continued recursively to construct blocks A (n) and B (n) (for any n ≥ 1), so that the original sequence (n i ) may be considered to be a sequence of A (n) 's and B (n) 's. Moreover, only particular blocks of A (n) 's and B (n) 's warrant non-empty triangular regions of the next generation.
Let us also introduce the notations A (0) = m and is a nonempty set. We have: ) .
Relation ( To prove the inductive step, suppose that for some n ≥ 1, we can rewrite the sequence (n i ) using blocks A (n+1) and B (n+1) as in case (8.6) or (8.7). Case 1. Assume A (n+1) and B (n+1) are given by (8.6). It follows immediately that . Also, if a sequence σ starts with an A (n+1) block and ends with a B (n+1) block (thus, implicitly, σ starts with an A (n) block and ends with a B (n) block), Therefore, (8.9) holds for n + 1, since (A (n) , B (n+1) ) = A (n+1) . Now assume that (n i ) starts with a block of A (n+1) 's of length l A (n+1) > 1. We prove that the sequence (n i ) cannot have two consecutive B (n+1) 's and any sequence of consecutive blocks A (n+1) has length l A (n+1) or l A (n+1) −1 . Suppose the sequence (n i ) contains two consecutive blocks of type B (n+1) : We look at the set and remark that the upper boundary satisfies (from (8.10)) and the lower boundary satisfies (from (8.9)) But (8.11) and (8.12) imply that b >b, because the two corresponding continued fractions with positive entries are in lexicographic order. Thus, there cannot be two consecutive B (n+1) blocks in the sequence (n i ).
Now, let us check that the sequence (n i ) cannot have a block of A (n+1) 's of length q > l A (n+1) . Assume the contrary, Then the set T Comparing the two continued fractions, we get thatb < b (since A (n+1) ≺ B (n+1) and q > l A (n+1) ). Now assume that (n i ) starts with A (n+1) and then continues with a block of B (n+1) 's of length l B (n+1) ≥ 1. We prove that the sequence (n i ) cannot have two consecutive A (n+1) 's and any sequence of consecutive blocks B (n+1) has length l B (n+1) or l B (n+1) + 1. Suppose the sequence (n i ) contains two (or more) consecutive blocks of type A , A (n+1) , τ, A (n+1) , B (n+1) ).
Comparing the two continued fractions, we get thatb < b.
Assume that (n i ) starts with a sequence of A (n+1) 's of length l A (n+1) > 1. Similar to the analysis of the first case, one proves that the sequence (n i ) cannot have two consecutive B (n+1) 's and any sequence of consecutive blocks A (n+1) has length l A (n+1) or l A (n+1) − 1.
If the sequence (n i ) starts with A (n+1) and then continues with a sequence of B (n+1) 's of length l B (n+1) ≥ 1, one can prove that the sequence (n i ) cannot have two consecutive A (n+1) 's and any sequence of consecutive blocks B (n+1) has length l B (n+1) or l B (n+1) + 1.
Proof. The statement is obviously true if n = 1. Assume it is true for some n both for A (n) and B (n) . We analyze the case of A (n+1) being given by (8.6), , B (n) ). Consider an arbitrary tail τ of A (n+1) ; τ could start with a block A (n) or a tail of A (n) or τ coincides with B (n) or a tail of B (n) . In all situations, the inductive hypothesis and the fact that A (n) ≺ B (n) prove that A (n+1) ≺ τ . The case of A (n+1) given by (8.7) is treated similarly. and a lower horizontal boundary that satisfies if A (n+1) is given by the substitution rule (8.6), and if A (n+1) is given by (8.7).
We will prove that the above inequalities are actually equality relations. For that we construct a starting subsequence of A (n+1) defined inductively as:  We introduce the notation f σ to denote the transformation T n k S . . . T n1 S if σ = (n 1 , . . . , n k ).
Lemma 8.8. Let σ (n+1) be the starting block of A (n+1) defined as above. Then the equation Proof. We proceed with an inductive proof, and as part of it we also show that where A (n) = (m,Ã (n) ).
We prove now that each set nonempty set E (ni) with (n i ) not eventually aperiodic sequence is actually a singleton. Proof. The sequence (n i ) satisfies the recursive relations (8.6) or (8.7). We look at the set T A (n+1) b and estimate the length of its lower base. In case (8.6) its upper vertex is given by (8.22) and its lower base satisfies (8.23). The lower base is a segment whose right end coordinate is a r n+1 = −(0, A (n+1) , B (n+1) ) − 1 and left end coordinate is a l n+1 = f A (n+1) (−(0, A (n+1) , B (n+1) )) − 1 = −(0, B (n+1) ) − 1 . Hence the length of the lower base is given by L n+1 = a r n − a l n+1 = (0, B (n+1) ) − (0, A (n+1) , B (n+1) ) . In case (8.7), the lower base is a segment whose right end coordinate is a r n+1 = −(0, A (n) , B (n) ) − 1 and the left end coordinate is given by a l n+1 = f A (n+1) (−(0, A (n) , B (n) )) − 1 = −(0, B (n) ) − 1 . Hence the length of the lower base is given by L n+1 = a r n+1 − a l n+1 = (0, B (n) ) − (0, A (n) , B (n) ) . Notice that in the first case the two continued fraction expansions have in common at least the block A (n) , while in the second case they have in common at least the block A (n−1) . This implies that in both cases L n+1 → 0 as n → ∞. Moreover, the bases of the sets T n1,...n k b have non-increasing length and we have found a subsequence of these bases whose lengths converge to zero. Therefore the set E The above result gives us a complete description of the set of exceptions E b to the finiteness condition. It is a subset of the boundary segment b = a + 1 of P. Moreover, each set E m b is uncountable because the recursive construction of a nonempty set E (ni) b allows for an arbitrary number of successive blocks A (k) at step (k + 1). Formally, one constructs a surjective map j : E m b → N N by associating to a singleton set E )(k) = # of consecutive A (k) -blocks at the beginning of (n i ).
The set E b has one-dimensional Lebesgue measure 0. The reason is that all associated formal continued fractions expansions of b = −(0, n 1 , n 2 , . . . ) have only two consecutive digits; such formal expansions (0, n 1 , n 2 , . . . ) are valid (-1,0)-continued fractions. Hence the set of such b's has measure zero by Proposition 2.4. Analogous conclusions hold for E a . Thus we have Theorem 8.11. For any (a, b) ∈ P, b = a + 1, the finiteness condition holds. The set of exceptions E to the finiteness condition is an uncountable set of onedimensional Lebesgue measure 0 that lies on the boundary b = a + 1 of P.  We remark thatF a,b is obtained from the map F a,b induced on the set D a,b ∩ {(x, y)|a ≤ y < b} by a change of coordinates x ′ = y, y ′ = −1/x. Therefore the domainD a,b is easily identified knowing D a,b and may be considered its "compactification". We present the simple case when 1 ≤ − 1 a ≤ b + 1 and a − 1 ≤ − 1 b ≤ −1. The general theory is the subject our paper in preparation [11].
The truncated orbits of a and b are L a = a + 1, − 1 a + 1 , U a = − 1 a , − a + 1 a Proof. The description ofD a,b follows directly from the cycle relations and the finite rectangular structure. It is a standard computation that the measure dxdy (1+xy) 2 is preserved byF a,b , by using the fact any Möbius transformation, hence F a,b , preserves the measure du dw (w−u) 2 , andF a,b is obtained from F a,b by coordinate changes x = w, y = −1/u. Moreover, the density The Gauss-type mapf a,b is a factor ofF a,b (projecting on the x-coordinate), so one can obtain its smooth invariant measure dµ a,b by integrating dν a,b overD a,b with respect to the y-coordinate as explained in [2]. Thus, if we know the exact shape of the set D a,b , we can calculate the invariant measure precisely.
The measure dµ a,b is ergodic and the measure-theoretic entropy off a,b can be computed explicitly using Rokhlin's formula.  a)]. The measure-theoretic entropy off a,b is given by Proof. The measure dµ a,b is obtained by integrating dν a,b overD a,b . Ergodicity follows from a more general result concerning one-dimensional expanding maps (see [2,20]). To compute the entropy, we use Rokhlin's formula log |x| x + 1 dx Let I(a, b) denote the sum of the four integrals. The function depends smoothly on a, b, hence we can compute the partial derivatives ∂I/∂a and ∂I/∂b. We get that both partial derivatives are zero, hence I(a, b) is constant. Using a = −1, b = 1, we get I(a, b) = I(−1, 1) = 2 1 0 log |x| 1 + x dx = −π 2 /6 , and the entropy formula (9.5).