Relational Closure from Transitive Closure

Theorem
Let $A$ be a set or class.

Let $\mathcal R$ be a relation on $A$.

Let $\mathcal R^+$ be the transitive closure of $\mathcal R$.

Let $B \subseteq A$.

Let $B' = B \cup (\mathcal R^+)^{-1} (B)$.

Let $C$ be an $\mathcal R$-transitive subset or subclass of $A$ such that $B \subseteq C$.

Then:


 * $B'$ is $\mathcal R$-transitive.
 * $B' \subseteq C$
 * If $B$ is a set and $\mathcal R$ is set-like then $B'$ is a set. That is, $B'$ is the relational closure of $B$ under $\mathcal R$.

$B'$ is $\mathcal R$-transitive
Let $x \in B'$ and $y \in A$, and let $y \mathrel{\mathcal R} x$.

If $x \in B$, then by the definition of transitive closure, $y \mathrel{\mathcal R^+} x$, so $y \in B'$.

If $x \in (\mathcal R^+)^{-1}(B)$, then $x \mathrel{\mathcal R^+} b$ for some $b \in B$.

Since $\mathcal R \subseteq \mathcal R^+$, $y \mathrel{\mathcal R^+} x$.

Since $\mathcal R^+$ is transitive:


 * $y \mathrel{\mathcal R^+} b$

That is, $y \in (\mathcal R^+){-1}(B)$, so $y \in B'$.

As this holds for all such $x$ and $y$, $B'$ is $\mathcal R$-transitive.

$B' \subseteq C$
Let $x \in B'$.

Then $x \in B$ or $x \in (\mathcal R^+)^{-1}(B)$.

If $x \in B$ then $x \in C$ because $B \subseteq C$.

Suppose that $x \in (\mathcal R^+)^{-1}(B)$.

Then for some $b \in B$, $x \mathrel{\mathcal R} b$.

By the definition of transitive closure:


 * For some $n \in \N_{>0}$ there exist $a_0, a_1, \dots, a_n$ such that $x = a_0 \mathrel{\mathcal R} a_1 \mathrel{\mathcal R} \dots \mathrel{\mathcal R} a_n = b$.

Thus by induction, $x \in C$.

Set-like implies set
Let $B$ be a set

Let $\mathcal R$ be set-like.

Then $(\mathcal R^+)^{-1}$ is a set by Inverse Image of Set under Set-Like Relation is Set.

Thus $B'$ is a set by the Axiom of Union.