Set Contained in Smallest Transitive Set

Theorem
Let $S$ be a set.

Then there exists a transitive set $G$ such that:
 * $S \subseteq G$

and:
 * if $Q$ is any transitive set such that $S \subseteq Q$, then $G \subseteq Q$.

Construction of $G$
Let $U$ be the class of all sets.

Define the mapping $F: \N \to U$ recursively:


 * $\map F 0 = S$
 * $\map F {n + 1} = \bigcup \map F n$

Applying the axiom of union inductively, $\map F n$ is a set for each $n \in \N$.

Let $\ds G = \bigcup_{i \mathop = 0}^\infty \map F i$.

By the axiom of unions, $G$ is a set.

Transitivity
It is to be proved that $G$ is transitive.

That is:
 * $a \in b, b \in G \implies a \in G$

Let $a \in b$ and $b \in G$.

By the definition of $G$, there exists $n \in \N$, $b \in \map F n$.

By the definition of $F$:
 * $\map F {n + 1} = \bigcup \map F n$

Then by the definition of union:
 * $a \in \map F {n + 1}$

Thus by the definition of $G$:
 * $a \in G$

Minimality
It is to be proved that if $Q$ is a transitive set and $S \subseteq Q$ then $G \subseteq Q$.

Let $Q$ be transitive and $S \subseteq Q$.

Define $F$ as above.

Prove by induction that $\map F n \subseteq Q$ for each $n$.