Let $M$ be a topological space, $K\subset M$ compact, $f\colon M\to\mathbb{R}\cup\left\{+\infty\right\}$ lower semi-continious. Show that $f$ takes its minimum on $K$.
Good day,
we defined lower semi-continuity as follows: $f$ is lower semi-continious on $M$ if for any $x\in M$ and any $\alpha < f(x)$ there is a neighbourhood $U\subset M$ of $x$ such that $\alpha<f(y)$ for all $y\in U$.
So my idea is the following.
$f$ is lower semi-continious on $K$. Take any $x\in K$ and $\alpha < f(x)$, then there is a neighbourhood $U_x\subset M$ of $x$ such that $\alpha < f(y)~\forall y\in U$.
So it is $$ K\subset\bigcup_{x\in K}U_x. $$ Because of the compactness of $K$ there is a finite index set $I$ such that $$ K\subset\bigcup_{i\in I}U_{x_i}. $$ It is $f(y)>\alpha~\forall y\in U_{x_i}, i\in I$.
So for all $\alpha <\infty$ it is $f(x)>\alpha$ for all $x\in K$.
This means that it is $\inf_{x\in K}f(x)=-\infty$.
But do not know what to do with this result, is it helpful at all??