In Risk and Portfolio Analysis (Hult et al, 2014) chapter 3.1 conditional expectation is defined as follows:
Consider a random vector $Z$ and a random variable $L$ with $\mathbb{E}[L^2] < \infty$. The conditional expectation of $L$ given $Z$, written $\mathbb{E}[L \mid Z]$, is the random variable $g(Z)$ with $g: \mathbb{R}^n \to \mathbb{R}$ such that $\mathbb{E}[g(Z)^2] < \infty$ satifying $$ \mathbb{E}[h(Z)g(Z)] = \mathbb{E}[h(Z)L] $$ for all $h: \mathbb{R}^n \to \mathbb{R}$ such that $\mathbb{E}[h(Z)^2] < \infty$.
I am having a hard time reconciling this definition with the abstract version (as stated for instance on wikipedia):
Let $(\Omega, \mathcal{F}, \mathbb{P})$ be a probability space and $\mathcal{G} \subseteq \mathcal{F}$ be a sub-$\sigma$-algebra. If $X: \Omega \to \mathbb{R}$ is a random variable then the conditional expectation of $X$ given $Y$ is a $\mathcal{G}$-measurable function $Y$ such that for all $G\in \mathcal{G}$ \begin{align*} \int_G Y d\mathbb{P} = \int_G X d\mathbb{P}. \end{align*} We write $Y$ as $\mathbb{E}[X \mid \mathcal{ G}]$. If we let $\chi$ denote the characteristic function we can also write $$ \mathbb{E}[\chi_G\mathbb{E}[ X \mid \mathcal{G}]] = \mathbb{E}[\chi_G X].$$
I would like to know how you can establish the equivalence (if it is an equivlance at all) between the two definitions? I'm thinking that there should be a way to go from the second to the first.
Thanks in advance!