I was reading Smooth manifolds and their application in homotopy theory by L. S. Pontryagin. There he proves this theorem
Let $M, N$ be two manifolds of dimension $m$ with $n$ and $m < n$ and let $f: M \to N$ be a $\mathcal{C}^1$ function. Then the set $f(M)$ is of "first category" in $N$, i.e it is a countable union of sets nowhere dense in $N$. In particular, if $M$ is compact, $f(M)$ is also compact and $N\setminus f(M)$ is dense in $N$.
The last sentence was not obvious to me, so I googled it and I found things like "meagre set", "Baire theorem", etc. I tried to adapt the proof of Baire category theorem in this setting:
Let be $f(M) = \bigcup A_n$ with $\mathring{\bar{A_n}} = \emptyset$. Take $U \subseteq M$ open. Thesis: $U \cap N\setminus f(M) \neq \emptyset$. We know that $U \not\subset \bar{A_1}$ because $\bar{A_1}$ has empty interior. Then it exists $x_1 \in U$ such that $x_1 \not\in \bar{A_1}$. We have that $N\setminus\bar{A_1} \cap U$ is a open neighborhood of $x_1$. Because $N$ is a manifold we can find an open neighborhood $U_1$ of $x_1$ such that $\bar{U_1}$ is compact and $\bar{U_1} \subseteq N\setminus\bar{A_1} \cap U$. We can repeat the argument with $U_1$ instead of $U$ and find $U_2$, then $U_3$. and so on. Let be $X = \bigcap \bar{U_n}$. Because $(\bar{U_n})_n$ is a decreasing sequence of closed compact set, then $X$ is not empty. So it exists $x \in X$ such that $x \not\in \bigcup\bar{A_n}$. So $x \not\in \bigcup A_n = f(M)$. Because $x \in U$, we have that $x \in U \cap N\setminus f(M)$.
Is this proof correct? I think no because it does not use anywhere the fact that $f(M)$ is compact!
The compactness hypothesis is not necessary : indeed you don't even need to adapt the proof of the Baire category theorem as it will apply here :
let $X$ be a countable union $\bigcup_n A_n$ of nowhere dense sets. Then $\overline{A_n}$ is closed with empty interior, so by the Baire category theorem, $\bigcup_n \overline{A_n}$ has empty interior as well. It follows that $\bigcup_n A_n = X$ has empty interior, i.e. $N\setminus X$ is dense.
I don't know enough about manifolds, but perhaps the compactness hypothesis is actually used to get the result of the first sentence, and the author just re-mentioned compactness for some obscure reason ?