Homomorphism-checking problem (generating sets)

Given data
Groups $$G_1$$ and $$G_2$$ are specified by means of encodings $$C_1$$ and $$C_2$$ respectively. We are given a generating set $$A_1$$ of $$G_1$$ and a map $$f:A_1 \to G_2$$.

Goal
We want to know whether there is a homomorphism $$\phi: G_1 \to G_2$$ that extends $$f$$ (such a homomorphism, if it exists must be unique).

Related problems

 * Isomorphism-checking problem
 * Automorphism-checking problem
 * Endomorphism-checking problem

Solution
If such a homomorphism doesn't exist, that means that the problem arises because there is a word in the elements of $$A_1$$ that reduces to the identity, but such that the word in their corresponding images does not reduce to the identity in $$G_2$$. Hence, if we can somehow guess what that word is, then evaluating the word will not be hard.

Of course, the length of the word may itself be quite large, but we know that there exists a small circuit that outputs any given word.

The upshot is that the homomorphism-checking problem is in nondeterministic polynomial time.