---
abstract: |
    We study the involution of the real line induced by the outer automorphism of the extended modular group PGL(2,Z). This ‘[modular]{}’ involution is discontinuous at rationals but satisfies a surprising collection of functional equations. It preserves the set of real quadratic irrationals mapping them in a non-obvious way to each other. It commutes with the Galois action on real quadratic irrationals.

    More generally, it preserves set-wise the orbits of the modular group, thereby inducing an involution of the moduli space of real rank-two lattices. We give a description of this involution as the boundary action of a certain automorphism of the infinite trivalent tree. It is conjectured that algebraic numbers of degree at least three are mapped to transcendental numbers under this involution.
author:
- 'A. Muhammed Uludağ$^*$, Hakan Ayral[^1]'
bibliography:
- 'references3.bib'
title: 'On the involution of the real line induced by Dyer’s outer automorphism of PGL(2,Z)'
---

*Dedicated to Yılmaz Akyıldız, who shared our enthusiasm about jimm*

Introduction {#sec:introduction}
============

It is (it seems not very well-) known that the group ${\mathrm{PGL}_2({\mathbf Z})}$ has an involutive outer automorphism, which was discovered by Dyer in the late 70’s [@dyer1978automorphism]. It would be very strange if this automorphism had no manifestations in myriad contexts where ${\mathrm{PGL}_2({\mathbf Z})}$ or its subgroups play a major role. Our aim in this paper is to elucidate one of these manifestations.

This paper contains some of the results from our arxiv preprint [@jimmarxiv] which could not be published due to its length and notational issues. For some complementary results, see [@jimmlebesgue].

Let $\widehat{{\mathbf R}}:={\mathbf R}\cup \{\infty\}$. The manifestation in question of ${\mathbf J}$ is a map ${\mathbf J}_{\mathbf R}: \widehat{{\mathbf R}}\rightarrow \widehat{{\mathbf R}}$. Denoting the continued fractions in the usual way $$[n_0,n_1,\dots]=n_0+\cfrac{1}{n_1+\cfrac{1}{{\dots}}},$$ one has, for an irrational number $[n_0,n_1,\dots]$ with $n_0, n_1, \dots \geq 2$, $${\mathbf J}_{\mathbf R}([n_0,n_1,n_2,\dots])=[1_{n_0-1},2,1_{n_1-2},2,1_{n_2-2},\dots]$$ where $1_k$ is the sequence ${1,1,\dots, 1}$ of length $k$. This formula remains valid for $n_0, n_1, \dots \geq 1$, if the emerging $1_{-1}$’s are eliminated in accordance with the rule $[\dots m, 1_{-1},n,\dots]=[\dots m+n-1,\dots]$ and $1_0$ with the rule $[\dots m, 1_{0},n,\dots]=[\dots m,n,\dots]$. See page below for some examples.

It is possible to extend this definition of ${\mathbf J}_{\mathbf R}$ to all of $\widehat{{\mathbf R}}$. If we ignore rationals and the noble numbers (i.e. numbers in the ${\mathrm{PGL}_2({\mathbf Z})}$-orbit of the golden section, $\Phi:=(1+\sqrt{5})/{2}$), then ${\mathbf J}_{\mathbf R}$ is an involution. It is well-defined and continuous at irrationals, but two-valued and discontinuous at rationals (Theorem \[jimmcontini\]).

[**Guide for notation**]{}. In what follows, ${\mathbf J}$ denotes Dyers’ outer automorphism of ${\mathrm{PGL}_2({\mathbf Z})}$, ${\mathbf J}_{\mathcal F}$ denotes the automorphism of the tree $|{\mathcal F}|$ induced by ${\mathbf J}$, ${\mathbf J}_{\partial{\mathcal F}}$ denotes the homeomorphism of the boundary $\partial{\mathcal F}$ induced by ${\mathbf J}_{\mathcal F}$, and ${\mathbf J}_{\mathbf R}$ denotes the involution of ${\mathbf R}$ induced by ${\mathbf J}_{\partial{\mathcal F}}$. However, we reserve the right to drop the subscript and simply write ${\mathbf J}$ when we think that confusion won’t arise.

### Functional equations {#functional-equations .unnumbered}

The involution ${\mathbf J}_{\mathbf R}$ shares the privileged status of the three involutions generating the extended modular group ${\mathrm{PGL}_2({\mathbf Z})}$, $$K:x\rightarrow 1-x, \quad U:x\rightarrow 1/x, \quad V:x\rightarrow -x,$$ as it interacts in a very harmonious way with them. Indeed, removing the rationals and noble numbers from its domain, ${\mathbf J}_{\mathbf R}$ satisfies the following functional equations:

The following set of functional equations are derived from the above ones:

(FE:I) and (FE:III) states that ${\mathbf J}$ is covariant with the operators $U$ and $K$. (FE:IV) is deduced from (FE:II) and (FE:III). The most general form of the equations is (FE:VI) and says that ${\mathbf J}_{\mathbf R}$ conjugates the Möbius map $M\in {\mathrm{PGL}_2({\mathbf Z})}$ to the Möbius map ${\mathbf J}(M)\in {\mathrm{PGL}_2({\mathbf Z})}$. It is deduced from (FE:I-III) by using the involutivity of ${\mathbf J}$.

Before attempting to play with them, beware that the equations are not consistent on ${\mathbf Q}$. On the set of noble numbers ${\mathbf J}$ is 2-to-1 and is not involutive.

${\mathbf J}$ preserves the “[real-multiplication locus]{}", i.e. the set of real quadratic irrationals. It does so in a non-trivial way, though it preserves setwise the ${\mathrm{PGL}_2({\mathbf Z})}$-orbits of real quadratic irrationals. More generally ${\mathbf J}$ preserves setwise the ${\mathrm{PGL}_2({\mathbf Z})}$-orbits on $\widehat{{\mathbf R}}$ thereby inducing an involution of the moduli space of real rank-2 lattices, $\widehat{{\mathbf R}}/{\mathrm{PGL}_2({\mathbf Z})}$. For a description of its fixed points, see Proposition \[fixed\].

One can use (FE:I)-(FE:III) to directly define and study ${\mathbf J}_{\mathbf R}$. However, the nature of ${\mathbf J}_{\mathbf R}$ is best understood by considering it as a homeomorphism of the boundary of the Farey tree, induced by an automorphism of the tree. See the coming sections for details.

Finally, the following consequence of the functional equations is noteworthy: $${\frac{1}{x}+\frac{1}{y}=1\iff \frac{1}{{\mathbf J}(x)}+\frac{1}{{\mathbf J}(y)}=1}.$$ (See page for a complete set of two-variable functional equations.) Hence ${\mathbf J}$ sends harmonic pairs of numbers to harmonic pairs, inducing a duality of Beatty partitions of positive integers. See [@jimmarxiv] for some details.

### Some examples. {#examples .unnumbered}

Here is a list of assorted values of ${\mathbf J}$. Recall that $\Phi$ denotes the golden section. $$\begin{aligned}
\label{jimmphi}
\Phi=[\overline{1}]\implies{\mathbf J}(\Phi)=\infty={\mathbf J}\bigl(-{1}/{\Phi}\bigr),\end{aligned}$$ where by $\overline{v}$ we denote the infinite sequence $v,v,v, \dots$, for any finite sequence $v$. From \[jimmphi\] by using (FE:II) we find $$\begin{aligned}
\label{jimmminusphi}
{\mathbf J}(-\Phi)={\mathbf J}\bigl({1}/{\Phi}\bigr)=0.\end{aligned}$$ Repeated application of (FE:IV) gives $$\begin{aligned}
\label{jimmenplusphi}
{\mathbf J}(n+\Phi)={\mathbf J}([n+1,\overline{1}])={F_{n+1}}/{F_{n}}\end{aligned}$$ where $F_n$ denotes the $n$th Fibonacci number. One has $${\mathbf J}([1_n,2,\overline{1}])=[n+1,\infty]=n+1$$ For the number $\sqrt{2}$ we have something that looks simple $$\sqrt{2}=[1,\overline{2}]\implies{\mathbf J}(\sqrt{2})=[\overline{2}]=1+\sqrt{2}$$ but this is not typical as the next example illustrates: $${\mathbf J}({(3+5\sqrt{2})}/{7})=
{\mathbf J}([1,\overline{2, 3, 1, 1, 2, 1, 1, 1}])=
[2,\overline{2,1,4,5}]
=\frac{-3+2\sqrt{95}}{7}$$ In a similar vein, consider the examples $$\sqrt{11}=[3;\overline{3, 6}] 
\implies {\mathbf J}(\sqrt{11})=[\overline{1,1,2,1,2,1,1}]=
\frac{15+\sqrt{901}}{26},$$ $${\mathbf J}(-\sqrt{11})=-1/{\mathbf J}(\sqrt{11})=-\frac{26}{15+\sqrt{901}}=\frac{15-\sqrt{901}}{26}.$$ The last example hints at the following result

The involution ${\mathbf J}$ commutes with the conjugation of real quadratic irrationals; i.e. for every real quadratic irrational $\alpha$ one has $
{\mathbf J}({\alpha}^*)={{\mathbf J}(\alpha)^*}.
$

[*Proof.*]{} Every such $\alpha$ is the fixed point of some $M\in {\mathrm{PSL}_2({\mathbf Z})}$, the Galois conjugate $\alpha^*$ being the other root of the equation $Mx=x$. But then ${\mathbf J}(M\alpha)={\mathbf J}(M){\mathbf J}(\alpha)={\mathbf J}(\alpha)$, i.e. ${\mathbf J}(\alpha)$ is a fixed point of ${\mathbf J}(M)$, the other root being ${\mathbf J}(\alpha)^*$. Finally $M\alpha=\alpha\implies$ $M\alpha^*=\alpha^*\implies$ $ {\mathbf J}(\alpha^*)={\mathbf J}(M\alpha^*)={\mathbf J}(M){\mathbf J}(\alpha^*)$, so ${\mathbf J}(\alpha^*)$ is also a fixed point of ${\mathbf J}(M)$, i.e. it must coincide with ${\mathbf J}(\alpha)^*$. $\Box$

To finish, let us give the ${\mathbf J}$-transform of a non-quadratic algebraic number, $$\begin{aligned}
{\mathbf J}(^3\!\sqrt{2})=
{\mathbf J}([1; 3, 1, 5, 1, 1, 4, 1, 1, 8, 1, 14, 1, 10, 2, 1, 4, 12, 2, 3, 2, 1, 3, 4, 1, \dots])\\
=[2,1,3,1,1,1,4,1,1,4,1_6,3,1_{12},3,1_8,2,3,1,1,2,1_{10},2,2,1,2,3,1,2,1,1,3,\dots ]
\\
=2.784731558662723\dots\end{aligned}$$ and the transforms of two familiar transcendental numbers: $$\begin{aligned}
{\mathbf J}(\pi)=
{\mathbf J}([3, 7, 15, 1, 292, 1, 1, 1, 2, 1, 3,  \dots])=
[1_2, 2, 1_5, 2, 1_{13}, 3, 1_{290}, 5, 3,  \dots]\\
=1.7237707925480276079699326494931025145558144289232\dots\end{aligned}$$ $$\begin{aligned}
{\mathbf J}(e)=
{\mathbf J}([2,1,2,1,1,4,1,1,6,1,1,8,\dots])= 
[1,3,4,1,1,4,1,1,1,1,\dots, \overline{4,1_{2n}}]\\
=1.3105752928466255215822495496939143349712038085627\dots\end{aligned}$$ We have been unable to relate these numbers to other numbers of mathematics.

We made some numerical experiments on the algebraicity of a few numbers ${\mathbf J}(x)$ where $x$ is an algebraic number of degree $>2$, with a special emphasis on ${\mathbf J}(^3\!\sqrt{2})$. It is very likely that these numbers are transcendental.

Modular group and its automorphism group
========================================

The [*modular group*]{} is the projective group ${\mathrm{PSL}_2({\mathbf Z})}$ of two by two unimodular integral matrices. It acts on the upper half plane by Möbius transformations. It is the free product of its subgroups generated by $S(z)=-1/z$ and $L(z)= (z-1)/z$, respectively of orders 2 and 3. Thus $
{\mathrm{PSL}_2({\mathbf Z})}=\langle S, L \,|\, S^2=L^3=1\rangle.
$ The projective group ${\mathrm{PGL}_2({\mathbf Z})}$ consists of integral matrices of determinant $\pm 1$.

The fact that $Out({\mathrm{PGL}_2({\mathbf Z})})\simeq {\mathbf Z}/2{\mathbf Z}$ has a story with a twist: Hua and Reiner [@hua1952automorphisms] claimed in 1952 that ${\mathrm{PGL}_2({\mathbf Z})}$ has no outer automorphisms. The error was corrected by Dyer [@dyer1978automorphism] in 1978. This automorphism also appears in the work of Djokovic and Miller [@djokovic] from about the same time. Dyer also proved that the automorphism tower of ${\mathrm{PGL}_2({\mathbf Z})}$ stops here. Note that ${\mathrm{PGL}_2({\mathbf Z})}\simeq Aut({\mathrm{PSL}_2({\mathbf Z})})$.

Below is a list of some presentations of ${\mathrm{PGL}_2({\mathbf Z})}$ and ${\mathbf J}$. $$\begin{array}{|l|l|} \hline &\\[-1ex]
\mbox{\bf Presentation of ${\mathrm{PGL}_2({\mathbf Z})}$}\quad &\mbox{\bf The automorphism ${\mathbf J}$}\quad  \\[1ex]\hline &\\[-.9ex]
\langle V,U,K\, |\, V^2=U^2=K^2=(VU)^2=(KU)^3=1 \rangle &(V,U,K) \rightarrow (UV,U,K)\\[1ex]\hline &\\[-.9ex]
\langle V,U,L\, |\, V^2=U^2=(LU)^2=(VU)^2=L^3=1 \rangle&(V,U,L) \rightarrow (UV, U, L)\\[1ex]\hline &\\[-.9ex]
\langle S,V,K\, |\, V^2=S^2=K^2=(SV)^2=(KSV)^3=1 \rangle\quad&(S,V,K) \rightarrow (V,S,K)\\[1ex]\hline
\end{array}$$

It is easy to find the ${\mathbf J}$ of an element of ${\mathrm{PGL}_2({\mathbf Z})}$ given as a word in one of the listed presentations. On the other hand, there seems to be no algorithm to compute the ${\mathbf J}$ of an element of ${\mathrm{PGL}_2({\mathbf Z})}$ given in the matrix form, other then actually expressing the matrix in terms of one of the presentations above, finding the ${\mathbf J}$-transform, and then computing the matrix.

The translation $2+x\in {\mathrm{PSL}_2({\mathbf Z})}$ is sent to $(2x+1)/(x+1)\in {\mathrm{PSL}_2({\mathbf Z})}$ under ${\mathbf J}$, i.e. ${\mathbf J}$ may send a parabolic element to a hyperbolic element.

The Farey tree and its boundary
===============================

#### The construction of ${\mathcal F}$.

From ${\mathrm{PSL}_2({\mathbf Z})}$ we construct the [*bipartite Farey tree ${\mathcal F}$*]{} tree on which ${\mathrm{PSL}_2({\mathbf Z})}$ acts, as follows. The set of edges is $E({\mathcal F})={\mathrm{PSL}_2({\mathbf Z})}$. Vertices are the left cosets of the subgroups $\langle S\rangle$ and $\langle L\rangle$. Two distinct vertices $v$ and $v'$ are joined by an edge if and only if $v \cap v'\neq \emptyset$ and in this case the edge between them is the only element in the intersection. Cosets of $\langle S\rangle$ are 2-valent vertices and the cosets of $\langle L\rangle$ are 3-valent. Since distinct cosets are disjoint, ${\mathcal F}$ is a bipartite graph. It is connected and circuit-free since ${\mathrm{PSL}_2({\mathbf Z})}$ is freely generated by $S$ and $L$.

The edges incident to the vertex $\{W,WL,WL^{2}\}$ are $ W, \, WL$ and $ WL^{2} $. These edges inherit a natural cyclic ordering which we fix for all vertices as $(W, WL, WL^2)$. This endows ${\mathcal F}$ with the structure of a ribbon graph. Hence ${\mathcal F}$ is an infinite bipartite tree with a ribbon structure. $M\in {\mathrm{PSL}_2({\mathbf Z})}$ acts on ${\mathcal F}$ from the left by ribbon graph automorphisms by sending the edge labeled $W$ to the edge labeled $MW$. This action is free on $E({\mathcal F})$ but not free on the set of vertices.

#### The boundary of ${\mathcal F}$. {#sec:boundary/of/F}

A [*path*]{} on $\mathcal F$ is a sequence of distinct edges $e_1,e_2,\dots,e_k$ such that $e_i$ and $e_{i+1}$ meet at a vertex, for each $1\leq i< k-1$. Since the edges of ${\mathcal F}$ are labeled by reduced words in the letters $L$ and $S$, a path in ${\mathcal F}$ is a sequence of reduced words $(W_i)$ in $L$ and $S$, such that $W_i^{-1}W_{i+1}\in \{L, L^2, S\}$ for every $i$.

An [*end*]{} of ${\mathcal F}$ is an equivalence class of infinite (but not bi-infinite) paths in ${\mathcal F}$, where eventually coinciding paths are considered as equivalent. The set of ends of ${\mathcal F}$ is denoted $\partial {\mathcal F}$. The action of ${\mathrm{PSL}_2({\mathbf Z})}$ on ${\mathcal F}$ extends to $\partial {\mathcal F}$, the element $M\in {\mathrm{PSL}_2({\mathbf Z})}$ sending the path $(W_i)$ to the path $(MW_i)$.

Given an edge $e$ of ${\mathcal F}$ and an end $b$ of ${\mathcal F}$, there is a unique path in the class $b$ which starts at $e$. Hence for any edge $e$, we may identify the set $\partial {\mathcal F}$ with the set of infinite paths that start at $e$. We denote this latter set by $\partial{\mathcal F}_e$ and endow it with the topology generated by the [*Farey intervals*]{} ${\mathcal O}_{e'}$, i.e. the set of paths through $e'$. The ribbon structure of ${\mathcal F}$ endows $\partial{\mathcal F}_e$ with the structure of a cyclically ordered topological space. Given a second edge $e'$ of ${\mathcal F}$, the spaces $\partial{\mathcal F}_e$ and $\partial{\mathcal F}_{e'}$ are homeomorphic under the order-preserving map which pre-composes with the unique path joining $e$ to $e'$. The action of the modular group on the set $\partial{\mathcal F}$ induces an action of ${\mathrm{PSL}_2({\mathbf Z})}$ by order-preserving homeomorphisms of $\partial{\mathcal F}_e$, for any choice of a base edge $e$.

#### The continued fraction map.

$\partial{\mathcal F}_e$ is homeomorphic to the Cantor set. By exploiting its cyclic order structure, we “smash its holes" as follows. Define a [*rational end*]{} of ${\mathcal F}$ to be an eventually left-turn or eventually right-turn path. Now introduce the equivalence relation $\sim $ on $\partial{\mathcal F}$ as: left- and right- rational paths which bifurcate from the same vertex are equivalent. On $\partial{\mathcal F}_e$ this equivalence sets equal those points which are not separated by a third point.

[![image](LRpaths)]{}\
[ A pair of rational ends.]{}\

On the quotient space $\partial{\mathcal F}_e/\!\sim $ there is the quotient topology induced by the topology on $\partial{\mathcal F}_e$ such that the projection map $$\label{projectionmap}
 \partial{\mathcal F}_e\longrightarrow \partial{\mathcal F}_e/\!\sim$$ is continuous. The quotient space $S^1_e:=\partial{\mathcal F}_e/\!\sim $ is a cyclically ordered topological space under the order relation inherited from $\partial{\mathcal F}_e$. The equivalence relation is preserved under the canonical homeomorphisms $\partial{\mathcal F}_e \longrightarrow \partial{\mathcal F}_{e'}$ and is also respected by the ${\mathrm{PSL}_2({\mathbf Z})}$-action. Therefore we have the commutative diagram $$\xymatrix{
\partial{\mathcal F}_e  \ar@{->}[r] \ar@{->}[d]  &  \partial{\mathcal F}_{e'}\ar@{->}[d]\\ 
S^1_{e}            \ar@{->}[r]                       &  S^1_{e'}\\
 }$$ where the horizontal arrows are order-preserving homeomorphisms. Moreover, ${\mathrm{PSL}_2({\mathbf Z})}$ acts by homeomorphisms on $S^1_{e}$, for all $e$.

Now, ${\mathcal F}$ is equipped with a distinguished edge, the one marked $I$, the identity element of ${\mathrm{PSL}_2({\mathbf Z})}$. So all spaces $S^1_{e}$ are canonically homeomorphic to $S^1_{I}$.

Any element of $S^1_I$ can be represented by an infinite word in $L$ and $S$. Regrouping occurrences of $LS$ and $L^2S$, any such word $x$ can be written as $$\begin{aligned}
\label{reps}
    x&=(LS)^{n_0}(L^2S)^{n_1}(LS)^{n_2}(L^2S)^{n_3}(LS)^{n_4} \cdots \mbox{ or  }\\
    x&=S(LS)^{n_0}(L^2S)^{n_1}(LS)^{n_2}(L^2S)^{n_3}(LS)^{n_4} \cdots,\end{aligned}$$

where $n_0, n_1 \dots \geq 0$. Since our paths do not have any backtracking we have $n_0\geq0$ and $n_{i}>0$ for $i = 1,2,\cdots$. The pairs of words $$\begin{aligned}
    (LS)^{n_0}\cdots (LS)^{n_{k}+1} (L^2S)^{\infty} \mbox{ and  } &(LS)^{n_0}\cdots (LS)^{n_{k}}(L^2S) (LS)^{\infty}, & (k\mbox{ even}) \\
    (LS)^{n_0}\cdots (L^2S)^{n_{k}+1} (LS)^{\infty} \mbox{ and  } &(LS)^{n_0}\cdots (L^2S)^{n_{k}}(LS) (L^2S)^{\infty}, & (k\mbox{ odd})  \end{aligned}$$ correspond to pairs of rational ends and represent the same element of $S_I^1$. For irrational ends this representation is unique.

The ${\mathrm{PSL}_2({\mathbf Z})}$-action on $S^1_I$ is then the pre-composition of the infinite word by the word in $L,S$ representing the element of ${\mathrm{PSL}_2({\mathbf Z})}$. In this picture it is readily seen that this action respects the equivalence relation $\sim $.

Set $T:=LS$, so that $T(x)=1+x$. Note that $$\begin{aligned}
(LS)^n.(L^2S)^m.(LS)^k(x)=(LS)^n.S.[S.(L^2S)^m .S]. S . (LS)^k(x)\\
=(LS)^n.S.[SL^2]^m. S . (LS)^k(x)=(LS)^n.S.[LS]^{-m}. S . (LS)^k(x)\\
=(x+n)\circ (-1/x) \circ (x-m) \circ (-1/x)\circ (x+k) =
n+\cfrac{1}{m+\cfrac{1}{k+x}}\end{aligned}$$ Accordingly, define the [*continued fraction map*]{} $\kappa: S^1_I\rightarrow \hat {\mathbf R} $ by $$\kappa(x)=\left\{ \begin{array}{rl}
[n_0,n_1,n_2,\dots]& \mbox{ if } x=(LS)^{n_0}(L^2S)^{n_1}(LS)^{n_2}(L^2S)^{n_3}(LS)^{n_4}\dots\\  
-1/[n_0,n_1,n_2,\dots]& \mbox{ if } x=S(LS)^{n_0}(L^2S)^{n_1}(LS)^{n_2}(L^2S)^{n_3}(LS)^{n_4}\dots
\end{array}\right.$$\

The continued fraction map $\kappa$ is a homeomorphism. \[thm:cfm\]

[*Proof.*]{} To each rational end $[n_0,n_1,n_2,\dots,n_k,\infty]$ we associate the rational number $[n_0,n_1,n_2,\dots,n_k]$. Likewise for the rational ends in the negative sector. This is an order preserving bijection between the set of equivalent pairs of rational ends and ${\mathbf Q}\cup\{\infty\}$. Now observe that an infinite path is no other than a Dedekind cut and conversely every cut determines a unique infinite path, see [@UZD] for details.$\Box$

As a consequence, we see that $\kappa$ conjugates the ${\mathrm{PSL}_2({\mathbf Z})}$-action on $S_I^1$ to its action on $\widehat {\mathbf R}$ by Möbius maps. Furthermore, there is a bijection between $\widehat {{\mathbf Q}}$ and the set of pairs of equivalent rational ends. Any pair of equivalent rational ends determines a unique [*rational horocycle*]{}, a bi-infinite left-turning (or right-turning) path. Hence, there is a bijection between $\widehat {{\mathbf Q}}$ and the set of rational horocycles.

\[correspondences\] Given the base edge $I$ of ${\mathcal F}$,\
(i) There is a natural bijection between the 3-valent vertices of ${\mathcal F}$ and $\widehat {{\mathbf Q}}\setminus\{0,\infty\}$.\
(ii) There is a bijection between the 2-valent vertices and the Farey intervals $[p/q, r/s]$ with $ps-qr=1$.

[*Proof.*]{} (i) On each rational horocycle there lies a unique trivalent vertex which is closest to $I$. If we exclude the two horocycles on which $I$ lies, this gives a bijection between the set of trivalent vertices of ${\mathcal F}$ and the set of horocycles. The map $\kappa$ sends the two horocycles through $I$ to $0$ and $\infty$. Hence, there is a bijection between the set of trivalent vertices of ${\mathcal F}$ and $\widehat {{\mathbf Q}}\setminus \{0, \infty\}$. This bijection sends the trivalent vertex $\{W, WL, WL^2\}$ to $W(1)\in {\mathbf Q}$, where $W$ is a reduced word ending with $S$. (ii) Every 2-valent vertex $\{W, WS\}$ lies exactly on two horocycles, and the set of paths through $\{W, WS\}$ is sent to the interval $[W(0), WS(0)]$ under $\kappa$. $\Box$

#### Periodic paths and the real multiplication set.

Let $\gamma:=(W_1, W_2, \dots, W_n)$ be a finite path in ${\mathcal F}$. Then the [*periodization*]{} of $\gamma$ is the path $\gamma^\omega$ defined as $$\begin{aligned}
W_1, W_2, \dots, W_n,   W_nW_1^{-1}W_2,     W_nW_1^{-1}W_3,    \dots,    W_nW_{1}^{-1}W_n,  \qquad\qquad\qquad \\ 
\quad (W_nW_{1}^{-1})^2W_2, \dots, (W_nW_{1}^{-1})^2W_n, (W_nW_{1}^{-1})^3W_2, \dots\end{aligned}$$ In plain words, $\gamma^\omega$ is the path obtained by concatenating an infinite number of copies of a path representing $W_1^{-1}W_n$, starting at the edge $W_1$. If $W_1^{-1}W_n$ is elliptic, then $\gamma^\omega$ is an infinitely backtracking finite path. If not, $\gamma^\omega$ is actually infinite and represents an end of ${\mathcal F}$. We call these [*periodic ends of ${\mathcal F}$*]{}. Thus we have the periodization map $$per:\,\,   \{\,finite\, \, hyperbolic \, \, paths\,  \} \longrightarrow \{\, ends\, \, of\, \, {\mathcal F}\,  \}$$ whose image consists of periodic ends. The map $per$ is not one-to one but its restriction to the set of primitive paths is. The modular group action on $\partial{\mathcal F}$ preserves the set of periodic ends and $per$ is ${\mathrm{PSL}_2({\mathbf Z})}$-equivariant.

Given an edge $e$ of ${\mathcal F}$ and a periodic end $b$ of ${\mathcal F}$, there is a unique path in the class $b$ which starts at $e$. This way the set of periodic ends of ${\mathcal F}$ is identified with the set of eventually periodic paths based at $e$. This set is dense in $\partial{\mathcal F}_e$ and preserved under the canonical homeomorphisms between $\partial{\mathcal F}_e$ and $\partial{\mathcal F}_{e'}$. Every periodic end has a unique ${\mathrm{PSL}_2({\mathbf Z})}$-translate, which is a purely periodic path based at $e$. Finally, the set of periodic ends descends to a well-defined subset of $S^1_e$. The image of this set under $\kappa$ consists of the set of eventually periodic continued fractions, i.e. the set of real quadratic irrationals. These are precisely the fixed points of the ${\mathrm{PSL}_2({\mathbf Z})}$-action on $S^1_e$; a hyperbolic element $M=(LS)^{n_0}(L^2S)^{n_1}\cdots (LS)^{n_{k}}\in {\mathrm{PSL}_2({\mathbf Z})}$ fixing the numbers represented by the infinite words $$\begin{aligned}
(LS)^{n_0}(L^2S)^{n_1}\cdots (LS)^{n_{k}}(LS)^{n_0}(L^2S)^{n_1}\cdots (LS)^{n_{k}}\dots, \mbox{ and}\\
(LS)^{-n_k}\cdots (L^2S)^{-n_1}(LS)^{-n_{k}}(LS)^{-n_k}\cdots (L^2S)^{-n_1}(LS)^{-n_{k}}\dots. \end{aligned}$$

The automorphism group of ${\mathcal F}$
----------------------------------------

Now let us forget about the ribbon structure of ${\mathcal F}$. This gives an abstract graph which we denote by $|{\mathcal F}|$. The automorphism group $Aut(|{\mathcal F}|)$ of $|{\mathcal F}|$ contains $Aut({\mathcal F})$ as a non-normal subgroup. It acts by homeomorphisms on $\partial {\mathcal F}$. However, automorphisms of $|{\mathcal F}|$ do not respect the ribbon structure on ${\mathcal F}$ in general and don’t induce well-defined self-maps of $S_I^1$.

Fix an edge $e$ of ${\mathcal F}$ and denote by $Aut_e(|{\mathcal F}|)$ the group of automorphisms of $|{\mathcal F}|$ that stabilize $e$. For any pair $e$, $e'$ of edges, $Aut_e(|{\mathcal F}|)$ and $Aut_{e'}(|{\mathcal F}|)$ are conjugate subgroups. For $n>0$ let $|{\mathcal F}_n|$ be the finite subtree of $|{\mathcal F}|$ containing vertices of distance $\leq n$ from $e$. Then $|{\mathcal F}_{n}|\subset |{\mathcal F}_{n+1}|$ forms an injective system with respect to inclusion and $Aut_e(|{\mathcal F}_{n+1}|) \rightarrow Aut_e(|{\mathcal F}_{n}|)$ forms a projective system, and $$Aut_e(|{\mathcal F}|)=\lim_{\longleftarrow} Aut_e(|{\mathcal F}_{n}|),$$ showing that $Aut_e(|{\mathcal F}|)$ is a profinite group.

#### A description of tree automorphisms as shuffles.

Let us turn back to the ribbon graph ${\mathcal F}$, with the base edge $I\in{\mathrm{PSL}_2({\mathbf Z})}$. Given any vertex $v$, this base edge permits us to define the subtree (i.e. Farey branch) attached to ${\mathcal F}$ at $v$.

Denote by $V_\bullet$ the set of of degree-3 vertices of ${\mathcal F}$.

The ribbon structure of ${\mathcal F}$ serves as a sort of coordinate system to describe all automorphisms of $|{\mathcal F}|$, as follows. Given a vertex $v=\{W, WL, WL^2\}$ of type $V_\bullet$ of ${\mathcal F}$, the [*shuffle*]{} $\sigma_v$ is the automorphism of $|{\mathcal F}|$ which is defined as: $$\begin{aligned}
\label{twist}
\sigma_v: \mbox{edge labeled } M \longrightarrow 
\mbox{edge labeled} \left\{
\begin{array}{ll}
M, & \mbox{ if } M\neq WLX\\ 
WL^2X,& \mbox{ if } M=WLX\\
WLX,& \mbox{ if } M=WL^2X
\end{array}
\right.\end{aligned}$$ where $M$ and $X$ are reduced words in $S$ and $L$. Thus $\sigma_v$ is the identity away from the Farey branches at $v$, whereas it exchanges the two Farey branches at $v$. Note that $\sigma_v^2=I$, i.e. the shuffle $\sigma_v$ is involutive.

The automorphism $\sigma_v$ is obtained by permuting the two branches attached at $v$, by shuffling these branches one above the other. Beware that $\sigma_v$ is [*not*]{} the automorphism $\theta_v$ of $|{\mathcal F}|$ obtained by rotating in the physical 3-space the branches starting at $WL$ and at $WL^2$ around the vertex $v$. We call this latter automorphism a [*twist*]{}, see below for a precise definition.

We must stress that the definition of $\sigma_v$ requires the ribbon structure of ${\mathcal F}$ as well as a base edge, although $\sigma_v$ is never an automorphism of ${\mathcal F}$.

Evidently, $\sigma_v$ stabilizes $I$, so one has $\sigma_v\in Aut_I(|{\mathcal F}|)$.

Given an arbitrary (finite or infinite) set $\nu$ of vertices in $V_\bullet$, we inductively define the shuffle $\sigma_\nu \in Aut_I(|{\mathcal F}|)$ as follows: First order the elements of $\nu$ with respect to the distance from the base edge $I$, i.e. set $\nu^{(1)}=(v_1^{(1)}, v_2^{(1)},\dots)$, where $v_i^{(1)}\neq v_{i+1}^{(1)}$ and such that $
d(v_i^{(1)},I) \leq d(v_{i+1}^{(1)},I)$ for all $i=1,2,\dots.$ Set $$\sigma^{(i)}_\nu:=\sigma_{v_i^{(i)}} \mbox{ and } v_j^{(i+1)}=\sigma^{(i)}_\nu(v_j^{(i)}) \mbox{ for } j\geq i+1, \quad 
i=1,2,\dots$$ Since for any $j>i$, the automorphism $\sigma^{(j)}_\nu$ agrees with $\sigma^{(i)}_\nu$ on ${\mathcal F}_i$, the sequence $\sigma^{(i)}_\nu$ converges in $Aut_I(|{\mathcal F}|)$ and we set $$\sigma_\nu:=\lim_{i\rightarrow \infty} \sigma^{(i)}_\nu$$ for the limit automorphism of $|{\mathcal F}|$. There is some arbitrariness in the initial ordering of $\nu$, concerning its elements of constant distance to the edge $I$, but the limit does not depend on this. The reason is that the shuffles corresponding to those elements commute. $\sigma_\emptyset$ is the identity automorphism by definition.

$Aut_I(|{\mathcal F}|) =\{ \sigma_\nu\, |\, \nu\subseteq V_\bullet({\mathcal F})\}$.

[*Proof.*]{} It suffices to show that the restrictions of shuffles to finite subtrees $|{\mathcal F}_n|$ gives the full group $Aut_I(|{\mathcal F}_n|)$. This is easy. $\Box$

#### The automorphism $\sigma_{V_\bullet}$.

What happens if we shuffle every $\bullet$-vertex of $|{\mathcal F}|$? In other words, what is effect of the automorphism $\sigma_{V_\bullet}$ on $\partial_I F$? If $x\in \partial_I F$ is represented by an infinite word in $L$, $L^2$ and $S$, then according to (\[twist\]), we see that $\sigma_{V_\bullet}$ replaces $L$ by $L^2$ and vice versa. In other words, if $x$ is of the form $$x=(LS)^{n_0}(L^2S)^{n_1}(LS)^{n_2}(L^2S)^{n_3}(LS)^{n_4}\dots,$$ then one has $$\sigma_{V_\bullet}(x)=
(L^2S)^{n_0}(LS)^{n_1}(L^2S)^{n_2}(LS)^{n_3}(L^2S)^{n_4}\dots$$ In terms of the contined fraction representations, we get, for $n_0>0$, $$\sigma_{V_\bullet}([n_0, n_1,n_2,\dots])=[0, n_1,n_2,\dots]$$ and for $n_0=0$ $$\sigma_{V_\bullet}([0, n_1,n_2,\dots])=[n_1,n_2,\dots].$$ A similar formula also holds when $x$ starts with an $S$, and we get $$\sigma_{V_\bullet}(x)=1/x=U(x).$$ Observe (keeping in mind the forthcoming parallelism between ${\mathbf J}$ and $U$) that $U$ is an involution satisfying the equations $$\label{fesforu}
U=U^{-1}, \quad US=SU, \quad
LU=UL^2.$$ Here, $U$, $L$ and $S$ are viewed as operators acting on the boundary $\partial_I{\mathcal F}$. These equations can be re-written in the form of functional equations as below: $$U(Ux)=x, \quad U(-\frac{1}{x})=-\frac{1}{Ux}, \quad U(\frac{1}{1-x})=1-\frac{1}{Ux}.$$ One may derive other functional equations from these, i.e. $UT=ULS=L^2US=L^2SU$ is written as $$U(1+x)=\frac{Ux}{1+Ux}.$$ One may consider $U$ as an “[orientation-reversing]{}" automorphism of the ribbon tree ${\mathcal F}$. In the same vein, $U$ is a homeomorphism of $\partial_I{\mathcal F}$ which reverses its canonical ordering. It is the sole element of $Aut_I(|{\mathcal F}|)$ which respects the equivalence $\sim $ (unlike ${\mathbf J}$) and hence $U$ acts by homeomorphism on $S^1_I$. In fact, taken as a map on $E({\mathcal F})={\mathrm{PSL}_2({\mathbf Z})}$, the involution $U$ is an automorphism of ${\mathrm{PSL}_2({\mathbf Z})}$, the one defined by $$U:\left(\begin{matrix} S\\L\end{matrix}\right) \to 
\left(\begin{matrix} S\\L^2\end{matrix} \right)$$ The automorphism group of ${\mathrm{PSL}_2({\mathbf Z})}$ is generated by the inner automorphisms and $U$: this is the group ${\mathrm{PGL}_2({\mathbf Z})}$.

#### Twists.

Let $v\in V_\bullet$ and let $\nu_v$ be the set of all vertices (including $v$) on the Farey branch (with reference to the edge $I$) of ${\mathcal F}$ at $v$. Then the [*twist*]{} of $v$ is the automorphism of ${\mathcal F}$ defined by $$\theta_v:=\sigma_{\nu_v}.$$ In words, $\theta_v$ is the shuffle of every vertex of the Farey branch at $v$. As in the case of shuffles, for any subset $\mu\subset V_\bullet$, one may define the twist $\theta_\mu$ as a limit of convergent sequence of individual twists.

\[twisttoshuffle\] Let $v$ be a vertex in $V_\bullet$ and $v'$, $v''$ its two children (with respect to the ancestor $I$). Put $\mu:=\{v,v',v''\}$. Then $
\sigma_v=\theta_\mu.
$

Hence, shuffles can be expressed in terms of twists and vice versa. This proves:

$Aut_I(|{\mathcal F}|) =\{ \theta_\mu\, |\, \mu\subseteq V_\bullet({\mathcal F})\}$.

\[notatdef\] Let $v^*$ be the trivalent vertex incident to the base edge $I$, i.e. $v^*:=\{I,L,L^2\}$ and set $V_\bullet^*:=V_\bullet\backslash \{v^*\}$. We denote the special automorphism $\theta_{V_\bullet^*}$ by ${\mathbf J}_{\mathcal F}$. In words, this is the automorphism of $|{\mathcal F}|$ obtained by twisting every trivalent vertex except $v^*$.

This ${\mathbf J}_{\mathcal F}$ is the same automorphism obtained by shuffling every other trivalent vertex, such that $v^*$ is not shuffled. More precisely, the following consequence of Lemma \[twisttoshuffle\] holds:

One has $
\theta_{V_\bullet^*}={\mathbf J}_{\mathcal F}=\sigma_J,
$ where $J\subset V_\bullet$ is the set of degree-3 vertices, whose distance to the base edge is an odd number.

Obviously, ${\mathbf J}_{\mathcal F}$ induce an involutive homeomorphism of $\partial_I{\mathcal F}$ but violates its ordering. We denote this homeomorphism by ${\mathbf J}_{\partial{\mathcal F}}$. We must emphasize that ${\mathbf J}_{{\mathcal F}}$ and ${\mathbf J}_{\partial{\mathcal F}}$ are perfectly well-defined mappings on their domain of definition. They don’t exhibit such things as the two-valued behaviour of ${\mathbf J}_{{\mathbf R}}$ at rationals. This two-valued behavior is a consequence of the fact that ${\mathbf J}_{\partial{\mathcal F}}$ do not respect the relation $\sim $.

To see the effect of ${\mathbf J}_{\partial{\mathcal F}}$ on $x\in\partial_I{\mathcal F}$, assume $$x=S^\epsilon (LS)^{n_0}(L^2S)^{n_1}(LS)^{n_2}(L^2S)^{n_3}(LS)^{n_4}\dots, \, (n_0\geq 0, \, n_i>0 \mbox{ if } i>0, \,\epsilon\in\{0, 1\}).$$ We may represent $x$ by a string of 0’s and 1’s (0 for $L$ and 1 for $L^2$): $$\begin{aligned}
x=S^\epsilon
\underbrace{00\dots0}_{n_0}
\underbrace{11\dots1}_{n_1}
\underbrace{00\dots0}_{n_2}
\underbrace{11\dots1}_{n_3}
\dots, \, \end{aligned}$$ Then rationals are represented by the eventually constant strings where for any finite string $a$, the strings $a0111\dots$ and $a1000\dots$ represent the same rational[^2].

Let $\phi:=(01)^\omega$ be the zig-zag path to infinity, and set $\phi^*:=\lnot \phi=(10)^\omega$. Then $${\mathbf J}_{\partial{\mathcal F}}(x)= \begin{cases} 
a \xor \phi,& x=a\in \{0,1\}^\omega,\\
S(a \xor \phi*),& x=Sa, \, a\in \{0,1\}^\omega.
\end{cases}$$ where $\xor$ is the operation of term-wise exclusive or (XOR). The involutivity of ${\mathbf J}_{\partial{\mathcal F}}$ then stems from the reversibility of the disjunctive or: $(p\xor q) \xor q=p$.

[**Some Examples.**]{} The string $0(0011)^\omega$ corresponds to the continued fraction $[1,2,2,2,\dots]$, which equals $\sqrt{2}$. One has $$\begin{array}{l|cccccccccccc|c}
\partial{\mathcal F}&&\multicolumn{10}{c}{\{0,1\}^\omega}&&\widehat{{\mathbf R}}\\
\hline
x 
&0&1&1&0&0&1&1&0&0&1&1&0\dots &\sqrt{2}\\
\phi
&0&1&0&1&0&1&0&1&0&1&0&1\dots&\Phi\\
{\mathbf J}(x)
&0&0&1&1&0&0&1&1&0&0&1&1\dots&1+\sqrt{2}
\end{array}$$ As for the value of ${\mathbf J}_{\mathbf R}$ at $\infty$, one has $$\begin{array}{l|cccccccccccc|c}
\partial{\mathcal F}&&\multicolumn{10}{c}{\{0,1\}^\omega}&&\widehat{{\mathbf R}}\\
\hline
x 
&0&0&0&0&0&0&0&0&0&0&0&0\dots &\infty\\
\phi
&0&1&0&1&0&1&0&1&0&1&0&1\dots&\Phi\\
{\mathbf J}(x)
&0&1&0&1&0&1&0&1&0&1&0&1\dots&\Phi
\end{array}$$ The two values ${\mathbf J}_{\mathbf R}$ assumes at the point $1$ are found as follows: $$\begin{array}{l|cccccccccccc|c}
\partial{\mathcal F}&&\multicolumn{10}{c}{\{0,1\}^\omega}&&\widehat{{\mathbf R}}\\
\hline
x 
&0&1&1&1&1&1&1&1&1&1&1&1\dots &1\\
\phi
&0&1&0&1&0&1&0&1&0&1&0&1\dots&\Phi\\
{\mathbf J}(x)
&0&0&1&0&1&0&1&0&1&0&1&0\dots&1+\Phi
\end{array}$$ $$\begin{array}{l|cccccccccccc|c}
\partial{\mathcal F}&&\multicolumn{10}{c}{\{0,1\}^\omega}&&\widehat{{\mathbf R}}\\
\hline
x 
&1&0&0&0&0&0&0&0&0&0&0&0\dots &1\\
\phi
&0&1&0&1&0&1&0&1&0&1&0&1\dots&\Phi\\
{\mathbf J}(x)
&1&1&0&1&0&1&0&1&0&1&0&1\dots&1/(1+\Phi)
\end{array}$$ Conversely, one has ${\mathbf J}_{\mathbf R}(1+\Phi)={\mathbf J}_{\mathbf R}(1/(1+\Phi))=1$, illustrating the two-to-oneness of ${\mathbf J}_{\mathbf R}$ on the set of noble numbers.

The noble numbers are the ${\mathrm{PSL}_2({\mathbf Z})}$-translates of the golden section $\Phi$. They correspond to the eventually zig-zag paths in $\partial {\mathcal F}$, and represented by strings terminating with $(01)^\omega$. From the $\xor$-description, it is clear that ${\mathbf J}_{\partial{\mathcal F}}$ sends those strings to rational (i.e. eventually constant) strings and vice versa.

Since the equivalence $\sim $ is not respected by ${\mathbf J}_{\partial{\mathcal F}}$, it does not induce a homeomorphism of $\widehat{{\mathbf R}}$, not even a well-defined map. Nevertheless, if we ignore the pairs of rational ends, then the remaining equivalence classes are singletons and ${\mathbf J}_{\partial{\mathcal F}}$ restricts to a well-defined map $${\mathbf J}_{\mathbf R}:\widehat{{\mathbf R}}\setminus\widehat{{\mathbf Q}}
\to \widehat{{\mathbf R}}$$ If we also ignore the set of “[noble paths]{}", i.e. the set ${\mathrm{PGL}_2({\mathbf Z})}\widehat{{\mathbf Q}}={\mathbf J}^{-1}({\mathbf Q})$, then we obtain an involutive bijection $${\mathbf J}_{\mathbf R}: \widehat{{\mathbf R}}\setminus(\widehat{{\mathbf Q}}\cup {\mathrm{PGL}_2({\mathbf Z})}\widehat{{\mathbf Q}})\to
\widehat{{\mathbf R}}\setminus(\widehat{{\mathbf Q}}\cup {\mathrm{PGL}_2({\mathbf Z})}\widehat{{\mathbf Q}})$$

#### The functional equations.

Since twists and shuffles do not change the distance to the base, we have our first functional equation:

The $|{\mathcal F}|$-automorphisms ${\mathbf J}_{\mathcal F}$ and $U=\sigma_{V_\bullet}$ commute, i.e. ${\mathbf J}_{\mathcal F}U=U{\mathbf J}_{\mathcal F}$. Hence, ${\mathbf J}_{\partial{\mathcal F}}U=U{\mathbf J}_{\partial{\mathcal F}}$ and whenever ${\mathbf J}_{\mathbf R}$ is defined, one has $$\label{jimmu}
{\mathbf J}_{\mathbf R}U= U{\mathbf J}_{\mathbf R}\iff {\mathbf J}_{\mathbf R}\bigl(\frac{1}{x}\bigr)=\frac{1}{{\mathbf J}_{\mathbf R}(x)}$$

In fact, ${\mathbf J}_{\mathcal F}U$ is the automorphism of ${\mathcal F}$ which shuffles every other vertex, starting with the vertex $v^*$. In other words, it shuffles those vertices which are not shuffled by ${\mathbf J}_{\mathcal F}$. We denote this automorphism by ${\mathbf J}_{\mathcal F}^*$. Note that, in terms of the strings, the operation $U$ is nothing but the term-wise negation: $$Ua=\lnot a,$$ and the lemma merely states the fact that $\lnot (\phi \xor a)=\phi \xor \lnot a$. The boundary homeomorphism induced by the automorphism ${\mathbf J}_{\mathcal F}^*$ is thus the map ${\mathbf J}_{\partial {\mathcal F}}^*$ which xors with the string $\phi^*:=(10)^\omega$.

Now, consider the operation $S$. If $x=a\in \{0,1\}^\omega$, then one has ${\mathbf J}_{\partial {\mathcal F}} (Sx)=$ $$\begin{aligned}
 = S(a \xor \phi^*) 
=S(a\xor \lnot \phi) =S(\lnot(a\xor\phi))=S(U(a\xor\phi)) = SU{\mathbf J}_{\partial {\mathcal F}} (x)=V{\mathbf J}_{\partial {\mathcal F}} (x)\end{aligned}$$ The same equality holds if $x=Sa$, and we get our second functional equation:

The $\partial_I{\mathcal F}$-homeomorphisms ${\mathbf J}_{\partial{\mathcal F}}$ and $S$ satisfy ${\mathbf J}_{\partial{\mathcal F}}S=V{\mathbf J}_{\partial{\mathcal F}}$. Hence, whenever ${\mathbf J}_{\mathbf R}$ is defined, one has $$\label{jimmux}
{\mathbf J}_{\mathbf R}S= V{\mathbf J}_{\mathbf R}\iff {\mathbf J}_{\mathbf R}\bigl(-\frac{1}{x}\bigr)=-{{\mathbf J}_{\mathbf R}(x)}$$

Now we consider the operator $L$. Suppose that $x=Sa$. Then $Lx= LSa=0a$. Hence, noting that $\phi=(01)^\omega=0 (10)^\omega=0\phi^*$ we have $$\begin{aligned}
 {\mathbf J}_{\partial {\mathcal F}} (Lx) = 0a \xor \phi=0a\xor 0\phi^*=0(a\xor \phi^*)= LS(a\xor \phi^*) 
 = L{\mathbf J}_{\partial {\mathcal F}} (x).\end{aligned}$$ Another possibility is that $x=0a$. In other words, $x$ starts with an $L$. Then $Lx$ starts with an $L^2$, i.e. $Lx= 1a$. Hence, $$\begin{aligned}
 {\mathbf J}_{\partial {\mathcal F}} (Lx) = 1a \xor \phi=1a\xor 0\phi^*=1(a\xor \phi^*),\\
  {\mathbf J}_{\partial {\mathcal F}}(x)=0a \xor \phi=0a\xor 0\phi^*=0(a\xor \phi^*) 
\implies L {\mathbf J}_{\partial {\mathcal F}}(x)= 1(a\xor \phi^*).\end{aligned}$$ Finally, if $x=1a$, then $Lx$ starts with an $S$, i.e. $Lx= Sa$. Hence, $$\begin{aligned}
 {\mathbf J}_{\partial {\mathcal F}} (Lx) = S(a \xor \phi^*),\\
  {\mathbf J}_{\partial {\mathcal F}}(x)=1a \xor \phi=1a\xor 0\phi^*=1(a\xor \phi^*) 
\implies L {\mathbf J}_{\partial {\mathcal F}}(x)= S(a\xor \phi^*).\end{aligned}$$ Whence the third functional equation:

The $\partial_I{\mathcal F}$-homeomorphisms ${\mathbf J}_{\partial{\mathcal F}}$ and $L$ satisfy ${\mathbf J}_{\partial{\mathcal F}}L=L{\mathbf J}_{\partial{\mathcal F}}$. Hence, whenever ${\mathbf J}_{\mathbf R}$ is defined, one has $$\label{jimmux}
{\mathbf J}_{\mathbf R}L= L{\mathbf J}_{\mathbf R}\iff {\mathbf J}_{\mathbf R}\bigl(1-\frac{1}{x}\bigr)=1-\frac{1}{{\mathbf J}_{\mathbf R}(x)}$$

Since $U$, $S$ and $L$ generate the group ${\mathrm{PGL}_2({\mathbf Z})}$, these three functional equations forms a complete set, from which the rest can be deduced. For example, $$T=LS\implies {\mathbf J}_{\partial {\mathcal F}}T=LV{\mathbf J}_{\partial {\mathcal F}}\iff
{\mathbf J}_{\mathbf R}(1+x)=1+\frac{1}{{\mathbf J}_{\mathbf R}(x)}$$ This also shows that ${\mathbf J}_{\mathbf R}$ acts as the desired outer automorphism of ${\mathrm{PGL}_2({\mathbf Z})}$.

#### Other forms of the functional equations.

It is possible to derive many alternative forms of the functional equations. Here we record some of them. We leave the task of verifying to the reader. (As usual we drop the subscript ${\mathbf R}$ from ${\mathbf J}_{\mathbf R}$ to increase the readability): $${\mathbf J}\left(1-\frac{1}{x}\right)=1-\frac{1}{{\mathbf J}(x)}, \quad 
{\mathbf J}\left(\frac{x}{x+1}\right)+{\mathbf J}\left(\frac{1}{x+1}\right)=1.$$

\[twovariable\]

Diverse facts about ${\mathbf J}$
=================================

${\mathbf J}$ as a limit of piecewise-${\mathrm{PGL}_2({\mathbf Z})}$ functions.
--------------------------------------------------------------------------------

In ${\mathcal F}$, denote by $V_\bullet(n)$ the set of vertices of distance $\leq n$ to the base (excluding $v^*$), and let $V_\bullet^\prime(n)$ be the set of vertices of odd distance $\leq n$ to the base. Then $${\mathbf J}_{\mathcal F}=
\lim_{n\to\infty} \theta_{V_\bullet(n)}
=\lim_{n\to\infty} \sigma_{V_\bullet^\prime(n)}.$$ The maps $\theta_{V_\bullet(n)}$ and $\sigma_{V_\bullet^\prime(n)}$ induce a sort of finitary projective interval exchange maps on $\widehat{{\mathbf R}}$ and thus ${\mathbf J}_{\mathbf R}$ can be written as a limit of such functions. Below we draw the twists $\theta_{V_\bullet(n)}$ for $n=2\dots 5$.

\[jimmiterate\] [![image](2x)]{} [![image](3x)]{} [![image](4x)]{} [![image](5x)]{}\
[ The plot of $\theta_{{\mathcal F}_n^*}$ on the interval $[0,1]$, for $n=2,3,4,5$.]{}\

${\mathbf J}$ on rationals {#jimmq}
--------------------------

In virtue of Lemma \[correspondences\], there is a 1-1 correspondence between the set of trivalent vertices and the set ${\mathbf Q}\setminus\{0,1\}$. Since any element of $Aut_I({\mathcal F})$ defines a bijection of $V_\bullet({\mathcal F})$, we see that every automorphism of ${\mathcal F}$ that fixes $I$, defines a unique bijection of ${\mathbf Q}\setminus\{0,1\}$. In particular, this is the case with ${\mathbf J}_{\mathcal F}$. We extend this involution to ${\mathbf Q}\cup\{\infty\}$ by sending $0\leftrightarrow \infty$ and we denote the resulting bijection with ${\mathbf J}_{\mathbf Q}$. This involution satisfies all the functional equations satisfied by ${\mathbf J}_{\mathbf R}$. One has ${\mathbf J}_{\mathbf Q}(1)=1$, and for $x>0$, its values can be computed by using the functional equations ${\mathbf J}_{\mathbf Q}(1+x)=1+1/{\mathbf J}_{\mathbf Q}(x)$ and ${\mathbf J}_{\mathbf Q}(1/x)=1/{\mathbf J}_{\mathbf Q}(x)$. It tends to ${\mathbf J}_{\mathbf R}$ at irrational points and in fact ${\mathbf J}_{\mathbf R}$ can be defined as this limit. However, it must be emphasized that ${\mathbf J}_{\mathbf Q}(x)$ is not the restriction of ${\mathbf J}_{\mathbf R}$ to ${\mathbf Q}$; this latter function is by definition two-valued at rationals[^3].

We show in [@lebesguesym] that ${\mathbf J}_{\mathbf Q}$ “commutes" with Lebesgue measure in a certain sense.

The involution ${\mathbf J}_{\mathbf Q}$ conjugates the multiplication (denoted by $\odot$) on ${\mathbf Q}$ to an operation with 1 as its identity, and such that the inverse of $q$ is $1/q$. The addition (denoted by $\oplus$) is conjugated to an operation with $\infty$ as its neutral element and such that the additive inverse of $q$ is $-1/q$, i.e. $\ominus q=-1/q$.

Fibonacci sequence
------------------

The Fibonacci sequence is defined by the recurrence $
F_0=0, \quad F_1=1,\mbox{ and } F_{n}=F_{n-1}+F_{n-2} \mbox{ for } n\in {\mathbf Z}.
$ One has then $F_{-n}=(-1)^{n+1}F_n$ and $$\widetilde{T}(x)=1+\frac{1}{x}\implies
\widetilde{T}^n=\frac{F_{n+1}x +F_n}{F_nx+F_{n-1}} \quad (n\in {\mathbf Z}).$$ The following lemma is an easy consequence of the functional equations.

\[easyconsequence\] Let $x$ be an irrational number. Then\
(i) $${\mathbf J}(1+x)=1+\frac{1}{{\mathbf J}(x)} \iff {\mathbf J}(Tx)=\widetilde{T}{\mathbf J}(x).$$ (ii) $${\mathbf J}(n+x)=\widetilde{T}^n{\mathbf J}(x)=\frac{F_{n+1}{\mathbf J}(x) +F_n}{F_n {\mathbf J}(x)+F_{n-1}} \quad (n\in {\mathbf Z}).$$ (iii) $${\mathbf J}([1,x])={\mathbf J}(1+\frac{1}{x})=1+{\mathbf J}(x) \implies {\mathbf J}([1_n,x])=n+x \quad (n\in {\mathbf Z}).$$ (iv) $${\mathbf J}([n,x])={\mathbf J}(n+1/x)=\frac{F_{n+1}+F_n{\mathbf J}(x) }{F_n +F_{n-1}{\mathbf J}(x)} \quad (n\in {\mathbf Z}).$$

Continuity
----------

Since the involution ${\mathbf J}_{\partial{\mathcal F}}: \partial{\mathcal F}\to \partial{\mathcal F}$ is a homemorphism and since the subspaces $${\mathbf R}\setminus {\mathbf Q}\simeq \partial{\mathcal F}\setminus \{\mbox{rational paths}\}$$ are also homeomorphic, the function ${\mathbf J}_{\mathbf R}$ is continuous at irrational points:

\[jimmcontini\] The function ${\mathbf J}_{\mathbf R}$ on ${\mathbf R}\setminus {\mathbf Q}$ is continuous.

Moreover, recall that there is a canonical ordering on $\partial{\mathcal F}$ inducing on $\widehat{{\mathbf R}}$ its canonical ordering compatible with its topology. So the notion of lower and upper limits exists on $\partial{\mathcal F}$ and coincides with lower and upper limits on $\widehat{{\mathbf R}}$. This shows that the two values that ${\mathbf J}_{\mathbf R}$ assumes on rational arguments are nothing but the limits $${\mathbf J}(q)^-:=\lim_{x\to q^-} {\mathbf J}(x) \mbox{ and }
{\mathbf J}(q)^+:=\lim_{x\to q^+} {\mathbf J}(x)$$ By choosing one of these values coherently, one can make ${\mathbf J}$ an everywhere upper (or lower) continuous function. Note however that it will (partially) cease to satisfy the functional equations at rational arguments. One has, for irrational $r$ and rational $q$, $$\lim_{q\rightarrow r} {\mathbf J}_{\mathbf Q}(q)=\lim_{q\rightarrow r} {\mathbf J}_{\mathbf R}(q)= {\mathbf J}_{\mathbf R}(r),$$ no matter how we choose the values of ${\mathbf J}_{\mathbf R}(q)$. In fact ${\mathbf J}$ is almost everywhere differentiable with derivative vanishing almost everywhere, see [@jimmarxiv].

Action on the quadratic irrationals
-----------------------------------

Since ${\mathbf J}_{\mathcal F}$ sends eventually periodic paths to eventually periodic paths, ${\mathbf J}_{\mathbf R}$ preserves the real-multiplication set. This is the content of our next result:

\[orbits\] ${\mathbf J}$ defines an involution of the set of real quadratic irrationals, and it respects the ${\mathrm{PGL}_2({\mathbf Z})}$-orbits.

Beyond this theorem, we failed to detect any further arithmetic structure or formula relating the quadratic number to its ${\mathbf J}$-transform. All we can do is to give some sporadic examples, which amounts to exhibit some special real quadratic numbers with known continued fraction expansions. We shall do this below. Before that, however, note that the equation below is solvable for every $n\in {\mathbf Z}$: $${\mathbf J}x=n+ x\implies  x={\mathbf J}{\mathbf J}x=\widetilde{T}^n{\mathbf J}x\implies  x=\widetilde{T}^n( x+n)$$ $$\frac{F_{n+1}( x+n)+F_n }{F_n( x+n) +F_{n-1}}= x=\frac{F_{n+1} x+F_n+nF_{n+1} }{F_n x^n +F_{n-1}+nF_n}$$ $$\implies F_n x^2+(F_{n-1}+nF_n-F_{n+1}) x -(F_n+nF_{n+1})$$ More generally, the equation ${\mathbf J}x=M x$ is solvable for $M\in{\mathrm{PGL}_2({\mathbf Z})}$. Indeed one has $${\mathbf J}x=M x\implies 
 x={\mathbf J}{\mathbf J}x=({\mathbf J}M)({\mathbf J}x)=
({\mathbf J}M) M x,$$ and the solutions are the fixed points of $({\mathbf J}M) M$. These points are precisely the words represented by the infinite path $$\begin{aligned}
\label{fixed}
x=({\mathbf J}M) M({\mathbf J}M) M({\mathbf J}M) M({\mathbf J}M) M\dots\end{aligned}$$ where we assume that both $M$ and ${\mathbf J}M$ are expressed as words in $U$ and $T$. Note that these words are precisely the points whose conjugacy classes remain stable under ${\mathbf J}$. $${\mathbf J}x=M({\mathbf J}M) M({\mathbf J}M) M({\mathbf J}M) M({\mathbf J}M) M\dots$$ Hence the ${\mathrm{PGL}_2({\mathbf Z})}$-orbits of the points in (\[fixed\]) remain stable under ${\mathbf J}$. Since the set of these orbits is the moduli space of real lattices, we deduce:

The fixed points of the involution ${\mathbf J}$ on the moduli space of real lattices are precisely the points (\[fixed\]) .

For example, if ${\mathbf J}M=\widetilde{T}^{k+1}$ then $M=T^{k+1}$, and the point (\[fixed\]) is nothing but the point $[\overline{1_k,k+2}]$ mentioned in the introduction.

Examples
--------

#### Example.

In [@manfred] it is shown that $$x=[0;{\overline{1_{n-1},a}}]=\frac{a}{2}\left(\sqrt{1+4\frac{aF_{n-1}+F_{n-2}}{a^2F_n}}-1\right)$$ Hence $
{\mathbf J}(x) = [0;n,\overline{1_{a-2},n+1}], 
$ and so ${\mathbf J}(x) = 1/(n+y)$, where $$y=[0;\overline{1_{a-2},n+1}]=\frac{n+1}{2}\left(\sqrt{1+4\frac{(n+1)F_{a-2}+F_{a-3}}{(n+1)^2F_{a-1}}}-1\right)$$

#### Example.

(From Einsiedler & Ward [@ward], Pg.90, ex. 3.1.1) This result of McMullen from [@mcmullen] illustrates how ${\mathbf J}$ behaves on one real quadratic number field. ${\mathbf Q}(\sqrt{5})$ contains infinitely many elements with a uniform bound on their partial quotients, since $
[\overline{1_{k+1},4,5,1_k,3}]\in {\mathbf Q}(\sqrt{5}), \quad \forall k=1,2,\dots.
$ Routine calculations shows that the transforms $
{\mathbf J}([\overline{1_{k+1},4,5,1_k,3}])=[k+2, \overline{2,2,3,k+2,1,k+3}]
$ lies in different quadratic number fields for different $k$’s. Hence, not only ${\mathbf J}$ does not preserve the property of “[belonging to a certain quadratic number field]{}", it sends elements from one quadratic number field to different quadratic number fields. The following result provides even more examples of this nature:

(McMullen [@mcmullen]) For any $s>0$, the periodic continued fractions $$x_m=[\overline{(1,s)^m,1,s+1,s-1, (1,s)^m,1,s+1,s+3)}]$$ lie in ${\mathbf Q}(\sqrt{s^2+4s})$ for any $m\geq 0$.

(Fishman and Miller [@fishman]) One has the following $$\Phi^k=
\begin{cases}
[\overline{F_{k+1}+F_{k-1}}],& \mbox{\it if k is even},\\
[F_{k+1}+F_{k-1}-1, \overline{1,F_{k+1}+F_{k-1}-2}]& \mbox{\it if k is odd}.
\end{cases}$$

The continued fraction of the kth power of the golden section is $${\mathbf J}(\Phi^k)=
\begin{cases}
[1_{F_{k+1}+F_{k-1}-1},\overline{2, 1_{F_{k+1}+F_{k-1}-2}}],& \mbox{\it if k is even},\\
[1_{F_{k+1}+F_{k-1}-2},\overline{3,1_{F_{k+1}+F_{k-1}-4}}]& \mbox{\it if k is odd}.
\end{cases}$$

#### Example.

Suppose $\alpha=p+\sqrt{q}$ be a quadratic irrational with $p,q\in {\mathbf Q}$. Then $\alpha^*=1/\alpha$ provided $$|\alpha|^2=p^2-q=1 \implies q=p^2-1.$$ Suppose $\alpha$ is of this form, i.e. $\alpha=p+\sqrt{p^2-1}$ and suppose ${\mathbf J}(\alpha)=x+\sqrt{y}$. Then since $$x-\sqrt{y}={\mathbf J}(\alpha)^*={\mathbf J}(\alpha^*)={\mathbf J}(1/\alpha)=1/{\mathbf J}(\alpha)=1/(x+\sqrt{y})
\implies x^2-y=1,$$ and we conclude that ${\mathbf J}(\alpha)$ is again of the form $x+\sqrt{x^2-1}$.

On the other hand, suppose ${\mathbf J}(\sqrt{q})=x+\sqrt{y}$. Then $${\mathbf J}(\sqrt{q})^*={\mathbf J}(\sqrt{q}^*)={\mathbf J}(-\sqrt{q})=-1/{\mathbf J}(\sqrt{q})\implies
|{\mathbf J}(\sqrt{q}^*)|=x^2-y=-1$$ Hence, ${\mathbf J}(\sqrt{q})$ is of the form $x+\sqrt{1+x^2}$. Conversely, if $\alpha$ is of the form $p+\sqrt{p^2+1}$, then ${\mathbf J}(\alpha)$ is a quadratic surd.

[**Acknowledgements.**]{} This research is funded by a Galatasaray University research grant and the TÜBİTAK grants 115F412 and 113R017.

[^1]: [Galatasaray University, Department of Mathematics,]{} [Ç[i]{}rağan Cad. No. 36, 34357 Beşiktaş]{} [İstanbul, Turkey]{}

[^2]: The two representations of the number $0\in {\mathbf R}$ are $1^\omega$ and $-0^\omega$ and the two representations of $\infty\in \widehat{\mathbf R}$ are $0^\omega$ and $-1^\omega$.

[^3]: It might have been convenient to declare the values of ${\mathbf J}_{\mathbf R}$ at rational arguments to be given by ${\mathbf J}_{\mathbf Q}(x)$, so that ${\mathbf J}_{\mathbf R}$ would be a well-defined function everywhere (save 0 and $\infty$). However, we have chosen to not to follow this idea, for the sake of uniformity in definitions.
