$\mathrm E [X \mid X=x] = x$? I've gotten so caught up in measure-theoretic probability that I'm actually having trouble showing this simple result.  Let $X$ be an integrable random variable.  Then
$$
\mathrm E[X \mid X=x] = \int_{\Omega} X(\omega)\, P^X(\mathrm d\omega \mid x) = \int_{X(\Omega)} x \, P_{X\mid X}(\mathrm dx | x) = ?
$$
The first equality is the definition of the conditional expectation of a random variable w.r.t. an event with zero probability, and so $P^X(\cdot \mid \cdot)$ is the regular conditional probability of $P$ given $X$.  I then tried to push forward this integral onto the range of $X$ using the conditional distribution of $X$ given $X$, $ P_{X\mid X}(\cdot | \cdot)$, but it's not clear to me either of these integrals equals $x$.
I'm clearly missing something pretty obvious and would appreciate an extra eye!
 A: Edit: this is for a previous version of the question with no independence assumptions. 
Start from definitions. You are trying to find $E[X|\sigma(X)]$. This by definition must satisfy $\int_A E[X|\sigma(X)]dP = \int_A XdP$ for all $A\in\sigma(X)$, and be $\sigma(X)$ measurable. Try $E[X|\sigma(X)]=X$ and verify it satisfies all definitions. Since $X(\omega)=x$ is equivalent to $X^{-1}(x)\in\sigma(P)$, it follows that $E[X|X=x]=x$.
A: Recall that $\{X=x\}$ is shorthand for $$X^{-1}(\{x\}) = \{\omega\in\Omega : X(\omega) = x\}.$$ If $A$ is an event, recall the usual definition of conditional probability
$$\mathbb P(A\mid X=x) = \frac{\mathbb P\left(A\cap\{X=x\}\right)}{\mathbb P(X=x)}, $$
provided that $\mathbb P(X=x)>0$. Similarly, we define
$$\mathbb E[Y\mid X=x] = \frac{\mathbb E\left[Y1_{\{X=x\}}\right]}{\mathbb P(X=x)}. $$
In the case where $Y=X$, we have
\begin{align}
\mathbb E[X\mid X=x] &= \frac{\mathbb E\left[X1_{\{X=x\}}\right]}{\mathbb P(X=x)}\\
&=\frac{x\mathbb P(X=x)}{\mathbb P(X=x)}\\
&=x,
\end{align}
as
\begin{align}
\mathbb E\left[X1_{\{X=x\}}\right] &= \int_{\Omega} X1_{\{X=x\}}\mathsf d\mathbb P\\
&= \int_{\{X=x\}} X\mathsf d\mathbb P\\
&= x\mathbb P(X=x).
\end{align}
A: Assuming that it exists at all, any such conditional density function of $X$ given $X=x$ must clearly be zero everywhere but at that point, and the integral of this function over the entire support of $X$ must be $1$ (per definition of density function).
This is, of course, not a well-behaved function, but it is the very definition of a generalised function known as the Dirac delta function, $\delta(s-x)$.
If is a property of this function that: $\int_\Bbb R g(s)\;\delta(s-x)\operatorname d s = g(x)$ .
So we have:
$$\begin{align}
\mathsf E(X\mid X=x) & = \int_{X(\Omega)} s\;{\mathsf P}_{X}(\operatorname d s\mid X=x)
\\ &= \int_{X(\Omega)} s\, \delta(s-x) \operatorname d s
\\ & = x
\end{align}$$

Note: To avoid confusion, the token for the bound variable of integration should not be that of the constant $x$.   So I have used $s$.
