Let $E$ be a countably infinite subset of $\mathbb{R}$. Let $(\Omega, \mathscr{A}, P)$ be a probability space. Let $(X_n)_{n \in \mathbb{N}}$ be a sequence of random variables defined on $(\Omega, \mathscr{A}, P)$, taking values in $E$. We assume that for all $\omega \in \Omega$, the sequence $(X_n(\omega))_{n \in \mathbb{N}}$ is stationary and converges to $X(\omega)$. We also define the random variable: $$L : \Omega \longrightarrow \mathbb{N}, \quad \omega \mapsto \begin{cases} 0 & \text{if } \forall n \in \mathbb{N}, X_n(\omega) = X(\omega) \\ \max\{n \in \mathbb{N}, X_n(\omega) \neq X(\omega)\} & \text{otherwise.} \end{cases}$$
Justify that the map $L$ is well defined.
Let $E$ be a countably infinite subset of $\mathbb{R}$. Let $(\Omega, \mathscr{A}, P)$ be a probability space. Let $(X_n)_{n \in \mathbb{N}}$ be a sequence of random variables defined on $(\Omega, \mathscr{A}, P)$, taking values in $E$. We assume that for all $\omega \in \Omega$, the sequence $(X_n(\omega))_{n \in \mathbb{N}}$ is stationary and converges to $X(\omega)$. We also define the random variable:
$$L : \Omega \longrightarrow \mathbb{N}, \quad \omega \mapsto \begin{cases} 0 & \text{if } \forall n \in \mathbb{N}, X_n(\omega) = X(\omega) \\ \max\{n \in \mathbb{N}, X_n(\omega) \neq X(\omega)\} & \text{otherwise.} \end{cases}$$

Justify that the map $L$ is well defined.