The tower law states: $$\mathbb{E}(X)=\mathbb{E}[\mathbb{E}(X|Y)]$$
But, from my understanding, we have the following:
Suppose we let $Z:=X|Y$ and $a,b\in\mathbb{R}$. Then:
$\mathbb{E}(X)=a$ is the expectation of a random variable, so it is a number
$\mathbb{E}(X|Y)=\mathbb{E}(Z)=b$ is also the expectation of a random variable, so it is a number
$\mathbb{E}[\mathbb{E}(X|Y)]=\mathbb{E}[\mathbb{E}(Z)]=\mathbb{E}(b)=b$ is the expectation of a number, so it is equal to that number itself
But, by this argument, the tower law doesn't hold
I'm guessing my understanding of $\mathbb{E}(X|Y)$ is wrong, but I don't know why. Please explain
$W := E[X \mid Y]$ is a random variable that depends on $Y$. Then $E[E[X \mid Y]]] = E[W]$. The notation $Z := X \mid Y$ unfortunately does not make sense.