TITLE: Prove that $\vert E \vert=0$ if $\frac{x+y}{2}\notin E$ for $x,y \in E$
QUESTION [14 upvotes]: Let $E\subset\mathbb{R}$ measurable such that if $x\neq y, x,y\in E$ then $\frac{x+y}{2}\notin E$. 
Prove that $\vert E \vert=0$.
Any idea? Thanks!

REPLY [2 votes]: First we prove the following claim.

Let $a<b$ be distinct points contained in $E$. Consider the interval $I = [a,b]$ and let $A = E \cap I$. Then $\lambda(A) \leq \lambda(I)/2$.

Proof:
Fix $x = a$ and let $y$ vary across $I$. Set $f(y) = (x+y)/2 = (a+y)/2$. If $y \in A$ then $f(y) \not\in A$. Thus we have identified a set $f(A) \subset [a,(a+b)/2]$ which is a scaled copy of $A$ (half the length of $A$) and which contains no points of $A$.
Now fix $y = b$ and let $x$ vary across $I$. Set $g(x) = (x+y)/2 = (x+b)/2$. If $x \in A$ then $g(x) \not \in A$. Thus we have identified a set $g(A) \subset [(a+b)/2,b]$ which is half the length of $A$ and which contains no points of $A$.
Now, the sets $A$, $f(A)$, and $g(A)$ are pairwise disjoint (except that $f(A)$ and $g(A)$ both contain $(a+b)/2$), and all are subsets of $[a,b]$. Therefore
$$b-a \geq \lambda(A) + \lambda(f(A)) + \lambda(g(A)) = \lambda(A) + \lambda(A)/2 + \lambda(A)/2 = 2\lambda(A)$$
so
$$\lambda(E \cap I) = \lambda(A) \leq (b-a)/2 = \lambda(I)/2$$

The claim implies a more general result.

If $J$ is any finite-length interval, then $\lambda(E \cap J) \leq \lambda(J)/2$.

Proof: Clearly if $E\cap J$ is empty or contains only one point, then $\lambda(E \cap J) = 0$ so the inequality holds. Otherwise, let $a = \inf(E \cap J)$ and $b = \sup(E \cap J)$, and let $a_n, b_n$ be sequences in $E \cap J$ such that $a_n \downarrow a$ and $b_n \uparrow b$, respectively. Then by the claim, $\lambda(E \cap [a_n, b_n]) \leq (b_n - a_n)/2$ for each $n$. Taking limits, we have
$$\begin{aligned}
\lambda(E\cap J) &= \lambda(E \cap [a,b]) \\
&= \lim_{n \to \infty}\lambda(E \cap [a_n, b_n]) \\
&\leq \lim_{n \to \infty} (b_n - a_n)/2 \\
&= (b - a)/2 \\
&\leq \lambda(J)/2 \\
\end{aligned}$$

Now let $J$ be any finite-length interval, and $A = E \cap J$. Suppose that $\lambda(A) > 0$. Let $\epsilon = \lambda(A)/2$ and suppose that $O$ is an open set containing $A$, with $\lambda(O) < \lambda(A) + \epsilon = 3\lambda(A)/2$. Such a set exists because $A = E \cap J$ is an intersection of measurable sets, hence measurable, and $A$ has finite measure because it is a subset of $J$.
As $O$ is an open subset of $\mathbb R$, we may express it as a countable union of disjoint open intervals, $O = \cup_{n=1}^{\infty}U_n$, and each $U_n$ has finite length since $O$ has finite measure.
For each $n$, we have two possibilities. If $A \cap U_n = \emptyset$ or $A \cap U_n$ is a singleton, then clearly $\lambda(A \cap U_n) = 0$. Otherwise, $A \cap U_n$ contains at least two distinct points of $A$, (hence of $E$), so $\lambda(A \cap U_n) = \lambda(E \cap (J \cap U_n)) \leq \lambda(J \cap U_n)/2 \leq \lambda(U_n)/2$.
Then
$$\begin{aligned}
\lambda(A) &= \lambda(A \cap O) \\
&= \lambda\left(A \cap \left(\bigcup_{n=1}^{\infty}U_n\right)\right) \\
&= \sum_{n=1}^{\infty}\lambda(A \cap U_n) \\
&\leq \sum_{n=1}^{\infty}\lambda(U_n)/2 \\
&= \frac{1}{2}\sum_{n=1}^{\infty}\lambda(U_n) \\
&= \frac{1}{2}\lambda(O) \\
&< \frac{3}{4}\lambda(A)
\end{aligned}$$
This contradiction resulted from the assumption that $\lambda(A) > 0$, so in fact we must have $\lambda(A) = 0$. This shows that the intersection of $E$ with any finite-length interval has measure zero. Therefore
$$E = E \cap \mathbb R = E \cap \left(\bigcup_{n=-\infty}^{\infty} [n,n+1]\right) = \bigcup_{n=-\infty}^{\infty}(E \cap [n, n+1])$$
also has zero measure, by countable additivity.