Question about conditional expectation on finite space Suppose $X_i$'s are Bernoulli random variables with success probability $p_i$ and $f$ is a function of $X_1,...,X_n$. Is that true $E[f\mid X_1,\dots,X_n]=\mathbf{1}_{\{X_n=1\}}E[f\mid X_1,\dots,X_n=1]+\mathbf{1}_{\{X_n=0\}}E[f\mid X_0,\dots,X_n=0]$ and 
$E[f\mid X_1,\dots,X_{n-1}]=p_i E[f\mid X_1,\dots,X_n=1]+(1-p_i)E[f\mid X_1,\dots, X_n=0]$? 
I think both are correct but not sure how to check the requirement that if $Y=E[X\mid\mathcal{F}]$, then $\int_AYdP=\int_A XdP$ for all $A\in \mathcal{F}$.
Revision: we assume $X_1,\dots,X_n$ are independent.
Yees, if you mix the notation for expectation conditioned by a random variable with the notation for expectation conditioned by an event, which are confusingly too similar in appearance.

Otherwise, for a sequence of Bernoulli random variables, then indeed:

$$\bbox[1ex,lemonchiffon]{\mathsf E(f\mid X_1,\ldots,X_n)~{=~ {\mathbf 1_{X_n=1}\mathsf E(f\mid X_1,\ldots,X_{n-1},\mathbf 1_{X_n=1}) }+{ \mathbf 1_{X_n=0}\mathsf E(f\mid X_1,\ldots,X_{n-1},\mathbf 1_{X_n=0}) } } }$$

And since $\mathsf E(f\mid X_1,\ldots, X_{n-1})=\mathsf E(\mathsf E(f\mid X_1,\ldots,X_n)\mid X_1,\ldots, X_{n-1})$ and also $\mathsf E(\mathbf 1_{X_n=1}\mid X_1,\ldots,X_{n-1})\overset{(1)}=\mathsf E(\mathbf 1_{X_n=1})\overset{(2)}=p_i$ (only if (1) mutually independent and (2) identically distributed) then too: 

$$\bbox[1ex,lemonchiffon]{\mathsf E(f\mid X_1,\ldots,X_{n-1})~{=~{ p_i~\mathsf E(f\mid X_1,\ldots,X_{n-1},\mathbf 1_{X_n=1})} + {(1-p_i)~\mathsf E(f\mid X_1,\ldots,X_{n-1},\mathbf 1_{X_n=0})}}}$$
Yees, if you mix the notation for expectation conditioned by a random variable with the notation for expectation conditioned by an event, which are confusingly too similar in appearance.

Otherwise, for a sequence of Bernoulli random variables, then indeed:

$$\bbox[1ex,lemonchiffon]{\mathsf E(f\mid X_1,\ldots,X_n)~{=~ {\mathbf 1_{X_n=1}\mathsf E(f\mid X_1,\ldots,X_{n-1},\mathbf 1_{X_n=1}) }+{ \mathbf 1_{X_n=0}\mathsf E(f\mid X_1,\ldots,X_{n-1},\mathbf 1_{X_n=0}) } } }$$

And since $\mathsf E(f\mid X_1,\ldots, X_{n-1})=\mathsf E(\mathsf E(f\mid X_1,\ldots,X_n)\mid X_1,\ldots, X_{n-1})$ and also $\mathsf E(\mathbf 1_{X_n=1}\mid X_1,\ldots,X_{n-1})\overset{(1)}=\mathsf E(\mathbf 1_{X_n=1})\overset{(2)}=p_i$ (only if (1) mutually independent and (2) identically distributed) then too: 

$$\bbox[1ex,lemonchiffon]{\mathsf E(f\mid X_1,\ldots,X_{n-1})~{=~{ p_i~\mathsf E(f\mid X_1,\ldots,X_{n-1},\mathbf 1_{X_n=1})} + {(1-p_i)~\mathsf E(f\mid X_1,\ldots,X_{n-1},\mathbf 1_{X_n=0})}}}$$