Kronecker's theorem and Lehmer's problem for polynomials in several variables