On the nonarchimedean quadratic Lagrange spectra

We study Diophantine approximation in completions of functions fields over finite fields, and in particular in fields of formal Laurent series over finite fields. We introduce a Lagrange spectrum for the approximation by orbits of quadratic irrationals under the modular group. We give nonarchimedean analogs of various well known results in the real case: the closedness and boundedness of the Lagrange spectrum, the existence of a Hall ray, as well as computations of various Hurwitz constants. We use geometric methods of group actions on Bruhat-Tits trees.


Introduction
Diophantine approximation in local fields of positive characteristic has been studied for many years, both from the classical viewpoint (see the works of de Mathan, Lasjaunias, Osgood, W. Schmidt, Thakur, Voloch for instance) and from the point of view of arithmetic geometry (see the works of Mahler, Manin, and many others), as well from an ergodic theory viewpoint (see for instance [BeN]). In this paper, we are interested in the approximation by quadratic irrationals: we define and study the quadratic Lagrange spectra in completions of function fields over finite fields with respect to the absolute values defined by discrete valuations. In this introduction, we concentrate on the special case of the field of rational fractions and its valuation at infinity. We refer to Section 3 for the definitions and results in the general case, allowing congruence considerations.
Let F q be a finite field of order a positive power q of a positive prime. Let R = F q [Y ], K = F q (Y ) and K = F q ((Y −1 )) be respectively the ring of polynomials in one variable Y over F q , the field of rational functions in Y over F q and the field of formal Laurent series in Y −1 over F q . Then K is a nonarchimedean local field, the completion of K with respect to its place at infinity, that is, the absolute value be the set of quadratic irrationals over K in K. Given f ∈ K − K, it is well known that f ∈ QI if and only if the continued fraction expansion 2 of f is eventually periodic. The projective action of Γ = PGL 2 (R) on P 1 ( K) = K ∪ {∞} preserves QI, keeping the periodic part of the continued fraction expansions unchanged (up to cyclic permutation and invertible elements). We refer for instance to [Las, Sch, Pau] for background on the above notions. Now let us fix α ∈ QI. We denote by α σ ∈ QI the Galois conjugate of α over K. The complexity h(α) = 1 |α−α σ | of α was introduced in [HP] and developped in [BPP,§17.2]. It plays the role of the (naive) height of a rational number in Diophantine approximation by rationals, and is an appropriate complexity when studying the approximation by elements in the orbit under the modular group of a given quadratic irrational. 3 We refer to the above references for motivations and results, in particular to [HP,Thm. 1.6] for a Khintchine type result and to [BPP,§17.2] for an equidistribution result of the orbit of α under PGL 2 (R).
Let Θ α = PGL 2 (R) · {α, α σ } be the union of the orbits of α and α σ under the projective action of PGL 2 (R). Given x ∈ K − (K ∪ Θ α ), we define the quadratic approximation constant of x by We define the quadratic Lagrange spectrum of α as Note that Sp(α) ⊂ q Z ∪ {0, +∞}. It follows from [HP,Thm. 1.6] that if m K is a Haar measure on the locally compact additive group of K, then for m K -almost every x ∈ K, we have c α (x) = 0. Hence in particular, 0 ∈ Sp(α) and the quadratic Lagrange spectrum is therefore closed. In Section 3, we prove that it is bounded, and we can thus define the (quadratic) Hurwitz constant of α as max Sp(α) ∈ q Z . The following theorems, giving nonarchimedean analogs of the results of Lin, Bugeaud and Pejkovic [Lin,Bug1,Pej], say that the quadratic Lagrange spectrum of α is a closed bounded subset of q Z ∪{0} which contains an initial interval, and computes various Hurwitz constants.
Theorem 1.1. Let α be a quadratic irrational over K in K.
(2) (Hall ray) There exists m α ∈ N such that for all n ∈ N with n ≥ m α , we have q −n ∈ Sp(α).
In Section 3, we even prove that Assertion (2) of this theorem is valid when K is any function field over F q , K is the completion of K at any place of K, and R is the corresponding affine function ring.
Theorem 1.2. The Hurwitz constant of any quadratic irrational over K in K, whose continued fraction expansion is eventually k-periodic with k ≤ q − 1, is equal to q −2 .
There are examples of quadratic irrationals for which the quadratic Lagrange spectrum coincides with the maximal Hall ray. The following theorem gives a special case, see Theorem 4.11 for a more general result.
In Proposition 4.12, we give a class of quadratic irrationals whose quadratic Lagrange spectrum does not coincide with its maximal Hall ray, in other words, who have gaps in their spectrum.
After the first version of this paper was posted on ArXiv, Yann Bugeaud [Bug2] has given a completely different proof of the above results (except the generalisation to function fields), and proved several new theorems giving a more precise description of these spectra. In particular, he proved that all approximation constants for a given quadratic irrational are attained on the other quadratic irrationals, that for every m ≥ 2 there exists β ∈ QI such that max Sp(β) = q −m , and that for all ∈ N, there exists β ∈ QI such that Sp(β) contains exactly gaps.
In order to explain the origin of our results, recall that for x ∈ R−Q, the approximation constant of x by rational numbers is and that the Lagrange spectrum is Sp Q = {c(x) : x ∈ R − Q}. Numerous properties of the Lagrange spectrum are known, see for instance [CF]. In particular, Sp Q is bounded and closed, has maximum 1 √ 5 , and contains a maximal interval [0, µ] with 0 < µ < 1 √ 5 called a Hall ray. Khinchin [Khi] proved that almost every real number is badly approximable by rational numbers, so that the approximation constant vanishes almost surely. Many of these results have been generalised to the Diophantine approximation of complex numbers, Hamiltonian quaternions and for the Heisenberg group, see for example [Poi,Sch1,Sch2,PaP1,PaP2,PaP3].
Let α 0 be a fixed real quadratic irrational number over Q. For every such number α, let α σ be its Galois conjugate. Let E α 0 = PSL 2 (Z) · {α 0 , α σ 0 } be its (countable, dense in R) orbit for the action by homographies and anti-homographies of PSL 2 (Z) on R ∪ {∞}. For every x ∈ R − (Q ∪ E α 0 ), the approximation constant of x by elements of E α 0 was defined in [PaP4] by the quadratic Lagrange spectrum (or approximation spectrum) of α 0 by and the Hurwitz constant of α 0 by sup Sp(α 0 ). We proved that the quadratic Lagrange spectrum of α 0 is bounded and closed, and that an analog of Khinchin's theorem holds. We generalised the definitions and the above results to the approximation of complex numbers and elements of the Heisenberg group. In the latter cases, we also proved the existence of a Hall ray in the spectrum.
In the real case, the existence of a Hall ray in Sp(α 0 ) is due to Lin [Lin]. Bugeaud [Bug1] proved that the Hurwitz constant of the Golden Ratio φ is equal to 3 √ 5 − 1, and his conjecture that the Hurwitz constant of any real quadratic irrational is at most 3 √ 5 − 1 was confirmed by Pejkovic [Pej]. The Hurwitz constant is known explicitly in many 2-periodic continued fraction expansion cases, see [Pej, Lin].

