One event of a r.r.v as a function of another r.r.v Let $(X_n)_{n \in \mathbb{N}}$ a sequence of r.r.v (real-value random variable) such as 
$\exists p \in [0,1] : \forall n \in \mathbb{N}$ 
$P(X_{n+1} = 0) = p$, and 
$P(X_{n+1} = X_n + 1) = 1 -p$.  
It was written in my example that $\forall n \in \mathbb{N}, E[X_{n+1}] = (1 -p)\ E[X_{n}]$. However, in the measure-theory perspective, I do not understand how that is possible. Indeed, by integrating $X_{n+1}$ over its set of events according to its discret probability measure, $E[X_{n+1}]$ should be equal to $0 \times p + (1 -p) X_{n}$, but $X_{n}$ is not here a real but a r.r.v. and therefore a measurable function. 
1) Is this formulation of the distribution of $X_{n+1}$ correct? 
2) If it is, is $E[X_{n+1}] = (1 -p)\ E[X_{n}]$ correct and why?
3) Else, what is the right result and formulation of $X_{n+1}$ as a distribution?
Thank you in advance
 A: A rigorous formulation of the hypothesis (which is ambiguously stated) might be that $$X_{n+1}=B_{n+1}\cdot(X_n+1)$$ where $B_{n+1}$ is independent of $(X_k)_{0\leqslant k\leqslant n}$ and $$P(B_{n+1}=0)=p\qquad P(B_{n+1}=1)=1-p$$ Then, $$E(X_{n+1})=E(B_{n+1})\cdot(E(X_n)+1)=(1-p)\cdot(E(X_n)+1)$$ Thus, unless you copied something incorrectly, your source is wrong.
In terms of distributions (but this is not really useful), one would translate the above as $$P_{X_{n+1}}=p\,\delta_0+(1-p)\,\delta_1\ast P_{X_n}$$ where, as usual, $P_Y$ denotes the distribution of the random variable $Y$ and $\delta_x$ denotes the Dirac measure at $x$.
A: All the guesses assume there's something wrong copied.
Guess 1: $$X_{n+1} = 1_{A_{n+1}}(X_n + 1), P(A_{n+1}) = 1-p$$ While Guess 1 would explain the

$P(X_{n+1} = 0) = p$, and
$P(X_{n+1} = X_n + 1) = 1 -p$.

There's still the matter of the

$E[X_{n+1}] = (1 -p)\ E[X_{n}]$

We could correct to $E[X_{n+1}] = (1 -p)\ (E[X_{n}]+1)$ with an additional assumption like independence or like $E[1_{A_{n+1}}|X_n]=1-p$.
There's also

$E[X_{n+1}]$ should be equal to $0 \times p + (1 -p) X_{n}$

Could this be conditional expectation?
Guess 2:
$$E[X_{n+1} | X_n] = (1-p)X_n$$
$$\to E[E[X_{n+1} | X_n]] = E[(1-p)X_n]$$
$$\to E[X_{n+1}] = (1-p)E[X_n]$$
The formula in Guess 1 no longer works.
Guess 3:
$$E[X_{n+1} | X_n] = 1_{A_{n+1}}X_n$$
We could have $E[X_{n+1}] = (1 -p)\ E[X_{n}]$ with an additional assumption like independence or like $E[1_{A_{n+1}}|X_n]=1-p$.
Again, the formula in Guess 1 no longer works.
Guess 4:
$$X_{n+1} = X_n + 1_A, P(A) = 1-p, X_1=0$$
Here, we have
$$E[X_{n+1}] = (1-p) + E[X_n]$$

As for distribution: Assuming

$P(X_{n+1} = 0) = p$, and
$P(X_{n+1} = X_n + 1) = 1 -p$.

then
$$P(X_{n+1} \in B) = p1_{B}(0) + (1-p)1_{B}(1)P(X_{n} \in B)$$
