A set contains $0$, $1$, and all averages of any subset of its element, prove it contains all rational number between 0 and 1 Assume we have a set $S$ $\subseteq \mathbb{R}$, we know $0,1 \in S$. Also, $S$ has the property that if $A \subseteq S$ is finite, the average of elements in $A$ is in $S$. We want to prove that any rational number between 0 and 1 is contained in $S$.
Can someone please give me a hint?  I tried to use induction but it seems hopeless to me...

We can explicitly construct sets to average more easily if we don't restrict ourselves to dyadics.
Define the set $T$ to be all positive integers $n$ such that $0 \leq p \leq n \implies \frac{p}{n} \in S$.  
In order to prove the result, we want to show that all positive integers are in $T$.
Given any $n \in T$, we can prove that


*

*$\frac{p}{2n} \in S$ for $0 < p \leq n$ by averaging {0, $\frac{p}{n}$}

*$\frac{p}{2n} \in S$ for $n \leq p < 2n$ by averaging {1, $\frac{p-n}{n}$}


Since $\frac{0}{2n}$ and $\frac{2n}{2n}$ are both in S by the original definition, $2n \in T$.
By induction, it is now obvious that $n \in T \implies 2^jn \in T$ for any positive integer $j$.
Given $n \in T$, we can now show that $\frac{p}{2n+1} \in S$ for $0 < p \leq n$ by choosing $j$ such that $2^j > 2n$ and averaging this set:
{0, $\frac{p}{2^jn}$, $\frac{(2^j-1)p}{2^jn}$, 
$\frac{2p}{2^jn}$, $\frac{(2^j-2)p}{2^jn}$, ... , 
$\frac{np}{2^jn}$, $\frac{(2^j-n)p}{2^jn}$}
Each pair of non-zero elements adds to $p/n$ and there are $n$ pairs; including the zero the average is therefore $\frac{p}{2n+1}$ as desired.  The requirement that $2^j > 2n$ ensures that no two elements are equal and also that they are all within $[0,1]$ and hence (since $2^jn \in T$) are elements of $S$.
To show that $\frac{p}{2n+1} \in S$ for $n < p < 2n + 1$ we can define $r=(2n+1)-p$ and use the set
{1, 1 - $\frac{r}{2^jn}$, 1 - $\frac{(2^j-1)r}{2^jn}$, 
1 - $\frac{2r}{2^jn}$, 1 - $\frac{(2^j-2)r}{2^jn}$, ... , 
1 - $\frac{nr}{2^jn}$, 1 - $\frac{(2^j-n)r}{2^jn}$}
Each pair in this set adds to $2 - \frac{r}{n}$ so the $n$ pairs add to $2n - r$ and the set to $2n + 1 - r$ which is equal to $p$, so the average is again $\frac{p}{2n+1}$ and it is easy to show that the elements do not repeat and are all within $[0,1]$.
Since we have shown $0 < p < 2n + 1 \implies \frac{p}{2n+1} \in S$, and since $\frac{0}{2n+1}$ and $\frac{2n+1}{2n+1}$ are both in S by the original definition, we have shown that $2n+1 \in T$.

Having shown that $n \in T$ implies both $2n \in T$ and $2n+1 \in T$, and since $1 \in T$ by the definition of $S$, it is trivial to show by induction that all positive integers $n$ are in $T$.  QED.
