# On Compact Space For Lower semi-continuous $\inf_{x\in X} f(x)$ is achieved

Let $(X,d)$ be a compact metric space and the function $f$ be a lower semi continuous. Prove that $\inf_{x\in X} f(x)$ is achieved, that is, there exists $x_0 \in X$, so that $f(x_0) \leq f(x)$ for all $x \in X$. Definition of Lower semi continuity: We say that a function $f: X \rightarrow \mathbb{R}$ is lower semi-continuous, if for all $x_0 \in X$, $\lim \inf_{x \rightarrow x_0} f(x) \geq f(x_0)$. \

My Attempt:: I assumed that $\inf_{x\in X} f(x)$ is not achieved and then there exist a sequence $x_n$ so that $f(x_n)< f(x_{n-1})-1$ by approximation property. Since $X$ is compact there exist a convergent subsequence $x_{n_k} \rightarrow x_0$ then there exist $N$ so that $f(x_N) < f(x_0)$ which is a contradiction to the hypothesis of lower semicontinuity.

My question is now how do i establish that a point $'x_0'$ exist so that $f(x_0) \leq f(x)$ for all $x \in X$.

I'm not sure about your question, since if you just showed that the assumption "$\inf_{x\in X}f(x)$ is not achieved'" leads to a contradiction, then you are done.
However I'm not sure about how you were able to find $(x_n)_n$ such that $f(x_n) < f(x_{n-1})-1$. What if the image of $f$ is something like $(0,1)$? I find it easier to avoid contradiction altogether for this problem.
By the definition of infimum, we can find a sequence $(x_n)_n$ in $X$ such that $f(x_n)\searrow\inf_{x\in X}f(x)$. Since $X$ is compact, we can find a subsequence $(x_{n_k})_k$ of $(x_n)_n$ and a point $x_0\in X$ such that $x_{n_k}\to x_0$. Then, by lower semi-continuity, we deduce $$f(x_0) \leq \liminf_{x\to x_0}f(x) \leq \lim_{n\to\infty} f(x_n)=\inf_{x\in X}f(x).$$ Therefore $f(x_0)=\inf_{x\in X}f(x)$.