TITLE: Variety defined by a recursively enumerable set of polynomials
QUESTION [9 upvotes]: Suppose we have a recursively enumerable set of polynomials $\mathcal{P}=\{ p_1({\bf x}), p_2({\bf x}), \ldots\}, p_i \in \mathbb{Z}[{\bf x}], {\bf x} = (x_1, \ldots, x_n)$. Let $V(\mathcal{P})$ denote the affine variety in $\mathbb{C}^n$ defined by $\mathcal{P}$. Is there an algorithm to compute $V(\mathcal{P})$? By the Nullstellensatz, we know that we need only use finitely many of the polynomials $p_i$ to cut out $V(\mathcal{P})$. We can recursively compute varieties cut out by $\{p_1, \ldots, p_k\}$, for example by computing a Grobner basis for the radical ideal of $(p_1,\ldots,p_k)$. But is there a way to compute $k$ such that $V(\mathcal{P})=V(p_1,\ldots,p_k)$? 
Please let me know if this question needs clarification or if I'm not using the correct notation. 
Addendum: This problem was motivated by this MO question. It would follow from:
If one has a finitely generated group $G$ with solvable word problem, for any $n$ can one compute the representation variety $G\to SL_n(\mathbb{C})$? 
I view $G$ as being given as the homomorphic image of a free group $\\langle g_1,\ldots,g_k\\rangle$. Moreover, there is a Turing machine which takes as input any element $h\in \\langle g_1,\ldots,g_k\\rangle$ and tells if $h$ is trivial in $G$. The space of representations  $\rho:G\to SL_n(\mathbb{C})$ is an affine variety, with $kn^2$ variables given by the entries of the matrices of $\rho(g_i)$. One can recursively generate polynomials 
which are the entries of the matrices $\rho(h)-I$ which cut out the representation variety (together with $det(\rho(g_i))-1$). So the algorithm should depend on how these polynomials are generated, if one wants to be able to compute the representation variety for each $n$. 
I suspect that the answer is no, although I'm not sure how to generalize Borcherds or Groves' answers to this context.  
If one could compute the representation variety, then one could determine if $G$ has a homomorphism to a finite group.

REPLY [2 votes]: Agol's other question (If one has a finitely generated group G  with solvable word problem, for any n  can one compute the representation variety G -> SLn(C)) also has a negative answer. In fact one cannot even compute the number of homomorphisms to the group of order 2 when G is generated by one element g. 
Take the relations to be g^(2k+1)=1 if  some given Turing machine halts for the first time after k steps. A little thought shows that this group has an effectively solvable word problem and an effectively recursive set of relations, but one cannot decide if it has a homomorphism to the group of order 2 without solving the halting problem for the given Turing machine.