SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Proof. Define  $V_{1} = \{y_{kl}^{ij}\in V_{bot}^{\mathcal{H}},\forall i,j,k,l\}$ , and  $V_{2} = V_{bot}^{\mathcal{H}}\setminus V_{1}$ . By construction of  $\mathcal{H}$ , the vertices of  $V_{2}$  have directed edges only to vertices in  $V_{2}$ . Therefore, for each vertex  $v\in V_2$ , we have  $v\notin \operatorname{Anc}_{\mathcal{H}[H]}(y)$ . As a result,  $V_{2}\cap H = \emptyset$ , since by definition of hedge, any vertex of  $H$  is an ancestor of  $y$  in  $\mathcal{H}[H]$ . Now, consider an arbitrary vertex  $v\in V_{1}$ . By construction of  $\mathcal{H}$ , if there exists a bidirected edge  $\{v,v^{\prime}\} \in E_b^{\mathcal{H}}$ , we must have that  $v^{\prime}\in V_{2}$ . Therefore, if  $v\in H$ , there must be at least one vertex  $v^{\prime}\in V_{2}\cap H$ . Since we proved  $V_{2}\cap H = \emptyset$ ,  $v$  cannot be in  $H$ . Consequently,  $V_{1}\cap H = \emptyset$ .
Lemma A.4. Suppose  $\mathcal{G}$  is an ADMG,  $Y$  is a set of its vertices, and  $(\mathcal{H}, Y^{mcip}) = \mathcal{T}(\mathcal{G}, Y)$ . Suppose there is a hedge formed for  $Q[y_{j}^{ij}]$  in  $\mathcal{H}$ , where  $y_{i}, y_{j} \in Y$  and  $y_{j}^{ij}$  is the vertex corresponding to the pair  $(y_{i}, y_{j})$  added in step  $(f)$  of the transform  $\mathcal{T}$ . Let  $H$  denote the set of vertices of this hedge. If  $v \in H \cap V_{bot}^{\mathcal{H}}$ , then  $v$  has the superscript  $ij$ , that is,  $v$  is either one of the vertices  $y_{k}^{ij}$ , or one of the vertices  $y_{kl}^{ij}$ , where  $i \leq k, l \leq j$ . In the latter case,  $y_{kl}^{b} \in H$ .
Proof. Define  $V_{1} = \{y_{kl}^{mn} \in V_{bot}^{\mathcal{H}}, \forall m, n, k, l\}$ , and  $V_{2} = V_{bot}^{\mathcal{H}} \setminus V_{1}$ . Suppose  $V_{1}^{*} = \{v_{kl}^{ij} \in V_{bot}^{\mathcal{H}}, \forall k, l\}$  and  $V_{2}^{*} = \{v_{k}^{ij} \in V_{bot}^{\mathcal{H}}, \forall k\}$ . Also define  $V_{1}' = V_{1} \setminus V_{1}^{*}$ ,  $V_{2}' = V_{2} \setminus V_{2}^{*}$ . For the first part of the claim, it suffices to show that  $V_{1}' \cap H = \emptyset$ ,  $V_{2}' \cap H = \emptyset$ . By construction of  $\mathcal{H}$ , the vertices of  $V_{2}'$  do not have any child out of  $V_{2}'$ . Therefore,  $V_{2}' \cap A n c_{\mathcal{H}[H]}(y_{j}^{ij}) = \emptyset$ . This implies that  $V_{2}' \cap H = \emptyset$ . Now let  $v_{1}^{i' j'}$  be an arbitrary vertex in  $V_{1}'$ . By construction of  $\mathcal{H}$ ,  $v_{1}^{i' j'}$  has bidirected edges only to vertices of  $V_{2}'$ . This implies that if  $v_{1}^{i' j'} \in H$ , there must be at least one vertex of  $V_{2}'$  in  $H$  which is in contradiction with  $V_{2}' \cap H = \emptyset$ . Therefore,  $v_{1}^{i' j'} \notin H$ . Since  $v_{1}^{i' j'}$  is an arbitrary vertex in  $V_{1}'$ , we conclude  $V_{1}' \cap H = \emptyset$ .
Now, we prove that if  $v \in H$  is one of the vertices  $y_{kl}^{ij}$ , we have  $y_{kl}^b \in H$ . Since  $y_{kl}^{ij} \in H$ , there exists a directed path from  $y_{kl}^{ij}$  to  $y_j^{ij}$  in  $\mathcal{H}[H]$ . Since  $y_{kl}^b$  is the only child of  $y_{kl}^{ij}$ , the aforementioned path passes through  $y_{kl}^b$ . Therefore,  $y_{kl}^b \in H$ .
Lemma A.5. Suppose  $\mathcal{G}' = (V^{\mathcal{G}'}', E_d^{\mathcal{G}'}', E_b^{\mathcal{G}'}')$  is an ADMG,  $Y \subseteq V^{\mathcal{G}'}$  is a set of its vertices, and  $(\mathcal{H}', Y^{mcip}) = \mathcal{T}(\mathcal{G}', Y)$ . Let  $E_d'' \subseteq E_d^{\mathcal{G}'}$  and  $E_b'' \subseteq E_b^{\mathcal{G}'}$  be arbitrary edges of  $\mathcal{G}$ , and define  $E_d^{\mathcal{G}} = E_d^{\mathcal{G}'} \setminus E_d''$ ,  $E_b^{\mathcal{G}} = E_b^{\mathcal{G}'} \setminus E_b''$ . Define  $\mathcal{G} = (V^{\mathcal{G}}, E_d^{\mathcal{G}}, E_b^{\mathcal{G}})$  and  $\mathcal{H} = \mathcal{H}'[V^{\mathcal{H}'} \setminus V']$ , where  $V^{\mathcal{G}} = V^{\mathcal{G}'}$  and  $V' = \{v \in V^{\mathcal{H}'} | \exists e \in E_b'' \cup E_d'', v = \mathcal{T}_2(e)\}$ . Suppose there is a hedge formed for  $Q[y_j^{ij}]$  in  $\mathcal{H}$  for some  $i, j$ . Let  $H$  denote the set of vertices of this hedge in  $\mathcal{H}$ . The set of vertices  $Y^* = \{y_k | y_k^{ij} \in H\}$  is a district in  $\mathcal{G}[Y]$ . Moreover,  $H_{top} = \text{Anc}_{\mathcal{H}[H_{top}]}(Y^*)$ , where  $H_{top} = H \cap V_{top}^{\mathcal{H}}$ .
Proof. First we prove that  $Y^{*}$  is a district in  $\mathcal{G}[Y]$ . Consider an arbitrary vertex  $y_{k}^{ij}$  in  $H$ . By definition of hedge, there exists a bidirected path,  $p_1$ , between  $y_{k}^{ij}$  and  $y_{j}^{ij}$  in  $\mathcal{H}[H]$ . Let  $Y^{ij}$  denotes the set of vertices in  $H$  such that their superscript is  $ij$ . Lemma A.4 implies that  $H \subseteq V_{top}^{\mathcal{H}} \cup Y^{ij}$ . Furthermore, by construction of  $\mathcal{H}$ , there is only one bidirected edge between  $Y^{ij}$  and  $H \setminus Y^{ij}$ , which is  $\{y_j, y_i^{ij}\}$ . Therefore, all of the vertices on the path  $p_1$  are in  $Y^{ij}$ . Now, we define  $Y_{1}' = \{y_{k}|y_{k}^{ij} \in p_{1}\}$  and  $Y_{2}' = \{y_{kl}^{b}|y_{kl}^{ij} \in p_{1}\}$ , i.e., the  $V_{top}^{\mathcal{H}}$  counterparts of the vertices in  $p_1$ . Since the vertices on  $p_1$  are in  $H$ ,  $Y_{1}' \subseteq Y^{*}$ . From Lemma A.4, we know that if  $y_{kl}^{ij} \in H$ , then,  $y_{kl}^{b} \in H$ . It implies that  $Y_{2}' \subseteq H$ . As a result,  $Y_{1}'$  and  $Y_{2}'$  are both vertices of  $\mathcal{H}$ . Now if we replace all the vertices in  $p_1$  with their corresponding counterpart in  $Y_{1}' \cup Y_{2}'$ , we arrive at a bidirected path  $p_2$  between  $y_k$  and  $y_j$  in  $\mathcal{H}[Y_1' \cup Y_2']$  (as by construction the same edges exist in  $V_{top}^{\mathcal{H}}$ ). By definition of  $\mathcal{G}$  and  $\mathcal{H}$ , if a vertex  $y_{kl}^{b}$  exists in  $\mathcal{H}$ , the corresponding edge  $\{y_k, y_l\}$  exists in  $\mathcal{G}$ . As a result, a bidirected path between  $y_k$  and  $y_l$  exists in  $\mathcal{G}[Y_1']$ . Noting that  $y_k$  is an arbitrary vertex in  $Y^{*}$  and  $Y_{1}' \subseteq Y^{*}$ , this implies that all of the vertices of  $Y^{*}$  are in the same district as  $y_j$  in  $\mathcal{G}[Y^{*}]$ , which completes the proof.
Next, we prove that  $H_{top} = \text{Anc}_{\mathcal{H}[H_{top}]}(Y^{*})$ . To this end, it suffices to show that there is a directed path from an arbitrary vertex  $v \in H_{top}$  to  $Y^{*}$  in  $\mathcal{H}[H_{top}]$ . Since  $H$  forms a hedge for  $Q[y_j^{ij}]$  in  $\mathcal{H}$ , there exists a directed path from  $v$  to  $y_j^{ij}$  in  $\mathcal{H}[H]$ . This path must go through the only parent of  $y_j^{ij}$ , which is  $y_i^{ij}$ . Then, the last vertex on the path is one of the parents of  $y_i^{ij}$ . If this parent is  $y_i$ , we are done as we have a directed path from  $v$  to  $y_i$ , where  $y_i \in Y^*$  and it has no ancestors in  $H \setminus H_{top}$ . Otherwise, let this parent be  $y_k^{ij}$  for some  $i < k < j$ . Now the last vertex on the path before  $y_k^{ij}$  must be  $y_k$ , which is the only parent of  $y_k^{ij}$ . Note that by definition of  $Y^{*}$ ,  $y_k \in Y^{*}$ . Therefore,  $v$  has a directed path to  $Y^{*}$  in  $\mathcal{H}[H_{top}]$ .
Lemma A.6. Suppose  $\mathcal{G} = (V^{\mathcal{G}},E_d^{\mathcal{G}},E_b^{\mathcal{G}})$  is an ADMG,  $Y$  is a set of its vertices, and  $(\mathcal{H},Y^{mcip}) = \mathcal{T}_2(\mathcal{G},Y)$ . Suppose there is a hedge formed for  $Q[y]$  in  $\mathcal{H}$  for some  $y\in Y^{mcip}$ . Let  $H$  denote the set of vertices of this hedge. Then  $H\cap X\neq \emptyset$ , where  $X = V^{\mathcal{G}}\setminus Y$ .
Proof. Since  $H$  forms a hedge for  $Q[y]$  in  $\mathcal{H}$ , there exists a vertex  $h \in H$  such that  $\{y, h\} \in E_b^{\mathcal{H}}$ . There are two possibilities for  $y \in Y^{mcip}$ :
-  $y = y_{i} \in Y$ . From Lemma A.4 we have  $h \notin V_{bot}^{\mathcal{H}}$ . Therefore, by construction of  $\mathcal{H}$ ,  $h = y_{ij}^{b}$  for some  $j$ .
-  $y = y_{j}^{ij} \in V_{bot}^{\mathcal{H}}$ . By construction of  $\mathcal{H}$ ,  $h = y_{kj}^{ij}$  for some  $k$ . Vertex  $h$  must have a directed path to  $y$  in  $H$  by definition of hedge, which must go through the only child of  $h$ , i.e.,  $y_{kl}^{b}$ .
In both cases, we showed that there exists a vertex  $v = y_{ij}^{b} \in H$  for some  $i, j$ . By definition of hedge, there is a bidirected path,  $p$ , from  $v$  to  $y$  in  $\mathcal{H}$  because  $v \in \text{Anc}_{\mathcal{H}}(y)$ . Since all of the children of  $v$  are in  $X$ , there is at least one vertex in  $X$  on path  $p$ . Therefore,  $H$  includes at least one vertex of  $X$ .
Lemma A.7. [Inverse transform preserves edges.] Suppose  $\mathcal{G}' = (V^{\mathcal{G}', E_d^{\mathcal{G}', E_b^{\mathcal{G}'}})$  is an ADMG,  $Y \subseteq V^{\mathcal{G}'}$  is a set of its vertices, and  $(\mathcal{H}', Y^{mcip}) = \mathcal{T}_2(\mathcal{G}', Y)$ . Let  $E_d'' \subseteq E_d^{\mathcal{G}'}$  and  $E_b'' \subseteq E_b^{\mathcal{G}'}$  be arbitrary edges of  $\mathcal{G}$ , and define  $E_d^{\mathcal{G}} = E_d^{\mathcal{G}'} \setminus E_d''$ ,  $E_b^{\mathcal{G}} = E_b^{\mathcal{G}'} \setminus E_b''$ . Define  $\mathcal{G} = (V^{\mathcal{G}}, E_d^{\mathcal{G}}, E_b^{\mathcal{G}})$  and  $\mathcal{H} = \mathcal{H}'[V^{\mathcal{H}'} \setminus V']$ , where  $V^{\mathcal{G}} = V^{\mathcal{G}'}$  and  $V' = \{v \in V^{\mathcal{H}'} | \exists e \in E_b'' \cup E_d''\}, v = \mathcal{T}_2(e)\}$ . Let  $W \subseteq V_{top}^{\mathcal{H}}$  be a set of vertices of  $\mathcal{H}$ . Let  $W_s \subseteq W \cap V^{\mathcal{G}}$  be a subset of  $W$  such that  $W_s$  are vertices of  $\mathcal{G}$  as well. Consider the inverse transform of  $\mathcal{H}[W]$  in the ADMG  $\mathcal{G}$ , i.e., for any  $v = v_{ij}^b \in W$ , delete  $v$  and all edges incident to it and draw a bidirected edge between  $v_i$  and  $v_j$ , and for any  $v = v_{ij}^d$ , delete  $v$  and all edges incident to it and draw a directed edge from  $v_i$  to  $v_j$ . Let the resulting subgraph (which is a subgraph of  $\mathcal{G}$ ) be denoted by  $\mathcal{G}[W^{-1}]$  with the set of vertices  $W^{-1} \subseteq V^{\mathcal{G}}$ . If  $\text{Anc}_{\mathcal{H}[W]}(W_s) = W$ , then  $\text{Anc}_{\mathcal{G}[W^{-1}]}(W_s) = W^{-1}$ . Moreover, if  $W$  is a district in  $\mathcal{H}[W]$ , then  $W^{-1}$  is a district in  $\mathcal{G}[W^{-1}]$ .
Proof. First, we show that if  $\text{Anc}_{\mathcal{H}[W]}(W_s) = W$ , then  $\text{Anc}_{\mathcal{G}[W^{-1}]}(W_s) = W^{-1}$ . Let  $v$  be an arbitrary vertex in  $W^{-1}$ . Vertex  $v$  is in  $W$  because  $W^{-1} \subseteq W$ . Since  $v \in W$  and  $v \in \text{Anc}_{\mathcal{H}[W]}(W_s)$ ,  $v$  has a directed path  $v \to \ldots$ . Since  $w \in W$ , we have  $w \in W_s$  in  $\mathcal{H}[W]$ . For each vertex  $v_{ij}^d$  on path  $l$ , we have  $v_i, v_j \in \mathcal{G}[W^{-1}]$  and since  $v_{ij}^d \in V^\mathcal{H}$ , by definition of  $\mathcal{G}$  and  $\mathcal{H}$ , there exists  $(v_i, v_j) \in E_d^\mathcal{G}$  s.t.  $i \prec j$ , and consequently,  $(v_i, v_j) \in E_d^{\mathcal{G}[W^{-1}]}$ . Therefore, there exists a directed path from  $v$  to  $w$  in  $\mathcal{G}[W^{-1}]$ . Noting that  $v$  is an arbitrary vertex in  $W^{-1}$ , we conclude that  $\text{Anc}_{\mathcal{G}[W^{-1}]}(W_s) = W^{-1}$ .
Now, we prove that if  $W$  is a district in  $\mathcal{H}[W]$ , then  $W^{-1}$  is a district in  $\mathcal{G}[W^{-1}]$ . Consider two vertices  $v_{1}, v_{2} \in W^{-1}$ . Since  $v_{1}, v_{2} \in W$  and  $W$  is a district, there exists a bidirected path  $v_{1} \leftrightarrow \ldots \leftrightarrow v_{i} \leftrightarrow v_{ij}^{b} \leftrightarrow v_{j} \leftrightarrow v_{2}$ , denoted by  $p$ , between  $v_{1}$  and  $v_{2}$  in  $\mathcal{H}[W]$ . Each vertex  $v_{ij}^{b}$  on path  $p$  is in  $\mathcal{H}$  and  $v_{i}, v_{j} \in \mathcal{G}[W^{-1}]$ . By definition of  $\mathcal{G}$  and  $\mathcal{H}$ , we have  $\{v_{i}, v_{j}\} \in E_{b}^{\mathcal{G}}$ . Therefore,  $\{v_{i}, v_{j}\} \in E_{b}^{\mathcal{G}[W^{-1}]}$ . Then, there is a bidirected path between  $v_{1}$  and  $v_{2}$  in  $\mathcal{G}[W^{-1}]$ . Since  $v_{1}$  and  $v_{2}$  are two arbitrary vertices in  $W^{-1}$ , it implies that  $W^{-1}$  is a district in  $\mathcal{G}[W^{-1}]$ .
Lemma A.8. [Transform preserves hedges.] Suppose  $\mathcal{G}' = (V^{\mathcal{G}'}', E_d^{\mathcal{G}'}', E_b^{\mathcal{G}'}')$  is an ADMG,  $Y \subseteq V^{\mathcal{G}'}$  is a set of its vertices, and  $(\mathcal{H}', Y^{mcip}) = \mathcal{T}_2(\mathcal{G}', Y)$ . Let  $E_d'' \subseteq E_d^{\mathcal{G}'}$  and  $E_b'' \subseteq E_b^{\mathcal{G}'}$  be arbitrary edges of  $\mathcal{G}$ , and define  $E_d^{\mathcal{G}} = E_d^{\mathcal{G}'} \setminus E_d''$ ,  $E_b^{\mathcal{G}} = E_b^{\mathcal{G}'} \setminus E_b''$ . Define  $\mathcal{G} = (V^{\mathcal{G}}, E_d^{\mathcal{G}}, E_b^{\mathcal{G}})$  and  $\mathcal{H} = \mathcal{H}'[V^{\mathcal{H}'} \setminus V']$ , where  $V^{\mathcal{G}} = V^{\mathcal{G}'}$  and  $V' = \{v \in V^{\mathcal{H}'} | \exists e \in E_b'' \cup E_d'', v = \mathcal{T}_2(e)\}$ . Let  $W \subseteq V^{\mathcal{G}}$  be a set of vertices of  $\mathcal{G}$  such that  $W \setminus Y \neq \emptyset$ . Let  $W_s \subseteq W$  be a subset of  $W$ . Let the transformed graph of  $\mathcal{G}[W]$  under  $\mathcal{T}_2$  be denoted by  $\mathcal{H}''$ , where  $\mathcal{H}'' \subseteq \mathcal{H}$ . Define  $W^* = V_{top}^{\mathcal{H}''}$ . If  $\text{Anc}_{\mathcal{G}[W]}(W_s) = W$ , then  $\text{Anc}_{\mathcal{H}[W^*]}(W_s) = W^*$ . Moreover, if  $W$  is a district in  $\mathcal{G}[W]$ , then  $W^*$  is a district in  $\mathcal{H}[W^*]$ .
Proof. First, we prove that if  $\text{Anc}_{\mathcal{G}[W]}(W_s) = W$ , then  $\text{Anc}_{\mathcal{H}[W^*]}(W_s) = W^*$ . Take an arbitrary vertex  $v \in W^*$ . There are two possibilities for  $v$ :
-  $v \in W$ . That is, vertex  $v$  is in  $\mathcal{G}[W]$ .
-  $v \notin W$ . This implies that  $v$  represents an edge  $e$  between two vertices  $v_i$  and  $v_j$  in  $\mathcal{G}[W]$ . There are three possibilities for  $e$ :
-  $e = (v_i, v_j)$ . By construction of  $\mathcal{H}$ ,  $v$  is parent of  $v_j$  in  $\mathcal{H}[W^*]$ , where  $v_j$  is a vertex of  $\mathcal{G}[W]$ .
-  $e = \{v_{i}, v_{j}\}$  and  $v_{i} \in X$  or  $v_{j} \in X$ . In this case,  $v$  is parent of at least one of  $v_{i}$  and  $v_{j}$  in  $\mathcal{H}[W^{*}]$ , w.l.o.g.  $v_{i}$ , where  $v_{i}$  is a vertex of  $\mathcal{G}[W]$ .
-  $e = \{v_{i}, v_{j}\}$  and  $v_{i}, v_{j} \in Y$ . By construction of  $\mathcal{H}$ ,  $v$  is parent of all vertices in  $V^{\mathcal{G}} \setminus Y$ . Since  $W \setminus Y \neq \emptyset$ , there exists a vertex  $x$  in  $\mathcal{G}[W]$  such that  $v$  is a parent of  $x$ .
In all three cases above, we proved that there exists a vertex  $x \in W$  such that  $v$  is a parent of  $x$ .
Therefore, we showed that any vertex  $v \in W^*$  either is itself a vertex in  $W$  or is a parent of a vertex in  $W$ . As a result, it suffices to show that every  $w \in W$  has a directed path to  $W_s$  in  $\mathcal{H}[W^*]$ . We know that  $w$  has a directed path to  $W_s$  in  $\mathcal{G}[W]$  such as  $p$ . Take an arbitrary pair of consecutive vertices on this path, such as  $v_1$  and  $v_2$ . The directed edge  $(v_1, v_2)$  exists in  $\mathcal{G}[W]$ . As a result, the directed path  $v_1 \to v_{12}^d \to v_2$  exists in  $\mathcal{H}[W^*]$ . Starting at  $w$  and repeating this argument for every pair of consecutive vertices on  $p$ , we conclude that there exists a directed path from  $w$  to  $W_s$ , which completes the proof.
Now, we show that if  $W$  is a district in  $\mathcal{G}[W]$ , then  $W^*$  is a district in  $\mathcal{H}[W^*]$ . Take an arbitrary vertex  $v \in W^*$ . There are two possibilities for  $v$ :
-  $v \in W$ . That is,  $v$  is a vertex in  $\mathcal{G}[W]$ .
-  $v \notin W$ . In this case, at least one of the vertices  $v$  represents an edge  $e$  between two vertices  $v_i$  and  $v_j$  in  $\mathcal{G}[W]$ . By construction of  $\mathcal{H}$ ,  $v$  is connected to at least one of  $v_i$  or  $v_j$ , w.l.o.g.  $v_i$ , by a bidirected edge, where  $v_i \in W$ .
We showed that any vertex  $v \in W^*$  either is in  $W$ , or is connected to a vertex in  $W$  through a bidirected edge. Therefore, it suffices to show that for any two vertices  $w_1, w_2 \in W$  there exists a bidirected path between  $w_1$  and  $w_2$  in  $\mathcal{H}[W^*]$ . Since  $w_1, w_2 \in W$ , there is a bidirected path,  $p$ , between  $w_1$  and  $w_2$  in  $\mathcal{G}[W]$ . Take an arbitrary pair of consecutive vertices on this path, such as  $v_1$  and  $v_2$ . The bidirected edge  $\{v_1, v_2\}$  exists in  $\mathcal{G}[W]$ . As a result, the bidirected path  $v_1 \leftrightarrow v_{12}^b \leftrightarrow v_2$  exists in  $\mathcal{H}[W^*]$ . Starting at  $w$  and repeating this argument for every pair of consecutive vertices on  $p$ , we conclude that there exists a bidirected path from  $w_1$  to  $w_2$ , which completes the proof.
Lemma A.9. Suppose  $\mathcal{G}$  is an ADMG, and  $Y$  is a subset of its vertices. Also let  $Y^{*}$  be a district in  $\mathcal{G}[Y]$ . If the set of vertices  $H$  form a hedge for  $Q[Y^{*}]$ , then  $H \setminus Y \neq \emptyset$ .
Proof. Assume by contradiction  $H \setminus Y = \emptyset$ , i.e.,  $H \subseteq Y$ . By definition of hedge, we know  $H \setminus Y^{*} \neq \emptyset$ . Take an arbitrary vertex  $v \in H \setminus Y^{*}$ . Furthermore,  $v \in Y \setminus Y^{*}$  because  $H \subseteq Y$ . Since  $H$  forms a hedge for  $Q[Y^{*}]$ ,  $H$  is a district in  $\mathcal{G}[H]$ . Therefore, there exists a bidirected path between  $v$  and a vertex  $y^{*} \in Y^{*}$  in  $Q[Y]$  which is in contradiction with the assumption that  $Y^{*}$  is a district in  $\mathcal{G}[Y]$ .
Proposition A.10. Suppose  $\mathcal{G}' = (V^{\mathcal{G}'}', E_d^{\mathcal{G}'}', E_b^{\mathcal{G}'}')$  is an ADMG,  $Y \subseteq V^{\mathcal{G}'}$  is a set of its vertices, and  $(\mathcal{H}', Y^{mcip}) = \mathcal{T}_2(\mathcal{G}', Y)$ . Let  $E_d'' \subseteq E_d^{\mathcal{G}'}$  and  $E_b'' \subseteq E_b^{\mathcal{G}'}$  be arbitrary edges of  $\mathcal{G}$ , and define  $E_d^{\mathcal{G}} = E_d^{\mathcal{G}'} \setminus E_d''$ ,  $E_b^{\mathcal{G}} = E_b^{\mathcal{G}'} \setminus E_b''$ .  $Q[Y]$  is identifiable in  $\mathcal{G} = (V^{\mathcal{G}}, E_d^{\mathcal{G}}, E_b^{\mathcal{G}})$  if and only if  $Q[Y^{mcip}]$  is identifiable in  $\mathcal{H} = \mathcal{H}'[V^{\mathcal{H}'} \setminus V']$ , where  $V^{\mathcal{G}} = V^{\mathcal{G}'}$  and  $V' = \{v \in V^{\mathcal{H}'} | \exists e \in E_b'' \cup E_d'', v = T_2(e)\}$ .
Proof. We prove the contrapositive, i.e.,  $Q[Y]$  is not identifiable in  $\mathcal{G}$  iff  $Q[Y^{mcip}]$  is not identifiable in  $\mathcal{H}$ .
If part. Suppose  $Q[Y^{mcip}]$  is not identifiable in  $\mathcal{H}$ . That is, there exists a hedge formed for  $Q[Y^{mcip}]$  in  $\mathcal{H}$ . From Lemma A.2, this hedge is formed for  $Q[y']$  for some  $y' \in Y^{mcip}$ . Denote the set of vertices of this hedge by  $H$ . We consider two possibilities separately:
-  $y' = y_i$ , where  $y_i \in Y$ . From Lemma A.3,  $H \subseteq V_{top}^{\mathcal{H}}$ . Taking  $W = H$  in Lemma A.7,  $W^{-1}$  is a set of vertices in  $\mathcal{G}$  such that  $\text{Anc}_{\mathcal{G}[W^{-1}]}(y) = W^{-1}$ , and  $W^{-1}$  is a district in  $\mathcal{G}$ . Now take  $Y^*$  to be the district of  $\mathcal{G}[Y]$  that includes  $y_i$ . By definition of hedge,  $\mathcal{G}[W^{-1} \cup Y^*]$  forms a hedge for  $Q[Y^*]$  in  $\mathcal{G}$ . Note that from Lemma A.6,  $W^{-1} \setminus Y \neq \emptyset$ . As a result,  $Q[Y]$  is not identifiable in  $\mathcal{G}$ .
-  $y' = y_j^{ij}$ , where  $y_i, y_j \in Y$  and  $y'$  is one of the vertices added to  $\mathcal{H}$  in the last step of the transformation  $\mathcal{T}$  (step (f)). Define the set  $Y^* = \{y_k | y_k^{ij} \in H\}$ . From Lemma A.5,  $Y^*$  is a district in  $\mathcal{G}$ , and therefore a district in  $\mathcal{G}[Y]$ . As a result, it suffices to show that there exists a hedge formed for  $Q[Y^*]$  in  $\mathcal{G}$ . Now define  $H_{top} = H \cap V_{top}^{\mathcal{H}}$ . By definition of hedge,  $H$  is a district in  $\mathcal{H}[H]$ , i.e., it is connected over its bidirected edges. By construction of  $\mathcal{H}$ , there is only one bidirected edge between the vertices in  $H_{top}$  and  $H \setminus H_{top}$ , which is the bidirected edge between  $y_j$  and  $y_i^{ij}$ . Therefore, this edge is a cut set that partitions the graph  $\mathcal{H}[H]$  into two connected components  $\mathcal{H}[H_{top}]$  and  $\mathcal{H}[H \setminus H_{top}]$ . That is,  $\mathcal{H}[H_{top}]$  is connected over its bidirected edges and therefore  $H_{top}$  is a district in  $\mathcal{H}[H_{top}]$ . Further, from Lemma A.5,  $H_{top} = \text{Anc}_{\mathcal{H}[H_{top}]}(Y^*)$ . Noting that  $H_{top} \subseteq V_{top}^{\mathcal{H}}$ , taking  $W = H_{top}$  in Lemma A.7,  $W^{-1}$  is a district in  $\mathcal{G}$  and  $\text{Anc}_{\mathcal{G}[W^{-1}]}(Y^*) = W^{-1}$ . Note that from Lemma A.6,  $W^{-1} \setminus Y \neq \emptyset$ . Therefore, the set of vertices  $W^{-1}$  form a hedge for  $Q[Y^*]$  in  $\mathcal{G}$ . Hence,  $Q[Y]$  is not identifiable in  $\mathcal{G}$ .
Only if part. Suppose  $Q[Y]$  is not identifiable in  $\mathcal{G}$ . It implies that there exists a district of  $\mathcal{G}[Y]$  such as  $Y^*$  such that there is a hedge formed for  $Q[Y^*]$  in  $\mathcal{G}$ . Let  $H$  denote the set of vertices of this hedge. From Lemma A.9,  $H \setminus Y \neq \emptyset$ . Define  $W^*$  as in Lemma A.8, that is the transform  $\mathcal{T}(\mathcal{G}[H], Y^*)$
without step (f) (only on the vertices of  $V_{top}^{\mathcal{H}}$ ). Note that  $Y^{*} \subseteq W^{*}$ . We consider the following two cases separately:
Proof of Proposition 4.2. The reduction from the edge ID problem to MCIP was shown through the proof of Proposition A.10. The opposite direction is an immediate corollary of Proposition A.1.  $\square$
Corollary A.11. The edge ID problem and MCIP are equivalent.
B Maximal hedge
Herein, we present the algorithm for recovering the maximal hedge formed for  $Q[Y]$  in a given ADMG  $\mathcal{G}$  (see Definition 2.5). Maximal hedge was initially defined in [2] under the name hedge hull. We adopt the same definition, and when  $\mathcal{G}[Y]$  comprises several districts, we define the maximal hedge as the union of the hedge hulls formed for each district of  $\mathcal{G}[Y]$ . As a result, the complete procedure of recovering the maximal hedge for a query  $Q[Y]$ , summarized in Algorithm 3, finds the maximal hedge formed for each district  $Y_{i}$  of  $\mathcal{G}[Y]$  and returns the union of them. This procedure is used as a subroutine  $\mathbf{MH}$  in Algorithm 1. The function  $\mathbf{HHull}$  is in fact Algorithm 1 borrowed from [2]. This function is proven to recover the union of all hedges formed for  $Y_{i}$ , where  $Y_{i}$  is one of the districts of  $\mathcal{G}[Y]$  (see Lemma 6 of [2]).
Algorithm 3 Maximal Hedge.
1: function MH  $(\mathcal{G},Y)$    
2: Initialize  $M\gets \emptyset$    
3: for  $Y_{i}$  in districts of  $\mathcal{G}[Y]$  do   
4:  $M\leftarrow M\cup \mathbf{HHull}(\mathcal{G},Y_i)$    
5: return  $\mathcal{G}[M]$    
1: function HHULL  $(\mathcal{G},Y_i)$    
2: Initialize  $H\gets V^{\mathcal{G}}$    
3: while True do   
4:  $C\gets$  connected component (district) of  $Y_{i}$  via bidirected edges in  $\mathcal{G}[H]$    
5:  $A\gets$  ancestors of  $Y_{i}$  in  $\mathcal{G}[C]$    
6: if  $C\neq A$  then   
7:  $H\gets A$    
8: else   
9: break   
10: return H
$$
z \xrightarrow {p} x \xrightarrow {q} y
$$
Figure 6: An example where the expert is aware that there is no causal path from  $z$  to  $y$ , e.g., because  $z \perp y$  with high confidence.
C Towards generalizing Assumption 2.1