Background on function fields and Bruhat-Tits trees
In this section, we recall the basic notations and properties of function fields K over F q and their valuations v, the associated Bruhat-Tits trees T v and modular groups Γ v acting on T v . We refer to [Gos, Ros, Ser] for definitions, proofs and further information, see also [BPP,Ch. 14 and 15].
Let F q be a finite field of order q with q a positive power of a positive prime.

Function fields
Let K be a function field over F q and let v : K × → Z be a (normalised discrete) valuation of K. Let R v be the affine function ring associated with (K, v). Let | · | v be the absolute value on K corresponding to v and let K v be the completion of K with respect to | · | v . We again denote by v and | · | v the extensions of v and | · | v to K v . Let be the valuation ring of K v . Its unique maximal ideal is We denote the cardinality of the residual field be the ring of polynomials in one variable Y with coefficients in F q , and let v ∞ : K × → Z be the valuation at infinity of K, defined on every Then R v∞ = F q [Y ] and the absolute value | · | v∞ on K associated with v ∞ is the absolute value defined in the introduction. The completion K v∞ of K for |·| v∞ is the field F q ((Y −1 )) of formal Laurent series in one variable Y −1 with coefficients in F q , denoted by K in the introduction. The elements x in F q ((Y −1 )) are of the form where x i ∈ F q for all i ∈ Z and x i = 0 for i small enough. The valuation at infinity of We identify the projective line The projective action of PGL 2 (K v ) on P 1 (K v ) is the action by homographies on K v ∪ {∞}, . As usual, we define g · ∞ = a c and g · (− d c ) = ∞.

