not difficult to show (see [@jungers_lncis Proposition 1.8]) that stability of the linear inclusion (\[eq:switched.linear.system\]) is equivalent to stability of its “corners”; i.e. to stability of a switched system that at each time step applies one of the $m$ matrices $A_1,\ldots,A_m$, but never a matrix strictly inside their convex hull. This statement is no longer true for the switched nonlinear system in (\[eq:switched.nonlinear.system\])-(\[eq:ftilda=conv\]); see Example \[ex:nonconvex.fails\] in Section \[subsec:nl.global\] of this paper. It turns out, however, that one can still prove switched stability of the entire convex hull by finding a common *convex* Lyapunov function for the corner systems $f_1,\ldots,f_m$. This is demonstrated in our Proposition \[prop:convex.lyap\] and Example \[ex:convex.lyap\], where we demonstrate that convexity of the Lyapunov function is important in such a setting.

Such considerations motivate us to seek efficient algorithms that can automatically search over all candidate convex polynomial Lyapunov functions of a given degree. This task, however, is unfortunately intractable even when one restricts attention to quartic (i.e., degree-four) Lyapunov functions and switched linear systems. See our discussion in Section \[section:sos-convex\]. In order to cope with this issue, we introduce the class of *sos-convex* Lyapunov functions (see Definition \[def:sos-convex\]). Roughly speaking, these Lyapunov functions constitute a 