Use the state-price density as a positive local martingale deflator, so each component of is a local martingale. The Itô product rule and the wealth equation give
The consumption term has finite variation, and the quadratic covariation of a stochastic integral satisfies . Also . Regrouping the terms therefore gives
The differential before is necessary: the first term is a stochastic gain, not the level of the deflated portfolio. It is missing in the printed display. This is the deflated wealth equation with consumption.