Letting $M$ be a compact nonempty smooth $n$-manifold and letting $F : M \longrightarrow \mathbb{R}^n$ be a smooth map, I am asked to show that $F$ cannot be an immersion.
I have the following proof by contradiction. Since $F$ is smooth, it must also be continuous, so $F(M)$ is compact. Since $\mathbb{R}^n$ is connected and Hausdorff, this implies that $F(M)$ is closed. By way of contra diction, assume that $F$ is an immersion. Since the dimensions of the domain and the codomain of $F$ are equal, $F$ must also be a submersion. This tells us that $F$ is a local diffeomorphism, and so is an open map. Thus, $F(M)$ is open. If $F(M) \neq \mathbb{R}^n,$ then $\mathbb{R}^n \setminus F(M) \neq \emptyset$ is also open, so $\mathbb{R}^n$ is not connected, a contradiction. On the other hand, if $F(M) = \mathbb{R}^n,$ then $\mathbb{R}^n$ is compact, a contradiction. Therefore, $F$ is not an immersion.
I found this question and this question helpful in formulating my proof (especially one of the answers to the second question). However, it is not clear to me that my first step is justified. For maps between real Euclidean spaces, smooth implies continuous. However, for $F$ to be smooth means that its composition with the inverse of any coordinate chart of $M$ is smooth, and therefore continuous. While $f,g$ continuous implies $f \circ g$ continuous, the converse need not hold. So am I justified in assuming that $F$ is continuous? Of all the questions I could have asked about this proof, this seems like it should be a simple one, but I'm having trouble seeing the solution. I apologize if this seems really basic.