Bruhat-Tits trees
and whose set of edges ET v is the set of pairs (x, x ) of vertices such that there exist representatives Λ of x and Λ of x for which Λ ⊂ Λ and Λ /Λ is isomorphic , which acts projectively on lk( * v ) = P 1 (k v ) by reduction modulo v, and in particular PGL 2 (k v ) acts simply transitively on triples of pairwise distinct points on lk( * v ). We identify the boundary at infinity The group Γ v is a lattice in the locally compact group PGL 2 (K v ), called the modular group at v of K. The quotient graph Γ\T v is called the modular graph of K, and the quotient graph of groups Γ\ \T v is called the modular graph of groups at v of K. We refer to [Ser] for background information on these objects, and for instance to [Pau] for a geometric treatment when Recall that the open horoballs centred at ξ ∈ ∂ ∞ T v are the subsets of the geometric where ρ ξ is a geodesic ray converging to ξ. The boundary of H (ρ ξ ) is the horosphere We refer to [BH] for background on these notions.
. It is positive if and only if x belongs to H (ρ ξ ). We denote by H ∞ the unique horoball centred at ∞ ∈ ∂ ∞ T v whose associated horosphere passes through * v .
Let Γ be a finite index subgroup of Γ v . By for instance [Ser, Pau], there exists a Γequivariant family of pairwise disjoint open horoballs (H ξ ) ξ∈P 1 (K) in T v with H ξ centered at ξ and the stabiliser Γ ξ of ξ in Γ acting transitively on the boundary of H ξ for every is a finite connected graph, denoted by E Γ . The set of cusps Γ\P 1 (K) is finite. For every representative ξ of a cusp in Γ\P 1 (K), the injective image by the canonical projection T v → Γ\T v of any geodesic ray starting from a point on the boundary of H ξ with point at infinity ξ is called a cuspidal ray. The quotient graph Γ\T ∞ is the union of the finite subgraph E Γ and the finite collection of cuspidal rays that are glued to E Γ at their origin.
) and the quotient graph of groups Γ v∞ \ \T v∞ is the following modular ray The graph E Γ is reduced to the orbit of the base point * v∞ , and E Γ is reduced to one vertex, the origin of the modular ray (see the above picture). In particular, the diameter of E Γ is zero. All geodesic lines in T v∞ pass through the Γ v∞ -orbit of * v∞ . Indeed, no geodesic is completely contained in a horoball and since ξ∈P 1 (K) ∂H ξ = Γ v∞ * v∞ , the only way a geodesic line exits a horoball of the canonical family (H ξ ) ξ∈P 1 (K) is through the orbit of * v∞ . The intersection of a geodesic line with the orbit Γ v∞ * v∞ is hence finite if and only if its endpoints are both in P 1 (K).
We end this section with the following lemma, which is an effective version of a special case of [HP,Prop. 2.6]. It controls the intersection length of a translation axis of an element of a discrete group of automorphisms of a tree with its images under this group. We will use it in Section 3 in order to prove Theorem 3.4.
Recall that an automorphism γ of a simplicial tree T with geometric realisation |T| is loxodromic if it fixes no point of |T|, that its translation length (γ) = min x∈V T d(x, γx) is then positive and that its translation axis Ax γ = {x ∈ |T| : d(x, γx) = (γ)} is then a geodesic line in |T|.
Lemma 2.3. Let Γ be a discrete group of automorphisms of a locally finite tree T. Let γ 0 ∈ Γ be a loxodromic element on T. Let k 0 = min x∈Axγ 0 |Γ x | be the minimal order of the stabiliser in Γ of a vertex of Ax γ 0 and let Γ 0 be the stabiliser of Ax γ 0 in Γ. Then for every γ ∈ Γ − Γ 0 , the length of the geodesic segment γ Ax γ 0 ∩ Ax γ 0 is less than (k 0 + 1) (γ 0 ) − 1.
Proof. Assume for a contradiction that the length L ∈ N of γ Ax γ 0 ∩ Ax γ 0 is at least Since the stabiliser of x has order less

