Suppose $P: \mathbb{R}^n \rightarrow \mathbb{R}_{\ge 0} $ is a differentiable map, with $P(x) = 0 \ \forall x \in \mathcal{X}$ and $P(x) > 0 \ \forall x \in \mathcal{X}^c$. Further, suppose $P$ has no stationary points in $\mathcal{X}^c$, i.e. $\nabla P(x) \not= 0 \ \forall x \in \mathcal{X}^c$$\nabla P(x) \ne 0 \ \forall x \in \mathcal{X}^c$.
My intuition is that $P$ eventually has a descent direction when we approach $\partial \mathcal{X}$ from $\mathcal{X}^c$. I need to make this more precise! For example, can we show that
$$ \forall x \in \partial \mathcal{X} ~ \exists \varepsilon >0 : \forall y \in \mathcal{X}^c ~ ||x-y||<\varepsilon \Rightarrow \nabla P(y)^T(x-y)<0 ?$$$$ \forall x \in \partial \mathcal{X} ~ \exists \varepsilon >0 : \forall y \in \mathcal{X}^c ~ \lVert x-y\rVert<\varepsilon \Rightarrow \nabla P(y)^T(x-y)<0 ?$$
Here is what I thought of: For $x\in \partial \mathcal{X}$ and $y \in \mathcal{X}^c$ Taylor tells us that $$0 = P(y) + \nabla_xP(y)^\top(x-y) + o(||x-y||). $$$$0 = P(y) + \nabla_xP(y)^\top(x-y) + o(\lVert x-y\rVert). $$ So this is almost what I need. However, I don't see that I can conclude here using $P(y) > 0$ that $$ \nabla_xP(y)^\top(x-y) < 0 $$ for $y$ close to $x$. Because, although $0 \approx P(y) + \nabla_xP(y)^\top(x-y)$, we also have that $P$ and all differentials decay to zero as we approach the boundary. I also thought about the MVT, but this doesn't seamseem to help since I need to keep my $y$ (as above) flexible.
It would be helpful if someone could point out whether this is obvious or whether I need additional assumptions. Thank You! You may assume $\mathcal{X}$ to be compact.