# Is there a topology on the reals such that the continuous functions of that topology are precisely the differentiable functions?

Is there a topology $$T$$ on the set of real numbers $$\mathbb{R}$$, such that the set of $$T$$-continuous functions from $$\mathbb{R}$$ to $$\mathbb{R}$$ is precisely the set of differentiable functions on $$\mathbb{R}$$?

• Just to be sure: $T$-continuous means with $T$ both on domain and range? Nov 2, 2022 at 17:51
• I would say "No". See https://www.ams.org/journals/proc/1971-028-01/S0002-9939-1971-0271969-5/home.html, whose title is "No topologies characterize differentiability as continuity".
– MPW
Nov 2, 2022 at 17:53
• Just to understand the question (and the accepted answer): a derivative is defined using a limit, so differentiability depends on the choice of the topology. By "differentiable function", do you mean "differentiable in the standard topology"? Or "differentiable in $T$"? Nov 3, 2022 at 6:34
• @Taladris It seems the assumption is that one fixes the standard notion of differentiability in this context ("Not all continuous functions are differentiable, but all differentiable functions are continuous; is there a way to deform the notion of continuity so as to make all continuous functions differentiable and vice versa?"). ... Nov 3, 2022 at 6:56
• For (something like) differentiability it seems one needs a bit more than a topology (e.g. a uniform structure), and one could interpret differentiability something that has to do with linear approximations, in which case the standard (left and right invariant) uniform structure on the reals seems like a natural choice, from which the standard definition of differentiability can be deduced it seems. For the record I agree with you that the question can be interpreted more broadly and I also was confused at first like you. Nov 3, 2022 at 7:02

Νo. Indeed, if such a topology exists, then the functions $$f_{1},f_{2}:\mathbb R \to \mathbb R$$ defined by $$f_{1}(x)=-x$$ and $$f_{2}(x)=x$$ are continuous. Now we can restrict the domain $$f_1:(-\infty,0] \to \mathbb R$$ and $$f_2:[0,\infty) \to \mathbb R$$ and it will stay continuous.

Now define $$f(x)=|x|$$; it is continuous from the gluing lemma with the functions $$f_1,f_2$$.

But it is not differentiable.

Edit: As Mark Saving correctly points out, we need to prove that $$(-\infty,0]$$ and $$[0,\infty)$$ are closed.

To prove that we first prove that $$T$$ is $$T_1$$. Let $$a \neq b \in \mathbb R$$. Choose a an open set $$B \in T$$ such that $$B \neq \mathbb R, \emptyset$$ - it exists as otherwise T is the trivial topology. Define $$A = \mathbb R \setminus B$$. Now the function $$f$$ defined by $$a$$ on $$A$$ and $$b$$ on $$B$$ can't be continuous as its image is two points (hence not continuous in the standard topology on $$\mathbb R$$ and thus not differentiable). Now the preimages of $$f$$ are $$\emptyset, A, B, \mathbb R$$ thus $$A$$ can't be open (as otherwise every preimage is open and thus $$f$$ is continuous) and as $$f$$ is not continuous and $$A$$ is the only preimage which is not open, there is an open set $$U \in T$$ such that $$f^{-1}(U)=A$$ and thus $$U$$ is an open set containing $$a$$ and not $$b$$. And thus $$T$$ is $$T_1$$.

Thus every singleton is closed in $$T$$.

Now we use the next theorem: let $$A$$ be a closed set in $$\mathbb R$$ thus there exists a differentiable function $$f:\mathbb R \to \mathbb R$$ such that $$f^{-1}(\{0\})=A$$. Now as $$f$$ is differentiable it is continuous in T and because $$\{0\}$$ is closed we have that $$A= f^{-1}(\{0\})$$ is closed in $$T$$ thus every closed set in the standard topology is closed in $$T$$.

