We saw that there are two kinds of functions in axiomatic set theory: class functions and set functions. A class function is a rule, defined by a first order formula. A set function is a function which is a set of pairs. The axiom scheme of replacement relates these two notions.

**Axiom Scheme of Replacement:** for any first order $\varphi (x,y,\stackrel{\_}{a})$, if
$\forall x\u200a\exists y\u200a\varphi (x,y,\stackrel{\_}{a})$ and $b$ is a set
then
$\left\{\u27e8u,v\u27e9:u\in b\wedge \varphi (u,v,\stackrel{\_}{a})\right\}$
is a set.

This is a new general principle building sets, and another instance of Frege's comprehension axiom. It was added by Fraenkel after Zermelo proposed his earlier set of axioms. (Zermelo endorsed the addition - he said that he had overlooked it originally.)

As an application, we look at the idea of transitive sets.

Definition.

A set $x$ is *transitive* if
for all $u,v$ if $u\in v$ and $v\in x$
then $u\in x$.

To find examples of transitive sets we apply the recursion theorem on $\omega $.

Definition.

We define $\text{TC}(x,n)$ by $\text{TC}(x,0)=x$ and $\text{TC}(x,n\mathrm{+1})=\bigcup \text{TC}(x,n)$.

Using replacement, $t=\left\{\text{TC}(x,n):n\in \omega \right\}$ is a set.
We let $\text{TC}\left(x\right)$ be the set $\bigcup t$
and call this the *transitive closure* of $x$.

Theorem.

(a) The transitive closure of $x$ is transitive. (b) If $y\supseteq x$ and $y$ is transitive then $y\supseteq \text{TC}\left(x\right)$.

**Proof.**

Exercise.