Subfield: Algebra


Question: Does there exist a pair $(g, h)$ of functions $g, h: \mathbb{R} \rightarrow \mathbb{R}$ such that the only function $f: \mathbb{R} \rightarrow \mathbb{R}$ satisfying $f(g(x))=g(f(x))$ and $f(h(x))=h(f(x))$ for all $x \in \mathbb{R}$ is the identity function $f(x) \equiv x$ ?

Solution:
Such a tester pair exists. We may biject $\mathbb{R}$ with the closed unit interval, so it suffices to find a tester pair for that instead. We give an explicit example: take some positive real numbers $\alpha, \beta$ (which we will specify further later). Take



$$

g(x)=\max (x-\alpha, 0) \quad \text { and } \quad h(x)=\min (x+\beta, 1)

$$15



Say a set $S \subseteq[0,1]$ is invariant if $f(S) \subseteq S$ for all functions $f$ commuting with both $g$ and $h$. Note that intersections and unions of invariant sets are invariant. Preimages of invariant sets under $g$ and $h$ are also invariant; indeed, if $S$ is invariant and, say, $T=g^{-1}(S)$, then $g(f(T))=$ $f(g(T)) \subseteq f(S) \subseteq S$, thus $f(T) \subseteq T$.



We claim that (if we choose $\alpha+\beta<1$ ) the intervals $[0, n \alpha-m \beta]$ are invariant where $n$ and $m$ are nonnegative integers with $0 \leq n \alpha-m \beta \leq 1$. We prove this by induction on $m+n$.



The set $\{0\}$ is invariant, as for any $f$ commuting with $g$ we have $g(f(0))=f(g(0))=f(0)$, so $f(0)$ is a fixed point of $g$. This gives that $f(0)=0$, thus the induction base is established.



Suppose now we have some $m, n$ such that $\left[0, n^{\prime} \alpha-m^{\prime} \beta\right]$ is invariant whenever $m^{\prime}+n^{\prime}<$ $m+n$. At least one of the numbers $(n-1) \alpha-m \beta$ and $n \alpha-(m-1) \beta$ lies in $(0,1)$. Note however that in the first case $[0, n \alpha-m \beta]=g^{-1}([0,(n-1) \alpha-m \beta])$, so $[0, n \alpha-m \beta]$ is invariant. In the second case $[0, n \alpha-m \beta]=h^{-1}([0, n \alpha-(m-1) \beta])$, so again $[0, n \alpha-m \beta]$ is invariant. This completes the induction.



We claim that if we choose $\alpha+\beta<1$, where $0<\alpha \notin \mathbb{Q}$ and $\beta=1 / k$ for some integer $k>1$, then all intervals $[0, \delta]$ are invariant for $0 \leq \delta<1$. This occurs, as by the previous claim, for all nonnegative integers $n$ we have $[0,(n \alpha \bmod 1)]$ is invariant. The set of $n \alpha \bmod 1$ is dense in $[0,1]$, so in particular



$$

[0, \delta]=\bigcap_{(n \alpha \bmod 1)>\delta}[0,(n \alpha \bmod 1)]

$$



is invariant.



A similar argument establishes that $[\delta, 1]$ is invariant, so by intersecting these $\{\delta\}$ is invariant for $0<\delta<1$. Yet we also have $\{0\},\{1\}$ both invariant, which proves $f$ to be the identity.
Let us agree that a sequence $\mathbf{x}=\left(x_{n}\right)_{n=1,2, \ldots}$ is cofinally non-constant if for every index $m$ there exists an index $n>m$ such that $x_{m} \neq x_{n}$.



Biject $\mathbb{R}$ with the set of cofinally non-constant sequences of 0's and 1's, and define $g$ and $h$ by



$$

