# Topological invariance of dimension

I am starting to study smooth manifolds with the book of Lee. At the beginning, he states this theorem, which is then proven later on with advanced techniques:

Theorem 1.2 (Topological Invariance of Dimension). A nonempty $n$-dimensional topological manifold cannot be homeomorphic to an $m$-dimensional manifold unless $m = n$.

I imagine that this is because there is no short simple proof. So I would like to know what is wrong with the following argument:

Let $M$ be a space, and $x \in M$ such that there are open neighbourhoods $U, V$ of $x$ which are homeomorphic to open subsets of $\mathbb{R}^n$ and $\mathbb{R}^m$, respectively (note furthermore that here the hypothesis is much weaker than being a topological manifold, so there must really be something wrong). Then $U \cap V$ is an open subset of both $U$ and $V$, which implies that under the respective homeomorphisms, $U \cap V$ is homeomorphic to both an open subset of $\mathbb{R}^n$ and an open subset of $\mathbb{R}^m$. Also, $x \in U \cap V$, so $U \cap V \neq \emptyset$. This however is possible only if $m = n$.

Your proof seems to use that $\mathbb{R}^m$ is homeomorphic to $\mathbb{R}^n$ if, and only, if $n=m$, but this statement is highly non-trivial (seems intuitive though) and equivalent to the one for topological manifolds (it is actually the core of the topological invariance of the dimension).
With easy tools (connexity argument), you can prove that $\mathbb{R}^n$ is homeomorphic to $\mathbb{R}$ if, and only, if $n=1$.
As a side note, can you establish with a one-line and really easy proof that $\mathbb{R}^m$ is diffeomorphic to $\mathbb{R}^n$ if, and only, if $n=m$?