There is some freedom in choosing how the constraints are written. For example, we could replace \(\phi _1\)  above with \(\phi _1 \equiv p_1 - p_2 + p_3 - p_4 = 0\) . However, we are not allowed to choose \(\phi _1 \equiv p_1^2 = 0\) . This is because the constraints must satisfy a regularity condition: the Jacobian matrix formed from the derivatives of the constraints with respect to the \(p\) 's and \(q\) 's must have maximal rank on the constraint subspace [1]}, [2]}. Roughly speaking, the constraints should have nonzero gradients.
