Example nonconvex-nonconcave function with some properties I am trying to provide an example of a non-convex and non-concave function $f:[0,1]\to [0,1]$ such that it satisfies the following properties:

*

*$f(0)=0$, $f(1)=1$.

*$f$ is (weakly) increasing.

*$f$ is sup-additive, for all $x,y\in [0,1]$ with $x+y\in [0,1]$ we have $f(x+y)\geq f(x)+f(y)$,

*the function $h:x\mapsto 1-f(1-x)$ is low-additive, for all $x,y\in [0,1]$ with $x+y\in [0,1]$ we have $h(x+y)\leq h(x)+h(y)$.

I tried some nonlinear transformation of the identity with some kinks, but I was not succesful. Any idea?
 A: A key observation is that sup-additivity (3) is trivially fulfilled for functions $f$ which are zero on $[0,\frac12]$, as for all $x,y\in[0,1]$ with $x+y\in[0,1]$ either $x$ or $y$ is $\leq\frac12$ and so the corresponding value vanishes. So, the question really comes down to whether a function $f$ with $\left.f\right|_{[0,\frac12]}\equiv0$ can be chosen such that (4) holds.
To actually answer this, let $h:[0,\frac12]\to[0,1]$ be a function with $h(0)=0$ and $h(\frac12)=1$ that is weakly increasing, subadditive and neither concave nor convex (which exist according to this answer; an example would be $\max\{\sqrt x,2x\}$). Then we can extend it to $[0,1]$ by defining $h(x):=1$ for $x\geq\frac12$ without changing any of those properties; further, we can then define $f:[0,1]\to[0,1]$ as $f(x)=1-h(1-x)$ to obtain a weakly increasing function with $\left.f\right|_{[0,\frac12]}\equiv0$ and $f(1)=1$ that is neither convex nor concave. This function fulfills (4) because $h$ is by construction subadditive, and (3) because it is zero on $[0,\frac12]$; so, it is an example of a function fulfilling (1) to (4) that is neither concave nor convex.
