Doob's decomposition of $X_n^2$, where $X_n$ symmetric random walk. I need to find Doob's decomposition of $X_n^2$, where $X_n$ is symmetric random walk. I have tried induction expressions.
Let $X_n^2 = M_n+A_n$, where $M_n$ is martingale and $A_n$ is integrable predictable process. Consider $X_{n+1}^2 = (X_n+\Delta X_n)^2 = X_n^2+2X_n\Delta X_n+\Delta X_n^2$. Using $\Delta X_n^2 = 1$ and $X_n^2 = M_n+A_n$ we get $X_{n+1}^2 = M_n+2X_n\Delta X_n + A_n +1$.
Hence $M_{n+1}=M_n+2X_n\Delta X_n$ and $A_{n+1}=A_n+1$.
Am I correct? Do I need to prove something else?
 A: I will give general answer. Your particular case can be easily obtained.
Suppose $ \{  \xi_{i} : i \geq 1 \} $ be i.i.d. random variables with $ \mathbb{E} ( \xi_i ) = 0 $ and $ \text{Var} (\xi) = \sigma^2 $. Let $ S_0 = 0 $ and for $ n \geq 1 $, $ S_n = \sum_{ i = 1}^n \xi_i $.
Let  $ Y_n = S_n^2 - n  \sigma^2  $ for $ n \geq 0 $. Then $ \{ Y_n : n \geq 1 \} $ is a ${\cal F}_n := \sigma ( \xi_k : 1 \leq k \leq n ) $ martingale. Therefore, we will have $ X_n^2 = Y_n + n \sigma^2 $ so that $ A_n = n \sigma^2 $ is the predictable process.
To show this, just note that $ S_{n+1} = S_n + \xi_{n+1} $ so that $ S_{n+1}^2 = S_n^2 + 2 S_n \xi_{n+1} + \xi_{n+1}^2 $. Thus, using the fact that $S_n $ is ${\cal F}_n $-measurable and $ \xi_{n+1} $ is independent of ${\cal F}_n $,  we have
\begin{align*}
 \mathbb{E} ( S_{n+1}^2 \mid {\cal F}_n ) & = \mathbb{E} ( S_n^2 + 2 S_n \xi_{n+1} + \xi_{n+1}^2  \mid {\cal F}_n ) \\
& = S_n^2 + 2 S_n \mathbb{E} ( \xi_{n+1}  \mid {\cal F}_n )  + \mathbb{E} (  \xi_{n+1}^2  \mid {\cal F}_n ) \\
& = S_n^2 + 2 S_n \mathbb{E} ( \xi_{n+1}  )  + \mathbb{E} (  \xi_{n+1}^2 ) \\
& = S_n^2  + \sigma^2. 
\end{align*}
This proves that $ \mathbb{E} \bigl( S_{n+1}^2 - (n+1) \sigma^2 \mid {\cal F}_n \bigr) = S_n^2  + \sigma^2  - (n+1) \sigma^2 = S_n^2 - n \sigma^2. $
This proves the result.
In the case of SSRW, we have $ \xi_{n+1} = \pm{1} $ with probability $1/2 $ so that $ \sigma^2 = 1 $. Thus, the decomposition is $ A_n = n $ for $ n \geq 1 $.
