Closure for Finite Collection of Relations and Operations

Theorem
Let $\mathcal R_1, \mathcal R_2 , \dots \mathcal R_n$ be relations.

Let $\mathcal S_1, \mathcal S_2 , \dots \mathcal S_m$ be operations.

Let $T$ be a small class.

Suppose that the image of $\mathcal R_i$ over any small class $x$ be small classes for $1 \le i \le n$.

In addition, suppose that the image of $\mathcal S_i$ over any cartesian product $x \times x$ be small classes for $1 \le i \le m$.

Then, there is a small class $X$ such that:


 * 1) $T \subseteq X$
 * 2) Each $R_i$ is closed with respect to $X$.  Each $S_i$ is closed with respect to $X \times X$.
 * 3) If $X$ is the smallest small class satisfying conditions 1 and 2 above.

Proof
Let $R “ x$ denote the image of $x$ under $R$.

Set $\displaystyle G\left({x}\right) = x \cup \bigcup_{i \mathop = 1}^n \mathcal R_i “ x \cup \bigcup_{i \mathop = 1}^m \mathcal S_i “ x$

Using finite recursion, construct the function $F$ as follows:


 * $\displaystyle F\left({0}\right) = T$
 * $\displaystyle F\left({n+1}\right) = G\left({F\left({n}\right)}\right)$

Define $X$ as follows:


 * $\displaystyle X = \bigcup_{n \mathop \in \omega} F\left({n}\right)$

Proof of Closure
Take any $\mathcal R_i$.

Suppose $x \mathcal R_i y$ and $x \in F\left({n}\right)$ for some $n$.

Then $y \in F\left({n+1}\right)$ by the definition of image.

Thus $y \in X$ and $R_i$ is closed with respect to $X$.

Similarly, take any $\mathcal S_i$.

Suppose $\left({ x S_i y }\right) = z$ and that $x \in X$ and $y \in X$.

It follows that $x,y \in F\left({n}\right)$ for some $n$, so $z \in F\left({n+1}\right)$.

Therefore, $z \in X$.

Proof that $X$ is the Smallest Relational Closure
Suppose $T \subseteq Y$ and that $R_i$ and $S_i$ are closed with respect to $Y$.


 * $F\left({n}\right) \subseteq Y$ shall be proven by induction:

For all $n \in \omega$, let $P \left({n}\right)$ be the proposition:
 * $F\left({n}\right) \subseteq Y$

$P \left({0}\right)$ is true, as this just says $T \subseteq Y$.

Basis for the Induction
$P \left({0}\right)$ is the case:
 * $F\left({0}\right) \subseteq Y$

which has been proved above.

This is our basis for the induction.

Induction Hypothesis
Now we need to show that, if $P \left({k}\right)$ is true, where $k \ge 0$, then it logically follows that $P \left({k+1}\right)$ is true.

So this is our induction hypothesis:
 * $F\left({k}\right) \subseteq Y$

Then we need to show:
 * $F\left({k+1}\right) \subseteq Y$

Induction Step
This is our induction step:

So $P \left({k}\right) \implies P \left({k+1}\right)$ and the result follows by the Principle of Mathematical Induction.

Therefore:
 * $F\left({n}\right) \subseteq R$ for all $n \in \omega$


 * $T \subseteq Y$ by Indexed Union Subset