[proofplan]
We show $\{T_A \leq t\} \in \mathcal{F}_t$ by establishing the set identity $\{T_A \leq t\} = \{\inf_{q \in \mathbb{Q} \cap [0,t]} d(X_q, A) = 0\}$. The right-hand side is $\mathcal{F}_t$-measurable because it involves a countable infimum of [measurable functions](/page/Measurable%20Functions). The forward inclusion uses [continuity](/page/Continuity) of $t \mapsto X_t$ and closedness of $A$ to pass from hitting at a real time to approximation along rationals; the reverse inclusion uses [sequential compactness](/page/Sequential%20Compactness) and continuity to produce an actual hitting time.
[/proofplan]
[step:Establish the set identity $\{T_A \leq t\} = \{\inf_{q \in \mathbb{Q} \cap [0,t]} d(X_q, A) = 0\}$]
We claim that for each $t \geq 0$,
\begin{align*}
\{T_A \leq t\} = \left\{\inf_{q \in \mathbb{Q} \cap [0,t]} d(X_q, A) = 0\right\},
\end{align*}
where $d(x, A) := \inf_{a \in A} |x - a|$ denotes the distance from $x \in \mathbb{R}^d$ to the closed set $A$.
[guided]
Our goal is to express the event $\{T_A \leq t\}$ — which involves an uncountable infimum over $s \in [0,t]$ — in terms of a countable infimum over $\mathbb{Q} \cap [0,t]$. The countable version is manifestly $\mathcal{F}_t$-measurable (each $X_q$ is $\mathcal{F}_q$-measurable, hence $\mathcal{F}_t$-measurable for $q \leq t$, and the distance [function](/page/Function) $d(\cdot, A)$ is continuous, so $d(X_q, A)$ is $\mathcal{F}_t$-measurable; a countable infimum of measurable functions is measurable).
The key question is: why can we replace the uncountable infimum with a countable one? This is where continuity of the sample paths and closedness of $A$ are both consumed. We verify the two inclusions separately.
[/guided]
[/step]
[step:Forward inclusion: if $T_A(\omega) \leq t$ then $\inf_{q \in \mathbb{Q} \cap [0,t]} d(X_q(\omega), A) = 0$]
Suppose $T_A(\omega) = s \leq t$. Then $X_s(\omega) \in A$, so $d(X_s(\omega), A) = 0$. Since $r \mapsto X_r(\omega)$ is continuous, for any $\varepsilon > 0$ there exists $\delta > 0$ such that $|X_r(\omega) - X_s(\omega)| < \varepsilon$ whenever $|r - s| < \delta$. By density of $\mathbb{Q}$ in $\mathbb{R}$, there exists a rational $q \in (s - \delta, s + \delta) \cap [0,t]$. For this $q$,
\begin{align*}
d(X_q(\omega), A) \leq |X_q(\omega) - X_s(\omega)| < \varepsilon.
\end{align*}
Since $\varepsilon > 0$ was arbitrary, $\inf_{q \in \mathbb{Q} \cap [0,t]} d(X_q(\omega), A) = 0$.
[guided]
We are given that $X_s(\omega) \in A$ for some $s \leq t$. Since $A$ is closed, $d(X_s(\omega), A) = 0$. We need to show that rational times approximate this event.
Continuity of $r \mapsto X_r(\omega)$ at $r = s$ provides: for every $\varepsilon > 0$, there exists $\delta > 0$ such that $|X_r(\omega) - X_s(\omega)| < \varepsilon$ for all $r$ with $|r - s| < \delta$. The density of $\mathbb{Q}$ in $\mathbb{R}$ guarantees the existence of a rational $q$ in the interval $(s - \delta, s + \delta) \cap [0,t]$. For this rational,
\begin{align*}
d(X_q(\omega), A) \leq |X_q(\omega) - X_s(\omega)| < \varepsilon,
\end{align*}
where the first inequality uses $X_s(\omega) \in A$. Since $\varepsilon > 0$ was arbitrary, $\inf_{q \in \mathbb{Q} \cap [0,t]} d(X_q(\omega), A) = 0$.
[/guided]
[/step]
[step:Reverse inclusion: if $\inf_{q \in \mathbb{Q} \cap [0,t]} d(X_q(\omega), A) = 0$ then $T_A(\omega) \leq t$]
Suppose $\inf_{q \in \mathbb{Q} \cap [0,t]} d(X_q(\omega), A) = 0$. Then there exist rationals $q_n \in \mathbb{Q} \cap [0,t]$ with $d(X_{q_n}(\omega), A) \to 0$. Since $[0,t]$ is compact, by the [Bolzano-Weierstrass Theorem](/theorems/628) there is a convergent subsequence $q_{n_k} \to s$ for some $s \in [0,t]$. By continuity of $r \mapsto X_r(\omega)$, $X_{q_{n_k}}(\omega) \to X_s(\omega)$.
For each $k$, choose $a_k \in A$ with $|X_{q_{n_k}}(\omega) - a_k| < d(X_{q_{n_k}}(\omega), A) + 1/k$. Then
\begin{align*}
|a_k - X_s(\omega)| \leq |a_k - X_{q_{n_k}}(\omega)| + |X_{q_{n_k}}(\omega) - X_s(\omega)| \to 0,
\end{align*}
so $a_k \to X_s(\omega)$. Since $A$ is closed and $a_k \in A$ for all $k$, the [limit](/page/Limit) $X_s(\omega)$ belongs to $A$. Therefore $T_A(\omega) \leq s \leq t$.
[guided]
We are given a sequence of rationals $q_n \in [0,t]$ with $d(X_{q_n}(\omega), A) \to 0$ and must produce an actual hitting time $s \leq t$.
The sequence $(q_n)$ lies in the compact interval $[0,t]$, so by the [Bolzano-Weierstrass Theorem](/theorems/628), it has a convergent subsequence $q_{n_k} \to s \in [0,t]$. By continuity of $r \mapsto X_r(\omega)$,
\begin{align*}
X_{q_{n_k}}(\omega) \to X_s(\omega).
\end{align*}
For each $k$, the infimum $d(X_{q_{n_k}}(\omega), A) = \inf_{a \in A} |X_{q_{n_k}}(\omega) - a|$ is approached to within $1/k$, so there exists $a_k \in A$ with $|X_{q_{n_k}}(\omega) - a_k| < d(X_{q_{n_k}}(\omega), A) + 1/k \to 0$. By the triangle inequality, $a_k \to X_s(\omega)$.
This is where closedness of $A$ is consumed: since $a_k \in A$ for all $k$ and $a_k \to X_s(\omega)$, the limit $X_s(\omega)$ belongs to $A$ (a set is closed if and only if it contains all limits of its convergent [sequences](/page/Sequence)). Therefore $T_A(\omega) \leq s \leq t$.
Without closedness, the argument fails: if $A = (0,1) \subset \mathbb{R}$, a process could satisfy $d(X_{q_n}, A) \to 0$ while the limiting value $X_s = 0$ lies outside $A$.
[/guided]
[/step]
[step:Conclude $\mathcal{F}_t$-measurability of $\{T_A \leq t\}$]
The map $\omega \mapsto d(X_q(\omega), A)$ is $\mathcal{F}_q$-measurable for each $q$: the process $X$ is adapted, so $X_q$ is $\mathcal{F}_q$-measurable, and $d(\cdot, A) : \mathbb{R}^d \to [0, \infty)$ is $1$-Lipschitz (hence continuous, hence Borel measurable), so the composition $d(X_q, A)$ is $\mathcal{F}_q$-measurable. For $q \leq t$, $\mathcal{F}_q \subset \mathcal{F}_t$, so each $d(X_q, A)$ is $\mathcal{F}_t$-measurable.
The set $\mathbb{Q} \cap [0,t]$ is countable, and a countable infimum of $\mathcal{F}_t$-measurable functions is $\mathcal{F}_t$-measurable (since $\{\inf_q f_q < c\} = \bigcup_q \{f_q < c\}$ is a countable union of $\mathcal{F}_t$-sets). Therefore
\begin{align*}
\{T_A \leq t\} = \left\{\inf_{q \in \mathbb{Q} \cap [0,t]} d(X_q, A) = 0\right\} \in \mathcal{F}_t,
\end{align*}
confirming that $T_A$ is a stopping time with respect to $(\mathcal{F}_t)_{t \geq 0}$.
[guided]
We combine the set identity from the preceding steps with a measurability argument.
For each fixed rational $q \leq t$: (i) $X_q$ is $\mathcal{F}_q$-measurable by the adaptedness hypothesis; (ii) the distance function $d(\cdot, A) : \mathbb{R}^d \to [0, \infty)$ is $1$-Lipschitz (hence continuous, hence Borel measurable); (iii) the composition $d(X_q, A) = d(\cdot, A) \circ X_q$ is therefore $\mathcal{F}_q$-measurable; (iv) since $q \leq t$ and $(\mathcal{F}_t)$ is a filtration, $\mathcal{F}_q \subset \mathcal{F}_t$, so $d(X_q, A)$ is $\mathcal{F}_t$-measurable.
The set $\mathbb{Q} \cap [0,t]$ is countable, and a countable infimum of $\mathcal{F}_t$-measurable functions is $\mathcal{F}_t$-measurable (the preimage $\{\inf_q f_q < c\} = \bigcup_q \{f_q < c\}$ is a countable union of $\mathcal{F}_t$-sets). Therefore
\begin{align*}
\{T_A \leq t\} = \left\{\inf_{q \in \mathbb{Q} \cap [0,t]} d(X_q, A) = 0\right\} \in \mathcal{F}_t,
\end{align*}
confirming that $T_A$ is a stopping time with respect to $(\mathcal{F}_t)_{t \geq 0}$.
[/guided]
[/step]