dimension of a connected Manifold Currently, I am studying smooth manifolds and I want to solve some exercises. There is a question that says:
Show that the dimension of a connected topological manifold is defined without ambiguity! Meaning that if $\dim M=n$, with the change of charts, the dimension still is $n$. Then show that this is true for a $C^r$ connected manifold using Inverse Function Theorem. 
To prove the first part, let $(U,\varphi)$ and $(V,\psi)$ be two charts with $\varphi(U) \subseteq \mathbb{R}^m$ and $\psi(V) \subseteq \mathbb{R}^n$ and suppose that $U \cap V \neq \emptyset$. Then, since $\psi \circ \varphi : \varphi (U \cap V) \rightarrow \psi (U \cap V) $ is a homeomorphism, $m=n$. Now, using this, if $M$ is a connected topological manifold with atlas $\mathcal{A}$, for all charts $(U_{\alpha}, \varphi_{\alpha})\in \mathcal{A}$, $\varphi_{\alpha}(U_{\alpha}) \subseteq \mathbb{R}^n$ and $n$ is constant for all the charts. Am I right?
But I have a problem showing the second part! I think that since every $C^r$ manifold is also a topological manifold, the answer to this question would be trivial! Why do we need "Inverse Function theorem" to answer it??
Any help is appreciated.

If $M$ is a smooth manifold of dimensions $m$ and $n$ then for each $p\in M$, we can find charts about $p$ with images open in $\mathbb{R}^n$ and $\mathbb{R}^m$. Hence $T_pM$ is isomorphic to $\mathbb{R}^n$ and $\mathbb{R}^m$
