[proofplan]
We prove both directions of the equivalence separately. The forward direction ($C$ closed $\Rightarrow$ accessibility stays in $C$) uses the multi-step expansion of $p_{i,j}(m)$ as a sum over paths, showing that if any path from $i$ to $j$ has positive probability then every intermediate state must lie in $C$ (since $C$ is closed, each one-step transition leaving $C$ has probability zero). The reverse direction ($\Leftarrow$) observes that if every accessible state from $C$ lies in $C$, then in particular every state reachable in one step lies in $C$, which is the definition of closedness.
[/proofplan]
[step:Show that closedness implies accessibility cannot leave $C$]
Suppose $C$ is closed. Let $i \in C$ and suppose $i \to j$, so there exists $m \geq 1$ with $p_{i,j}(m) > 0$. We must show $j \in C$.
Expand $p_{i,j}(m)$ by iterating the one-step transitions along all possible paths of length $m$:
\begin{align*}
p_{i,j}(m) = \sum_{i_1, \ldots, i_{m-1} \in S} p_{i,i_1}\, p_{i_1,i_2} \cdots p_{i_{m-1},j}.
\end{align*}
Since $p_{i,j}(m) > 0$, at least one term in this sum must be strictly positive. Fix a sequence $i_1, \ldots, i_{m-1} \in S$ for which every factor is positive: $p_{i,i_1} > 0$, $p_{i_1,i_2} > 0$, $\ldots$, $p_{i_{m-1},j} > 0$.
We show by induction along this path that every state lies in $C$. Since $C$ is closed and $i \in C$, the condition $p_{i,i_1} > 0$ with $i \in C$ forces $i_1 \in C$ (if $i_1 \notin C$, then $p_{i,i_1} = 0$ by the definition of closedness, contradicting $p_{i,i_1} > 0$). Next, $i_1 \in C$ and $p_{i_1,i_2} > 0$ forces $i_2 \in C$ by the same reasoning. Continuing inductively along the path, we obtain $i_1, i_2, \ldots, i_{m-1} \in C$. Finally, $i_{m-1} \in C$ and $p_{i_{m-1},j} > 0$ forces $j \in C$.
[guided]
Suppose $C$ is closed, $i \in C$, and $i \to j$. We need to show $j \in C$.
The assumption $i \to j$ means there exists $m \geq 1$ with $p_{i,j}(m) > 0$. The $m$-step probability can be decomposed as a sum over all possible paths of length $m$:
\begin{align*}
p_{i,j}(m) = \sum_{i_1, \ldots, i_{m-1} \in S} p_{i,i_1}\, p_{i_1,i_2} \cdots p_{i_{m-1},j}.
\end{align*}
This is a consequence of iterating the [Chapman--Kolmogorov Equations](/theorems/2207): we condition on the state at each intermediate time step. Every term in the sum is non-negative (as a product of probabilities), so if the sum is positive, at least one term must be positive. Fix such a term: there exist states $i_1, \ldots, i_{m-1}$ with
\begin{align*}
p_{i,i_1} > 0, \quad p_{i_1,i_2} > 0, \quad \ldots, \quad p_{i_{m-1},j} > 0.
\end{align*}
This is a path $i \to i_1 \to i_2 \to \cdots \to i_{m-1} \to j$ where every one-step transition has strictly positive probability.
Now we use the closedness of $C$ to "trap" the path inside $C$. Closedness means: for any state $a \in C$ and any state $b \notin C$, we have $p_{a,b} = 0$. Equivalently, if $a \in C$ and $p_{a,b} > 0$, then $b \in C$.
Start with $i \in C$. Since $p_{i,i_1} > 0$ and $i \in C$, closedness gives $i_1 \in C$. Since $p_{i_1,i_2} > 0$ and $i_1 \in C$, closedness gives $i_2 \in C$. Continuing step by step along the path, we deduce $i_1, i_2, \ldots, i_{m-1} \in C$. The final step: $p_{i_{m-1},j} > 0$ and $i_{m-1} \in C$ gives $j \in C$.
The key insight is that closedness is a one-step condition ($p_{i,j} = 0$ for $j \notin C$), but by applying it inductively along a path, it controls multi-step reachability: no path starting in $C$ can ever leave $C$.
[/guided]
[/step]
[step:Show the converse: if accessibility stays in $C$, then $C$ is closed]
Conversely, suppose that whenever $i \in C$ and $i \to j$, we have $j \in C$. We must show $C$ is closed, i.e., $p_{i,j} = 0$ for all $i \in C$ and $j \notin C$.
Fix $i \in C$ and $j \notin C$. If $p_{i,j} > 0$, then $p_{i,j}(1) = p_{i,j} > 0$, which means $i \to j$. By the hypothesis, $i \to j$ with $i \in C$ forces $j \in C$, contradicting $j \notin C$. Therefore $p_{i,j} = 0$.
Since this holds for every $i \in C$ and every $j \notin C$, the set $C$ is closed.
[guided]
Suppose the accessibility condition holds: for all $i \in C$ and $j \in S$, if $i \to j$ then $j \in C$. We need to verify the definition of closedness: $p_{i,j} = 0$ for all $i \in C$ and $j \notin C$.
Fix $i \in C$ and $j \notin C$. We argue by contradiction. If $p_{i,j} > 0$, then since $p_{i,j} = p_{i,j}(1)$, we have $i \to j$ (the chain can reach $j$ from $i$ in one step with positive probability). The accessibility hypothesis then gives $j \in C$, contradicting $j \notin C$. This contradiction forces $p_{i,j} = 0$.
Since the choice of $i \in C$ and $j \notin C$ was arbitrary, we have $p_{i,j} = 0$ for all $i \in C$ and $j \notin C$, which is exactly the definition of $C$ being closed.
The reverse direction is in some sense the easier half: closedness is a one-step condition, and one-step reachability is a special case of multi-step accessibility. The forward direction is the content-bearing half, showing that a one-step trapping condition propagates along arbitrary-length paths.
[/guided]
[/step]