Solution sets of equations in infinite discrete groups