Precipitating Quasigeostrophic Equations and Potential Vorticity Inversion with Phase Changes