Find all functions $f$ such that: $f(x)+f(y)+1\geq f(x+y)\geq f(x)+f(y)$ 
Find all functions $f: \Bbb R\rightarrow \Bbb R$ such that:
  1) $\forall x,y \in \Bbb R: f(x)+f(y)+1\geq f(x+y)\geq f(x)+f(y)$
  2) $\forall x \in [0,1) : f(x)\leq f(0)$
  3) $f(-1)=-1 , f(1)=1$

I set $x=0$,according to 1 and 2 we obtain: $f(0)=0$ . My OBVIOUS guess: $f(x)=x$,but I'm not sure about other possibilities....
 A: The third condition together with the first gives
$$f(0) = f(-1 + 1) \geq f(-1) + f(1) = 0$$
A different way of combining the two conditions gives
$$f(-1 + 0) = -1 \geq f(-1) + f(0) = f(0)-1 \Rightarrow f(0) \leq 0$$
Thus $f(0) = 0$. The two inequalities above (with various different arguments) will carry us through the majority of the proof.
I will now prove that:


*

*$f(n) = n$ for all integers $n$

*$f(x) = 0$ for $x \in [0,1)$

*$f(x) = \lfloor x\rfloor$ for all $x$


Let $n \in \mathbb{N}$. Suppose for each $0< i < n$, $f(i) = i$. Then $f(n)\geq f(n-1)+f(1) = n$. Similarly, $f(n-1) = n-1 \geq f(-1) + f(n) = f(n) - 1$, so $f(n) \leq n$. By induction, $f(n) = n$ for all $n \in \mathbb{N}$.
Now we prove the result for $n < 0$. Let $m \in \mathbb{Z}, m < 0$. Suppose $f(k) = k$ for all $k\in\mathbb{Z}, k > m$. Then $f(m) \geq f(m+1) + f(-1) = m$. In the same way as above, we can show $f(m) = m$.
The next step is dealing with non-integer values.
We prove that $f(x) = 0 = \lfloor x\rfloor$ for $x \in [0,1)$, and use this prove it for all other non-integer $x$. Let $x \in (0,1)$. Then $f(x) \leq f(0) = 0$. Similarly, as $1-x \in (0,1)$, $f(1-x) \leq 0$. Thus $f(x) + f(1-x) \leq 0$. However, $1 = f(1) = f(1-x+x) \leq 1 + f(1-x) + f(x)$, so $f(x) + f(1-x) \geq 0$. Hence $f(x) + f(1-x) = 0$. As neither can be positive, we obtain that $f(x) = 0$.
The final step is to use this result to prove that for $x \in (k, k+1)$, $f(x) = k$. Let $k \in \mathbb{Z}, x \in (k, k+1)$. Again we use induction, supposing it is true for $m < k$.
We have that $f(x) \geq f(k) + f(x-k) = f(k) = k$, and $f(x-1) = k-1 \geq f(x)+f(-1) = f(x)-1$, and so $f(x) \leq k$. Thus $f(x) = k$.
Thus $f(x) = \lfloor x\rfloor$ for all $x \in \mathbb{R}$.
A: From $(1)$ with $x=y=0$, $$\tag4-1\le f(0)\le 0.$$
From $(3)$ and $(1)$ with $x=t$,$y=1$, 
$$f(t)+2\ge f(t+1)\ge f(t)+1,$$
and with $x=t+1$, $y=-1$,
$$ f(t+1)\ge f(t)\ge f(t+1)-1,$$
hence 
$$\tag5 f(t+1)=f(t)+1$$
and so
$$ f(x)=\lfloor x\rfloor +f(x-\lfloor x\rfloor)$$
and in particular,
$$\tag6 f(n)=n\qquad\text{for }n\in\Bbb Z $$
because it is true for $n=1$.
Let $x\in(0,1)$. Then $f(x)\le f(0)\le0$, $f(1-x)\le f(0)\le 0$, and $f(x)+f(1-x)\ge f(1)-1=0$. We conclude $f(x)=0$. Consequently,
$$ f(x)=\lfloor x\rfloor$$
is the only possible solution (and readily verified to actually be a solution).
