Is there another topology on $\mathbb{R}$ that gives the same continuous functions from $\mathbb{R}$ to $\mathbb{R}$?

Suppose $\tau$ is such a topology. For clarity, I'll use "open" to mean open in the usual sense, and "$\tau$-open" to mean open in the new topology, $\tau$; similarly with "continuous" and "$\tau$-continuous."

We'll show that $\tau$ is in fact a refinement of the usual topology on $\mathbb{R}$. The only fact about the usual topology used is $$(*)\quad\mbox{No map $h:\mathbb{R}\rightarrow\mathbb{R}$ whose range has exactly two elements is continuous.}$$


We begin by showing that $\tau$ is $T_1$. Take $a\neq b$, and take two non-empty subsets $A,B$ with $A\cap B=\varnothing$ and $A\cup B=\mathbb R$ and with $B$ $\tau$-open. Such $A, B$ exist since $\tau$ is not indiscrete: if $\tau$ were, it would have too many continuous functions.

Now by $(*)$, the function that sends $A$ to $a$ and $B$ to $b$ is not continuous in the usual topology, so it is not $\tau$-continuous either.

Since $f$ isn't $\tau$-continuous, we must have that $A$ is not $\tau$-open. Now, the only $f$-preimages are $\emptyset, B, \mathbb{R}, A$; the only one of these which is not $\tau$-open is $A$, so for $f$ to not be $\tau$-continuous there must be some $\tau$-open set $U$ with $f^{-1}(U)=A$. That is, there must be a $\tau$-open set that contains $a$ and not $b$.


So we have that $\tau$ is $T_1$. (Note: $\tau$ is also connected by the same argument, but that's not directly useful for the rest of this argument.)

We can now prove that $\tau$ refines the usual topology. Since $\tau$ is $T_1$, we know that $\mathbb R\setminus \{x\}$ is $\tau$-open for all $x$. For $a\in\mathbb{R}$, consider the function $f_a(x)=\max(a,x)$. This function is continuous and hence $\tau$-continuous. Since $\mathbb R\setminus \{a\}$ is $\tau$-open, its $f_a$-preimage must be $\tau$-open; that is, $(a,\infty)$ is $\tau$-open. We can prove $(-\infty,a)$ is open analogously. Intersecting open sets, we get that $(a, b)$ is $\tau$-open for every $a,b\in\mathbb{R}$.


Carry on Smiling has shown that if $\tau$ is a topology on $\mathbb{R}$ has the same continuous functions $\mathbb{R}\to\mathbb{R}$ as the usual topology, then $\tau$ contains the usual topology. I will now show that $\tau$ must also be contained in the usual topology, and thus must actually be equal to the usual topology.

Suppose $A\subset\mathbb{R}$ is a set that is $\tau$-closed but not closed. Choose a point $x\in\mathbb{R}\setminus A$ and a sequence of points $(x_n)$ in $A$ which converge to $x$. To simplify notation, let me assume $x=0$ and $x_n=1/n$. In fact, this loses no generality: we can assume the $x_n$ are converging to $x$ monotonically by passing to a subsequence, and then we can apply a homeomorphism of $\mathbb{R}$ to send $x$ to $0$ and $x_n$ to $1/n$.

So we may assume $0\not\in A$ but $1/n\in A$ for all positive integers $n$. Now consider the map $f:\mathbb{R}\to\mathbb{R}$ given by $f(x)=0$ for $x\leq 0$, $f(x)=1/n$ if $x\in [1/(2n+1),1/2n]$ for some positive integer $n$, $f(x)=1$ if $x\geq 1/2$, and interpolate linearly for other values of $x$. Then $f$ is continuous. Let $g$ be defined similarly to $f$, except that $g(x)=1/n$ if $x\in [1/2n,1/(2n-1)]$. Let $h(x)=f(-x)$ and $i(x)=g(-x)$. Now observe that $f^{-1}(A)\cup g^{-1}(A)$ contains all positive numbers, and $h^{-1}(A)\cup i^{-1}(A)$ contains all negative numbers. On the other hand, none of these sets contain $0$, since all the functions map $0$ to $0$ and $0\not\in A$. Thus $f^{-1}(A)\cup g^{-1}(A)\cup h^{-1}(A)\cup i^{-1}(A)=\mathbb{R}\setminus\{0\}$.

By assumption, $f$, $g$, $h$, and $i$ are all $\tau$-continuous. It follows that $\mathbb{R}\setminus\{0\}$ is $\tau$-closed. For each $r\in\mathbb{R}$ $j_r(x)=x-r$ is also $\tau$-continuous, so in fact $\mathbb{R}\setminus\{r\}$ is $\tau$-closed for all $r$. But this means $\tau$ is the discrete topology, which is impossible since then every function would be $\tau$-continuous.

Thus no such set $A$ can exist, and $\tau$ is contained in the usual topology.