  Consider the problem of minimizing a lower semi-continuous semi-algebraic
function $f \colon \mathbb{R}^n \to \mathbb{R} \cup \{+\infty\}$ on an
unbounded closed semi-algebraic set $S \subset \mathbb{R}^n.$ Employing
adequate tools of semi-algebraic geometry, we first establish some properties
of the tangency variety of the restriction of $f$ on $S.$ Then we derive
verifiable necessary and sufficient conditions for the existence of optimal
solutions of the problem as well as the boundedness from below and coercivity
of the restriction of $f$ on $S.$ We also present a computable formula for the
optimal value of the problem.
