andrewkirk said:
Are you allowed to use the
least upper bound property? If so the proof is easy by considering the subset of elements of K that are less than c and the subset of elements of K that are greater than c.
I apologize if I placed a lot of unnecessary sentences as I've written everything in my scratchpad. Also, I haven't shown the g.l.b. is in ##K## since I might as well get my work checked before proceeding to the final step.
Assuming ##c\in K## and ##K## is closed, then ##c## is not a point of closure of ##K##; that is ##\exists\epsilon\gt 0## such that ##\forall N\in\Bbb{N}##, ##\exists m\gt N##, ##\vert c-x_m\vert\gt\epsilon##. Considering all elements ##q_1\in K## such that ##c\lt q_1##, we note that any sequence ##(q_n)## of ##K## such that ##\forall n\in\Bbb{N}##, ##c\lt q_n##, ##(q_n)## is bounded below by ##c## and by the Axiom of Completeness, they have a greatest lower bound, say ##\lambda##; we have ##\lambda\lt\dots\lt q_i\lt\cdots\lt q_j\lt\cdots##. So we have
\begin{align}
c\lt\lambda\leq\cdots\lt q_i\lt\cdots\lt q_j\lt\cdots\\
&\Leftrightarrow -\lambda\geq\dots\gt -q_i\gt\cdots\gt -q_j\gt\cdots\\
&\Leftrightarrow -(c-\lambda)\leq\cdots\lt-(c-q_i)\lt\cdots -(c-q_j)\lt\cdots\\
&\Leftrightarrow \vert c-\lambda\vert\leq\cdots\lt\vert c-q_i\vert\lt\dots\lt \vert c-q_j\vert\lt\cdots\\
\end{align}
Now we want to show that ##\inf\{\vert c-x\vert : x\in K\}=\vert c-\lambda \vert##. Suppose that it isn't, then ##\exists\lambda_1\in\Bbb{R}## such that ##\vert c-\lambda\vert \lt \vert c-\lambda_1\vert \leq \vert c-q_k\vert## for all ##q_k\in K##. But that implies ##\lambda \lt \lambda_1 \leq q_k, \forall q_k\in K## which means ##\lambda## is not the greatest lower bound of ##K##, a contradiction.