# A general result on the continuous real functions

Let $f\in C^0(\mathbb R^n,\mathbb R)$, with $n>1$ integer, and $f(\mathbb R^n)=\mathbb R$.

Is it true that the cardinality of $f^{-1}(\{c\})$ must be the same as the cardinality of $\mathbb R$ (the continuum) for any $c\in\mathbb R$?

Source : les dattes à Dattier

• Of course not. What if $f\equiv 1$ and $c=0?$ And what is Q6 supposed to mean? – zhw. Jan 23 '17 at 18:06
• If that inverse set has 2 or more points in it, then yes, same card. – coffeemath Jan 23 '17 at 18:07
• sorry, I have change the hypothesis. – Dattier Jan 23 '17 at 18:07
• I guess you mean $f(\mathbb R^n)=\mathbb R$, not $f(\mathbb R)=\mathbb R$ ? – MPW Jan 23 '17 at 18:08
• To give the source in this form is a bit strange. I don't mind enough to do something about it, but it's strange and you likely decrease the reception you get. – quid Feb 28 '18 at 0:05

Let's take two points $z_1$, $z_2\in\mathbb R^n$ such that $f(z_1)<c$, $f(z_2)>c$ (they exist because $f$ is surjective). Denote $L\subset\mathbb R$ a hyperplane for which $z_1$ and $z_2$ are laying on the different sides. Then for any point $x\in L$ consider the set consisting of two straight line segments $Z_x=[z_1,x]\cup[x,z_2]$. This set is connected, so there exists a point $z_x\in Z_x$ for which $f(z_x)=c$. Since for all the $Z_x$ their pairwise intersection is $\{z_1,z_2\}$, we can conclude that there's a continuum set of points where $f(x)=c$.
• Nice, +1. Note that the $Z_x$ are not pairwise disjoint, but the $(z_1,x]\cup [x,z_2)$ are. – zhw. Jan 23 '17 at 18:29
Let $E = f^{-1}(\{c\}).$ Because $f$ is continuous, $E$ is closed. Also, $f^{-1}((c,\infty)),f^{-1}((-\infty,c))$ are disjoint, nonempty, and open. Thus $\mathbb R^n \setminus E$ is not connected. But as is well known, if $E$ is countable, then $\mathbb R^n \setminus E$ is connected (actually path connected); here we use the fact that $n>1.$ It follows that $E$ is uncountable. So then $E$ is closed and uncountable, and I think this implies the cardinality of $E$ is that of $\mathbb R.$ But I'm not sure how to get this last bit yet.