# Complete metric space and continuous function

Let $X$ be a complete metric space and $A_1\supseteq A_2\supseteq\cdots$ be a sequence of closed sets in $X$ with diam of $A_n$ converging to $0$. Let $f:X\rightarrow X$ be a continuous function.

Question is to show that $f\left(\bigcap A_n\right)=\bigcap f(A_n)$..

By diameter of $A_n$ we mean $\sup\{d(x,y):x,y\in A_n\}$...

Clearly, we have $f\left(\bigcap A_n\right)\subseteq\bigcap f(A_n)$..

Let $a\in f(A_n)$ for all $n\in A_n$ i.e., given $n$ there exists $x_n\in A_n$ such that $a=f(x_n)$ for all $n$...

Given $\epsilon>0$ there exists $N\in \mathbb{N}$ such that diam$(A_n)<\epsilon$ for all $n\geq N$

Let $m,n\geq N$ then $x_m,x_n\in A_N$ so $d(x_n,x_m)<\epsilon$.. Thus $(x_n)$ is a cauchy sequence..

As $X$ is complete there exists $x\in X$ such that $x_n\rightarrow x$..

As we are in metric space, $f(x_n)\rightarrow f(x)$.. As $f(x_n)=a$ for all $a$ we have $a=f(x)$..

Now, enough to prove that $x\in \bigcap A_n$...

I strongly belive this is true.. But could not come with a proof immediatley..

Help me to justify this and let me know if there are any gaps in between..

We observe that, every $A_n$ is closed. Moreover, since the sequence $\{x_m\}_{m\geq n}\subset A_n$ for every $n\in\mathbb{N}$ and $x_m\to x$, by closedness of $A_n$ we have that $x\in A_n$ for every $n\in\mathbb{N}$, hence $x\in \bigcap A_n$.