g(\epsilon, \mathbf{x})=\left\{\begin{array}{ll}

\epsilon, \mathbf{x} & \text { if } \epsilon=0 \\

\mathbf{x} & \text { else }

\end{array} \quad \text { and } \quad h(\epsilon, \mathbf{x})= \begin{cases}\epsilon, \mathbf{x} & \text { if } \epsilon=1 \\

\mathbf{x} & \text { else }\end{cases}\right.

$$



where $\epsilon, \mathbf{x}$ denotes the sequence formed by appending $\mathbf{x}$ to the single-element sequence $\epsilon$. Note that $g$ fixes precisely those sequences beginning with 0 , and $h$ fixes precisely those beginning with 1.



Now assume that $f$ commutes with both $f$ and $g$. To prove that $f(\mathbf{x})=\mathbf{x}$ for all $\mathbf{x}$ we show that $\mathbf{x}$ and $f(\mathbf{x})$ share the same first $n$ terms, by induction on $n$.



The base case $n=1$ is simple, as we have noticed above that the set of sequences beginning with a 0 is precisely the set of $g$-fixed points, so is preserved by $f$, and similarly for the set of sequences starting with 1 .







Suppose that $f(\mathbf{x})$ and $\mathbf{x}$ agree for the first $n$ terms, whatever $\mathbf{x}$. Consider any sequence, and write it as $\mathbf{x}=\epsilon, \mathbf{y}$. Without loss of generality, we may (and will) assume that $\epsilon=0$, so $f(\mathbf{x})=0, \mathbf{y}^{\prime}$ by the base case. Yet then $f(\mathbf{y})=f(h(\mathbf{x}))=h(f(\mathbf{x}))=h\left(0, \mathbf{y}^{\prime}\right)=\mathbf{y}^{\prime}$. Consequently, $f(\mathbf{x})=0, f(\mathbf{y})$, so $f(\mathbf{x})$ and $\mathbf{x}$ agree for the first $n+1$ terms by the inductive hypothesis.



Thus $f$ fixes all of cofinally non-constant sequences, and the conclusion follows.
We will show that there exists a tester pair of bijective functions $g$ and $h$.



First of all, let us find out when a pair of functions is a tester pair. Let $g, h: \mathbb{R} \rightarrow \mathbb{R}$ be arbitrary functions. We construct a directed graph $G_{g, h}$ with $\mathbb{R}$ as the set of vertices, its edges being painted with two colors: for every vertex $x \in \mathbb{R}$, we introduce a red edge $x \rightarrow g(x)$ and a blue edge $x \rightarrow h(x)$.



Now, assume that the function $f: \mathbb{R} \rightarrow \mathbb{R}$ satisfies $f(g(x))=g(f(x))$ and $f(h(x))=h(f(x))$ for all $x \in \mathbb{R}$. This means exactly that if there exists an edge $x \rightarrow y$, then there also exists an edge $f(x) \rightarrow f(y)$ of the same color; that is $-f$ is an endomorphism of $G_{g, h}$.



Thus, a pair $(g, h)$ is a tester pair if and only if the graph $G_{g, h}$ admits no nontrivial endomorphisms. Notice that each endomorphism maps a component into a component. Thus, to construct a tester pair, it suffices to construct a continuum of components with no nontrivial endomorphisms and no homomorphisms from one to another. It can be done in many ways; below we present one of them.



Let $g(x)=x+1$; the construction of $h$ is more involved. For every $x \in[0,1)$ we define the set $S_{x}=x+\mathbb{Z}$; the sets $S_{x}$ will be exactly the components of $G_{g, h}$. Now we will construct these components.



Let us fix any $x \in[0,1)$; let $x=0 . x_{1} x_{2} \ldots$ be the binary representation of $x$. Define $h(x-n)=x-n+1$ for every $n>3$. Next, let $h(x-3)=x, h(x)=x-2, h(x-2)=x-1$, and $h(x-1)=x+1$ (that would be a "marker" which fixes a point in our component).



Next, for every $i=1,2, \ldots$, we define



(1) $h(x+3 i-2)=x+3 i-1, h(x+3 i-1)=x+3 i$, and $h(x+3 i)=x+3 i+1$, if $x_{i}=0$;



(2) $h(x+3 i-2)=x+3 i, h(x+3 i)=3 i-1$, and $h(x+3 i-1)=x+3 i+1$, if $x_{i}=1$.



Clearly, $h$ is a bijection mapping each $S_{x}$ to itself. Now we claim that the graph $G_{g, h}$ satisfies the desired conditions.



Consider any homomorphism $f_{x}: S_{x} \rightarrow S_{y}$ ( $x$ and $y$ may coincide). Since $g$ is a bijection, consideration of the red edges shows that $f_{x}(x+n)=x+n+k$ for a fixed real $k$. Next, there exists a blue edge $(x-3) \rightarrow x$, and the only blue edge of the form $(y+m-3) \rightarrow(y+m)$ is $(y-3) \rightarrow y$; thus $f_{x}(x)=y$, and $k=0$.



Next, if $x_{i}=0$ then there exists a blue edge $(x+3 i-2) \rightarrow(x+3 i-1)$; then the edge $(y+3 i-2) \rightarrow(y+3 i-1)$ also should exist, so $y_{i}=0$. Analogously, if $x_{i}=1$ then there exists a blue edge $(x+3 i-2) \rightarrow(x+3 i)$; then the edge $(y+3 i-2) \rightarrow(y+3 i)$ also should exist, so $y_{i}=1$. We conclude that $x=y$, and $f_{x}$ is the identity mapping, as required.