Residually finite and finitely many homomorphisms to any finite group implies Hopfian

Statement
Suppose $$G$$ is a uses property satisfaction of::residually finite group and is also a  uses property satisfaction of::group having finitely many homomorphisms to any finite group. Then, $$G$$ is a proves property satisfaction of::Hopfian group.

Applications

 * Finitely generated and residually finite implies Hopfian

Similar facts

 * Finitely many homomorphisms to any finite group implies every subgroup of finite index has finitely many automorphic subgroups

Opposite facts

 * Finitely many homomorphisms to any finite group not implies Hopfian

Proof
Given: A group $$G$$ that is resudally finite and has finitely many homomorphisms to any fixed finite group. A surjective endomorphism $$\varphi$$ of $$G$$.

To prove: $$\varphi$$ is an automorphism.

Proof: We prove this by contradiction.

ASSUMPTION THAT WILL LEAD TO CONTRADICTION: We assume that $$\varphi$$ is not an automorphism. Since it is surjective, it must fail to be injective, so that it must have a nontrivial kernel. Let $$g$$ be a non-identity element in the kernel of $$\varphi$$.