I'm working through a lemma which is used to prove the existence of a free group on a set $S$.
The setting is this:
$S$ is a set, and $G$ is a group, and $f:S\to G$ is a map such that the image of $f$ generates $G$. That is, every element of $G$ can be written in the form $f(s_{1})^{e_1}\dots f(s_{n})^{e_n}$ where $s_{i}\in S$ and $e_{i} = \pm 1$.
The claim I am having difficulty verifying (which appears in a lemma) is this:
If $S$ is infinite, then the cardinality of $G$ is no larger than the cardinality of $S$.
To verify this, I would need an injection from $G$ to $S$, or a surjection from $S$ to $G$.
Intuitively, I think I see it, going from $S$ to $f(S)$ cannot increase the size, since $f$ is a function, and going from $f(S)$ to $G$ cannot get any larger since elements of $G$ can be mapped to finite sequences of elements of $f(S)$. But I can't seem to make this precise.