I was trying to partition $\mathbb R$ into two sets $A, B$ such that for all $a\in A, b\in B$ we have $|a-b|\neq 1$. An obvious way to do it is to take $\mathbb Z$ and ${\mathbb R}\setminus {\mathbb Z}$. The other examples I found all consisted of one countable set and its complement.


**Question.** Is there $A\subseteq {\mathbb R}$ such that both $A$ and $B:= {\mathbb R}\setminus A$ are uncountable, and for all $a\in A, b\in B$ we have $|a-b|\neq 1$?



Partitioning $\mathbb R$ into sets such that no mutual points have distance $1$
Converting my comment to an answer:


Choose any $X\subseteq [0,1)$ which is uncountable and for which $[0,1)\setminus X$ is also uncountable (for example, $X=[0,\frac{1}{2}]$).


Then set $A := \{n+x\colon n\in\mathbb{Z}, x\in X\}$ and $B := \{n+x\colon n \in \mathbb{Z}, x \in [0,1)\setminus X\}$.


It is easy to see that all solutions are of this form.


