Show that a subset $I$ of $\textbf{R}$ is an interval if and only if whenever $a,b\in I$ and $0\leq t\leq 1$ then $(1-t)a + tb\in I$.
MY ATTEMPT
We say that a subset $I$ of $\textbf{R}$ is an interval iff $a \leq c \leq b$ and $a,b\in I$ implies that $c\in I$. Based on such definition, we may proceed.
Let us prove the implication $(\Rightarrow)$ first.
Suppose that $I$ is an interval and $a,b\in I$ s.t. $a \leq x \leq b$.
We shall prove that $(1-t)a + tb\in I$ whenever $t\in[0,1]$.
In order to do so, let us consider that $t = (x-a)/(b-a)\in[0,1]$.
We have that $t\in[0,1]$ because $a\leq x\leq b$. Moreover, we do also have that
\begin{align*} x = a + x - a = a + (b-a)\times\frac{x-a}{b-a} = a + (b-a)t = (1-t)a+ bt\in I \end{align*}
Conversely, let us prove the implication $(\Leftarrow)$.
Let us suppose that $a,b\in I$ and $(1-t)a + tb\in I$ whenever $t\in[0,1]$.
Thus, if $a\leq x\leq b$, we have \begin{align*} t = \frac{x-a}{b-a}\in[0,1]\Rightarrow (1-t)a + bt = a + t(b-a) = a + \frac{x-a}{b-a}\times(b-a) = a + x - a = x \in I \end{align*} and we are done.
Could someone please check if the wording of my proof is correct?
Any contribution is appreciated.
In order to do so, let us consider that $t = (x-a)/(b-a)\in[0,1]$." However, how do you know that every $t \in [0, 1]$ is of the form $(x-a)/(b-a)$? (For some $a \le x \le b$, presumably.)
– Aryaman Maithani Jul 08 '20 at 22:32