[proofplan]
Let $W$ denote the displayed set of finite words in elements of $S$ and their inverses. We first prove that $W$ is a subgroup of $G$ containing $S$, using the empty word for the identity, concatenation for multiplication, and reversal with sign changes for inverses. This gives $\langle S\rangle \subset W$ because $\langle S\rangle$ is the smallest subgroup of $G$ containing $S$. Conversely, every subgroup containing $S$ must contain each letter $s \in S$, each inverse $s^{-1}$, and therefore every finite word, so $W \subset \langle S\rangle$.
[/proofplan]
custom_env
admin
[step:Define the word set and place the identity and generators inside it]Define $W \subset G$ by
\begin{align*}
W := \{s_1^{\varepsilon_1}s_2^{\varepsilon_2}\cdots s_m^{\varepsilon_m} : m \geq 0,\ s_i \in S,\ \varepsilon_i \in \{-1,1\}\ \text{for each } i \in \{1,\dots,m\}\}.
\end{align*}
The case $m=0$ gives the empty product, which is $e$, so $e \in W$. If $s \in S$, then taking $m=1$, $s_1=s$, and $\varepsilon_1=1$ gives $s \in W$. Hence $S \subset W$.[/step]
custom_env
admin
[guided]We isolate the set described in the statement so that we can prove it has the universal property of the generated subgroup. Define $W \subset G$ by
\begin{align*}
W := \{s_1^{\varepsilon_1}s_2^{\varepsilon_2}\cdots s_m^{\varepsilon_m} : m \geq 0,\ s_i \in S,\ \varepsilon_i \in \{-1,1\}\ \text{for each } i \in \{1,\dots,m\}\}.
\end{align*}
The integer $m$ records the length of the word. The special case $m=0$ is important: there are then no letters, and the product is by convention the empty product, equal to the identity element $e$ of $G$. Thus $e \in W$, even when $S=\varnothing$.
Next let $s \in S$. Choosing the word of length one with $s_1=s$ and $\varepsilon_1=1$ gives
\begin{align*}
s_1^{\varepsilon_1}=s^1=s.
\end{align*}
Therefore $s \in W$. Since this holds for every $s \in S$, we have $S \subset W$.[/guided]
custom_env
admin
[step:Prove the word set is closed under multiplication by concatenating words]
Let $a,b \in W$. Then there are integers $m,n \geq 0$, elements $s_1,\dots,s_m,t_1,\dots,t_n \in S$, and exponents $\varepsilon_1,\dots,\varepsilon_m,\delta_1,\dots,\delta_n \in \{-1,1\}$ such that
\begin{align*}
a=s_1^{\varepsilon_1}\cdots s_m^{\varepsilon_m}
\end{align*}
and
\begin{align*}
b=t_1^{\delta_1}\cdots t_n^{\delta_n}.
\end{align*}
By associativity in $G$, their product is the concatenated word
\begin{align*}
ab=s_1^{\varepsilon_1}\cdots s_m^{\varepsilon_m}t_1^{\delta_1}\cdots t_n^{\delta_n}.
\end{align*}
This is a word of length $m+n$ with letters in $S$ and exponents in $\{-1,1\}$, so $ab \in W$.
[/step]
custom_env
admin
[step:Prove the word set is closed under inverses by reversing each word]
Let $a \in W$. Choose an integer $m \geq 0$, elements $s_1,\dots,s_m \in S$, and exponents $\varepsilon_1,\dots,\varepsilon_m \in \{-1,1\}$ such that
\begin{align*}
a=s_1^{\varepsilon_1}\cdots s_m^{\varepsilon_m}.
\end{align*}
If $m=0$, then $a=e$ and $a^{-1}=e \in W$. If $m\geq 1$, the inverse of a product in a group gives
\begin{align*}
a^{-1}=s_m^{-\varepsilon_m}s_{m-1}^{-\varepsilon_{m-1}}\cdots s_1^{-\varepsilon_1}.
\end{align*}
For each $i$, $-\varepsilon_i \in \{-1,1\}$, and each letter $s_i$ lies in $S$. Hence $a^{-1}$ is again a word in $W$.
[/step]
custom_env
admin
[step:Use the subgroup property to compare with the generated subgroup]
The previous steps show that $W$ contains $e$, is closed under multiplication, and is closed under inverses. Therefore $W$ is a subgroup of $G$. Since $S \subset W$, the defining minimality of the generated subgroup gives
\begin{align*}
\langle S\rangle \subset W.
\end{align*}
[/step]
custom_env
admin
[step:Show every subgroup containing $S$ contains every word]
Let $H \leq G$ be any subgroup with $S \subset H$. For every $s \in S$, we have $s \in H$, and since $H$ is closed under inverses, $s^{-1} \in H$. Therefore, if $m \geq 1$, $s_i \in S$, and $\varepsilon_i \in \{-1,1\}$ for each $i$, then every factor $s_i^{\varepsilon_i}$ lies in $H$, and repeated closure under multiplication gives
\begin{align*}
s_1^{\varepsilon_1}s_2^{\varepsilon_2}\cdots s_m^{\varepsilon_m} \in H.
\end{align*}
For $m=0$, the word is $e$, and every subgroup contains $e$. Thus $W \subset H$ for every subgroup $H$ of $G$ containing $S$.
Applying this to $H=\langle S\rangle$, which is a subgroup of $G$ containing $S$, gives
\begin{align*}
W \subset \langle S\rangle.
\end{align*}
Together with $\langle S\rangle \subset W$, this proves $W=\langle S\rangle$, exactly the asserted word description.
[/step]