• en.m.wikipedia.org/wiki/Pasting_lemma
– RT1
Nov 2, 2022 at 18:40
• That doesn’t apply here since it requires the two sets to be closed, and you haven’t shown that $[0, \infty)$ and $(-\infty, 0]$ are closed under this hypothetical topology $T$. Nov 2, 2022 at 19:10
• @MarkSaving, you are right. I added a proof of that
– RT1
Nov 2, 2022 at 19:57
• I am confused about a few claims in the proof: 1. Why is $f_2$ continuous? $f_1:(\mathbb R,T)\to(\mathbb R,T)$ is continuous, but it does not imply that $f_2$ is also continuous. For example, if $T$ is the topology whose open sets are all intervals of the form $[a,\infty)$ (together with $\emptyset$ and $\mathbb R$), $f_2$ would not be continuous, am I wrong? 2. Why are you assuming that $\mathbb R$ (as a target of the applications) is endowed with the standard topology (in the sentence "its image is two points (hence not continuous in the standard topology...)"? The OP does not say that. Nov 3, 2022 at 4:36
• I assumed he meant diffrentiability in the usual sense(I haven't heard about diffrentiating in the sense of diffrent topology). The OP can correct me if he didn't mean that
– RT1
Nov 3, 2022 at 7:10

To build on @RT1's answer, we may use the pasting lemma provided we first show that $$(-\infty,0]$$ and $$[0,\infty)$$ are closed sets in $$T$$.

Suppose such a $$T$$ exists. Clearly, $$T$$ is not the trivial topology. Let $$U\in T$$ be a nonempty set such that $$U\neq \mathbb R$$. Then there exists $$y\in\mathbb R$$ such that $$y\not\in U$$. Let $$f:\mathbb R\to\mathbb R$$ be a differentiable function such that $$f(x)=y$$ for $$y\geq 1$$ and $$y\leq 0$$, and $$f(x)\in U$$ for some $$x\in (0,1)$$. Then $$V:=f^{-1}(U)$$ is a nonempty subset of $$(0,1)$$. Since $$f$$ is $$T$$-continuous, $$V\in T$$.

Now, let $$(a,b)\subset\mathbb R$$. Define $$g:\mathbb R\to\mathbb R$$ by $$g(x)=\frac{a-x}{a-b}.$$ Then observe that $$g^{-1}(V)\subset(a,b)$$. Since $$V\in T$$ and since $$g$$ is $$T$$-continuous, we conclude that $$(a,b)$$ contains a set in $$T$$.

Next, let $$c\in\mathbb R$$ and consider $$h:\mathbb R\to\mathbb R$$ defined by $$h(x)=x-c$$. Then $$h$$ is $$T$$-continuous, so $$h^{-1}=V+c\in T.$$ Thus, translations of sets in $$T$$ are also in $$T$$.

Now let $$W\subset\mathbb R$$ be open in the usual topology. Then for each $$x\in W$$, there exists $$\varepsilon>0$$ such that $$(x-\varepsilon,x+\varepsilon)\subset W$$. Since any interval contains a nonempty set in $$T$$, we conclude that there exists a nonepmty $$\tilde U_x\in T$$ such that $$\tilde U_x\subset(x-\varepsilon/2,x+\varepsilon/2)$$. The set $$\tilde U_x$$ may not contain $$x$$, but it does contain some point $$\tilde x\in(x-\varepsilon/2,x+\varepsilon/2)$$. Therefore, define $$U_x:=\tilde U_x+(x-\tilde x)$$, which has the following properties:

• $$x\in U_x$$,
• $$U_x\in T$$ since it is a translation of $$\tilde U_x\in T$$, and
• $$U_x\subset (x-\varepsilon,x+\varepsilon)$$ since $$\tilde U_x\subset (x-\varepsilon/2,x+\varepsilon/2)$$ and $$|x-\tilde x|<\varepsilon/2$$.

Thus, $$U_x\subset W$$, and $$W=\bigcup_{x\in W}U_x\in T.$$

We conclude that $$(0,\infty)$$ and $$(-\infty,0)$$ are in $$T$$, so $$(-\infty,0]$$ and $$[0,\infty)$$ are closed, so we may use the pasting lemma argument.

Here’s another perspective which relies on a bit of basic analysis background, but allows one to see at a glance that no such topology on the reals can exist. For any topological space $$X$$, the set of continuous real-valued functions on $$X$$ is closed under uniform limits. On the other hand, the differentiable functions on the real line are not closed under uniform limits, so they cannot be the set of continuous functions with respect to any topology.