*Lior Bary-Soroker*on Mathoverflow. $\newcommand{\bR}{\mathbb{R}}$ $\newcommand{\pa}{\partial}$

Suppose that $f:\bR^n\to \bR$ is a polynomial. For any $\vec{a}\in\bR^n$ we define

$$f_{\vec{a}}:\bR^n\to \bR,\;\; f_{\vec{a}}(\vec{x})=f(\vec{x})-\vec{a}\cdot\vec{x}. $$

We want to prove that for generic $\vec{a}$ the function $f_{\vec{a}}$ is an excellent Morse function, i.e., all critical points are nondegenerate, and no two of them are on the same level set of $f_{\vec{a}}$. We set

$$C(\vec{a})=\lbrace \vec{x}\in\bR^n;\;\;df_{\vec{a}}(\vec{x})=0\;\rbrace=\lbrace\;\vec{x}\in\bR^n;\;\;df(\vec{x})=\vec{a}\;\rbrace. $$

We say that a set $S\subset\bR^n$ is

*generic*(in semialgebraic sense) if its complement is a semialgebraic set of dimension $<n$. Sard's theorem implies that for generic $\vec{a}$ the critical set $C(\vec{a})$ is discrete. Being semialgebraic this implies that it is also finite.

Define $\newcommand{\eZ}{\mathscr{Z}}$

$$\eZ:=\bigl\lbrace\; (\vec{x},\vec{a})\in\bR^n\times\bR^n;\;\;df(\vec{x})=\vec{a}\;\bigr\rbrace. $$

The set $\eZ$ is semialgebraic. We denote by $\pi:\eZ\to\bR^n$ the projection

$$\eZ\ni (\vec{x},\vec{a})\to \vec{a}\in \bR^n. $$

For any $S\subset \bR^n$ we set $\eZ(S):=\pi^{-1}(S)$. There exists a generic set $G\subset \bR^n$ such that for any connected component $A$ of $G$ the induced map $\pi:\eZ(A)\to A$ is a twice differentiable covering. Thus there exists a positive integer $m=m(A)$ and twice differentiable maps

$$ \vec{u}_1,\dotsc,\vec{u}_m:A\to \bR^n $$

such that

$$\vec{u}_i(\vec{a})\neq\vec{u}_j(\vec{a}), \;\;\forall i\neq j, \;\;\vec{a}\in A, \tag{1}$$

and the set $\eZ(A)$ is the union of the graphs of the maps $\vec{u}_i$. In other words, for any $\vec{a}\in A$ we have

$$C(\vec{a})=\lbrace\; \vec{u}_1(\vec{a}),\dotsc,\vec{u}_m(\vec{a})\;\rbrace. $$

We claim that $f_{\vec{a}}$ is excellent for generic $\vec{a}\in A$. We argue by contradiction. Suppose that this is not the case. Then there exists a nonempty, connected open subset $A_*\subset A$ and indices $i\neq j$ such that

$$ f( \vec{u}_i(\vec{a}) -f(\vec{u}_j(\vec{a}))=\vec{a}\cdot\bigl(\vec{u}_i(\vec{a})-\vec{u}_j(\vec{a})\;\bigr),\;\;\forall \vec{a}\in A_*. \tag{2}$$

We denote by $\pa_k f$ the $k$-th partial derivative of $f$ and we write

$$\vec{a}= (a^1,\dotsc, a^n),\;\;\vec{u}_i=(u_i^1,\dotsc, u_i^n). $$

Note that

$$ \pa_kf(\vec{u}_i(\vec{a}))=a^k=\pa_kf(\vec{u}_j(\vec{a})),\;\;\forall k=1,\dotsc, n.\tag{3}$$

Derivating (2) with respect to the variable $a^\ell$ using the equality (3) we deduce

$$\sum_k a^k\pa_{a^\ell}\bigl(u_i^k-u_j^k\bigr)= u^\ell_i(\vec{a})-u^\ell_j(\vec{a}) +\sum_k a^k\pa_{a^\ell}\bigl(u_i^k-u_j^k),\;\;\vec{a}\in A_*. $$

We deduce that

$$ u^\ell_i(\vec{a})=u^\ell_j(\vec{a}),\;\;\forall\ell=1,\dotsc, n,\;\forall\vec{a}\in A_*. $$

This contradicts (1).