Why lower semicontinuity? I'm reading a proof on the existence of a solution to a minimisation problem, but I'm stuck. I give a brief summary of the arguments up to the point at which I'm stuck(at the yellow box).
Information:
The feasible set $X$ is sequentially compact with respect to weak$^\star$ convergence, and the objective function $f: X \longrightarrow \mathbb{R}$ is nonnegative.
The arguments:
We consider the set
\begin{align}
W = \{ f(x): x \in X \}.
\end{align}
Now, since $f$ is nonnegative, $W$ is bounded from below and therefore has an infimum. Write $\kappa = \inf W$. Then, by the definition of the infimum there is a sequence $(f(x_n))_n \subset W$ such that 
\begin{align}
f(x_n) \rightarrow \kappa.
\end{align}
By sequential compactness we can find a convergent subsequence $(x_{n_k})_k$ of $(x_n)_n$, such that
\begin{align}
x_{n_k}\overset{w^\star}{\rightarrow}x^\star
\end{align}
for some $x \in X$. Clearly, we also have that
\begin{align}
f(x_{n_k}) \rightarrow \kappa.
\end{align}

Hence, the proof is completed by showing that the functional $f$ is lower semicontinuous, that is, if $(x_n)_n$ is convergent with weak$^\star$ limit $x$, then 
  \begin{align}
\lim\inf\limits_{n \rightarrow \infty} f(x_n) \geq f(x).
\end{align}

My problem:
I don't see why the argument if the yellow box works. I guess I am confused about what is meant by existence here. I thought that existence of a solution was defined as follows: There is an $x^\star \in X$ such that
\begin{align}
\inf_{x \in X}f(x) = f(x^\star).
\end{align}
I do not see how the lower semicontinuity of $f$ implies this.
More information:


*

*$X$ is convex.

 A: The point of lower semicontinuity (or something like it) is that were it to fail, there's no guarantee that $f(x^\ast)$ has the right value.
For example think about what goes wrong in the following: consider $X=[-2,2]$ and the function $f$ which takes $x$ to $-x$ for $x<0$ and takes $x$ to $x+1$ to $x\geq 0$. Take a minimizing sequence $x_n\in[-2,2]$ which of course will converge to $x^\ast=0.$ But $f(0)=1$.
The problem is that on a completely a priori level, having only some information about $X$ and some weak information about $f$ such as nonnegativity, there's no connection between doing something entirely within $X$ (such as taking a weak limit) and doing something with the corresponding values of $f$. (This is the problem above.)
But the assumption of lower semicontinuity is enough to establish a link. Taking only sequentially compact $X$ and nonnegative $f$, as you said we have a minimizing sequence $x_n$ with a weak limit $x^\ast$. And then there's nothing to say about $f(x^\ast)$ except that it's nonnegative. But now assuming semicontinuity, there is $f(x^\ast)\leq\liminf f(x_n)$. But $x_n$ was defined in such a way that $\liminf f(x_n)$ is the minimal possible value that $f$ takes on $X$. And the lower semicontinuity says $f(x^\ast)$ is less than or equal to that value! So $f(x^\ast)$ has to be exactly that value.
