Must a space that is locally injective image of $\mathbb{R}^n$ be a manifold? Suppose $X\subseteq\mathbb{R}^m$ s.t. for any $x\in X$ and any open $U\subseteq\mathbb{R}^m$ that contains $x$, there exists a smaller open set $V\subseteq U$ also containing $x$, so that $V\cap X$ is the image of some injective continuous map $f:\mathbb{R}^n\rightarrow\mathbb{R}^m$.
Any $n$-manifold embedded in $\mathbb{R}^m$ clearly satisfies this property; conversely must such an $X$ be an $n$-manifold? Is it true at least for $n=1$? The usual counterexamples such as the topologist's sine curve and the figure 8 are ruled out by this definition.
I am asking in the continuous category, but feel free to consider the smooth variants. Clarification: I mean must $X$ be a topological manifold if we further assume each $f$ is smooth, and must it be a smooth manifold if $f$ is an immersion.
 A: Here an outline of an argument for an affirmative answer in the case n=1:
By replacing $X$ by $X\cap V$, we can assume $X=g(\mathbb R)$ for a continuous injective map $g:\mathbb R\rightarrow \mathbb R^m$.
We prove (under the given assumptions on X) that $g$ is a proper map to its image (and thus a homeomorphism to its image). Since $g$ is locally on $\mathbb R$ a homeomorphism to its image, it suffices to show that no $x\in X$ is the limit of a sequence $g(t_k)$
with $|t_k|\rightarrow \infty$.
Assume by contradiction, that there is $x\in X$ with $g(t_k)\rightarrow x$ for some $t_k\rightarrow \infty$.
(*) Assume further for simplicity that $g(t)$ converges to $z\neq x$ at the other end of $\mathbb R$, as $t\rightarrow -\infty$.

*

*We will show that in this situation $\lim_{t\rightarrow \infty}g(t)=x$.

Indeed, if there is another accumulation point $y\in \mathbb{R}^m$ of $g(t)$ as $t\rightarrow \infty$, pick an open neighborhood $V$ of $x$ such that $y,z\notin \overline{V}$.
Then $g^{-1}(V)$ consists of a countably infinite disjoint union of nonempty open intervals $I_k\subset \mathbb R$ with compact closures (these intervals tend to $\infty$, since $g$ only accumulates to $x$ as $t\rightarrow \infty$). The images of $J_k:=g(I_k)\subset V$ are homeomorphic to open intervals. The closures of the $J_k$'s in $\mathbb R^m$ are pairwise disjoint and their boundary $\overline{J_k}\setminus J_k\subset \partial V$, consists of two points for each $k$. Thus each $J_k$ is closed in $V$.
Assume now $V$ is also such that $X\cap V$ is the image of a continuous injective map $f:\mathbb R\rightarrow \mathbb R^m$. Since we can write $X\cap V= \bigsqcup_k J_k$ as a disjoint union of countably many nonempty closed subsets, the properties of $f$ imply that $\mathbb R$ is the disjoint union of countably many nonempty closed subsets. But this is not possible (e.g. by an application of the Baire category theorem), thus we find a contradiction.


*Obtain from 1. and (*) a contradiction to our assumptions on $X$:

$g(t)$ converges to $x$ as $t\rightarrow \infty$, but does not accumulate at $x$ for $t\rightarrow -\infty$. Thus $X\setminus {x}$ has  locally near $x$ 3 connected components, which shows that $X\setminus{x}$ locally near x cannot be the continuous image of $\mathbb{R}\setminus p$. This contradicts the assumptions on $X$.


*Removing the assumption $(*)$.
There are several cases to consider:

a) If $x$ is not an accumulation point of $g(t)$ as $t\rightarrow -\infty$
then the argument from 1. goes through by choosing $V$ so small that it contains no such accumulation point, e.g. such that $g((-\infty,0])\cap V=\emptyset$ (and by ignoring $z$). Step 2. applies now as before to yield a contradiction to the assumptions on $X$.
b) If $x$ is an accumulation point of $g(t)$ as $t\rightarrow -\infty$ but not the limit of $g(t)$ as $t\rightarrow -\infty$, then the argument from 1. still goes through to derive a contradiction, if we choose $z$ as another accumulation point of $g$ as $t\rightarrow -\infty$ (there are now intervals $I_k$ tending to both $\pm \infty$). This contradiction obtained as in 1. shows (without any further assumptions) that no $x\in X$ can be "accumulation point but not limit" at both ends of $\mathbb R$. Up to switching $\pm\infty$, we are thus in the situation c) if $(*)$ does not hold:
c) $x$ is the limit of $g(t)$ as $t\rightarrow -\infty$ (and an accumulation point, but not the limit, of $g(t)$ as $t\rightarrow \infty$).
In this situation, we still follow the basic strategy of 1., picking V and z as before, but the argument changes as slightly: The connected components of $g^{-1}(V)$ can be enumerated as follows. One component has the form $I_0:=(-\infty,a)$, one (potentially different) component is an open interval $I_0'\subset \mathbb R$ containing $g^{-1}(x)$, and the other components form a countable sequence of pairwise disjoint open intervals $I_k, k\geq 1$ tending to $\infty$ (and not containing $x$). The images $g(I_k), k\geq 1$ are closed in V as before, but also $g(I_0\cup I_0')$ is closed in V (since the only accumulation point of $g(I_0)$ in $V\setminus g(I_0)$ is $x\in g(I_0')$) and all of these sets are pairwise disjoint. Thus one obtains a contradiction as in 1., and it follows that $x$ is the limit of $g$ at both $\pm \infty$.
Then $X\setminus x$ has (similar as in 2.) locally near $x$ 4 connected components, and thus it cannot be the continuous image of $\mathbb R\setminus p$.
A: I feel like this is true for $n=1$. Here is an outline. Suppose $X$ is Hausdorff and
$\{U\subseteq X\mid U\text{ is open and there exists a continuous bijection }f:\mathbb{R}\rightarrow U\}$
form a basis of $X$. It suffices to show that each of these $f$ is actually an embedding. It is certainly an embedding restricted to any finite interval, and the only way it can fail to be an embedding is that there exists a sequence $t_n\rightarrow\infty$ s.t. $f(t_n)\rightarrow a$ where $a\in\mathrm{Im}f$ (or a sequence $t_n\rightarrow-\infty$, which is similar).

*

*If there is only one such point $a$, then $X$ locally looks like a "cross road" at $a$, and cannot satisfy the definition there, for reason similar to the figure 8.


*Now suppose there exist two such points $a,b$. Take disjoint neighborhoods $U\ni a,V\ni b$ in $X$, such that there is a continuous bijection $g:\mathbb{R}\rightarrow U$. $f^{-1}(U)$ is an open subset of $\mathbb{R}$ that contains a sequence $(J_i)_{i\geq 1}$ of open intervals that "go to infinity", and we can assume $\overline{f(J_i)}\cap\overline{f(J_j)}=\emptyset$ for $i\neq j$ since $f^{-1}(U)$ is "interleaved" with $f^{-1}(V)$. Then the desired contradiction should follow from  the claim below, which I believe is true.
Claim: if $f$, a continuous bijection to a Hausdorff space, is defined on countably many disjoint open intervals $(J_i)_{i\geq 1}$, and $\overline{f(J_i)}\cap\overline{f(J_j)}=\emptyset$ for $i\neq j$, then $\mathrm{Im}f$ cannot be path-connected.
