How can I prove $f_M(x) = \min(f(x),M)$ is lower semi-continuous? My question is:
Suppose that $f:X\rightarrow \mathbb{R}$ is lower semicontinuous and M is a real number. Define $f_M:X\rightarrow\mathbb{R}$ by 
$$ f_M(x) = \min(f(x),M). $$
Prove that $f_M$ is lower semicontinuous.
The definition that I am using is:
A function $f$ is lower semi continuous on X if for all $x\in$X and every sequence $x_n\rightarrow x$, we have
$$\lim_{n\rightarrow\infty} \inf f(x_n) \geq f(x).$$ 
Thank you in advance for any help!
 A: A real-valued function is lower semicontinuous if the inverse image of every set of the form $(-\infty,a]$ is closed (this is actually the definition in many real analysis textbooks, in some others an equivalence). Note that if $a>M$ then $f_M^{-1}((-\infty,a])=X$ which is trivially closed. In the other case, if $a<M$ then $f_M^{-1}((-\infty,a])=f^{-1}((-\infty,a])$ which is closed since you are assuming the lower semicontinuity of $f$. Therefore $f_M$ is lower semicontinuous.

With your definition: let $x$ be any element in $X$   and $\{ x_n \}_{n=1}^\infty$ a sequence converging to $x$. Note first that $f(y) \geq f_M(y)$ for every $y\in X$. Now, since $f$ is LSC we have
  $$ \liminf_{n\to\infty} f(x_n)  \geq f(x) \geq f_M(x)  \tag{1} $$
  and since we also know that $f_M(x)\leq M$ we have
  $$f_M(x)  \leq  \min\{M,\liminf_{n\to\infty} f(x_n) \} \leq  \liminf_{n\to\infty} ( \min\{M,f(x_n)\} ) = \liminf_{n\to\infty} f_M(x_n) \tag{2} $$
  and since this holds for every $x\in X$ we can conclude that $f_M$ is LSC. 

Try to justify (2) using the definition of $\liminf$.
$$ \liminf_{n\to\infty} f(x_n) = \inf_{n\geq 0} \sup_{k\geq n}f(x_n)  $$.
