Equivalence of Definitions of Transitive Closure (Relation Theory)/Intersection is Smallest

Theorem
Let $\mathcal R$ be a relation on a set $S$.

Then the transitive closure $\mathcal R^+$ of $\mathcal R$ always exists.

Proof
First, note that there exists at least one transitive relation containing $\mathcal R$.

That is, the trivial relation $S \times S$, which is an equivalence and therefore transitive by definition.

Next, note that the Intersection of Transitive Relations is Transitive.

Hence the transitive closure of $\mathcal R$ is the intersection of all transitive relations containing $\mathcal R$.

Given the relation $\mathcal R$, its transitive closure $\mathcal R^+$ can be constructed as follows:

Let:
 * $\mathcal R^n := \begin{cases}

\mathcal R & : n = 0 \\ \mathcal R^{n-1} \cup \left\{{\left({x_1, x_3}\right): \exists x_2: \left({x_1, x_2}\right) \in \mathcal R^{n-1} \land \left({x_2, x_3}\right) \in \mathcal R^{n-1}}\right\} & : n > 0 \end{cases}$

Then:
 * $\displaystyle \mathcal R^+ = \bigcup_{i \in \N} \mathcal R^i$.

To show that $\mathcal R^+$ is the transitive closure of $\mathcal R$, we must show that:


 * $\mathcal R \subseteq \mathcal R^+$
 * $\mathcal R^+$ is transitive
 * $\mathcal R^+$ is the smallest relation with both of those characteristics.

Proof of Subset
$\mathcal R \subseteq \mathcal R^+$: $\mathcal R^+$ contains all of the $\mathcal R^i$, so in particular $\mathcal R^+$ contains $\mathcal R$.

Proof of Transitivity
Every element of $\mathcal R^+$ is in one of the $\mathcal R^i$.

From the method of construction of $\mathcal R^+$, we have that $\forall i, j \in \N: \mathcal R^i \subseteq \mathcal R^{\max \left({i, j}\right)}$.

Suppose $\left({s_1, s_2}\right) \in \mathcal R^j$ and $\left({s_2, s_3}\right) \in \mathcal R^k$.

Then as:
 * $\mathcal R^j \subseteq \mathcal R^{\max \left({j, k}\right)}$

and:
 * $\mathcal R^k \subseteq \mathcal R^{\max \left({j, k}\right)}$

it follows that:
 * $\left({s_1, s_2}\right) \in \mathcal R^{\max \left({j, k}\right)}$ and $\left({s_2, s_3}\right) \in \mathcal R^{\max \left({j, k}\right)}$

It follows from the method of construction that $\left({s_1, s_3}\right) \in \mathcal R^{\max \left({j, k}\right)}$.

Hence as $\mathcal R^{\max \left({j, k}\right)} \subseteq \mathcal R^+$, it follows that $\mathcal R^+$ is transitive.

Proof of being the smallest such relation
Let $\mathcal R'$ be any transitive relation containing $\mathcal R$.

We want to show that $\mathcal R^+ \subseteq \mathcal R'$.

It is sufficient to show that $\forall i \in \N: \mathcal R^i \subseteq \mathcal R'$.

Since $\mathcal R \subseteq \mathcal R'$, we have that $\mathcal R^0 \subseteq \mathcal R'$.

Suppose $\mathcal R^i \subseteq \mathcal R'$.

From the method of construction, as $\mathcal R'$ is transitive, $\mathcal R^{i+1} \subseteq \mathcal R'$.

Therefore, by induction, $\forall i \in \N: \mathcal R^i \subseteq \mathcal R'$.

So $\mathcal R^+ \subseteq \mathcal R'$, and hence the result.

Alternative definition of construction
From Transitive Relation contains Composite with Self, it follows that the following more compact form can be used to define construct the transitive closure of $\mathcal R$:

Let:
 * $\mathcal R^n := \begin{cases}

\mathcal R & : n = 0 \\ \mathcal R^{n-1} \circ \mathcal R & : n > 0 \end{cases}$

where $\circ$ denotes composition of relations.

Then:
 * $\displaystyle \mathcal R^+ = \bigcup_{i \in \N} \mathcal R^i$.