Does $E(X|X\in A)=\frac{E(X\mathbf{1}(X\in A))}{Pr(X\in A)}$ hold? Does $E(X|X\in A)=\frac{E(X\mathbf{1}(X\in A))}{Pr(X\in A)}$ hold? (Here $\mathbf{1}(\cdot)$ is the indicator function). To me it seems that it holds. Here is the proof:
$E(X|X\in A)=\int_{-\infty}^{\infty}xf(x|x\in A)dx=\int_{-\infty}^{\infty}x\frac{f(x,x\in A)}{Pr(X\in A)}dx=\int_{-\infty}^{\infty}x\frac{f(x)\mathbf{1}(x\in A)}{Pr(X\in A)}dx=\frac{E(X\mathbf{1}(X\in A))}{Pr(X\in A)}$ .
Does this proof look correct?

For a proof without using integrals but using the Law of Iterated Expectations :
Let $\mathbf{1}_{A}$ denote $\mathbf{1}_{X \in A}$. Then
$$E[X \mathbf{1}_{A}]=E[E(X \mathbf{1}_{A} | \mathbf{1}_{A} )]=E[\mathbf{1}_{A}E(X|\mathbf{1}_{A})]=Pr(\mathbf{1}_{A}=1)E[X|X \in A]+Pr(\mathbf{1}_{A}=0)(0\times E[X | X \notin A])=Pr(\mathbf{1}_{A}=1)E[X|X \in A]$$
The result follows (divide both sides by $Pr(\mathbf{1}_{A}=1)$)
