How to prove, that $f\left(\bigcap\limits_{n=1}^\infty K_n\right)=\bigcap\limits_{n=1}^\infty f(K_n)$? Let $f:\mathbb{R}\to\mathbb{R}$ be a continuous function and $\{K_n\}_{n=1}^\infty$ be a decreasing sequence of compact subsets of $\mathbb{R}$. Show that $f\left(\bigcap\limits_{n=1}^\infty K_n\right)=\bigcap\limits_{n=1}^\infty f(K_n)$


I have a problem with this specific task. I would be glad if someone can give a hint in order that I can solve it alone.

Thanks in advance.
If $z\in \bigcap K_n$ then $f(z)\in f(K_n)$ for all integers $n$, so $f(z)\in \bigcap f(K_n)$. 

The other inclusion requires more work: if $w\in f(K_n)$ for each integer $n$, there is a $z_n\in K_n$ such that $f(z_n)=w.$ Using compactness , we find a subsequence, which we still call $(z_n)$ for convenience, such that $z_n\to z\in K_1.$ But since $z_n\in K_n$, and the $K_n$ are decreasing, we must have, in fact,  $z\in \bigcap K_n:$ 

for if not, there is an integer $N$ such that $z\notin K_N$, which implies that $z\notin K_{n}$ if $n\ge N$. But then, because the $K_n$ are closed, there is a positive number $r$ such that $d(z,z_n)&gt;r,$ which is a contradiction since $z_n\to z$. 

So we have $f(z)\in f(\bigcap K_n).$ 

To finish, note that continuity now implies that $w=f(z_n)\to f(z)\in f(\bigcap K_n).$
Let $K = \bigcap_{n=1}^{\infty}K_n$. Since $f(K)\subset f(K_n)$ for all $n$ then $f(K)\subset \cap f(K_n)$. Now let $y\in f(K_n)$. Then $f^{-1}(\{y\})\cap K_n$ is non-empty and compact. Also for any $n$

$$f^{-1}(\{y\})\cap K_{n+1}\subset f^{-1}(\{y\})\cap K_n$$

we have the set

$$\bigcap_{k=1}^{\infty}\left(f^{-1}(\{y\}\cap K_n\right) = f^{-1}(\{y\})\cap K$$

is non-empty, so $y\in f(K)$.

Hope that helps, I may have messed up some details...