Hey. There is a seemingly "tricky" problem in Rudin's PMA. Ex. is 4.19:
Suppose $f$ is a real function with domain $R^1$ which has the intermediate value property. Suppose also, for every rational $r$, that the set of all $x$ with $f(x) = r$ is closed. Prove that $f$ is continuous. Hint: If $x_n\to x_0$ but $f(x_n) > r > f(x_0)$ for some $r$ and all $n$, then $f(t_n) = r$ for some $t_n$ between $x_0$ and $x_n$; thus $t_n \to x_0$. Find a contradiction.
For me it seems that it is immediate answer, since $t_n$ proves that $x_0$ is a limit point and $f(x_0)=r$, contradiction. I must be missi…