If the homomorphism from a group $G$ is uniquely determined by the values on its subset $A$, is $G$ generated by $A$? Let $G$ be a group and $A\subset G$. For every group $H$ and every two homomophisms $\phi_1:G\to H$, $\phi_2:G\to H$, if $\phi_1\upharpoonright A=\phi_2\upharpoonright A$, then $\phi_1=\phi_2$. Is it  necessary that $G$ should be generated by $A$, i.e. $G=\langle A\rangle$?
Thanks for any help!
 A: Yes; note that the embedding $\iota\colon \langle A\rangle\hookrightarrow G$ is an epimorphism in the category of groups: for any two group homomorphisms $f,g\colon G\to H$ to an arbitrary group $H$, $f\circ \iota = g\circ\iota \implies f=g$. That is, $\iota$ is right cancellable.
But in $\mathbf{Group}$, the category of all groups (and also in $\mathbf{FinGroup}$, the category of all finite groups), epimorphisms are surjective. Thus, $\iota$ is surjective, so $\langle A\rangle = G$.

If you restrict the class of groups you are looking at, this is no longer necessarily the case. For example, in the variety generated by $A_5$, $\mathbf{HSP}(A_5)$ consisting of all groups that are homomorphic images of subgroups of (possibly infinitely many) copies of $A_5$, the embedding $A_4\hookrightarrow A_5$ is a nonsurjective epimorphism; and more generally, $A_n\hookrightarrow A_{n+1}$ is a nonsurjective epimorphism in $\mathbf{HSP}(A_{n+1})$ and in $\mathbf{HSP}(S_{n+1})$.
But Peter Neumann proved that in any quotient-closed class of solvable groups, every epimorphism is surjective; and Susan McKay generalized the result to a larger family of quotient-closed classes of solvable groups.
