Is $\tau = \inf \{n :X_1+\cdots+X_{n-1}\leq 1\leq X_1+\cdots+X_{n-1}+X_n \}$ a stopping time? Let $X_1, X_2, ...$ be a sequence of i.i.d. non-negative random variables. Let $$\tau = \inf \{n :X_1+\cdots+X_{n-1}\leq 1\leq X_1+\cdots+X_{n-1}+X_n \}.$$
  Is $\tau$ a stopping time for the sequence $X_1, X_2, ...$?


Using the definition of a stopping time, I should verify whether the event $\tau = n$ may or may not be independent of $X_{n+1}, X_{n+2}, ... $.  

The expression for $\tau$ makes it difficult for me. Any hints how to solve this problem?
This what I come up with so far (if I'm wrong please tell me!):

by definition: Let $F_n$ be the $\sigma$-algebra generated by $X_1, X_2, ... X_n$.  So $F_n$ is a filtration.

Let $Y_{n-1} = \sum_{i = 1}^{n-1}X_i$ and $Z_n = \sum_{i = 1}^{n}X_i$. So both $Y_n$ and $Z_n$ are adapted to $F_n$.

The definition of stopping time is: $\{\tau = n\} \in F_n$.

Edit: Thanks to Did, I needed to clarify this:

Let $\{Y_k \leq 1\}$ be the set of all $X_k$ such that their sum is less or equal to 1, and $\{Z_k \geq 1\}$ be the set of all $X_k$ such that their sum is greater or equal to 1 $\forall k = 1, 2, 3... n$. Then:

$\tau = \{Y_{1} \leq 1\} \cap \{Y_{2} \leq 1\} ... \cap \{Y_{n-1} \leq 1\} \cap \{Z_{1} \geq 1\} \cap \{Z_{2} \geq 1\} ... \cap \{Z_{n} \geq 1\} \in F_n$ because $F_n$ is closed under intersections.

So $\tau$ is a stopping time. In fact it is a "First hitting time".

You will need $X_1, X_2... X_n$ independence to prove if $Y_n$ and $Z_n$ are a martingale.
This what I come up with so far (if I'm wrong please tell me!):

by definition: Let $F_n$ be the $\sigma$-algebra generated by $X_1, X_2, ... X_n$.  So $F_n$ is a filtration.

Let $Y_{n-1} = \sum_{i = 1}^{n-1}X_i$ and $Z_n = \sum_{i = 1}^{n}X_i$. So both $Y_n$ and $Z_n$ are adapted to $F_n$.

The definition of stopping time is: $\{\tau = n\} \in F_n$.

Edit: Thanks to Did, I needed to clarify this:

Let $\{Y_k \leq 1\}$ be the set of all $X_k$ such that their sum is less or equal to 1, and $\{Z_k \geq 1\}$ be the set of all $X_k$ such that their sum is greater or equal to 1 $\forall k = 1, 2, 3... n$. Then:

$\tau = \{Y_{1} \leq 1\} \cap \{Y_{2} \leq 1\} ... \cap \{Y_{n-1} \leq 1\} \cap \{Z_{1} \geq 1\} \cap \{Z_{2} \geq 1\} ... \cap \{Z_{n} \geq 1\} \in F_n$ because $F_n$ is closed under intersections.

So $\tau$ is a stopping time. In fact it is a "First hitting time".

You will need $X_1, X_2... X_n$ independence to prove if $Y_n$ and $Z_n$ are a martingale.