# Example of a bijective continuous self mapping whose inverse is not continuous on a complete subspace of $\mathbb{R}$

I gave an answer to the following question Finding an (easy) example of a bijective continuous self mapping whose inverse is not continuous. In this question the OP asked for a continuous mapping $$f: (X,d) \rightarrow (X,d)$$ which is bijective, continuous and not a homeomorphism (and $$(X,d)$$ a metric space). The famous Kavi Rama Murthy then remarked that all the counterexamples are for metric spaces which are incomplete. I gave it some thoughts and come up with a counterexample where the space is complete. However, I did not manage to make it work within $$\mathbb{R}$$. So my question is:

Does there exist some closed subset $$X\subseteq \mathbb{R}$$ and a function $$f: X \rightarrow X$$ which is bijective, continuous (wrt to the subspace topology) and not a homeomorphism.

My intuition tells me that it is not possible as there are at most two noncompact connected components. Thus, preventing us to play the game of gluing together connected components to prevent the inverse function to be continuous. Let me elaborate a bit on this thought.

We note that we may wlog assume that $$X$$ has no unbounded connected components. Simply as those would be the only noncompact connected components and as continuous functions send compact sets to compact sets and our $$f$$ is bijective, we would have that it sends unbounded connected components to unbounded connected components. Either the image of the unbounded connected component covers an unbounded connected component, or we need to cover a bounded half-open interval by countably many compact disjoint intervals (which is not possible using a Baire-category argument, see for example here https://terrytao.wordpress.com/2010/10/04/covering-a-non-closed-interval-by-disjoint-closed-intervals/). Thus, unbounded connected components get swapped or fix and hence, the $$X$$ with the unbounded connected components replaced by points are a counterexample as well.

Hence, $$X$$ can be taken to be a countable union of compact intervals. On the other hand, it is not possible that $$X$$ is compact (continuous functions from a compact space into a Hausdorff space are closed, which would make our function a homeomorphism).

Furthermore, using again that we cannot cover a half-open interval with countably many disjoint compact intervals, we get that all that $$f$$ can do is permuting connected components (it maps some intervals to another interval and points to points).

• What does "$f:\mathbb{R}\supseteq X\rightarrow X\subseteq\mathbb{R}$" mean? Is it $f:X\rightarrow X$ (which seems most likely) or $f:\mathbb{R}\rightarrow X$ (which would explain the "$\mathbb{R}\supseteq X$" versus "$X\subseteq\mathbb{R}$" notation)? Since we already know that $X\subseteq\mathbb{R}$, it only makes things messier to include that data in the description of $f$. Jun 11, 2020 at 18:43
• @NoahSchweber I meant $X\rightarrow X$. I like to keep the inclusions to remind myself that we are in the reals, but if you consider it confusing, then I'll change it. Given that this is the only "formula" it is not particular messy, is it? :) Jun 11, 2020 at 18:48
• FWIW in my experience in the notation "$f: A[...]\rightarrow B[...]$" the $[...]$s are the annotations, so "$f: \mathbb{R}\supseteq X\rightarrow X\supseteq\mathbb{R}$" would mean $f:\mathbb{R}\rightarrow X$. (BTW +1, it's a good question.) Jun 11, 2020 at 19:02
• @NoahSchweber That is interesting, I did not know that this is a standard way of writing. Until now I only saw things like $X\supseteq U \rightarrow V \subseteq Y$ to remind us that $U \subseteq X, V \subseteq Y$, simply to keep in mind about which of the many Banach spaces we are talking right now (and keeping the arrow between the sets we are mapping). Thanks, I like the question as well ;) Jun 11, 2020 at 20:00
• Oh, interesting - I've not seen that before. It's quite possible that's more common, my experience is definitely limited, I just find it a little hard to read. Jun 11, 2020 at 20:07

After some more thought I realized that one of the things that could go wrong is that the inverse function "sends points to infinity". Namely, if we had $$Y= \{ 0 \} \cup \bigcup_{n\in \mathbb{N}_{\geq 1}} \left\{ \frac{1}{2^n}\left( 1 + \frac{1}{2} \right) \right\} \cup \bigcup_{n\in \mathbb{N}_{\geq 1}} \left\{ 2^n\left( 1 + \frac{1}{2} \right) \right\},$$ then we could do some kind of "inversion" around $$1$$ while fixing the origin. Namely, we want for $$n\in \mathbb{N}_{\geq 1}$$ $$f(0):=0, \quad f\left( 2^n\left( 1 + \frac{1}{2} \right) \right) := \frac{1}{2^{n}}\left( 1 + \frac{1}{2} \right).$$ Then clearly the inverse of this function (if it was bijective) would be discontinuous at the origin. How to we make this bijective? We apply the trick that we can "create" or "destroy" a point if we add some converging sequence for it, simply by shifting along the sequence. Hence, we define $$X= \{ 0 \} \cup \bigcup_{n\in \mathbb{N}_{\geq 1}} \left\{ \frac{1}{2^n}\left( 1 + \frac{1}{2^k} \right) \ : \ k\in \mathbb{N}_{\geq 1} \right\} \cup \bigcup_{n\in \mathbb{N}_{\geq 1}} \left\{ 2^n \left( 1 + \frac{1}{2^k} \right) \ : \ k\in \mathbb{N}_{\geq 1} \right\}.$$ We "shift into $$\frac{1}{2^n}$$" and "shift out of $$2^n$$". Namely, we define for all $$n\in \mathbb{N}_{\geq 1}$$ $$f(0):= 0, \qquad f\left( \frac{1}{2^n} \right) := \frac{1}{2^n}, \qquad f\left( 2^n \right) := 2^n.$$ and $$f\left( \frac{1}{2^n}\left( 1 + \frac{1}{2^k} \right) \right) := \frac{1}{2^n}\left( 1 + \frac{1}{2^{k+1}} \right), \qquad f\left( 2^n\left( 1 + \frac{1}{2^k} \right) \right) = \begin{cases} 2^n \left( 1 + \frac{1}{2^{k-1}} \right),& k\neq 1, \\ \frac{1}{2^n}\left( 1 + \frac{1}{2} \right),& k=1.\end{cases}$$ Thus, we found a continuous, bijective map $$f: X \rightarrow X$$ which is not a homeomorphism. And $$X\subseteq \mathbb{R}$$ is a closed set and thus complete.