TITLE: Do there exist general conditions under which we can conclude that continuity on a topological space is detected by $\mathbb{R}$?
QUESTION [7 upvotes]: Whenever $X$ is a topological space, let us say that continuity on $X$ is detected by $\mathbb{R}$ iff for all functions $f : X \rightarrow Y$ where $Y$ is another topological space, we have that if every continuous function $c : \mathbb{R} \rightarrow X$ satisfies "$f \circ c$ is continuous", then $f$ is itself continuous.

Clearly, continuity on $\mathbb{R}$ is detected by $\mathbb{R}$
It is shown here that continuity on $\mathbb{R}^2$ is detected by $\mathbb{R}$.
Clearly, it is not the case that continuity on $\mathbb{Q}$ is detected by $\mathbb{R}$, since every continuous mapping $\mathbb{R} \rightarrow \mathbb{Q}$ is constant.


Question. Do there exist general conditions underwhich we can conclude that continuity on a topological space is detected by $\mathbb{R}$?

REPLY [6 votes]: Let us say a space $X$ is $\mathbb{R}$-generated if continuity of maps out of $X$ is detected by composition with maps $\mathbb{R}\to X$.  By general nonsense, this is the same as saying a subset of $X$ is closed (or open) iff its preimage under every continuous map $\mathbb{R}\to X$ is, or that $X$ is the colimit of a diagram in which every object is a copy of $\mathbb{R}$.
Consider the following statements:

$X$ is locally path-connected and first-countable.
$X$ is $\mathbb{R}$-generated.
$X$ is locally path-connected and sequential.

I claim that $(1)\Rightarrow (2)\Rightarrow (3)$, and neither implication is reversible.
To show $(1)\Rightarrow (2)$, suppose $X$ is locally path-connected and first-countable.  It suffices to  show that if a subset $A\subseteq X$ is not closed, then there is some continuous $f:\mathbb{R}\to X$ such that $f^{-1}(A)$ is not closed.  So suppose $A\subseteq X$ is not closed; let $x\in\bar{A}\setminus A$.  Let $(U_n)$ be a local neighborhood base at $x$; let $x_n\in U_n\cap A$ for each $n$.  Choose a path from $x_n$ to $x_{n+1}$ that lies entirely inside $U_n$ for each $n$.  Concatenating these paths together, you get a map $f_0:[0,1)\to X$ which extends continuously to $[0,1]$ by sending $1$ to $x$.  Extending this to a map $f:\mathbb{R}\to X$, we then have that $f^{-1}(A)$ contains a sequence that converges to $1$ but does not contain $1$, and so $f^{-1}(A)$ is not closed.
To show $(2)\Rightarrow (3)$, suppose $X$ is $\mathbb{R}$-generated.  Since $\mathbb{R}$ is sequential, $X$ must be sequential.  Now enlarge the topology on $X$ by saying that if $U$ is an open neighborhood of a point $x\in X$, so is the path-component of $x$ inside $U$.  Let $Y$ be $X$ with this enlarged topology; it is easy to see that any continuous map $\mathbb{R}\to X$ is still continuous as a map $\mathbb{R}\to Y$.  Since $X$ is $\mathbb{R}$-generated, this means the identity map $X\to Y$ is continuous.  That is, our enlarged topology is the same as the original topology; it follows that $X$ is locally path-connected.
Finally, let us give some counterexamples to the reverse implications.  For $(2)\not\Rightarrow(1)$, note that a colimit of $\mathbb{R}$-generated spaces is $\mathbb{R}$-generated, so any CW-complex is $\mathbb{R}$-generated.  But a CW-complex is first-countable iff it is locally finite.
A counterexample to $(3)\Rightarrow(2)$ can be obtained as follows.  Let $W=\mathbb{N}\times(0,1]\cup\{\infty\}$ be the 1-point compactification of $\mathbb{N}\times(0,1]$, and let $Z$ be the subspace $\mathbb{N}\times(0,1)\cup\{\infty\}\subset W$.  It is easy to see that $Z$ is locally path-connected and sequential.  Let $X=\mathbb{N}\times Z\cup\{x\}$, topologized as follows.  Any open subset of $\mathbb{N}\times Z$ (with the product topology) is open in $X$, and a set $U$ containing $x$ is open iff the following conditions hold:

$U\cap\mathbb{N}\times Z$ is open in $\mathbb{N}\times Z$.
For every $m,n\in\mathbb{N}$, there is a $t_{m,n}<1$ such that $\{m\}\times\{n\}\times(t_{m,n},1)\subset U$.
For all but finitely many $m\in\mathbb{N}$, $(m,\infty)\in U$.

For any $m,n\in\mathbb{N}$, the map $f:[0,1]\to X$ such that $f(0)=(m,\infty)$, $f(t)=(m,n,t)$ for $0<t<1$, and $f(1)=x$ is continuous.  It follows that $X$ is locally path-connected.  To show that $X$ is sequential, it suffices to show that if $A\subseteq\mathbb{N}\times Z$ is closed in $\mathbb{N}\times Z$ and $x\in\bar{A}$ in $X$, then some sequence in $A$ converges to $x$.  If there exist $m,n\in \mathbb{N}$ such that $(m,n,t)\in A$ for $t$ arbitrarily close to $1$, a sequence of such points with $t\to 1$ will converge to $x$.  If no such $m$ and $n$ exist, then there must either be infinitely many $m$ such that $(m,\infty)\in A$ or infinitely many $m$ such that for infinitely many $n$, $(m,n,t)\in A$ for some $t\in(0,1)$.  Since $A$ is closed in $\mathbb{N}\times Z$, the second case actually implies the first case (since in $Z$, any sequence of points $(n,t)$ with $n\to\infty$ converges to $\infty$).  Thus we can find a sequence of points $(m,\infty)\in A$ with $m\to \infty$, and such a sequence converges to $x$.
Finally, I claim $X$ is not $\mathbb{R}$-generated.  Indeed, consider the set $A=\mathbb{N}\times\{\infty\}\subset X$.  It is easy to see that $\bar{A}=A\cup\{x\}$, but I claim that $f^{-1}(A)$ is closed for every continuous $f:\mathbb{R}\to X$.  To show this, let $f:\mathbb{R}\to X$ be continuous; then the only way $f^{-1}(A)$ can fail to be closed is if some sequence in $f^{-1}(A)$ converges to a preimage of $x$.  Thus suppose (WLOG) that $f(0)=x$ and $f(1/k)=(m_k,\infty)\in A$ for each positive integer $k$.  If there is some $m$ such that $m_k=m$ for infinitely many $k$, then clearly $f$ will fail to be continuous at $0$, so we may assume the $m_k$ are all distinct.  Note that any path in $X$ from $(m,\infty)$ to $(m',\infty)$ must pass through $x$ if $m\neq m'$, and that any path from $(m,\infty)$ to $x$ must pass through $\{m\}\times\mathbb{N}\times(0,1)$.  It follows that for each $k$, there is some $s_k\in(1/k,1/(k+1))$ such that $f(s_k)\in \{m_k\}\times\mathbb{N}\times(0,1)$.  Since $f$ is continuous, the sequence $f(s_k)$ must converge to $f(0)=x$.  But since the $m_k$ are all distinct, it is easy to find a neighborhood of $x$ that does not contains any $f(s_k)$.  This contradiction shows that $f^{-1}(A)$ is closed.  Since $f$ was arbitrary, this shows $X$ is not $\mathbb{R}$-generated.