Given $X$ and $Y$ are discrete real random variables with values in $\Omega_X = \{x_1, x_2, ...\}$ and $\Omega_Y=\{y_1, y_2, ...\}$, respectively, and suppose that $\mathbf{E}[|X|] < \infty$. and let $\mathbf{1}$ be the indicator function.
Show that $\mathbf{E}[X\mid Y]=\sum_{l=1}^{\infty}\sum_{k=1}^{\infty}x_k\mathbf{P}[X=x_k\mid Y=y_l]\mathbf{1}_{{Y=y_l}}$ almost surely.
I tried using the formula $\mathbf{E}[X\mid G]=\sum_{i=1}^N\frac{\mathbf{E}[X\mathbf{1}_{A_i}]}{\mathbf{P}[A_i]}\mathbf{1}_{A_i}$ for $A_i$, where $i=1,2, ..., N$, being pairwise disjoint events that partitions all possible outcomes and $G$ being the $\sigma$-algebra generated by the set of $A_i$. How can I use this to show the equation above?
$X_1=X_1(\omega)=E(X|Y)$ is a random variable; just check that the equality holds for every $\omega\in\Omega$. Hint: $Y(\omega)$ equals some $y_l$.