I'm having troubles to prove that $f(x+y)=f(x)+f(y)$
Let $K$ be a complete ordered field and $0'$ and $1'$ be the zero and the unit of $K$. For each $n\in \mathbb N$, we have $n'=n\cdot1'=+1'+...+1$ (n-times) and $(-n)'=-n'$. We define a function $f:\mathbb R\ \to K$ with $f(p/q)=p'/q'$ for each $p/q\in \mathbb Q$ and for each x irracional, $f(x)=\sup\{p'/q'\in K;p/q\lt x\}$. Prove that $f$ is a homomorphism.
Since
$\{p'/q'\in K;p/q\lt x\}+ \{p'/q'\in K;p/q\lt y\}\subset \{p'/q'\in K;p/q\lt x+y\}$, we have $f(x+y)\geq f(x)+f(y)$. I need help to prove the inverse, i.e., $f(x+y)\leq f(x)+f(y)$.
I really need help.
Thanks a lot.
HINT: It’s possible that $x+y$ is rational even if $x$ and $y$ are both irrational, so it would be a good idea to start by showing that if $x$ is rational, then
$$f(x)=\sup\left\{\frac{p'}{q'}\in K:\frac{p}q<x\right\}\;.$$
In other words, the definition of $f$ on $\Bbb R\setminus\Bbb Q$ also gives the correct value on $\Bbb Q$. This will let you avoid having to deal with several cases. Once you have that, the fact that
$$\left\{\frac{p'}{q'}\in K:\frac{p}q<x\right\}+\left\{\frac{p'}{q'}\in K:\frac{p}q<y\right\}\subseteq\left\{\frac{p'}{q'}\in K:\frac{p}q<x+y\right\}$$
does show that $f(x)+f(y)\le f(x+y)$, even if $x+y\in\Bbb Q$. For the opposite inequality, suppose that
$$f(x)+f(y)<f(x+y)=\sup\left\{\frac{p'}{q'}\in K:\frac{p}q<x+y\right\}\;;$$
then there is $\dfrac{p}q\in\Bbb Q$ such that $\dfrac{p}q<x+y$ and $f(x)+f(y)<\dfrac{p'}{q'}$. Let $z=x+y-\dfrac{p}q>0$, and let $\dfrac{r_x}{s_x},\dfrac{r_y}{s_y}\in\Bbb Q$ satisfy $$x-\frac{z}2<\dfrac{r_x}{s_x}<x\quad\text{and}\quad y-\frac{z}2<\frac{r_y}{s_y}<y\;.$$
Then $$\frac{p}q=x+y-z<\frac{r_x}{s_x}+\frac{r_y}{s_y}<x+y$$
and
$$\frac{r_x'}{s_x'}+\frac{r_y'}{s_y'}\le f(x)+f(y)<\frac{p'}{q'}\;;$$
do you see why this is a problem?