Stopping time that depends on other stopping time Consider a random variable $\tau$:
$$\tau  := \inf \left\{ {k = \sigma , \ldots ,T:S_k \ge u} \right\}\wedge T,$$
 where $\sigma$ is a stopping time, $S_k$ - stochastic process, $T, u$ are constants and $a\wedge b=\min(a,b)$. I would like to prove that $\tau$ is a stopping time, i.e. I need to show that $\{ \tau\le k\} \in {F_k}$, where ${F_k}$ is natural filtration.
I tried to present $\tau$ as $\{ \tau  \le k\}  = \mathop \bigcup \limits_{j = \sigma }^k \{ \tau  = j\} $ and to show that $\{ \tau  = j\}\in F_j, {F_j} \subset {F_k}$, so I can conclude that $\{ \tau\le k\} \in {F_k}$. But can I really use a stopping time $\sigma$ in union operator as starting index? If not, what is the correct way to prove that $\tau$ is a stopping time?
 A: Let $\mathcal F$ denote the filtration $(\mathcal F_n)_{n\geqslant0}$ and $S$ the process $(S_n)_{n\geqslant0}$. The result follows from the fact that, for every $0\leqslant k\leqslant T-1$, 
$$
[\tau\leqslant k]=\bigcup_{i=0}^kA_i^k$$
with
$$A_i^k=[\sigma=i]\cup\bigcup_{j=i}^k[S_j\geqslant u]
$$
Fix $0\leqslant k\leqslant T-1$. Then, for every $0\leqslant i\leqslant k$, $[\sigma=i]\in\mathcal F_i$ because $\sigma$ is an $\mathcal F$-stopping time, and $\mathcal F_i\subseteq\mathcal F_k$, hence $[\sigma=i]\in \mathcal F_k$. For every $i\leqslant j\leqslant k$, $[S_j\geqslant u]\in \mathcal F_j$ because $S$ is $\mathcal F$-adapted, and $\mathcal F_j\subseteq\mathcal F_k$, hence $[S_j\geqslant u]\in\mathcal F_k$. 
Thus, $A_i^k\in\mathcal F_k$ for every $0\leqslant i\leqslant k$, which proves that $[\tau\leqslant k]\in\mathcal F_k$. 
Finally, for every $k\geqslant T$, $[\tau\leqslant k]=\Omega\in\mathcal F_k$, hence $\tau$ is an $\mathcal F$-stopping time.
A: Is it also correct if we replace $S_k$ by a right-continuous stochastic process $X_t$,
a right-continuous filtration $\mathcal{F}_t$, an open set $B$ and a stopping time $S$
with values in $[0,\infty[$? Or to be more precise i formulate it as a Theorem:
Theorem: Assume we have a right-continuous stochastic process $X_t$,
a right-continuous filtration $\mathcal{F}_t$, an open set $B$ and a stopping time $S$
with values in $[0,\infty[$. Then
$  \tau_B^S:=\inf \left\{t\geq S\ : \ X_t\in B\right\}$
is a stopping time.
I tried to proof it, but failed. I have shown, that for a fixed number $r\in[0,\infty[$ the random variable $\tau_B^r$ is a stopping time. Indeed by $X$ right-continuous and $B$ open we have
$\left\{\tau_B^S<t\right\}=\bigcup\limits_{s\ :\ s\ \in\ [u,t[\cap \mathbb{Q}} \left\{X_s\in B\right\}
 \in \mathcal{F}_t$
and therefore by the right-continuity of the filtration the claim follows.
Now you can write
$\left\{\tau_B^S<t\right\}=\bigcup\limits_{r\ :\ r \ \in\  [0,t[}  \left\{S = r\right\}\cap
\left\{\tau_B^r<t\right\}$.
and by the first part the intersection of the two sets is an element of $\mathcal{F}_t$.
But now we got to my problem. I don't know how to get a countable union, i.e. something like that
$\left\{\tau_B^S<t\right\} ?=? \bigcup\limits_{r\ :\ r \ \in\  [0,t[\cap \mathbb{Q}}  \left\{S = r\right\}\cap
\left\{\tau_B^r<t\right\}$.
Is this possible or is there another more simple solution to the problem?
