Let V be a complex affine variety given as the vanishing set of a set of polynomials with integral coefficients. I have 3 questions.


1)


Under what assumption will the dimension of V over C remain the same as the dimension of V computed over some finite field like Z\_P, assuming that the prime P does not divide any of the coefficients of the polynomials defining V?


2)


How can such a prime P be found if we have a set of polynomials whose vanishing set is V? 


3)


Suppose that V has a singularity over Z\_P. Can we conclude that V is singular variety? In other words. Does having a singularity over a finite field immediately imply the variety is not smooth? If not, what guarantees that having a singularity modulo p implies a singularity over C?



Concerning the dimension of a complex variety modulo a prime
To make more precise the answer of Felip. You have a scheme $X=Spec(A)$ over $\mathbb Z$, where $A$ is a finitely generate $\mathbb Z$-algebra such that its generic fiber $X\_{\mathbb Q}$ (just consider your polynomials as polynomials with rational coefficients) gives $V$ by field extension $\mathbb{C}/\mathbb{Q}$. Of course, $X\_{\mathbb Q}$ has the same dimension as $V$, and $X\_{\mathbb Q}$ is smooth if and only $V$ is smooth. 


**Questions 1-2**. You want to compare $\dim X\_p$ with $\dim X\_{\mathbb Q}$. In general $\dim X\_p\ge \dim X\_{\mathbb Q}$. The equality holds under some flatness condition at $p$. Namely, there is rather general result: if $f: Y\to Z$ is a flat morphism of finite type between noetherian schemes and suppose that $Z$ is integral and universally catenary (e.g.any scheme of finite type over a noetherian regular scheme, so any open subset of $Spec(\mathbb Z)$ is OK), then all [**EDIT**: non-empty] fibers $Y\_z$ of $f$ have the same dimension [**EDIT**: if the generic fiber of $f$ is equidimensional (i.e. all irreducibles components have the same dimension)]. 


Problem: your $X$ is not necessarily flat over $\mathbb Z$. But the flatness over $\mathbb Z$ (or any Dedekind domain) is easy to detect: it is equivalent to be torsion free. So consider the ideal $I$ equal to
$$ { a\in A \mid ka=0 \text{ for some non zero } k \in \mathbb Z \}$$
(don't know how to type "{" and "}"). Then $A/I$ is flat over $\mathbb Z$ and defines a closed scheme of $X$ which coincides with $X$ over an open subset of $\mathbb Z$. Actually, as $I$ is finitely generated, there exists a positive integer $N$ such that $NI=0$. Then $I=0$ over $Spec(\mathbb Z[1/N])$. So for any prime number $p$ prime to $N$, $X\_p$ will have dimension $\dim V$. Now you have to compute such a $N$... For hypersurface, $N$ is just the gcd of the coefficients (see comments in Felip's answer). I don't know whether efficient methodes exist in general. Of course if a prime $p$ does not divid any polynomial in the definning ideal of $X$, then this $p$ is OK. But you have to test this property for all polynomials and not just a set of generators (Example: the ideal generated by $T\_1+pT\_2, T\_1$, then $p$ is bad). 


**Question 3**. Suppose $V$ is smooth (and connected for simplicity), and you are looking for the $p$ such that $X\_p$ is also smooth. You first proceed as in Question 1 to find an open subset $Spec(\mathbb Z[1/N]$ over which $X$ is flat. Let $d=\dim X\_{\mathbb Q}=\dim X\_p$ for all $p$ prime to $N$. Write 
$$ X=Spec\big(\mathbb Z[T\_1, \ldots T\_n]/(F\_1,\ldots, F\_m)\big)$$ 
Then $X\_p$ is smooth is and only if the Jacobian matrix of the $F\_i$'s mod $p$ has rank $n-d$ at all points of $X\_p$. Equivalently, the ideal $J\subseteq \mathbb Z[T\_1,\ldots, T\_n]$ generated by $F\_1,...,F\_m$ and the rank $n-d$ minors of the Jacobian matrix is the unit ideal mod $p$. Therefore, the computation consists in determining the ideal $J$. As $X\_{\mathbb Q}$ is supposed to be smooth, $J$ is generated by a positive integer $M$. Now for all $p$ prime to $MN$, $X\_p$ is smooth of dimension $\dim V$. 


[**EDIT**]: The assertion on the dimensions of the fibers needs some hypothesis on the generic fiber of $Y\to Z$. We must assume it is equidimensional. Otherwise $Y\_z$ has dimension equal to that of the generic fiber for $z\in Z$ belonging to the image of all irreducible components of $X$. For the initial question, it is better to assum the original variety $V$ is irreducible. 


