I have seen the following result stated several times in the literature, without proof:



> 
> Let $\mathbb{K}$ be $\mathbb{R}$ or $\mathbb{C}$, and assume $P\in\mathbb{K}[X\_{1},\ldots,X\_{n}]$ is an irreducible polynomial of $n$ variables, and let
> 
> 
> $$ V = \{z\in\mathbb{C}^{n},~P(z)=0\},\quad I(V)=\{Q\in\mathbb{C}[X\_{1},\ldots,X\_{n}],~Q=0\text{ on }V\}.$$
> 
> 
> Assume that $V$ contains a real point $a\in\mathbb{R}^{n}$ which is regular, that is
> 
> 
> $$\text{dim }V=n-\text{rank }J\_{a}(V),$$
> 
> 
> where $J\_{a}(V)$ denotes the Jacobian of a family of generators of $I(V)$, evaluated at $a$.
> 
> 
> Then the set $V\_{\mathbb{R}}=V\cap\mathbb{R}^{n}$ of real points of $V$ is Zariski dense in $V$, or equivalently any polynomial that vanishes on $V\_{\mathbb{R}}$ must vanish on $V$.
> 
> 
> 


I am also interested by the analytic version of this result (if true) where $V$ is still the zero set of a polynomial $P$ but $I(V)$ is the ideal of analytic functions vanishing on $V$, and the vanishing of an analytic function $f$ on $V\_{\mathbb{R}}$ implies the vanishing of $f$ on $V$.


Could someone provide a proof for the algebraic or analytic case?


Many thanks in advance.



Polynomials (or analytic functions) vanishing on a real algebraic set
The more general statement that is true is the following:



> 
> Let $X \subset \mathbb{C}^d$ be an irreducible affine variety defined by real polynomials. If $X$ has a smooth real point, then $X(\mathbb{R})$ is Zariski dense in $X.$
> 
> 
> 


A sketch of the proof and some good examples are given here: *[Real Algebraic Geometry for Geometric Constraints](https://arxiv.org/pdf/1606.03127.pdf)* by Frank Sottile (page 8). 


The main fact used is, under the assumption there is a real smooth point, the [smooth points of the $\mathbb{R}$-locus is a real manifold](https://mathoverflow.net/a/262737/12218) of the same dimension.


The main reference is: *[Real Algebraic Geometry](https://www.springer.com/us/book/9783540646631)* by Bochnak, Coste, Roy.


Fun facts: 


1. If you ask instead for the density of $\overline{\mathbb{Q}}$-points then that is true more generally for any $d$–dimensional affine variety $V$ defined over $\mathbb{Q}$ by Noether Normalization.
2. If you remove the assumption that there is a smooth point, then the statement is false as $V(x^2+y^2)$ has only one $\mathbb{R}$-point which is not smooth, namely $(0,0)$, and $x^2+y^2$ is irreducible over $\mathbb{R}$ and the $\mathbb{C}$-locus is dimension 1 (so the $\mathbb{R}$-locus not Zariski dense).


