In an oral exam I passed yesterday evening I was asked a question similar to the following: Does there exist an application $f:\mathbb{R}^2\to\mathbb{R}$ that is continuous and injective? I'd like to know how to render my solution perfectly rigorous as to why it is impossible.
The idea is to say since $f$ is continuous and $\mathbb{R}^2$ is simply connected, it follows that $f(\mathbb{R}^2)=(a,b)$ where $-\infty\leq a<b\leq+\infty$. by taking $\Omega=B_f((0,0),r)$ the closed ball of radius $r>0$ and centre $(0,0)$, $f(\Omega)=I\subset(a,b)$ where $I$ is an interval by continuity. The idea is now to consider two points $(A,B)\in(\mathbb{R}^2\backslash\Omega)^2$ and observe that there are two cases:
- Either $[A,B]\cap\Omega$ is empty, in which cases by continuity on the segment $[A,B]$, we have that $f(A)$ and $f(B)$ map to the same side of $I$ and cannot be inside of it by injectivity.
- Either the intersection is non-empty, in which case once again by continuity of $f$ on the segment $[A,B]$ we have that $I\subset[f(A),f(B)]$, ie $f(A)$ and $f(B)$ do not map to the same side of $I$.
It is this second case that interests us as, if we take a point $C\in\mathbb{R^2}$ far enough, well chosen such that the intersections $[A,C]\cap\Omega$ and $[C,B]\cap\Omega$ are empty, we have a contradiction, as by continuity on the one hand $A$ and $C$ must be mapped to the same side of $I$ and yet $C$ and $B$ must be mapped to the same side f $I$, which is impossible since $A$ and $B$ aren't mapped on the same side of $I$.
This proof is incredibly visual, and I would like some help in formalising the proof (which may actually be wrong! This solution is one I adapted from another problem that i actually got during my exam, which was validated by the examiner).
The question I was asked was Does there exist an application $f:\mathbb{R}^2\to\mathbb{R}$ that is simultaneously surjective, continuous such that $f^{-1}(\{0\})$ is compact?