According to Vershik, an ergodic invertible measure-preserving transformation $T$ on a Lebesgue space $X$ has discrete spectrum if and only if for every bounded measurable function $f\colon X \to \mathbb{C}$ and almost all $x_0 \in X$, the function from $\mathbb{Z}$ to $\mathbb{C}$ defined by $n \mapsto f(T^nx_0)$ is Besicovitch almost periodic (for short, BAP). I am mainly interested in the *only if* part of this result: the proof of BAP under the discrete spectrum assumption.

When $T$ has discrete spectrum, it is isomorphic to an ergodic isometry, and using this version of $T$, it is known that $n \mapsto f(T^nx_0)$ is uniformly almost periodic when $f$ is continuous. This is proved in Petersen's book, but I have failed to adapt the proof to the Besicovitch almost periodicity (that does not mean the proof is hard, I am not an expert in spectral theory, or even in ergodic theory in general).

Here is the definition of BAP. On the space of bounded functions $g\colon \mathbb{Z}\to\mathbb{C}$, define the Besicovitch semi-norm: $$ {\Vert g \Vert} = \limsup_{K \to \infty} \frac{1}{2K+1}\sum_{|k|\leq K} \bigl|g(k)\bigr|. $$ For a bounded function $g\colon \mathbb{Z}\to\mathbb{C}$ define its shift $g_n(k)=g(n+k)$. Say that $g$ is BAP if the set $\{g_n, n \in \mathbb{Z}\}$ is relatively compact for ${\Vert \cdot \Vert}$.

Note that ${\Vert \cdot \Vert} \leq {\Vert \cdot \Vert}_\infty$ (the sup norm), therefore a function is BAP whenever it is uniformly almost periodic (the definition of uniform almost periodicty is obtained by replacing ${\Vert \cdot \Vert}$ with ${\Vert \cdot \Vert}_\infty$).

The two following conditions are equivalent to BAP:

$g$ is the ${\Vert \cdot \Vert}$-limit of a sequence of trigonometric polynomials $p_N$ having form $p_N(k) = \sum_{j=1}^N a^{(N)}_je^{2i\pi\alpha_j^{(N)}k}$ with $\bigl|\alpha_j^{(N)}\bigr|=1$.

The continuation of $g$ on the Bohr compactification of $\mathbb{Z}$ exists and belongs to $L^1$ (when the Bohr compactification is endowed with the Haar probability measure).

I don't know whether there is a characterization of BAP looking like the syndeticness of $\epsilon$-periods, which is known to be equivalent to uniform almost periodicity (see the child's garden of almost periodic functions where the uniform almost periodicity is called Bochner almost periodicity, and the syndeticness property is called the Bohr almost periodicity).

One of my attempts was to prove that the set $\bigl\{f \text{ bounded} \mid k \mapsto f(T^kx_0) \text{is BAP}\bigr\}$ is a vector space containing the uniformly continuous functions and stable by pointwise limit. Then one could conclude by a Stone-Weierstrass result.

I would prefer a proof that deduces the result directly from the definition, not using a characterization such as 1. and 2., but this is secondary.

Another claim by Vershik is for the case when $T$ is given as a shift on $A^{\mathbb{Z}}$, where $A$ is a finite alphabet. For two sequences $x, y \in A^{\mathbb{Z}}$, define the Besicovitch-Hamming distance $$ \rho(x,y) = \liminf_{K \to \infty} \frac{1}{2K+1} \#\left\{k \;\big\vert\; |k| \leq K, x_k \neq y_k\right\}. $$

*Note:* I obtained my definition of ${\Vert g \Vert}$ by adapting the Wikipedia page to $\mathbb{Z}$. It is strange that it is defined with a limit superior whereas there is a limit inferior in Vershik's definition of the BH distance.

Then say that $x$ is BH almost periodic if the set consisting of $x$ and all its shifted sequences is relatively compact for $\rho$. Then it is claimed that an ergodic $T$ has discrete spectrum if and only if almost every orbit of $T$ is BH almost periodic. I don't know whether this result is easier than the previous one, but I am interested in one or the other.

Vershik gives an argument for this second claim: $T$ is isomorphic to an ergodic isometry by Von Neumann's theorem, and *"observe that the restriction of any bounded measurable function on a compact Abelian group to a countable $\mathbb{Z}$-subgroup, regarded as a function on $\mathbb{Z}$, is BH almost periodic"* (sic).

## UPDATE

Ten minutes after posting this question, I found this document which provides a proof of the result (the result is stated with "$\mathbb{N}$-orbits" but this should be equivalent). It makes use of the characterization 1. Instead of deleting this post, I ask for a proof that more directly deduces the result from the definition.