Quadratic Diophantine approximation in completions of function fields
Let K be a function field over F q , let v be a (normalised discrete) valuation of K, let R v be the affine function ring associated with v, and let Γ be a finite index subgroup of the set of quadratic irrationals in K v over K, and we fix α ∈ QI v . We denote by α σ ∈ QI v the Galois conjugate of α over K, and by the union of the orbits of α and α σ under the projective action of Γ, with Θ α = Θ α, Γv . Note that α σ = α, since an irreducible quadratic polynomial over K which is inseparable does not split over K v , and that there exists a loxodromic element γ α ∈ Γ v such that ]α, α σ [ = Ax γα (see for instance [BPP,Lem. 17.2]). For all x ∈ K v and β ∈ QI v with x = β, let The following result gives a geometric interpretation to this quantity.
(1) If the geodesic lines ]∞, x[ and ]β, β σ [ in T v are disjoint or meet at only one vertex, then, with n the distance between them, (2) If the geodesic lines ]∞, where t → y t , t → z t are the geodesic lines starting from ∞, through ∂H at time t = 0, ending at the points at infinity y, z respectively. By for instance [BPP,Eq. (15.2)], we have |y − z| v = d H∞ (y, z) ln qv .
Since the ratio d H (y, z) d H (y , z ) does not depend on the horoball H centered at ∞, if H is small enough, we hence have The result follows.
For every x ∈ K v − (K ∪ Θ α, Γ ), we define the approximation constant of x by the (extended) Γ-orbit of α as When x is itself a quadratic irrational, the following result gives a geometric computation of the approximation constant c α, Γ (x).
Remark 3.2. For all α, β ∈ QI v such that β / ∈ Θ α, Γ , we have Proof. Note that since the elements of Γ preserve the lengths of segments, and by a change of variable γ → γ −1 , we have n(β, α) = n(α, β), so that the first equality follows from the second one. By a proof similar to the one of Proposition 2.3, for all α, β ∈ QI v such that β / ∈ Θ α, Γ , there exists a constant α,β (depending only on the translation lengths of primitive elements in Γ preserving the geodesic lines ]α σ , α[ and ]β σ , β[, as well as on the cardinalities of the stabilisers in Γ of the vertices of these geodesic lines) such that for every γ ∈ Γ, the length of the intersection ]α σ , α[ ∩ γ ]β σ , β[ is at most α,β .
First assume that some image of ]β σ , β[ by an element of Γ meets ]α σ , α[. Using Lemma 3.1 for the second equality, the fact that ]∞, β[ and ]β σ , β[ share a subray with endpoint β for the third equality, and Lemma 3.1 (2) for the fourth one, we have Otherwise, the result follows by using Lemma 3.1 (1).
The above result allows us to define the Hurwitz constant of α relative to Γ as and the Hurwitz constant of α as max Sp(Γ v , α). The proof of Proposition 3.3 actually gives an upper bound on Sp(α, Γ) which does not depend on the quadratic irrational α, see Equation (1) below. In the special case when (K, v, Γ) = (F q (Y ), v ∞ , Γ v∞ ), we will prove more precisely in Section 4 that max α∈QI v max Sp(α) = 1 q 2 . Proof. It follows from [HP,Thm. 1.6] 4 that if m Kv is a Haar measure on the locally compact additive group of K v , then c α, Γ (x) = 0 for m Kv -almost every x ∈ K v . Therefore 0 ∈ Sp(α, Γ), and the quadratic Lagrange spectrum of α relative to Γ is closed.
Let us fix x ∈ K v − K and let us prove that c α, , where E Γ is as defined in Section 2. This proves Proposition 3.3 with a uniform bound on the Hurwitz constants (1) Since x is irrational and since any geodesic ray entering into a horoball and not converging towards its point at infinity has to exit the horoball, the geodesic line ]∞, x[ from ∞ to x cannot stay after a given time in a given horoball of the family (H ξ ) ξ∈P 1 (K) defined in Section 2. Hence there exists a sequence (p n ) n∈N of points of E Γ converging to x along the geodesic line ]∞, x[ . Since E Γ = Γ\ E Γ is finite and since no geodesic line is contained in a horoball, there exists a sequence (γ n ) n∈N in Γ such that d(p n , γ n ]α, α σ [) ≤ diam E Γ for all n ∈ N.
By Lemma 3.1, there exists β n ∈ {γ n α, Let γ α ∈ Γ v be a loxodromic element such that ]α, α σ [ = Ax γα . Since Γ has finite index in Γ v , up to replacing γ α by a positive power, we may assume that γ α belongs to Γ. Since the length of the intersection of two distinct translates of Ax γα by elements of Γ is uniformly bounded by Lemma 2.3, we have lim n→+∞ |β n − β σ n | v = 0. Hence by the definition of the approximation constants, we have as wanted c α, The following result, which implies Theorem 1.1 (2) in the introduction, says that the nonarchimedean quadratic Lagrange spectra contain Hall rays. Note that its proof gives an explicit upper bound on the constant whose existence is claimed.
Therefore ξ satisfies the properties required at the beginning of the proof, and Theorem 3.4 follows.
In the next section, we will give several computations, using the continued fraction expansions, in the special case when K = F q (Y ), v = v ∞ is the valuation at infinity, and Γ = Γ v∞ is the full Nagao lattice PGL 2 (F q [Y ]).

Computations of approximation constants, Hurwitz constants and quadratic Lagrange spectra for fields of formal Laurent series
In this section, we use the notation be the ring of formal power series in one variable Y −1 over F q . Its unique maximal ideal is m = Y −1 O. We denote by T the Bruhat-Tits tree of (PGL with a 0 = a 0 (f ) = [f ] ∈ R, and a n = a n (f ) = 1 Ψ n−1 (f −a 0 ) ∈ R a nonconstant polynomial for n ≥ 1. The polynomials a n (f ) are called the coefficients of the continued fraction expansion of f . For every n ∈ N, the rational element P n Q n = [a 0 , a 1 , a 2 , . . . , a n−a , a n ] = a 0 + 1 a 1 + 1 a 2 + 1 . . . + . . . 1 a n−1 + 1 a n is the n-th convergent of f . We refer to [Las, Sch, Pau] for details and further information on continued fraction expansions of formal Laurent series and their geometric interpretation in terms of the Bruhat-Tits tree T.
As recalled in the introduction, an irrational element α ∈ K − K is quadratic over K if and only if its continued fraction expansion is eventually periodic: For every p ∈ N large enough, the sequence of coefficients (a k+p (α)) k∈N is periodic with period m ∈ N − {0} and, as usual, we then write the continued fraction expansion of α as α = [a 0 , a 1 , a 2 , . . . , a p−1 , a p , a p+1 , . . . , a p+m−1 ]. We then have We will need the following lemmas, which also follow from the geometric interpretation of the continued fraction expansion given in [Pau], in order to estimate the quadratic approximation constants of elements f ∈ K − K. Lemma 4.2. Let f ∈ K −K and α ∈ QI with purely periodic continued fraction expansion. If there exist p, q ∈ N and m ∈ N such that a p+1 (f ) = a q+1 (α), . . . , a p+m (f ) = a q+m (α), then there exists γ ∈ Γ such that the geodesic lines ]∞, f [ and γ ]α σ , α[ coincide at least in H p+1 (f ) ∪ · · · ∪ H p+m (f ), so that their intersection has length at least The proof of Proposition 3.3, and in particular Equation (1) since diam E Γ = 0 for the Nagao lattice Γ as seen in Example 2.2, shows that the quadratic Lagrange spectrum with respect to the valuation at infinity of any quadratic irrational is contained in {0} ∪ {q −n : n ∈ N}. The following result, which implies Theorem 1.1 (1) in the introduction, improves the upper bound of the spectrum. In Corollary 4.7 and Proposition 4.8, we will show that this upper bound is realised for certain quadratic irrationals. Proof. Up to replacing α by an element of Θ α , we may assume that α ∈ m and α σ ∈ K−O, so that the base point * belongs to the geodesic line ]α, α σ [.
Since f is irrational, no positive subray of the geodesic line ]∞, f [ (oriented from ∞ to f ) is contained in a single horoball of the canonical family (H ξ ) ξ∈P 1 (K) . Hence there exists a sequence (x n = γ n * ) n∈N , with γ n ∈ Γ, of vertices in the Γ-orbit of the base point * , converging to f on the geodesic line ]∞, f [. As * belongs to ]α, α σ [, we thus have that ]∞, f [ and ]γ n · α, γ n · α σ [ meet at least at the vertex γ n * .
The stabiliser PGL 2 (F q ) of * in Γ acts transitively on the set of pairs of distinct elements of the link of * . Thus, up to multiplying γ n on the right by an element of PGL 2 (F q ), the geodesic line ]∞, f [ meets ]γ n · α, γ n · α σ [ in a segment of length at least 2 for all n ∈ N. Thus, by Lemma 3.1 (2), we have min{c(x, γ n · α), c(x, γ n · α σ )} ≤ q −2 .
We are now going to give a series of computations of quadratic approximation constants. We start by two preliminary results.

Proof.
(1) By the penetration properties of geodesic lines in the horoballs of the canonical family (H ξ ) ξ∈P 1 (K) , for every β ∈ Θ α , the maximum height the geodesic line ]β σ , β[ enters in one of these horoballs is M (α). Similarly, the minimum height the geodesic line ]∞, f [ enters one of these horoballs except finitely many of them is m(f ), which is strictly bigger than M (α). Hence for all β ∈ Θ α , the geodesic lines ]∞, f [ and ]β σ , β[ can meet at most in two consecutive horoballs H n (f ) for n ∈ N large enough, and their intersection has length at most M 2 (α) (and even at most M (α) ≤ M 2 (α) if ]β σ , β[ meets at most one of the horoballs H n (f ) for n ∈ N large enough), see the picture below.
The proof of Assertion (2) is similar.
Lemma 4.5. For all α ∈ QI and f ∈ K − (K ∪ Θ α ) such that m(f ) > M (α), there exists a sequence (β n ) n∈N in Θ α such that c(f, β n ) = q −M 2 (α) and |β n − β σ n | → 0 as n → +∞. Proof. Replacing α by an element in its Γ-orbit if necessary, we can assume that the continued fraction expansion of α is periodic, that α ∈ m and α σ ∈ K − O, and that M 2 (α) = deg a 1 (α) + deg a 2 (α). The unipotent upper triangular subgroup 1 x 0 1 : x ∈ R of Γ fixes ∞ ∈ ∂ ∞ T, and acts transitively on the subset R of ∂ ∞ T. Since the horoballs in the canonical family (H ξ ) ξ∈P 1 (K) whose closure meets the closure of H ∞ are (besides H ∞ itself) the ones centred at an element of R, the group Γ acts transitively on the ordered pairs of horoballs in this family whose closures meet at one point. In particular, for all n ∈ N large enough, there exists γ n ∈ Γ sending H 1 (α) to H n (f ) and H 2 (α) to H n+1 (f ).
Proof. This follows immediately from Lemmas 4.4 (1) and 4.5, by the definition of the quadratic approximation constants. Proof.
(1) This follows from Corollary 4.6 since for instance satisfies the assumption of Corollary 4.6 if p ∈ N is such that M 2 (α) = deg a p (α) + deg a p+1 (α).
The above corollary shows that the maximum Hurwitz constant is attained for many quadratic irrationals α. In fact, the same holds for all quadratic irrationals with small enough period length.
Proposition 4.8. If α is a quadratic irrational over K in K whose period of its continued fraction expansion contains at most q − 2 coefficients of degree 1, then max Sp(α) = max P ∈Fq[X], deg P =1 c α ([ P ]) = q −2 .
The first equality is a (strengthened) nonarchimedean version of the 2-periodic case of Bugeaud's conjecture solved by Lin [Lin,Rem. 1.3]. In particular, if α ∈ QI is eventually k-periodic with k ≤ q − 1 (as for instance with k = 2 since q ≥ 3), then max Sp(α) = max P ∈Fq[X], deg P =1 c α ([ P ]) = q −2 . Indeed, either all coefficients of the period of α have degrees 1, in which case M (α) = 1 and Corollary 4.7 (2) applies, or α satisfies the assumption of Proposition 4.8. This proves Theorem 1.2 in the introduction.
Proof. Since Card(F q − {0}) = q − 1 and by the assumption, there exists a polynomial P ∈ R of degree 1 such that for every degree 1 coefficient a i (α) of the period of α, the polynomial P −a i (α) is nonconstant. Let f = [ P ]. For all β ∈ Θ α and n ∈ N large enough, we claim that ]β σ , β[ agrees with ]∞, f [ on a segment with length at most 1 inside any horoball H n (f ) for n ∈ N. By an argument as in the proof of Proposition 4.3, this implies that c α (f ) = q −2 . This in turn implies that max Sp(α) ≥ q −2 , and the result follows since q −2 is an upper bound on max Sp(α) (see Proposition 4.3).
Assume for a contradiction that the geodesic segment ]β σ , β[ agrees with ]∞, f [ on a segment of length at least 2 inside H n (f ). Since deg a n (f ) = deg P = 1, this implies that ]β σ , β[ and ]∞, f [ actually coincide inside of H n (f ). Assume that the orientations of the geodesic lines ]β σ , β[ and ]∞, f [ respectively from β σ to β and from ∞ to f agree. By Lemma 4.1, this implies that if a i (β) is the coefficient in the period of β such that H n (f ) = H i (β), then the polynomial P −a i (β) is constant. This implies that deg a i (β) = 1 and this contradicts the definition of P , since α and β have the same period (up to a cyclic permutation).
If the period of a quadratic irrational α is longer than q − 1, then its Hurwitz constant max Sp(α) may be arbitrarily small, as the following result shows. For every α ∈ E m, k , we have max Sp(α) ≤ q − min(2m, k+2) .
Assume first that there exists a subsequence of coefficients (a in (f )) n∈N of f such that i 0 ≥ 1 and deg a in (f ) > k for all n ∈ N. Let x n be the point of ∂H in (f ) at which the geodesic line ]∞, f [ exits the horoball H in (f ). Since any polynomial P ∈ R of degree k occurs as a coefficient of α (in its periodic part), there exists a horoball H k in the canonical family (H ξ ) ξ∈P 1 (K) which intersects the geodesic ]α σ , α[ in a segment of length exactly 2k. Let y be the point of ∂H k at which the geodesic ]α σ , α[ exits the horoball H k .
H in (f ) k γ n e 1 e 2 x n k H k β n γ n · β σ n γ n · β n β σ n α σ α γ −1 n e 2 γ −1 n e 1 y f ∞ By the transitivity of the action of Γ on the pairs (H , x) where H belongs to the canonical family (H ξ ) ξ∈P 1 (K) and x belongs to ∂H , there exists γ n ∈ Γ which sends (H k , y) to (H in (f ), x n ). Let e 1 , e 2 be the consecutive edges along ]∞, f [ such that the origin of e 1 is x n . Note that the endpoint of e 2 (which is at distance 2 from x n ) might belong to the orbit Γ * of the base point of T or not. Since any pair (P, P ) with P, P ∈ R, deg P = k and deg P ∈ {1, 2} occurs as a pair of consecutive coefficients in the continued fraction expansion of α, there exists β n ∈ Θ α such that the geodesic line ]β σ n , β n [ contains γ −1 n e 1 and γ −1 n e 2 , and coincides with ]α σ , α[ inside H k . Hence γ n ]β σ n , β n [ coincides with ]∞, f [ on e 1 , e 2 as well as on a segment of length exactly k inside H in (f ) (since deg a in (f ) > k).
Otherwise, there exists i 0 ∈ N such that deg a i (f ) ≤ k for all i ≥ i 0 . For every n ∈ N, consider the string of m consecutive horoballs H i 0 +nm (f ), . . . , H i 0 +(n+1)m−1 (f ) crossed by the geodesic line ]∞, f [. The quadratic irrational α has been constructed in such a way that there exists a string of consecutive coefficients in the period of α that agrees with those of f inside the above horoballs. Using Lemma 4.2, this gives the estimate c α (f ) ≤ q −2m . Together with the previous estimate, this completes the proof. Indeed, Proposition 4.9 gives max Sp(α) ≤ q −4 . For any P ∈ R with deg P ≥ 3 and f = [ P ], we have c α (f ) = q −4 by Corollary 4.6. The result follows.
As a special case of Corollary 4.7, we get max Sp(ϕ) = q −2 . The following result gives in particular a complete description of the quadratic Lagrange spectrum of ϕ, proving Theorem 1.3 in the introduction.