Let a $(\Omega,\mathcal{F},\mathbb{P})$ be a probability space with sub-sigma algebra $\mathcal{G}$. I know that the conditional expectation $\mathbb{E}[X\mid \mathcal{G}]$ is defined as the unique r.v. $Y$ such that $Y$ is integrable, $\mathcal{G}$-measurable and for all $G\in\mathcal{G}$ we have,
$$\int_GXdP=\int_GYdP $$
But how is $\mathbb{P}(X=x\mid \mathcal{G})$ defined? Is this just $\mathbb{E}[1_{X=x}\mid \mathcal{G}]$?