Consider a randomized experiment (AB test), where $n$ units are randomized into the treatment group $T_i=1$ and control group $T_i=0$. Let $M_i\in P$ denote the observed value of a continuous variable that is realized after the exposure to the treatment where $P$ is the support of $M_i$. $D_i$ is a binary variable. $F$ represents the distribution function. Can we re-write the expression:
$x=\int \{\mathbb{E}(Y_i|T_i=1, M_i=m, D_i=1) - \mathbb{E}(Y_i|T_i=0, M_i=m, D_i=1)\}\mathrm{d} F_{M_i|D_i=1}(m),$
into
$ x = \mathbb{E}(Y_i|T_i=1, D_i=1) - \mathbb{E}(Y_i|T_i=0, D_i=1)$
by using the (general) law of iterated expectations?