Let $G$ be a group and let $\emptyset \neq S\subseteq G.$ Prove that if $G$ is a multiplicative group, then $$\begin{align}\langle S\rangle &= \{a_1^{k_1} a_2^{k_2}\cdots a_s^{k_s} : s\geq 0, a_i \in S, k_i \in \mathbb{Z}\}\\ &=\{a_1^{k_1} a_2^{k_2}\cdots a_s^{k_s} : s\geq 0, a_i\neq a_{i+1} \in S, k_i \in \mathbb{Z}\},\end{align} $$
or, if $G$ is an additive abelian group, that $$\langle S\rangle = \{k_1a_1+ k_2a_2 + \cdots + k_sa_s : s\geq 0, a_i \in S, a_i\neq a_j\text{ for $i\neq j$}, 0\neq k_i\in \mathbb{Z}\}$$
where the empty product is the identity element and $\langle S\rangle$ is the smallest subgroup of $G$ containing $S$ or equivalently the intersection of all subgroups of $G$ containing $S$.
I know that if $G$ is a multiplicative group, and $a\in G,$ then $\langle a\rangle = \{a^k : k \in \mathbb{Z}\}.$ The statement is an extension of this fact, and it seems the second equality is much easier to prove than the first. Also, if $G$ is an additive group, all that's changed is the operation, so it suffices to prove the first equality (i.e. that $$\langle S\rangle = \{a_1^{k_1} a_2^{k_2}\cdots a_s^{k_s} : s\geq 0, a_i \in S, k_i \in \mathbb{Z}\}).$$ We claim that $T := \{a_1^{k_1} a_2^{k_2}\cdots a_s^{k_s} : s\geq 0, a_i \in S, k_i \in \mathbb{Z}\}$ is a subgroup of $G$. Observe that it clearly contains $S$. Indeed, let $a \in S.$ Then $a = a^1 \in T.$ Also, $e = a^0\in T.$ For any $a, b \in T, ab^{-1}$ is clearly in $T$. Thus, by the Subgroup Test, $T\leq G$. Since $S\subseteq T, \langle S\rangle\subseteq T.$
To show that $T\subseteq \langle S\rangle,$ let $H\leq G, S\subseteq H.$ Let $a_1^{k_1}a_2^{k_2}\cdots a_s^{k_s} \in T.$ By closure under the operation and inversion, $a_1^{k_1}a_2^{k_2}\cdots a_s^{k_s} \in H$. So $T\subseteq \langle S\rangle.$
Is this correct?