My text has the following definition of expectation:
$$\mathbb{E}(X) = \int x dF(x) = \begin{cases} \sum_x xf(x) & \text{ if X is discrete } \\ \int xf(x)dx & \text{ if X is continuous } \end{cases} $$
And conditional expectation:
$$\mathbb{E}(X \mid Y=y) = \begin{cases} \sum xf_{X \mid Y}(x \mid y)dx & \text{ discrete case } \\ \int xf_{X \mid Y}(x \mid y)dx & \text{ continuous case } \end{cases}$$
Then it tries to show that $\mathbb{E}(\mathbb{E}(Y \mid X)) = \mathbb{E}(Y)$ with this proof, saying that "We'll prove the first equation. Using the definition of conditional expectation and the fact that $f_{X,Y}(x,y) = f_{Y \mid X}(y \mid x)f_X(x)$.":
$$1.\ \mathbb{E}(\mathbb{E}(Y \mid X)) = \int \mathbb{E}(Y \mid X = x)f_X(x)dx$$
$$2.\ \mathbb{E}(\mathbb{E}(Y \mid X)) = \int\int yf(y\mid x)dyf(x)dx$$
$$3.\ \mathbb{E}(\mathbb{E}(Y \mid X)) = \int\int yf(y\mid x)f(x)dxdy$$
$$3.\ \mathbb{E}(\mathbb{E}(Y \mid X)) = \int\int yf(x,y)dxdy$$
I don't understand step #1. I do understand the idea that $\mathbb{E}(X \mid Y = y)$ is a particular value while $\mathbb{E}(X \mid Y)$ is a random variable that takes on those values. But here's how I imagine doing the proof:
Let $Z = \mathbb{E}(Y \mid X)$. Then:
$$\mathbb{E}(\mathbb{E}(Y \mid X)) = \mathbb{E}(Z) = \int zf_z(z)$$
But then you're stuck getting from here to step 1. I can hand wave a little bit and say that since $\mathbb{E}(Y \mid X)$ takes on specific values $\mathbb{E}(Y \mid X = x)$, and the definition of expectation is having you integrate over all the possible values for your variable that $z = \mathbb{E}(Y \mid X = x)$. Then we have:
$$\int zf_z(z) = \int \mathbb{E}(Y \mid X = x) f_Z(z)dz$$
But then we somehow still need to justify substituting in $f_X(x)dx$ for $f_Z(z)dz$, and I don't feel totally comfortable that either of these moves is allowed.