Suppose we are in $\mathbb R^n$ and consider $$\min f(x) \qquad s.t. \qquad x\in P.$$ Under what conditions on $f$ and $P$, we can guarantee this problem obtains a solution?
The most generic situation that I know of is that when $f$ is lower-semicontinuous with a bounded sublevel (or coercive which implies a bounded sublevel set) and $P$ is closed, then the problem has a solution. Do we have other generic cases?
What other methods are often used to show the existence of a solution?
From my point of view, the proof of existence (almost) always follows the classical steps:
Consequently, $\hat x$ is a solution.
From this recipe, one can see, that one needs some way to get boundedness of $(x_k)$ to extract a convergent subsequence, closedness of $P$ to get $\hat x \in P$ and lower semicontinuity to get the final inequality.