Existence of Unique Subsemigroup Generated by Subset

Theorem
Let $\varnothing \subset X \subseteq S$, where $\left({S, \circ}\right)$ is a semigroup.

Then there exists $\left({T, \circ}\right)$, the smallest subsemigroup of $\left({S, \circ}\right)$ which contains $X$.

In this case, we say that:
 * $X$ is the generator (or set of generators) of $\left({T, \circ}\right)$
 * $X$ generates $\left({T, \circ}\right)$
 * $\left({T, \circ}\right)$ is the subsemigroup generated by $X$.

This is written $T = \left\langle {X} \right\rangle$.

Existence
First, we prove that such a subsemigroup exists.

Let $\mathbb S$ be the set of all subsemigroups of $S$ which contain $X$.

$\mathbb S \ne \varnothing$ because $S$ is itself a subsemigroup of $S$ (trivial), and thus $S \in \mathbb S$.

Let $T$ be the intersection of all the elements of $\mathbb S$.

By Intersection of Subsemigroups, $T$ is the largest element of $\mathbb S$ contained in each element of $\mathbb S$.

Thus $T$ is a subsemigroup of $S$.

Since $\forall x \in \mathbb S: X \subseteq x$, we see that $X \subseteq T$, so $T \in \mathbb S$.

Smallest
Now to show that $T$ is the smallest such subsemigroup.

If any $K \le S: X \subseteq K$, then $K \in \mathbb S$ and therefore $T \subseteq K$.

So $T$ is the smallest subsemigroup of $S$ containing $X$.

Uniqueness
Now we show that $T$ is unique.

Suppose $\exists T_1, T_2 \in \mathbb S$ such that $T_1$ and $T_2$ were two such smallest subsemigroups containing $X$.

Then, by the definition of smallest, each would be equal in size.

If one is not a subset of the other, then their intersection (by definition containing $X$) would be a smaller subsemigroup and hence neither $T_1$ nor $T_2$ would be the smallest.

Hence one must be the subset of the other, and by Equality of Sets, that means they must be the same set.

So the smallest subsemigroup, whose existence we have proved above, is unique.