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.