TITLE: A Borel set whose projection onto the first coordinate is not a Borel set
QUESTION [10 upvotes]: I am working on measurable sets and I have been coming across this, so called "fact" about unit circle. More precisely, some of proofs I am studying based on the following observation:

There is a Borel set in the unit square whose projection onto the first coordinate is not a Borel set in the interval $[0,1]$.

I can't give a proof or visual image of this set. I thought two- dimensional Cantor sets i.e., $\mathcal{C}\times \mathcal{C}$.

REPLY [6 votes]: The other answers are absolutely correct; let me add to them by giving an explicit example of such a set.
There is (think Godel numbering) a way to represent linear orderings with domain $\mathbb{N}$ by real numbers. Similarly, we can represent infinite sequences of natural numbers by real numbers. So we can define the following set:

$X$ is the set of pairs $(r, s)$ of real numbers such that $r$ codes a linear ordering and $s$ codes an infinite descending sequence through (the linear order coded by) $r$.

Let $Y$ be the projection of $X$ onto the first coordinate; then $Y$ is the set of reals which code non-well-orderings (or which fail to code linear orderings). This set, it turns out, is non-Borel! Meanwhile - as long as the coding scheme we used above is non-silly - $X$ is Borel.
Most of this is fairly straightforward; the hard part, of course, is proving that $Y$ is indeed not Borel. This is a bit technical, so I'm not going to get into it here; the citations in the other answers say more.