Proving that a convex subset of a chain is the intersection of a lower segment and an upper segment of a chain. The book I am using is very naive so AC is assumed.
Call a subset $S$ of a chain $L$ a lower segment if: $x \in S$ and $a < x$ implies $a \in S$. An upper segment is defined equivalently. 
Call a subset $S$ of a chain convex if: $a,b \in S$ and $a < x < b$ implies $x \in S$.
I need to prove that convex subsets of a chain $L$ is the intersection of a lower segment and an upper segment of $L$. For the sake of the problem let the convex set be all elements $a < x < b$ for some value of $a$ and $b$.
My (second) attempt:
Every subset of a chain $L$ with an upper bound has a least upper bound. Similarly for greatest lower bound. 
Consider a convex subset with a least upper bound and a greatest lower bound.  Call this least upper bound $u_+$ and the greatest lower bound $u_-$. The convex chain is now the intersection of the lower segment with elements less than $u_+$ and the upper segment for elements greater than $u_-$.
Am I allowed to choose the upper and lower chains like this?
The problem is number 13 from page 14 of "Set Theory and Metric Spaces" By Kaplanski.
 A: Let $P$ be a linearly ordered set, and let $S$ be a convex subset of $P$.
We will show that $S=U\cap L$ for some upper set $U$ and some lower set $L$ of $P$.
Set $$U=\bigcup_{x\in S}\uparrow\{x\}=\{y\in P: \exists x\in S\left(x\leq y\right)\}\\L=\bigcup_{x\in S}\downarrow\{x\}=\{y\in P: \exists x\in S\left(y\leq x\right)\}$$
I claim that $U$ and $L$ are upper and lower respectively and that $S=U\cap L$.
Let $y\in U$ and suppose $z\in P$ such that $y\leq z$. Since $y\in U$ there is an $x\in S$ such that $y\in\uparrow\{x\}$. Since $\uparrow\{x\}$ is an upper set, we have that $z\in\uparrow\{x\}\subseteq U$. Thus $U$ is upper.
Let $y\in L$ and suppose $z\in P$ such that $z\leq y$. Since $y\in L$ there is an $x\in S$ such that $y\in\downarrow\{x\}$. Since $\downarrow\{x\}$ is a lower set, we have that $z\in\downarrow\{x\}\subseteq L$. Thus $L$ is lower.
Now let $x\in S$. Then $\{x\}=\uparrow\{x\}\cap\downarrow\{x\}\subseteq U\cap L$. Thus $x\in U\cap L$. So $S\subseteq U\cap L$.
Now let $x\in U\cap L$. Then there is a $y$ and $z\in S$ such that $x\in\uparrow\{y\}$ and $x\in \downarrow\{z\}$. In particular, $y\leq x\leq z$. But since $S$ is convex, $x\in S$.
Thus $U\cap L\subseteq S$, and we have shown both inclusions.
This is going a bit beyond your question, but $S=U\cap L$ is in a sense the 'smallest possible factorization of $S$ into an upper an lower set.' More precisely, suppose $S=U'\cap L'$ where $U'$ and $L'$ are upper and lower respectively. Then using the same notation above, we have $U\subseteq U'$ and $L\subseteq L'$. This follows from the fact that $U$ and $L$ are the smallest possible upper and lower sets which contain $S$.
A: If I understand you correctly, it seems that you assume that every convex subset $S$ has a minimum and a maximum. This is not always the case. Consider, for example, the open interval $(0,1)\subset\mathbb{R}$.
Now, some subsets that don't have a minimum and a maximum can be described as $\{x|a<x<b\}$. The above interval for example. But this, too, is not always the case. Take for example $\{x\in\mathbb{Q}|x^2<2\}\subset\mathbb{Q}$. 
So the $a$ and $b$ you refer to in your solution don't always exist. You need to work harder.
