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 \left({\mathcal R^+}\right)^{-1} \left({B}\right)$.

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'$

Let $x \in \left({\mathcal R^+}\right)^{-1} \left({B}\right)$.

Then:
 * $x \mathrel{\mathcal R^+} b$

for some $b \in B$.

Since $\mathcal R \subseteq \mathcal R^+$, it follows that:
 * $y \mathrel{\mathcal R^+} x$

Since $\mathcal R^+$ is transitive:
 * $y \mathrel{\mathcal R^+} b$

That is:
 * $y \in \left({\mathcal R^+}\right)^{-1} \left({B}\right)$

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 \left({\mathcal R^+}\right)^{-1} \left({B}\right)$.

Let $x \in B$.

Then because $B \subseteq C$:
 * $x \in C$

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

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 the Principle of Mathematical Induction:
 * $x \in C$

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

Let $\mathcal R$ be set-like.

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

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