TITLE: A set is not semialgebraic
QUESTION [5 upvotes]: A subset $A$ of $\mathbb R^n$ is called semi-algebraic if it can be represented as a finite union of sets of the form
\begin{equation*}
\{x\in \mathbb R^n\; |\; p_i(x)=0, q_i(x)<0\; \mbox{for all }i=1, \ldots, m\},
\end{equation*}
where $p_i$ and $q_i$ for $i=1,\ldots, m$ are polynomial functions on $\mathbb R^n$.
I know that the projection of a semialgebraic set in $\mathbb R^{n+1}$ to $\mathbb R^n$ is also a semialgebraic set (Tarski - Seidenberg Theorem). Examples of semialgebraic sets seem to be easy to find, but the opposite seems to be harder. I try to prove that the following set $$A=\{(x,y)\in \mathbb R^2: y=\sin(x)\}$$ is not semialgebraic. But the difficulty is that I can not show that $A$ can not be of the above form or can not to be the projection of any semialgebraic set in $\mathbb R^{3}$. 
How can I continue?

REPLY [2 votes]: Lemma. Let $p\in\mathbb R[x,y]$ be a polynomial and let $T\subset \mathbb R$ be an infinite set with an accumulation point $a$. Assume $p(t,\sin t)=0$ for all $t\in T$. Then $p$ is the zero polynomial.
Proof.
Because $t\mapsto p(t,\sin t)$ is analytic, it follows that $p(t,\sin t)=0$ for all $t\in\mathbb R$. 
Write $$p(x,y)=\sum_{k=1}^n x^kr_k(y)$$ with $r_k\in\mathbb R[y]$. For fixed $t\in\mathbb R$ the polynomial $$\sum_{k=1}^n r_k(\sin t)\cdot x^k\in\mathbb R[x]$$ has infinitely zeroes, namely at $x=2n\pi+t$ with $n\in\mathbb Z$, hence must be the zero polynomial, i.e. all $r_k(\sin t)=0$.
Then $r_k$ is identically zero on $[-1,1]$ and hence is the zero polynomial. So ultimately $p$ is also the zero polynomial. $_\square$
Now assume $A=\{\,(x,\sin x)\mid x\in\mathbb R\,\}$ is semi-algebraic.
Each point $a\in A$ must be an accumulation point for one of the finitely many sets $\{\,x\in\mathbb R^2\mid p_i(x)=0, q_i(x)<0,1\le i\le m\,\}$ we take the union of. By the lemma, all $p_i$ must be zero and can be ignored, i.e., $a$ is an accumulation point of $\{\,x\in\mathbb R^2\mid q_i(x)<0,1\le i\le m\,\}\subseteq A$. In other words, $A$ contains a nonempty open set, contradiction.