Equivalence of Definitions of Generated Subgroup

Theorem
Let $G$ be a group.

Let $S \subset G$ be a subset.

$(1)$ implies $(2)$
Let $\gen S$ be a generated subgroup by definition 1.

Then by definition:
 * $\gen S$ is the smallest subgroup containing $S$

Thus $\gen S$ is a generated subgroup by definition 2.

$(2)$ implies $(1)$
Let $\gen S$ be a generated subgroup by definition 2.

Then by definition:
 * $\gen S$ is the intersection of all subgroups of $G$ containing $S$.

Thus $\gen S$ is a generated subgroup by definition 1.