On page 82 in Mostly Harmless Econometrics, there is a formula for the average treatment effect on the treatment, using propensity score, that is $$\tag{1} E(Y_{1i} - Y_{0i}\vert D_i =1) = E\bigg[\frac{(D_i - \rho(X_i))Y_i}{(1-\rho(X_i))P(D_i=1)}\bigg] $$ where $\rho(X_i) = prob(D_i=1\vert X_i) =E(D_i\vert X_i)$ is the propensity score. $D_i$ is a dummy variable for the treatment, $P(D_i=1)$ is the probability that $D_i=1$, and $X_i$ are covariates. Also, we have conditional independence assumption that $\{Y_{1i}, Y_{01}\}\perp D_i\vert X_i$
My question is how to prove (1). Preferably, I am looking for something that uses the Law of iterated expectations, as that is how Angrist and Pischke show the similar formula for the ATE.
Going by what the did for the ATE, and the fact that they say it is similar to show for the ATT, I believe I need to have start with showing something like $$ E[\text{something}] = E[Y_{1i}\vert D_i=1] $$ by using the law of iterations on the left-hand side. However, I don't know what to do for the "something".
I thought maybe I would just use what they used, where "something" is $\frac{Y_iD_i}{\rho(X_i)}$, but in order to get the expectation on the right conditional on $D_i$, I need to condition the left hand side on $D_i$ as well, and when I do that I don't get the propensity score in the denominator to cancel anymore, so I get confused.
Edit: Incase it is of any use, here is the formula for the ATE: $$ E(Y_{1i} - Y_{0i}) = E\bigg[\frac{(D_i - \rho(X_i))Y_i}{(1-\rho(X_i))\rho(X_i)}\bigg] $$ which is derived from $E[\frac{Y_iD_i}{\rho(X_i)}] = E[Y_{1i}]$ and $[\frac{Y_i(1-D_i)}{(1-\rho(X_i)}] = E[Y_{0i}]$ which can be shown using Law of Iterated Expections and conditional independence assumption.
The only difference between the two formulas is one has the propensity score in the denominator and the other has $prob(D_i=1)$