I am a beginner to Markov chains, while learning about stopping time and the Strong Markov Property, I saw something like $\{ X_{T} = i \}$, where $X: \Omega \to I$ , I being a countable space where the corresponding Sigma field of $\Omega$ is $\mathcal{F}$, and $P(I)$ for I. T also a random variable: $T:\Omega \to \{ 0,1,2, \dots \} \cup \{ \infty \}$. As in a typical Markov chain, $X_{i}$ just means the i-th random variable.
Intuitively, it makes sense that $X_{T}$ is just another random variable, and $\{{X_{T} = i} \}$ is an event, but I don't understand what it is logically.
Specifically, why $\mathbb{P}(\{ X_{T} = i \} \cap \{ T = j \}) = \mathbb{P}(\{ X_{j} = i \} \cap \{ T = j \})$? How can one just make a substitution like this?
$X_T$ means, take the value of random variable $T$, use that as the index in the sequence $X_j$, and take the value of the random variable $X_j$ with that index. Thus $\{ X_T = i\}$ is the event that $X_j = i$ where $j$ is the value of the random variable $T$. You could write it as $$ \bigcup_{j=0}^\infty \{X_j = i,\; T = j\}$$