Let $P$ be the problem \begin{alignat}{2} &\text{min} \ \ && f(\mathbf{x})\\ &s.t && g(x) \leq 0\\ & &&x\in X \end{alignat} for convex functions $f$ and $g$ over $\mathbb{R}^n$ and $X\subseteq\mathbb{R}^n$ is a convex set. Then if $\mathbf{x}^*$ is an optimal solution to $P$ with $g(x)<0$, then $\mathbf{x}^*$ is also an optimal solution to the problem $Q$: \begin{alignat}{2} &\text{min} \ \ && f(\mathbf{x})\\ & &&x\in X. \end{alignat}
I'm having trouble seeing how exactly $x^*$ would be an optimal solution to $Q$. Is there a way to exploit $g$ and its convexity to show this?
Thanks