[step:Apply the ordinary Markov property at the deterministic time $m$]We now compute the conditional probability. Assume $\mathbb{P}(A_m) > 0$. By the definition of conditional probability,
\begin{align*}
&\mathbb{P}(X_{m+1} = j_1, \ldots, X_{m+n} = j_n \mid A_m) \\
&\quad = \frac{\mathbb{P}(X_{m+1} = j_1, \ldots, X_{m+n} = j_n, \, A_m)}{\mathbb{P}(A_m)}.
\end{align*}
Since $A_m \subset \{X_m = i_m\} = \{X_m = i\}$, we can write
\begin{align*}
&\mathbb{P}(X_{m+1} = j_1, \ldots, X_{m+n} = j_n, \, A_m) \\
&\quad = \mathbb{P}(X_{m+1} = j_1, \ldots, X_{m+n} = j_n, \, X_0 = i_0, \ldots, X_m = i, \, T = m).
\end{align*}
Since $\{T = m\} \in \sigma(X_0, \ldots, X_m)$, there exists a set $\mathcal{T}_m \subset S^{m+1}$ of admissible trajectories such that
\begin{align*}
\{T = m\} = \{(X_0, \ldots, X_m) \in \mathcal{T}_m\}.
\end{align*}
The trajectory $(i_0, \ldots, i_m)$ either belongs to $\mathcal{T}_m$ or it does not. Since $\mathbb{P}(A_m) > 0$, it must belong to $\mathcal{T}_m$, and therefore $\{T = m\}$ holds with certainty on the event $\{X_0 = i_0, \ldots, X_m = i_m\}$. This means
\begin{align*}
A_m = \{X_0 = i_0, X_1 = i_1, \ldots, X_m = i_m\}.
\end{align*}
By the [Extended Markov Property](/theorems/2206) applied at the deterministic time $m$, conditional on $(X_0 = i_0, \ldots, X_m = i)$, the future process $(X_{m+1}, X_{m+2}, \ldots)$ is a Markov chain with transition matrix $P$ started at state $i$, and it is independent of $(X_0, \ldots, X_m)$. In particular,
\begin{align*}
&\mathbb{P}(X_{m+1} = j_1, \ldots, X_{m+n} = j_n \mid X_0 = i_0, \ldots, X_m = i) \\
&\quad = P_{i j_1} P_{j_1 j_2} \cdots P_{j_{n-1} j_n}.
\end{align*}
This follows from the [Path Probability Formula](/theorems/2205), which gives the probability of a specified path in terms of the product of transition probabilities along that path.
Substituting back into the conditional probability, since $A_m = \{X_0 = i_0, \ldots, X_m = i_m\}$ on the event that $(i_0, \ldots, i_m) \in \mathcal{T}_m$, we obtain
\begin{align*}
\mathbb{P}(X_{m+1} = j_1, \ldots, X_{m+n} = j_n \mid A_m) = P_{i j_1} P_{j_1 j_2} \cdots P_{j_{n-1} j_n}.
\end{align*}[/step]