Conditional expectation on a filtration defined by a stopping time I am trying to answer this question. 
The $\sigma$-algebra $\mathcal F_\tau$ defined by a stopping time $\tau$ is such that $A\in  \mathcal F_\tau$ iff the
event $A \cap \{\tau=t\} \in \mathcal F_\tau $ for $t = 0, 1, 2, \ldots$. If 
 $\tau < n$ almost surely for some finite positive integer $n$, show that, for all $t = 0, 1,\ldots, n$,
$$E(X_t\mid\mathcal F_\tau)=\sum_{s=0}^n E(X_t1(\tau=s)\mid\mathcal F_s).$$
This is how I go about solving the question:
Lemma: Suppose that $s\in \mathbb N \cup {0}$ and $\tau(w)=s$ for all $w\in \Omega$. Then $\mathcal F_\tau=\mathcal F_s $. 
Since $P(\tau <n) =1$, then $\tau =
s$ a.s. for all $s= 0, 1, \ldots, n-1$. Using the lemma, we have $\mathcal F_\tau=\mathcal F_s $ and hence $E(X_t\mid\mathcal F_\tau)=E(X_t\mid\mathcal F_s)$ for all $s=0,1,\ldots, n-1$, or equivalently, $$E(X_t\mid\mathcal F_\tau)=\sum_{s=0}^{n-1} E(X_t1(\tau=s)\mid\mathcal F_s).$$


*

*Should the upper bound of summation in the statement of the problem be $n-1$, as I've obtained? I suspect that is a typo in the problem.

*Apart from this issue, is my proof rigorous enough? 

*Also the proof I found for the lemma is as follows. It is however, for continuous time processes. Can it be a adopted, with obvious due changes, for the discrete time cases, like my problem?
Proof of the Lemma:
Suppose that $A\in \mathcal F_s$. Then for $t\in T$, the event $A\cap \{\tau\le t\}$ is $A$ if $s\le t$ or $\varnothing$ if $s>t$. In either case, $A\cap \{τ\le t\}∈\mathcal F_t$ and hence $A∈\mathcal F_\tau$. Conversely, suppose that $A∈\mathcal F_τ$. Then $A=A\cap \{τ\le s\}\in \mathcal F_s$.
 A: Since $\tau<n$ a.s., we have
\begin{align}
E(X_t\mid\mathcal F_\tau)
&= E(\sum_{s=0}^nX_t1_{\{\tau = s\}}\mid\mathcal F_\tau) \\
&= \sum_{s=0}^n E(X_t1_{\{\tau = s\}}\mid\mathcal F_\tau).
\end{align}
We consider the summands seperately. Let $s\in\{0,...n-1\}$. We want to show
$$
E(X_t1_{\{\tau = s\}}\mid\mathcal F_\tau) = E(X_t1_{\{\tau = s\}}\mid\mathcal F_s)
$$ 
with the definition of conditional expectation (for the conditional expectation on the RHS). Hence, let $A\in \mathcal{F}_s$. Indeed we get
\begin{align}
&\mathbb{E}\left[ E(X_t1_{\{\tau = s\}}\mid\mathcal F_\tau) 1_A \right] \\
(1_{\{\tau = s\}} \text{ is } \mathcal{F}_\tau\text{-mb.}) \quad
= &\mathbb{E}\left[ E(X_t\mid\mathcal F_\tau) 1_{\{\tau = s\}}1_A \right] \\
= &\mathbb{E}\left[ E(X_t\mid\mathcal F_\tau) 1_{\{\tau = s\}\cap A} \right] \\
(1_{\{\tau = s\}\cap A} \text{ is } \mathcal{F}_\tau\text{-mb.}) \quad
= &\mathbb{E}\left[ E(X_t 1_{\{\tau = s\}\cap A}\mid\mathcal F_\tau) \right]\\
(\text{law of total expectation}) \quad
= &\mathbb{E}\left[ X_t 1_{\{\tau = s\}\cap A}\right] \\
= &\mathbb{E}\left[ X_t 1_{\{\tau = s\}}1_{\cap A}\right],
\end{align}
and thus the equation above holds true. 
