Integral of Brownian motion is a stopping time I've been revising for an exam and I've come across a problem from a past paper which I cannot solve.
If $B$ is a one-dimensional Brownian motion with respect to a filtration $(\mathcal{F}_t)_{t \geq 0},$ then show that $$\tau = \inf\left\{t: \int^t_0 B_s ds=1 \right\}$$ is a stopping time.
So far, I managed to show that the integral $\int^t_0 B_s ds$ is a Gaussian random variable with mean $0$ and variance $\frac{t^3}{3}$ but I'm not sure if this helps at all. I know that by the definition of a stopping time, I need to show that $$\{\tau \leq t\} \in \mathcal{F}_t.$$ Maybe there's some trick one can use to rewrite this integral but I can't see it. Any help would be appreciated. Thanks!
 A: We can show the more general statement that given an adapted continuous process $X_t$ with $X_0 = 0$, the random variable $\tau := \inf\{t : X_t = 1\}$ is a stopping time.  Fix $s > 0$; we will show $\{ \tau > s \} \in \mathcal F_s$.
Note that \begin{align*}\{ \tau > s \} &= \left\{ \text{for all } 0 \le t \le s \text{ there exsists } n \in \mathbb{N} \text{ such that } X_t < 1 - \frac 1n \right\} \\
&= \bigcap_{t \in[0,s]} \bigcup_{n \in \mathbb{N}} \left\{X_t < 1 - \frac 1n \right\},\end{align*}
but since $X$ is continuous it is sufficient to only check $X_t < 1-\frac 1n$ for $t \in \mathbb{Q}$ so $$\{ \tau > s \} = \bigcap_{t \in[0,s]\cap \mathbb{Q}} \bigcup_{n \in \mathbb{N}} \left\{X_t < 1 - \frac 1n \right\}.$$
Since $X$ is adapted, $\left\{X_t < 1 - \frac 1n \right\} \in \mathcal F_{t} \subseteq \mathcal F_s$, so $\{ \tau > s \}$ is a countable union and intersection of events in $\mathcal F_s$ and hence $\{ \tau > s \} \in \mathcal F_s$.  Since $\mathcal F_s$ is closed under taking complements, this implies $\{ \tau \le s \} \in \mathcal F_s$ and therefore we conclude $\tau$ is a stopping time.
