What is the Zariski closure of a locally closed set, when "locally" means the Euclidean topology? Let $X \subseteq \mathbf{R}^n$ be Zariski closed and absolutely irreducible, and let $U \subseteq \mathbf{R}^n$ be Euclidean open. My guess is that $X$ is the Zariski closure of $X \cap U$, if the latter is nonempty.
In the case of $X = \mathbf{R}^n$, the proof as given in this answer can be easily modified to work here: if $f$ is a polynomial that vanishes on $U$ ($= X \cap U$), then it is zero on all of $\mathbf{R}^n$ by analyticity. Then $X$ is the Zariski closure of $X \cap U$.
In the general case, it seems like you would want to choose some analytic local coordinates, but this is not easy for at least two reasons:


*

*The statement is clearly false if $X$ is allowed to be reducible, and when $U$ has empty intersection with any of its irreducible components. This shows how hard it is to make a global statement about the zeros of some function $f$ that vanishes on $X \cap U$.

*Maybe $X \cap U$ contains singularities.


In the case of $X \subseteq \mathbf{C}^n$, the analogous statement is implied by the theorem in Mumford's book as cited by this answer.
I tried the following: Suppose that $f$ vanishes on $X \cap U$; we want that $f$ vanishes on $X$. Define $V = X \cap V(f)$ and $W = \overline{X \setminus V}$ (Zariski closure). Since $X$ is irreducible, it is sufficient if we can prove that $W \neq X$, because then $V=X$. I'm not sure if this is very helpful: At this point, I've basically just postponed comparing a Zariski closure with a Euclidean open set.
Thanks in advance for any insight!
 A: This answer is distilled from the comments by Jérémy Blanc, François Brunault and xuhan.
The guess that $X$ is the Zariski closure of $X \cap U$, if the latter is nonempty, is false in general. As a counterexample, take the Zariski closed set in $\mathbf{R}^2$ given by the zero set of the equation
$x^2 + x^3 + y^2 + y^3 = 0$
It consists of a curve that asymptotically approached the line $x + y = 0$, together with the isolated point $(x,y)=(0,0)$. Taking any small Euclidean neighbourhood of this isolated point for $U$ is a counterexample to this guess.
However, if $X$ is in addition assumed to be a connected submanifold of $\mathbf{R}^n$, then the guess is true. Namely, if $X$ is a submanifold and Zariski closed, then it actually is a (real) analytic submanifold, meaning that analytic functions that vanish locally vanish, by analytic continuation, on the entire connected component. This implies that the Zariski closure of $X \cap U$ is the entire connected component containing $X \cap U$. Assuming $X$ to be connected, this was the 'guess' in the question.
