Let $(X_{n})_{n>0}$ be a sequence of random variables in $[0, 1]$ and assuming that ($X_{0}=a) \epsilon [0, 1]$ then:
$Pr\left(X_{n+1}=\frac{X_{n}}{2}|\mathcal{F}_{n}\right)=1-X_{n}$ and $Pr\left(X_{n+1}=\frac{X_{n}+1}{2}|\mathcal{F_{n}}\right)=X_{n}$.
$a)$ Prove that $(X_{n})_{n>0}$ is a martingale according to the natural filtration and it's almost sure that it converges to a RV $Z$.
$b)$ Demonstrate that $E([X_{n+1}-X_{n}]^2)=\frac{1}{4}E[X_{n}(1-X{n})]$.
$c)$ Calculate $E[Z(1-Z)]$.
$d)$ Define the law of $Z$.
This was my attempt to solve this:
$a)$
To prove $(X_{n})_{n>0}$ is a martingale you need to prove that
$i)$ $E[|X_{n}|]=E[X_{n}]<\infty$
This is proven by the definition of $X_{n}\epsilon[0, 1]$
$ii)$ $X_{n}$ is $\mathcal{F}_{n}$-measurable.
This is proven by being the natural filtration.
$iii)$ $E[X_{n+1}|\mathcal{F}_{n}]=X_{n}$
Noticing that $Pr(X_{n+1}=\frac{X_{n}}{2}|\mathcal{F}_{n})+Pr(X_{n+1}=\frac{X_{n}+1}{2}|\mathcal{F}_{n})=1$ so $Pr(X_{n+1}=\frac{X_{n}}{2}|\mathcal{F}_{n})+Pr(X_{n+1}=\frac{X_{n}+1}{2}|\mathcal{F}_{n})$ is the density function for $X_{n+1}$
Then $$E[X_{n+1}|\mathcal{F}_{n}]=\frac{X_{n}}{2}Pr(X_{n+1}=\frac{X_{n}}{2}|\mathcal{F}_{n}) +\frac{X_{n}+1}{2}Pr(X_{n+1}=\frac{X_{n}+1}{2}|\mathcal{F}_{n})$$ $$=\frac{X_{n}}{2}(1-X_{n})+\frac{X_{n}+1}{2}X_{n}$$ $$=\frac{X_{n}-X_{n}^2}{2}+\frac{X_{n}^2+X_{n}}{2}=X_{n}$$ proving is martingale.
Now, I don't know how to prove the convergence.
$b)$
Let $$E[(X_{n+1}-X_{n})^2|\mathcal{F}_{n}]=E[(X_{n+1}^2-2X_{n+1}X_{n}+X_{n}^2)|\mathcal{F}_{n}]$$ $$=E[X_{n+1}^2|\mathcal{F}_{n}]-2E[X_{n+1}X_{n}|\mathcal{F}_{n}]+E[X_{n}^2|\mathcal{F}_{n}$$ $$=E[X_{n+1}^2|\mathcal{F}_{n}]-2E[X_{n+1}|\mathcal{F}_{n}]E[X_{n}|\mathcal{F}_{n}]+E[X_{n}^2|\mathcal{F}_{n}$$
And because it's a martingale we can assume that $$=E[X_{n+1}^2|\mathcal{F}_{n}]-2X_{n}^2+E[X_{n}^2|\mathcal{F}_{n}]$$
then applying expectancy on both sides $$E[E[(X_{n+1}-X_{n})^2]]=E[E[X_{n+1}^2|\mathcal{F}_{n}]-2X_{n}^2+E[X_{n}^2|\mathcal{F}_{n}]$$ $$E[(X_{n+1}-X_{n})^2]=E[X_{n+1}^2]-2E[X_{n}^2]+E[X_{n}^2]$$ $$=E[X_{n+1}^2-X_{n}^2]$$ $$=E[X_{n+1}^2]-E[X_{n}^2]$$ And again applying conditional expectancy we have $$E[E[(X_{n+1}-X_{n})^2|\mathcal{F}_{n}]]=E[(E[X_{n+1}^2]-E[X_{n}^2])|\mathcal{F}_{n}]$$ $$=E[E[X_{n+1}^2|\mathcal{F}_{n}]]-E[E[X_{n}^2|\mathcal{F}_{n}]]$$
And from $a)$ we can see that $$E[X_{n+1}^2|\mathcal{F}_{n}]=(\frac{X_{n}}{2})^2(1-X_{n})+(\frac{X_{n}+1}{2})^2X_{n}$$ $$=\frac{X_{n}^2}{4}(1-X_{n})+\frac{X_{n}^2+2X_{n}+1}{4}X_{n}$$ $$=\frac{X_{n^2}-X_{n}^3+X_{n}^3+2X_{n}^2+X_{n}}{4}$$ $$=\frac{1}{4}(3X_{n}^2+X_{n})$$
then $$E[E[(X_{n+1}-X_{n})^2|\mathcal{F}_{n}]]=E[\frac{1}{4}(3X_{n}^2+X_{n})]-E[E[X_{n}^2|\mathcal{F}_{n}]]$$ $$E[(X_{n+1}-X_{n})^2=\frac{1}{4}E[(3X_{n}^2+X_{n})]-E[X_{n}^2]$$ $$=\frac{1}{4}(3E[X_{n}^2]+E[X_{n}]-4E[X_{n}^2)$$ $$=\frac{1}{4}(X_{n}-X_{n}^2)$$ $$=\frac{1}{4}(X_{n}(1-X_{n}))$$
This is as far as I could go, if anyone can tell me if I'm right with what I've done, and also could help me being more formal at the demonstrations I would appreciate it a lot. Also anyone that could help me finish the rest of the subsection step-by-step would be really appreciated too.
Hints
a) Note that $(X_n)_{n \geq 0}$ is a non-negative martingale which is bounded in $L^2$. There are martingale convergence theorems which ensure that under these assumptions there exists a random variable $Z$ such that $X_n \to Z$ almost surely and $X_n \to Z$ in $L^2$.
c) Use b) and the fact that $X_n \to Z$ in $L^2$.
d) Use c) to deduce that $Z \cdot (1-Z) =0$ almost surely. Hence, $Z \sim p \delta_0 + (1-p) \delta_1$ for some $p \in [0,1]$. In order to find $p$, note that $\mathbb{E}Z = \mathbb{E}X_0 = a$.