SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Suppose the edge mark adjacent to  $M$  along the subpath between  $W_{m'}$  and  $M$  is a tail: This means there is at least one collider between  $W_{m'}$  and  $M$ . Any such collider must be active since  $q$  is active given  $T'$ . Consider the collider that is closest to  $M$ . Since it is active, this collider must be an ancestor of  $T'$ . However, observe that  $K$  is an ancestor of this collider which implies that  $K$  is an ancestor of  $T'$  as well. However, we obtained  $T'$  by removing all descendants of  $K$  from  $T$ , which is a contradiction.
This establishes that the edge mark adjacent to  $M$  along the subpath between  $W_{m'}$  and  $M$  is an arrowhead. Thus, this reveals the following structure for  $q$ :
$$
X \leftarrow W _ {1} \leftarrow W _ {2} \dots \leftarrow W _ {m ^ {\prime}} * \rightarrow \dots * \rightarrow M \dots Y \tag {19}
$$
Suppose the directed path from  $K$  to  $M$  is as follows for some  $\{\theta_i\}_i$  for some integer  $m''$ :
$$
K \rightarrow \theta_ {1} \rightarrow \dots \theta_ {m ^ {\prime \prime}} \rightarrow M \tag {20}
$$
Recall that  $M$  is a non-collider along  $q$ . Thus, the subpath of  $q$  between  $M$  and  $Y$  must start with a tail as  $M \to \ldots Y$ . Now observe that if the subpath of  $p$  between  $M$  and  $Y$  had no collider, then we would have the following directed path from  $X$  to  $Y$ :
$$
X \rightarrow U _ {1} \rightarrow \dots \rightarrow U _ {m} \rightarrow K \rightarrow \theta_ {1} \rightarrow \dots \rightarrow \theta_ {m ^ {\prime \prime}} \rightarrow M \rightarrow \dots \rightarrow Y \tag {21}
$$
However, we know  $X$  is a non-ancecestor of  $Y$ . Thus, there must be at least one collider between  $M$  and  $Y$  along  $p$ , all of which are open given  $T'$ . Consider the collider that is closest to  $M$ . There is a directed path from  $M$  to this collider, and a directed path from this collider to a member of  $T'$ . But this means there is a directed path from  $K$  to a member of  $T'$  since there is a directed path from  $K$  to this collider. This is a contradiction since we obtained  $T'$  by removing all descendants of  $K$  from  $T$ .
This establishes the claim that removing descendants of the collider along any d-connecting path that starts with a tail at  $X$  cannot introduce a d-connecting path that starts with an arrow into  $X$  when  $X \notin \operatorname{An}(Y)$ .
The following is the parallel lemma to Lemma A.2 for any mixed graph  $\mathbb{K}$  that satisfies the conditions of Theorem 3.9.
Lemma A.14. Consider a bidirected edge  $X \leftrightarrow Y$  in  $\mathbb{K}$ . Suppose conditioned on any subset  $T: |T| \leq k$ ,  $X \not\sqcup Y|T$  in  $G - (X \leftrightarrow Y)$ . Then conditioned on any  $T: |T| \leq k$ , there exists a  $d$ -connecting path between  $X, Y$  that starts with an arrow into  $X$  and an arrow into  $Y$ .
Proof. For the sake of contradiction suppose, conditioned on some  $T: |T| \leq k$ , there is no d-connecting path with an arrow into  $X$  and an arrow into  $Y$ . Since neither  $X$  is an ancestor of  $Y$  nor  $Y$  is an ancestor of  $X$ , all d-connecting paths must have colliders on them. And all such colliders must be ancestors of  $T$ .
Consider such a path  $p$  where, without loss of generality, the edge adjacent to  $X$  has a tail at  $X$ . Let  $K$  be the collider that is closest to  $X$ .
$$
X \rightarrow U _ {1} \rightarrow \dots \rightarrow U _ {m} \rightarrow K \leftarrow * V \dots Y \tag {22}
$$
for some  $\{U_i\}_i, V$  and integer  $m$ . Since the path is open, this collider must be unblocked. It must be that  $K \in An(T)$ . Let  $T' = T - De(K)$ , where  $De(K)$  are all descendants of  $K$ . Clearly,  $p$  is no longer open. We investigate other open paths now, keeping in mind that  $X, Y$  are dependent given  $T'$  since  $|T'| \leq k$ .
Claim 1: Removing the descendants of the collider closest to  $X$  from the conditioning set can only add d-connecting paths that start with a tail at  $X$  but no d-connecting path that starts with an arrowhead at  $X$ .
Proof of Claim 1: Since a bidirected edge exists between  $X, Y$ , and that  $\mathbb{K}$  is a MAG, neither  $X$  nor  $Y$  are ancestors of one another, since then we would have an almost directed cycle. By Lemma A.13, we know that removing the descendants of  $K$  from  $T$  can only introduce d-connecting paths that are out of  $X$ .
Now consider the d-connecting paths under conditioning on  $T'$ . We know that these paths must have a tail either at  $X$  or at  $Y$ . Using the above claim that no path that has an arrowhead into both endpoints are opened, we can use recursion and claim that we can make  $X, Y$  d-separated by removing descendants of colliders (that are closest to the endpoint that is adjacent to a tail) of active paths, which gives the following:
Claim 2: There exists a set  $T^{*}$  of size at most  $k$  such that  $X \perp Y | T^{*}$ , which leads to a contradiction since  $X, Y$  cannot be made independent by conditioning on sets of size at most  $k$  by the assumption.
Proof of Claim 2. Given claim 1, we can continue removing descendants of the colliders of the active paths that are closest to the tail-end node from the set  $T$ . Either no d-connecting path is left at some point in this process, or that we end up removing all the variables from the conditioning set. If former, this is a contradiction since  $X, Y$  cannot be made conditionally independent given empty set. If the latter is true, then there is another contradiction due to the following: This means that given empty set, paths that have a tail adjacent to one of the endpoints, i.e., the paths with colliders on them (since all paths that have a tail adjacent to one of the endpoints must have a collider because  $X \notin An(Y)$  and  $Y \notin An(X)$ ) are d-connecting, which is not possible. This proves Claim 2.
Therefore, the supposition that the only d-connecting paths must have a tail adjacent to either endpoint must be wrong, which proves the lemma.
Proof of Theorem 3.9. Now, we are ready to prove the main characterization theorem. We will need the following lemma:
Lemma A.15. Let  $\mathbb{K}$  be a mixed graph that satisfies the conditions in Theorem 3.9. Let  $\mathbb{K}'$  be the graph obtained by removing all the bidirected edges from  $\mathbb{K}$ . Then
1.  $\mathbb{K}^{\prime}$  is a DAG and
2.  $\mathbb{K}^{\prime}\sim_{k}\mathbb{K}.$
Proof. Since the only difference between  $\mathbb{K}'$  and  $\mathbb{K}$  is the removal of bidirected edges, any directed cycle that exists in  $\mathbb{K}'$  would also have existed in  $\mathbb{K}$ , which contradicts with the assumption that  $\mathbb{K}$  is a MAG. This establishes that  $\mathbb{K}$  has no directed cycles.
Clearly, any independence statement in  $\mathbb{K}$  holds in  $\mathbb{K}'$ , since it is obtained from  $\mathbb{K}$  by removing edges. Thus any degree- $k$  d-separation relation that holds in  $\mathbb{K}$  also holds in  $\mathbb{K}'$ . Therefore, we only need to show that for any  $c$  of size at most  $k$  ( $a \nsubseteq b | c$ ) $_{\mathbb{K}}$  implies ( $a \nsubseteq b | c$ ) $_{\mathbb{K}'}$ .
Suppose for the sake of contradiction that  $a \nsubseteq b | c$  in  $\mathbb{K}$  but  $a \perp b | c$  in  $\mathbb{K}'$ . Let  $p$  be a d-connecting path between  $a, b$  given  $c$  in  $\mathbb{K}$ . This path must be closed in  $\mathbb{K}'$ . Since the only difference between the two graphs is the removal of bidirected edges, ancestralty relations cannot be different. Thus, it cannot be the case that a collider that was open in  $\mathbb{K}$  is now closed in  $\mathbb{K}'$  and is closing the path  $p$ . Any collider that was open must still be open. Thus, the only way for  $p$  to be closed in  $\mathbb{K}'$  is if some bidirected edge  $X \leftrightarrow Y$  along  $p$  is removed. However, by Lemma A.14, for any such bidirected edge in  $\mathbb{K}$ , and for any conditioning set of size at most  $c$ , we have a d-connecting path called a replacement path with an incoming edge to both  $X$  and  $Y$ . Consider the path  $q$  obtained by replacing every bidirected edge along  $p$  with a corresponding replacement path. Since  $a, b$  are d-separated by assumption, this path cannot be open. As this path is a concatenation of several d-connecting paths – either sub-paths of  $p$ , which must be open, or replacement paths which must be open, by Lemma A.4, they must have no overlapping nodes, and some node at the junction of these paths must be a collider and non-ancecestor of  $c$ . However, since we replaced bidirected edges  $X \leftrightarrow Y$  with paths of the form  $X \leftarrow * \dots * \rightarrow Y$ , both  $X$  and  $Y$  must have the same collider status on both  $p$  and  $q$ . Thus, they cannot be blocking  $q$  since they are not blocking  $p$ . This means that  $q$  is d-connecting in  $\mathbb{K}'$ , which is a contradiction. This proves the lemma that  $\mathbb{K}$  and  $\mathbb{K}'$  must entail the same degree- $k$  d-separation relations, which implies they are  $k$ -Markov equivalent.
The only if direction: Suppose a mixed graph is a  $k$ -closure graph, i.e.,  $\mathbb{K} = \mathcal{C}_k(D)$  for some DAG  $D$  and has the edge  $a \leftrightarrow b$ . Suppose for the sake of contradiction that  $a, b$  are not  $k$ -covered in  $\mathbb{K} - (a \leftrightarrow b)$ . Let  $\mathbb{K}'$  be the graph obtained from  $\mathbb{K}$  by removing all the bidirected edges. Note that  $\mathbb{K}'$  is a DAG since  $\mathbb{K}$  has no directed cycles. Also note that all edges in  $D$  must appear in  $\mathbb{K}'$  by construction of  $k$ -closure graphs.  $D$  can therefore be obtained from  $\mathbb{K}$  by removing edges. Thus, any d-separation statement in  $\mathbb{K}$  must also hold in  $D$ . Therefore,  $a, b$  must be conditionally independent given some subset  $c$  of size at most  $k$  in  $D$ . This means  $\mathbb{K}$ , in which  $a, b$  are adjacent, cannot be the  $k$ -closure graph of  $D$ , which is a contradiction.
If direction: Suppose a mixed graph  $\mathbb{K}$  satisfies the conditions in Theorem 3.9. By Lemma A.15, for any such mixed graph  $\mathbb{K}$ , there is a DAG whose  $k$ -closure is  $\mathbb{K}$ , which shows that any such  $\mathbb{K}$  is a valid  $k$ -closure graph, proving the theorem.
A.4 Proof of Lemma 3.12
Let  $K_{1} = \mathcal{C}_{k}(D_{1}), K_{2} = \mathcal{C}_{k}(D_{2})$  be two  $k$ -closure graphs with the same skeleton and unshielded colliders. Suppose for the sake of contradiction that there is a path  $p$  that is discriminating for a triple  $\langle u, Y, v \rangle$  in both such that  $Y$  is a collider along  $p$  in  $\mathcal{C}_{k}(D_{1})$  and a non-collider in  $\mathcal{C}_{k}(D_{2})$ . Thus, in  $\mathcal{C}_{k}(D_{1})$  we have the path  $p$  as
$$
a * \rightarrow z _ {1} \leftrightarrow z _ {2} \leftrightarrow \dots \leftrightarrow z _ {m} \leftrightarrow u \leftrightarrow Y \leftrightarrow v \tag {23}
$$
where  $z_{i} \to v, \forall i$  and  $u \to v$  and  $a, v$  are non-adjacent. Note that we cannot have  $Y \leftrightarrow v$  instead of  $Y \leftrightarrow v$  since this would create the almost directed cycle  $u \to v \to Y \leftrightarrow u$ . The same path with  $Y$  as a non-collider can take two configurations in  $\mathcal{C}_k(D_2)$ , either as
$$
a * \rightarrow z _ {1} \leftrightarrow z _ {2} \leftrightarrow \dots \leftrightarrow z _ {m} \leftrightarrow u \leftrightarrow Y \rightarrow v \tag {24}
$$
$$
a * \rightarrow z _ {1} \leftrightarrow z _ {2} \leftrightarrow \dots \leftrightarrow z _ {m} \leftrightarrow u \leftarrow Y \rightarrow v \tag {25}
$$
Other paths where  $Y$  is a non-collider would either render  $u$  a non-collar, which cannot happen by definition of a discriminating path, or create a directed or almost directed cycle. Since  $a, v$  are non-adjacent by definition of a discriminating path, there must be some  $S: |S| \leq k$  where  $(a \perp v | S)_{\mathcal{C}_k(D_1)}$ . Note that  $S$  must include all  $z_i$ 's and  $u$ , and not include  $Y$  since otherwise there would be d-connecting paths between  $a, v$  in  $\mathcal{C}_k(D_1)$  due to the discriminating path. This means that  $(a \nmid v | S)_{\mathcal{C}_k(D_2)}$ .
Since  $u \leftrightarrow Y$  in  $\mathcal{C}_k(D_1)$ , by Lemma A.2, there must be a d-connecting path between  $u, Y$  in  $D_1$  conditioned on  $S$  that has an arrowhead at  $Y$ . By construction, this path must also appear in  $\mathcal{C}_k(D_1)$ . Since the path is inherited from  $D_1$ , it does not have bidirected edges. Consider the shortest of all such d-connecting paths, call this path  $q$ . Let  $X$  be the node adjacent to  $Y$  along  $q$ . Thus,  $q$  has the form
$$
u \leftarrow \dots \rightarrow X \rightarrow Y. \tag {26}
$$
We have that  $X \to Y$  in both  $D_{1}$  and  $\mathcal{C}_k(D_1)$ . In  $\mathcal{C}_k(D_1)$ , we have  $X \to Y \leftrightarrow v$ . Since the edge between  $Y, v$  has a tail at  $Y$  in  $\mathcal{C}_k(D_2)$ , this collider cannot exist in  $\mathcal{C}_k(D_2)$ . Thus, it must be the case that this collider is shielded in  $\mathcal{C}_k(D_1)$ , i.e.,  $X$  and  $v$  are adjacent in  $\mathcal{C}_k(D_1)$ . Since  $\mathcal{C}_k(D_1), \mathcal{C}_k(D_2)$  have the same skeleton, they must also be adjacent in  $\mathcal{C}_k(D_2)$ .
Now consider the path obtained by concatenating the subpath of  $p$ $a * \rightarrow \ldots u$ , and the subpath of  $q$  between  $u$  and  $X$ , and the edge between  $X$  and  $v$  in  $\mathcal{C}_k(D_1)$ . Call this path  $r$ . Note that the subpath of  $q$  is d-connecting given  $S$ , as well as the subpath of  $p$  since  $z_i$ 's and  $u$  are in  $S$ . Thus, unless  $X$  is a collider on it, the path  $r$  between  $a, v$  will be open, which would lead to a contradiction since  $a, v$  are d-separated given  $S$  in  $\mathcal{C}_k(D_1)$ . Thus, the edge between  $X, v$  must have an arrowhead at  $X$ . Let  $W$  be the node before  $X$  along  $q$ . Thus we have  $W \rightarrow X \leftrightarrow v$  in  $\mathcal{C}_k(D_1)$ . Note that  $X \leftarrow v$  is not possible since this would create an almost directed cycle  $X \rightarrow Y \leftrightarrow v \rightarrow X$  in  $\mathcal{C}_k(D_1)$ .
Suppose this collider is unshielded and appears in  $\mathcal{C}_k(D_2)$  as well:  $W\ast \to X\gets *v$  in  $\mathcal{C}_k(D_2)$ . Thus in  $\mathcal{C}_k(D_2)$ , we have  $Y\rightarrow v\ast \rightarrow X\leftarrow *W$ . Since  $X,Y$  are adjacent, it must be that  $X\leftarrow Y$  or  $X\leftrightarrow Y$  to avoid a directed or almost directed cycle. Thus in  $\mathcal{C}_k(D_2)$ , we have  $X\leftarrow *Y$ . However, this creates the collider  $W\ast \rightarrow X\leftarrow *Y$  in  $\mathcal{C}_k(D_2)$ . Note that this collider cannot appear in  $\mathcal{C}_k(D_1)$  since the edge between  $X,Y$  has a tail at  $X$  in  $\mathcal{C}_k(D_1)$ . Thus the collider must be shielded, meaning that  $W,Y$  must be adjacent, and both in  $\mathcal{C}_k(D_2)$  and in  $\mathcal{C}_k(D_1)$ . Since we have  $W\rightarrow X\rightarrow Y$  in  $\mathcal{C}_k(D_1)$ , the edge must be  $W\rightarrow Y$  in  $\mathcal{C}_k(D_1)$ . Furthermore, similar to  $X,W$  cannot be in the conditioning set since this would block the path  $q$ . This means there is a d-connecting path that has an arrowhead at  $Y$  that is shorter than  $q$ , which is a contradiction.
Thus the collider  $W \to X \leftrightarrow v$  in  $\mathcal{C}_k(D_1)$  must be shielded. Similar to the above argument,  $W$  must be a collider along the path constructed by concatenating the subpath  $a * \rightarrow \ldots$  of  $p$ , and the subpath of  $q$  between  $u$  and  $W$ , and the edge between  $W$  and  $v$  since otherwise this path would be open, which would contradict with  $a \perp v | S$ . Let  $V$  be the node next to  $W$  along  $q$ . Thus we have  $V \to W \to X$  along  $q$  and  $V \to W \leftarrow *v$  is a collider in  $\mathcal{C}_k(D_1)$ . In fact, it must be that  $W \leftrightarrow v$  since otherwise there would be an almost directed cycle  $v \to W \to X \to Y \leftrightarrow v$  in  $\mathcal{C}_k(D_1)$ .
Suppose the collider  $V \to W \leftrightarrow v$  in  $\mathcal{C}_k(D_1)$  is unshielded and also appears in  $\mathcal{C}_k(D_2)$ . Note that if  $V, X$  were adjacent in  $\mathcal{C}_k(D_1)$ , the orientation would have to be as  $V * \to X$  since otherwise there
would be a directed cycle  $V \to W \to X \to V$  in  $\mathcal{C}_k(D_1)$ . But this would imply that there is a shorter path than  $q$  that connects  $u, Y$  and has an arrow into  $Y$ . Thus,  $V, X$  must be non-adjacent in  $\mathcal{C}_k(D_1)$  and hence in  $\mathcal{C}_k(D_2)$ . Thus,  $\langle V, W, X \rangle$  is an unshielded non-collider in  $\mathcal{C}_k(D_1)$  and must also be in  $\mathcal{C}_k(D_2)$ . Thus it must be that  $W \to X$  in  $\mathcal{C}_k(D_2)$ . Since  $v * \to W \to X$  in  $\mathcal{C}_k(D_2)$ , it must be that  $v * \to X$  in  $\mathcal{C}_k(D_2)$  to avoid a directed or almost directed cycle. Since  $Y \to v * \to X$  in  $\mathcal{C}_k(D_2)$ , it must be that  $X \leftarrow *Y$  to avoid a cycle or almost directed cycle in  $\mathcal{C}_k(D_2)$ . However, now we have a collider  $W \to X \leftarrow *Y$  in  $\mathcal{C}_k(D_2)$  that is a non-collider in  $\mathcal{C}_k(D_1)$  since in  $\mathcal{C}_k(D_1)$  we have  $X \to Y$ . Thus, this collider must be shielded, i.e.,  $W, Y$  must be adjacent in  $\mathcal{C}_k(D_2)$ . Thus, they must also be adjacent in  $\mathcal{C}_k(D_1)$ . Since  $W \to X \to Y$  in  $\mathcal{C}_k(D_1)$ , it must be that  $W \to Y$  in  $\mathcal{C}_k(D_1)$  to avoid a cycle. But this means there is a shorter d-connecting path between  $u, Y$  given  $S$  with an arrowhead at  $Y$ , which is a contradiction.
Therefore, the collider  $V \to W \leftrightarrow v$  must be shielded in  $\mathcal{C}_k(D_1)$ . We can repeat the above argument as many times as needed continuing from the parent of  $V$  along  $q$ . As we keep shielding more and more colliders in  $\mathcal{C}_k(D_1)$ , eventually when we shield the first node along  $q$  next to  $u$ , we will end up with a directed path from  $u$  to  $Y$ . However, this is a contradiction since bidirected edge was added between  $u, Y$  which implies that  $u$  is not an ancestor of  $Y$ .
Therefore, if two  $k$ -closure graphs  $\mathcal{C}_k(D_1), \mathcal{C}_k(D_2)$  have the same skeleton and unshielded colliders, then they cannot have different colliders along discriminating paths, which proves the lemma.
A.5 Proof of Corollary 3.13
$(\Rightarrow)$  If they are Markov equivalent then by Lemma 3.8 they are two Markov equivalent MAGs. Therefore by Theorem 3.11 they have the same skeleton, and the same unshielded colliders.
$(\Leftarrow)$  If they have the same skeleton and the same unshielded colliders, then by Lemma 3.12, they must have the same colliders along discriminating paths. Thus, by Theorem 3.11 they are equivalent.
A.6 Proof of Theorem 3.14
$(\Rightarrow)$  Suppose  $D_{1}, D_{2}$  are  $k$ -Markov equivalent. For the sake of contradiction suppose that  $\mathcal{C}_k(D_1)$  and  $\mathcal{C}_k(D_2)$  are not Markov equivalent. By Corollary 3.13, this happens when either they have different skeletons, or different unshielded colliders. Thus, there are two cases:
$k$ -closures have different skeletons:  $\mathcal{C}_k(D_1)$  and  $\mathcal{C}_k(D_2)$  have different skeletons. Suppose without loss of generality that  $\mathcal{C}_k(D_1)$  has an extra edge, i.e.,  $a, b$  are adjacent in  $\mathcal{C}_k(D_1)$  but not in  $\mathcal{C}_k(D_2)$ . This can only happen if  $\exists S \subset V : |S| \leq k$  such that  $(a \perp b|_{D_2})$  while there is no such separating set in  $D_1$ , implying that  $(a \nsubseteq b|_{D_1})$ . This is a contradiction with the supposition that  $D_1, D_2$  are  $k$ -Markov equivalent. Therefore,  $\mathcal{C}_k(D_1)$  and  $\mathcal{C}_k(D_2)$  must have the same skeletons.
For completeness, we restate the definition of unshielded collider in  $k$ -closure graphs, which is identical to how it is defined in MAGs.
Definition A.16. A triple  $\langle a, c, b \rangle$  in a  $k$ -closure graph is called an unshielded collider if  $a, b$  are non-adjacent,  $a, c$  and  $c, b$  are adjacent and the edges adjacent to  $c$  have an arrowhead mark at  $c$ .
According to the definition, a triple  $\langle a, c, b \rangle$  in a  $k$ -closure graph  $\mathcal{C}_k(D)$  can be an unshielded collider if the induced subgraph on the nodes take either of the following configurations:
1.  $a\to c\gets b$
2.  $a\to c\leftrightarrow b$
3.  $a\leftrightarrow c\gets b$
4.  $a\leftrightarrow c\leftrightarrow b$
We use asterisk to represent either an arrowhead or a tail.  $\ast \rightarrow$  represents either  $\rightarrow$ ,  $\leftrightarrow$ . Similarly,  $\leftarrow\ast$  represents either  $\leftarrow$  or  $\leftrightarrow$ .
$k$ -closures have different unshielded colliders: Without loss of generality assume that  $(a* \rightarrow c \leftarrow *b)_{\mathcal{C}_k(D_1)}$  but this unshielded collider does not exist in  $\mathcal{C}_k(D_2)$ , i.e.,  $\langle a, c, b \rangle$  is an unshielded non-collider in  $\mathcal{C}_k(D_2)$ .
Lemma A.17. In a  $k$ -closure graph  $\mathcal{C}_k(D)$ , two nodes  $a, b$  are non-adjacent iff  $(a \perp b | S)_{\mathcal{C}_k(D)}$  for some  $S \subset V$ .
Proof.  $(\Rightarrow)$  Suppose  $a, b$  are non-adjacent in  $\mathcal{C}_k(D)$ . Thus it must be the case that  $(a \perp b|S)_D$  for some  $S$  such that  $|S| \leq k$ , since otherwise  $a, b$  would be made adjacent during the construction of  $\mathcal{C}_k(D)$ . By Lemma 3.6, this means  $(a \perp b|S)_{\mathcal{C}_k(D)}$ . This establishes the only if direction.
$(\Leftarrow)$  Suppose now that  $(a \perp b | S)_{\mathcal{C}_k(D)}$ . By definition of d-separation, adjacent nodes cannot be d-separated and thus  $a, b$  must be non-adjacent in  $\mathcal{C}_k(D)$ .
Lemma A.18. In a  $k$ -closure graph  $\mathcal{C}_k(D)$ , any pair of non-adjacent nodes  $a, b$  are separable by a set of size at most  $k$ , i.e.,  $\exists S: |S| \leq k$ ,  $(a \perp b | S)_{\mathcal{C}_k(D)}$ .
Proof. Suppose otherwise: For some non-adjacent pair  $a, b$  all d-separating sets in  $\mathcal{C}_k(D)$  have size greater than  $k$ . Let  $S$  be the smallest subset that makes  $a, b$  d-separated, i.e.,  $(a \perp b | S)_{\mathcal{C}_k(D)} -$  one exists by Lemma A.17. Clearly,  $|S| > k$ . Note that non-adjacency of  $a, b$  in  $\mathcal{C}_k(D)$  implies that  $a, b$  are separable in  $D$  with some set  $T$  of size at most  $k$ :  $(a \perp b | T)_D$ . Since  $|T| \leq k < |S|$  and  $S$  is the smallest subset that d-separates  $a, b$  in  $\mathcal{C}_k(D)$ , it must be that  $(a \perp b | T)_{\mathcal{C}_k(D)}$ . However, this contradicts with Lemma 3.6 which says that  $D$  and  $\mathcal{C}_k(D)$  must entail the same d-separation constraints for conditioning sets of size up to  $k$ .
Since  $a, b$  are non-adjacent in both graphs, by Lemma A.18 there are two subsets  $S_{1}, S_{2}$  of size at most  $k$  such that
$$
(a \perp b | S _ {1}) _ {\mathcal {C} _ {k} (D _ {1})}, (a \perp b | S _ {2}) _ {\mathcal {C} _ {k} (D _ {2})}. \tag {27}
$$
Clearly,  $S_{1} \not\equiv c, S_{2} \ni c$  since  $c$  is a collider between  $a, b$  in  $\mathcal{C}_k(D_1)$  and a non-collider in  $\mathcal{C}_k(D_2)$ . If we switch the conditioning sets, due to the different collider status of  $c$  in both graphs the d-separation statements will switch to d-connection statements:
$$
\left(a \not \perp b | S _ {1}\right) _ {\mathcal {C} _ {k} (D _ {2})}, \left(a \not \perp b | S _ {2}\right) _ {\mathcal {C} _ {k} (D _ {1})}. \tag {28}
$$
Since  $S_{1}$  and  $S_{2}$  have size of at most  $k$ , then from Lemma 3.6 we have that:
$$
(a \perp b | S _ {1}) _ {D _ {1}}, (a \not \perp b | S _ {1}) _ {D _ {2}} \tag {29}
$$
This implies that  $D_{1}, D_{2}$  are not  $k$ -Markov equivalent which is a contradiction.