Borel subsets of $\mathbb{R}$ and membership algorithms

63 Views Asked by At

Edit: As the comments by many people show, the answer is no, and my argument for open sets is wrong. Still, I believe that my mistakes are interesting, so I'm not going to delete the question.

Fix a Borel subset $B$ of $\mathbb{R}$.

Is there an algorithm that takes $x \in \mathbb{R}$ as input and decides whether $x$ belongs to $B$? The algorithm is allowed to make queries of the form "Compare $x$ to $y$" for $y\in\mathbb{R}$. The result of such a query is one of $<$, $=$ and $>$.

Note that $B$ is arbitrary but fixed. It is not part of the input of the algorithm.

If $B$ is open, such an algorithm exists: First we can find an integer $T$ such that $|x|\leq T$. Then it remains to decide whether or not $x$ belongs to one of finitely many open intervals.

Note that my notion of an algorithm is allowed to have real numbers as variables and perform arithmetic operations on them.

My notion of an algorithm is also allowed to have a pre-computed infinite sequence of real values in memory (for my example where $B$ is open, I'm assuming that the endpoints of the intervals whose union is $B$ are stored in memory before the algorithm starts running, in a convenient order).

My general motivation here is my intuition that in some sense Borel sets are "computable". I haven't decided exactly what this means yet, but the question above depicts my first attempt.

For this reason, if you think there's a similar more interesting question, please let me know.