I am currently practicing with a few problems in Lee's Introduction to Topological Manifold, and I decided the complete the following problem:
Prove that a nonempty topological space cannot be both a $1$-manifold and an $n$-manifold for $n>1$.
The idea of proof seems pretty obvious: Assume $X$ is both a $1$-manifold and an $n$-manifold for $n>1$. Given some $p \in X$, let $(U,\varphi)$ and $(V,\tau)$ be coordinate charts around $p$ where $\varphi:U \rightarrow \mathbb{R}$ and $\tau:V \rightarrow \mathbb{R}^n$. Note that both $U$ and $V$ are connected. Since $U$ and $V$ are both open, $W=U\cap V$ is an open, connected and nonempty subset of $X$. The restriction of $\varphi$ and $\tau$ to $W$ is a continuous map into $\mathbb{R}$ and $\mathbb{R}^n$, respectively. In particular, $\varphi(W)$ is a connected, open subspace of $\mathbb{R}$, hence $\varphi(W)=(a,b)$ for some $a,b \in \mathbb{R}$. As such, there exists some homeomorphism $f:(a,b)\rightarrow \mathbb{R}$. Using this we can construct the homeomorphism $f \circ \varphi|_W: W \rightarrow \mathbb{R}$. Similarly, we can construct a homeomorphism $g \circ \tau|_W: W \rightarrow \mathbb{R}^n$. Composing both of these maps in the right way gives a homeomorphism between $\mathbb{R}$ and $\mathbb{R}^n$, which is impossible since $\mathbb{R}$ minus a point is disconnected while $\mathbb{R}^n$ minus a point is connected for $n>1$.
My question is:
Is this line of reasoning correct?