\subsection{Gauss statistics on one typical set} \label{sec:gauss-statistics} Gauss cylinders connect finite itineraries with distributions of infinite codes. Their distortion bounds give both a comparison of measures and a proof of ergodicity. We then place all the statistical conclusions on one Borel set. Write $J=(0,1)$ and $J_*=J\setminus\mathbb Q$, and denote Lebesgue measure by $\lambda$. Throughout this subsection, a word has positive integer entries. Its length is denoted by $|\mathbf b|$, and the empty word is allowed. We extend the Gauss map to $\R$ by $T(x)=\{1/x\}$ for $x\ne0$ and $T(0)=0$. It is Borel, and maps $J_*$ into itself. \subsubsection{Cylinder geometry and comparison of measures} Fix a sequence $\mathbf a\in\mathcal D$. For its prefix of length $n$ write $G_n=g_{a_0}\circ\cdots\circ g_{a_{n-1}}$, and define \begin{equation} q_{-1}=0,\qquad q_0=1,\qquad q_{n+1}=a_nq_n+q_{n-1}. \label{eq:denominator-recurrence} \end{equation} These denominators give both the length and the distortion of a cylinder. \begin{lemma} \label{lem:cylinder-density} For $n\geq0$ and $x\geq0$, \begin{equation} G_n'(x)=\frac{(-1)^n}{(q_n+q_{n-1}x)^2},\qquad \lambda(I_{(a_0,\ldots,a_{n-1})}) =\frac1{q_n(q_n+q_{n-1})}. \label{eq:cylinder-length} \end{equation} Consequently, for every word $\mathbf b$ and $x\in[0,1]$, \begin{equation} \frac12\lambda(I_{\mathbf b})\leq |G_{\mathbf b}'(x)| \leq2\lambda(I_{\mathbf b}). \label{eq:cylinder-density} \end{equation} Moreover, for $x,y\geq0$, \begin{equation} \left|\log|G_{\mathbf b}'(x)|-\log|G_{\mathbf b}'(y)|\right| \leq2|x-y|. \label{eq:log-prefix-lipschitz} \end{equation} \end{lemma} \begin{proof} Induction in~\eqref{eq:denominator-recurrence} gives $q_n\geq1$ and $0\leq q_{n-1}\leq q_n$. Put $D_n(x)=q_n+q_{n-1}x$. The recurrence is equivalent to \[ D_{n+1}(x)=(a_n+x)D_n(g_{a_n}(x)). \] Since $G_{n+1}=G_n\circ g_{a_n}$, the derivative formula follows by the chain rule, starting from $G_0(x)=x$. Each branch is injective, and hence so is $G_n$. Integrating its absolute derivative on $J$ gives the cylinder length. In fact, \[ \frac{d}{dx}\frac{x}{q_n(q_n+q_{n-1}x)} =\frac1{(q_n+q_{n-1}x)^2}. \] For $x\in[0,1]$, the derivative divided by the cylinder length lies between $q_n/(q_n+q_{n-1})$ and $(q_n+q_{n-1})/q_n$. These bounds imply~\eqref{eq:cylinder-density}. Finally, \[ \frac{d}{dx}\log|G_n'(x)| =-\frac{2q_{n-1}}{q_n+q_{n-1}x} \] has absolute value at most $2$ on $[0,\infty)$. The mean value theorem proves~\eqref{eq:log-prefix-lipschitz}. \end{proof} Every $z\in J_*$ has a code. Indeed, all its iterates remain in $J_*$. Taking $a_m=\lfloor1/T^mz\rfloor$ gives $T^mz=g_{a_m}(T^{m+1}z)$. Proposition~\ref{prop:phase-comparison}, with zero errors, yields $z=c(\mathbf a)$. Two intersecting cylinders have comparable words: one word is a prefix of the other. To see this, for $x\in J$ the first digit of $g_k(x)$ is $\lfloor1/g_k(x)\rfloor=k$. Thus intersecting nonempty words have the same first digit. Cancel its inverse branch and repeat. In particular, the cylinders of a fixed length are pairwise disjoint, and their union contains $J_*$. They have total Lebesgue measure one. Also, \begin{equation} c(\mathbf a)\in I_{\mathbf b} \quad\Longleftrightarrow\quad (a_0,\ldots,a_{|\mathbf b|-1})=\mathbf b. \label{eq:code-cylinder} \end{equation} \begin{lemma}[Cylinder domination] \label{lem:cylinder-domination} Let $\mu$ and $\xi$ be Borel measures on $\R$, with $\xi$ outer regular. Suppose that $\mu(\R\setminus J_*)=0$ and \[ \mu(I_{\mathbf b})\leq\xi(I_{\mathbf b}) \qquad\text{for every nonempty word }\mathbf b. \] Then $\mu\leq\xi$. \end{lemma} \begin{proof} Let $O\subset\R$ be open. Take all nonempty words $\mathbf b$ such that $I_{\mathbf b}\subset O$, but no nonempty proper prefix has this property. Their cylinders are pairwise disjoint by comparability. They cover $O\cap J_*$: for $z=c(\mathbf a)\in O$, the cylinders of its successive prefixes contain $z$ and have diameter at most $4^{-\lfloor n/2\rfloor}$. Some cylinder is therefore contained in $O$, and there is a first nonempty prefix with this property. Writing $\mathcal W(O)$ for these words, countable subadditivity gives \[ \mu(O)\leq\sum_{\mathbf b\in\mathcal W(O)}\mu(I_{\mathbf b}) \leq\sum_{\mathbf b\in\mathcal W(O)}\xi(I_{\mathbf b}) =\xi\!\left(\bigcup_{\mathbf b\in\mathcal W(O)}I_{\mathbf b}\right) \leq\xi(O). \] For a Borel set $A$, take the infimum over open supersets of $A$ and use outer regularity of $\xi$. \end{proof} The useful feature of this argument is that the covering cylinders can have different lengths. A bound at every finite depth consequently controls arbitrary Borel sets without a limiting boundary estimate. \begin{corollary}[Distribution of codes] \label{cor:code-domination} Let $(X,\mu)$ be a measure space and let $\mathbf a:X\to\mathcal D$ be measurable. If $C\geq0$ and \begin{equation} \mu\{q:(a_0(q),\ldots,a_{r-1}(q))=\mathbf b\} \leq C\lambda(I_{\mathbf b}) \label{eq:prefix-mass-bound} \end{equation} for every nonempty word $\mathbf b$ of length $r$, then \begin{equation} (c\circ\mathbf a)_*\mu\leq C\lambda|_J. \label{eq:code-domination} \end{equation} In particular the distribution of codes is absolutely continuous. \end{corollary} \begin{proof} The map $c\circ\mathbf a$ is measurable and takes its values in $J_*$. By~\eqref{eq:code-cylinder}, its pushforward satisfies the cylinder bounds of Lemma~\ref{lem:cylinder-domination}, with $\xi=C\lambda|_J$. \end{proof} \subsubsection{Ergodicity and a common typical set} The density in~\eqref{eq:gauss-measure} is strictly positive and satisfies \begin{equation} \frac1{2\log2}\leq\frac1{\log2\,(1+x)}\leq\frac1{\log2} \qquad(0\leq x\leq1). \label{eq:gauss-density-bounds} \end{equation} Its primitive is $\log(1+x)/\log2$. Thus $\nu$ is a probability, has the same null sets as $\lambda|_J$, and gives no mass to rational points. For $0\leq a\leq b\leq1$, \begin{equation} \nu((a,b))=\frac{\log(1+b)-\log(1+a)}{\log2}. \label{eq:gauss-interval} \end{equation} \begin{proposition} \label{prop:gauss-ergodic} The Gauss map preserves $\nu$ and is ergodic with respect to $\nu$. \end{proposition} \begin{proof} Write $w(x)=1/(\log2\,(1+x))$. For $k\geq1$ and $x\in J$, \[ w(g_k(x))|g_k'(x)| =\frac1{\log2}\left(\frac1{k+x}-\frac1{k+1+x}\right). \] Summing over $k$ telescopes to $w(x)$. For a Borel set $A\subset J$, the sets $g_k(A)$ are disjoint and their union agrees with $T^{-1}A$ on $J$ up to rational points. Change of variables in each branch and monotone convergence therefore give \[ \nu(T^{-1}A)=\sum_{k\geq1}\nu(g_k(A)) =\int_A\sum_{k\geq1}w(g_k(x))|g_k'(x)|\dd x=\nu(A). \] Since $\nu$ and its image under $T$ are concentrated on $J$, this proves invariance for every Borel set in $\R$. For ergodicity, let $E\subset\R$ be Borel with $T^{-1}E=E$, and put $B=E\cap J$. Invariance of membership, applied successively to inverse branches, gives $G_{\mathbf b}(B)=I_{\mathbf b}\cap E$. Lemma~\ref{lem:cylinder-density} and change of variables imply \[ \lambda(I_{\mathbf b}\cap E) \geq\tfrac12\lambda(I_{\mathbf b})\lambda(B). \] Apply Lemma~\ref{lem:cylinder-domination} to $\mu=\tfrac12\lambda(B)\lambda|_J$ and $\xi=\lambda|_B$. The latter is a finite Borel measure on $\R$, hence outer regular. It follows that \[ \tfrac12\lambda(B)\lambda|_J\leq\lambda|_B. \] Evaluating this inequality on $E^c$ yields $\lambda(B)\lambda(J\setminus E)=0$. Thus $E$ is null or conull in $J$ for Lebesgue measure, and hence for $\nu$ by \eqref{eq:gauss-density-bounds}. This is ergodicity. \end{proof} We use Birkhoff's pointwise ergodic theorem in the following form. For an ergodic measure-preserving map $F$ of a probability space $(X,\mu)$ and a real integrable function $f$, \begin{equation} \frac1N\sum_{m=0}^{N-1}f(F^mq)\longrightarrow\int_X f\dd\mu \quad\text{for }\mu\text{-almost every }q. \label{eq:birkhoff-input} \end{equation} See~\cite[Corollary~10.1.2, p.~89]{Walkden}. Here it is applied to the countable family of cylinder indicators. Let $\mathcal B$ consist of the points $z\in\R$ such that, for every word $\mathbf b$, \begin{equation} \frac1N\sum_{m=0}^{N-1}\ind_{I_{\mathbf b}}(T^mz) \longrightarrow\nu(I_{\mathbf b}). \label{eq:cylinder-typical} \end{equation} Each convergence condition is Borel. Proposition~\ref{prop:gauss-ergodic} and~\eqref{eq:birkhoff-input} show that $\nu(\mathcal B)=1$, since the indicators are bounded and there are only countably many words. Moreover, $T^{-1}\mathcal B=\mathcal B$: shifting an average of an indicator changes it by at most $1/N$. We next pass from cylinder indicators to all continuous functions on $[0,1]$ on this same set. The following elementary observation controls the infinitely many cylinders at a fixed depth. If probability masses $p_N(i)$ on a countable set converge pointwise to probability masses $p(i)$, then \begin{equation} \sum_i|p_N(i)-p(i)| =2-2\sum_i\min(p_N(i),p(i))\longrightarrow0. \label{eq:discrete-l1} \end{equation} Indeed, the summands in the last sum converge to $p(i)$ and are bounded by the summable sequence $p(i)$. Dominated convergence proves the limit. \begin{proposition} \label{prop:typical-statistics} If $\mathbf a\in\mathcal D$ and $z=c(\mathbf a)\in\mathcal B$, then all six limits~\eqref{eq:phase-law}--\eqref{eq:infinite-mean} hold with $K_m=a_m$ and $x_m=T^mz$. \end{proposition} \begin{proof} The block frequencies follow from~\eqref{eq:code-cylinder}, the shift identity~\eqref{eq:code-recurrence}, and the definition of $\mathcal B$. For continuous observations, fix a depth $r$ and write \[ p_N(\mathbf b)=\frac1N\#\{m