Relationship between Transitive Closure Definitions

Theorem
Let $x$ be a set.

Let $a$ be the smallest set such that $x \in a$ and $a$ is transitive.

Let $b$ be the smallest set such that $x \subseteq b$ and $b$ is transitive.

Then $a = b \cup \set x$.

Proof
We have that:
 * $x \in a$

and $a$ is transitive.

So:
 * $x \subseteq a$

Thus by the definition of $b$ and of smallest set:
 * $b \subseteq a$

Since we also have $x \in a$:
 * $b \cup \set x \subseteq a$

$x \in \set x$, so:
 * $x \in b \cup \set x$

$b \cup \set x$ is transitive:

If $p \in b$ then:
 * $p \subseteq b \subseteq b \cup \set x$.

If $p \in \set x$ then:
 * $p = x$

So by the definition of $b$:
 * $p \subseteq b \subseteq b \cup \set x$

Thus by the definition of $a$:
 * $a \subseteq b \cup \set x$

Thus the theorem holds by definition of set equality.