If I understand correctly (which I clearly don't) the condition of stable equilibrium of a closed system at constant $(P,T)$ is that $G$ is minimum.
That implies that $dG=0$ and $d^2G≥0$. Since $dG=VdP-SdT$, if the second differential is positive then $\left(\frac{\partial V}{\partial P}\right)_T≥0$, which is false. What am I doing wrong?
EDIT: I would like the answer to be as mathematically rigorous as possible, and with no hand-waving about differentials. I would also appreciate if you could tell me a textbook/article where stability is discussed with some level of rigour.