Points at distance one from an algebraic subset of $\mathbb R^n$ Let $n$ be an integer $\ge2$; let $X_1,\ldots,X_n$ be indeterminates; let $S$ be a subset of the polynomial ring $\mathbb R[X_1,\ldots,X_n]$; let $V(S)$ be the set formed by the points of $\mathbb R^n$ on which each polynomial $f\in S$ vanishes; assume that $V(S)$ is nonempty; and let $V(S)_1$ be the set consisting of the points of $\mathbb R^n$ which are at distance one from $V(S)$.
Is there necessarily a nonzero polynomial $g\in\mathbb R[X_1,\ldots,X_n]$ which vanishes on $V(S)_1$?
 A: Yes. One solution runs through semi-algebraic sets.
Definition: A subset $S\subset \Bbb R^n$ is semi-algebraic if it can be written as a finite boolean combination of sets of the form $\{x\in\Bbb R^n\mid f(x) * 0\}$, where $f$ is a polynomial and $*$ is any of the symbols $>$, $<$, or $=$.
Theorem: Semialgebraic sets are exactly the sets which are definable in the language $(\Bbb R, 0, 1,+,\cdot)$.
Proof: See section 1.1 of Denkowska & Denkowski, for instance. $\blacksquare$
With this in mind, we can define $V(S)_1$ as follows: it's the intersection of $$\{ x\in\Bbb R^n \mid \exists y\in V(S) \text{ such that } \sum_{i=0}^n (x_i-y_i)^2 = 1 \}$$ and $$\{ x\in\Bbb R^n \mid \not\exists y\in V(S) \text{ such that } \sum_{i=0}^n (x_i-y_i)^2 < 1 \}.$$
As $V(S)_1$ is semi-algebraic, we can write $V(S)_1$ as $$\bigcup_{i=0}^p \{x\in\Bbb R^n\mid f_{i1}(x)=0, \cdots, f_{im_i}(x)=0, g_{i1}(x)>0, \cdots, g_{in_i}(x)>0\}$$ for polynomials $f_{ij},g_{ik}$. Now I claim that none of the sets in our union are Zariski dense: if they were, they'd have to contain a nonempty open ball, which contradicts the fact that $V(S)_1$ is the set of points of distance exactly one to $V(S)$. This implies that each set has some $f_{ij}\neq 0$, and we can take the product of these nonzero $f$ to find a nonzero polynomial vanishing on $V(S)_1$.
