No continuous injective function from 2-sphere to torus I'm currently working through a problem to show that there is no continuous injective function from the 2-sphere ($S^2$) to the torus ($T^2$). I saw a similar question posted here (Is there a continuous function from the torus to the sphere? or from sphere to the torus?) but I'm not yet acquainted with second homotopy groups. I suppose a contradiction can be reached somehow, but I'm not sure how to formulate it:
Suppose there exists such a continuous and injective function $f:S^2\rightarrow T^2$. $S^2$ is compact, so $f(S^2)\subset T^2$ must also be compact. $S^2$ is also simply connected while $\pi_1(T^2)$ is $\mathbb{Z}\times\mathbb{Z}$, which I believe may come into play. I don't know where the injective property comes in however. Any guidance or hints would be appreciated, thanks.
 A: Any continuous and injective function $f : S^2 \to T^2$ would, since $S^2$ has trivial $\pi_1$, lift to a continuous and injective function $\widetilde{f} : S^2 \to \mathbb{R}^2$ into the universal cover. Since $S^2$ is compact its image under $\widetilde{f}$ is compact, hence in particular closed. On the other hand $\widetilde{f}$ is injective, hence a local homeomorphism, which means it must have open image. In summary $\widetilde{f}(S^2)$ is clopen in $\mathbb{R}^2$, therefore is all of $\mathbb{R}^2$. But $\widetilde{f}$ has compact image, which is the desired contradiction.

As Arctic Char of course rightly emphasizes, the fact that $\widetilde{f}$ must be a local homeomorphism is "hard". This is an immediate consequence of the classical so-called "invariance of domain" theorem. I suppose given the traditional statement of invariance of domain we want to delete a pair of points $x_1$ and $x_2$ from $S^2$ and consider homoemorphisms $D^2 \to S^2 \setminus \{x_i\}$ with $D^2 \subset \mathbb{R}^2$ the disk. Then post-composing these homeomorphisms with $\widetilde{f}$ we get that the image of each $D^2$ is open in $\mathbb{R}^2$: the image of $\widetilde{f}$ itself is then just the union of these two open sets, so again open.
