Let $f:\mathbb{R}\rightarrow\mathbb{R}$ be a solution to the Cauchy functional equation
$$f(a+b)=f(a)+f(b),\quad\forall a,b\in\mathbb{R}.$$


Observe that
$$A:=\{a\in\mathbb{R}:f(a)\geq 0\},\quad B:=\{b\in\mathbb{R}:f(b)< 0\}$$
provide a partition of $\mathbb{R}$ into two closed by sum subsets.


I would like to know if the contrary holds true. So my question is:


**Given a partition of $\mathbb{R}$ into two subsets $A,B$, both closed by sum, is it true that there exists a solution $f$ to the Cauchy functional equation such that $A=\{a\in\mathbb{R}:f(a)\geq 0\}$ and $B=\{b\in\mathbb{R}:f(b)< 0\}$?**



Sets closed by sum and solutions to the Cauchy functional equation
Suppose we have a decomposition $\mathbb R=A\cup B$ as described in the question and that $0\in A$. (Clearly, $0\in B$ is impossible, so we have to denote by $A$ the set which contains zero.)


Now, let us denote 
$$A\_0=\{x\in A; -x\in A\} \qquad\text{and}\qquad A\_1=\{x\in A; -x\in B\}.$$
It's not difficult to see that $A=A\_0\cup A\_1$ and both $A\_0$ and $A\_1$ are closed under addition.


Moreover, notice that we have $-x\in A\_1$ for any $x\in B$. (For $x\in B$ we have $-x\in A$, otherwise we would get $x+(-x)=0\in B$, a contradiction.) Thus we get that $B=-A\_1=\{-x; x\in A\_1\}$.


We can also check relatively easily that any of these three sets is closed under multiplication by a positive rational number. (Let $X$ be one of these three sets. It is easy to see that $x\in X$ and $n\in\mathbb Z^+$ we have $nx\in X$. Now for any rational number $\frac pq$ with $p,q>0$ and $y=\frac xq$ we get that $qy\in X$. This also implies $y\in X$; if $y$ belonged to some of the other too sets, so would $qy$. Consequently $\frac pq \cdot x = py \in X$.) 


Now we can see that both $A\_0$ and $\{0\}\cup A\_1\cup B$ are subspaces of $\mathbb R$ considered as a $\mathbb Q$-vector space. Then we can choose basis of these subspaces such that $B\_0\subseteq A\_0$ and $B\_1\subseteq A\_1$. 


Now if we prescribe $f[B\_0]=\{0\}$ and $f[B\_1]=\{1\}$, this gives us an additive function $f\colon\mathbb R\to\mathbb R$ such that $A\_0=\{x\in\mathbb R; f(x)=0\}$, $A\_1=\{x\in\mathbb R; f(x)>0\}$ and $B=-A\_1=\{x\in\mathbb R; f(x)<0\}$. 




---


It seems that similar approach would work for $\mathbb R^+=A\cup B$ and $f\colon \mathbb R^+\to\mathbb R$. 


