While going through Boyd & Vandenberghe's Convex Optimization, I saw the following rules, where $f(x) = (h \circ g)(x)$.
$f$ is convex if $h$ is convex, $\tilde{h}$ is nondecreasing, and $g$ is convex
$f$ is convex if $h$ is convex, $\tilde{h}$ is nonincreasing, and $g$ is concave
$f$ is concave if $h$ is concave, $\tilde{h}$ is nondecreasing, and $g$ is concave
$f$ is concave if $h$ is concave, $\tilde{h}$ is nonincreasing, and $g$ is convex
Consider the convexity of $f(x)= \sqrt{ 1 + x^2 }$, here $h(x)=\sqrt{x}$ and $g(x)=1+x^2$. The extended value extension $h̃$ is $h=-\infty$ for $x<0.$
Clearly, $h$ is concave and nondecreasing, and $g$ is a convex function.
I want to know if the the above rules are if and only if, i.e if the function does not fit in any of the above conditions, can it still be convex?