Suppose $K$ is convex and $F(x) = 1$ for $x$ in $K$ and $F(x) = 0$ for $x$ not in $K$. Is $F$ a convex function ? What if the $0$ and $1$ are reversed ?
I think in both cases, the function is not convex because the set of points above $F$ is not a convex set since we can pick two points such that the line joining them goes outside the convex set.
Is this intuition correct?