$$\begin{equation*} \begin{array}{ll} \text{minimize} & (1/2) x^T P x + q^T x + r + g(x) \\ \text{subject to} & Ax = b \end{array} \end{equation*}$$ ...