  Let $f,g_1,\dots,g_m$ be polynomials with real coefficients in a vector of
variables $x=(x_1,\dots,x_n)$. Denote by $\text{diag}(g)$ the diagonal matrix
with coefficients $g=(g_1,\dots,g_m)$ and denote by $\nabla g$ the Jacobian of
$g$. Let $C$ be the set of critical points defined by \begin{equation}
  C=\{x\in\mathbb R^n\,:\,\text{rank}(\varphi(x))<
m\}\quad\text{with}\quad\varphi:=\begin{bmatrix} \nabla g\\ \text{diag}(g)
\end{bmatrix}\,. \end{equation} Assume that the image of $C$ under $f$, denoted
by $f(C)$, is empty or finite. (Our assumption holds generically since $C$ is
empty in a Zariski open set in the space of the coefficients of $g_1,\dots,g_m$
with given degrees.) We provide a sequence of values, returned by semidefinite
programs, finitely converges to the minimal value attained by $f$ over the
basic semi-algebraic set $S$ defined by \begin{equation}
  S:=\{x\in\mathbb R^n\,:\,g_j(x)\ge 0\,,\,j=1,\dots,m\}\,. \end{equation}
Consequently, we can compute exactly the minimal value of any polynomial with
real coefficients in $x$ over one of the following sets: the unit ball, the
unit hypercube and the unit simplex. Under a slightly more general assumption,
we extend this result to the minimization of any polynomial over a basic convex
semi-algebraic set that has non-empty interior and is defined by the
inequalities of concave polynomials.
