Question. Let $T$ denote an algebraic theory, and suppose $X$ is the $T$-algebra freely generated by a finite set $F \subseteq X$. Suppose $G \subseteq X$ also generates $X$ and that $|G|=|F|$. Does $G$ necessarily freely generate $X$?
Example. The statement of interest holds for $T$ equal to the (algebraic) theory of $K$-vector spaces, whenever $K$ is a field.
The question is equivalent to: Is every surjective endomorphism of $T(n)$ (the free $T$-algebra on $n$ generators) an isomorphism? In other words, is $T(n)$ Hopfian? If $R$ is a commutative ring, then it is known that finitely generated $R$-modules are Hopfian. If $R$ is any ring, then Noetherian $R$-modules are Hopfian. But in general, $R$ doesn't have to be a Noetherian $R$-module, and in fact doesn't have to be Hopfian. This means that there is an element $u \in R$ such that $u$ has a left inverse, but not a right inverse (consider $R \to R$, $x \mapsto xu$). The typical example is a shift operator. By the way, for the theory of groups the answer is yes: finitely generated free groups are Hopfian. More generally, any finitely generated residually finite group is Hopfian.