Construct a sequence of function spaces $F_k$ as follows:
- $F_0$ is the space of linear forms $\mathbb R^n\to\mathbb R$.
- $F_{k+1}$ is the span of functions in $F_k$ and their absolute values.
Here are some examples:
$$F_0(\mathbb R^2)\ni\quad2x-y$$ $$F_1(\mathbb R^2)\ni\quad2|x|-y+|x+y|$$ $$F_2(\mathbb R^2)\ni\quad x-\big||2x|-y\big|$$ $$F_3(\mathbb R^2)\ni\quad\Big|x-\big||2x|-y\big|\Big|+|x+y|$$ $$\big||x|+y\big|\quad\not\in F_1(\mathbb R^2)$$ $$F_2(\mathbb R^2)\ni\quad\big||x|+|y|\big|=|x|+|y|\quad\in F_1(\mathbb R^2)$$ $$F_2(\mathbb R^2)\ni\quad\big||x|-|y|\big|=|x+y|+|x-y|-|x|-|y|\quad\in F_1(\mathbb R^2)$$ $$\max(x,y,z)\quad\not\in F_1(\mathbb R^3)$$ $$\max(x,y,z)\quad\in F_2(\mathbb R^3)$$ $$\max(x,y,z,w)\quad\in F_2(\mathbb R^4)$$
It's clear that $F_0\subseteq F_1\subseteq F_2\subseteq\cdots\subseteq F_k\subseteq F_{k+1}\subseteq\cdots\subseteq G$, where $G$ is the space of continuous piecewise-linear functions with polyhedral cone "pieces".
Is there some $k\in\mathbb N$ such that $F_{k+1}=F_k$ ?
Of course the answer depends on $n$. For $n\leq2$ at least, it is just $k=n$, as a result of $G=F_n$.
- A function $f\in G(\mathbb R^0)$ is trivial: $f()=0$.
- A function $f\in G(\mathbb R^1)$ is $f(x)=\tfrac12f(1)(|x|+x)+\tfrac12f(-1)(|x|-x)$. Hence $f\in F_1(\mathbb R^1)$.
- A function $f\in G(\mathbb R^2)$ is sharp (i.e. non-differentiable) along some rays meeting at $(0,0)$, and is smooth on the sectors between those rays. If all sectors are half-planes or larger, then $f\in F_1(\mathbb R^2)$. If any sector is less than a half-plane, then there's some function $g\in F_2(\mathbb R^2)$ with three sharp rays that agrees with $f$ around the two sharp rays bounding that sector, so that $f-g$ has one less sharp ray than $f$; the original two rays are cancelled and a third ray is added. (The prototypical functions for this are $g(x,y)=\max(|x|,y)=\tfrac12(|x|+y+\big||x|-y\big|)$ and $g(x,y)=\min(|x|,y)=\tfrac12(|x|+y-\big||x|-y\big|)$; apply linear transformations to these.) Inducting on the number of sharp rays, we find $f=\sum g\in F_2(\mathbb R^2)$.
We also have $|x|=\max(x,-x)$, and $-\max(x,y)=\min(-x,-y)$, so anything in $F_k$ can be expressed in terms of $\max$ and $\min$. Furthermore, addition distributes over $\max$ and $\min$, and $\max$ and $\min$ distribute over each other:
$$x+\max(y,z)=\max(x+y,x+z)$$ $$\max(x,\min(y,z))=\min(\max(x,y),\max(x,z))$$
It follows that anything in $F_k$ can be expressed in the form
$$\min(\max(f_{11},f_{12},\cdots),\max(f_{21},f_{22},\cdots),\max(f_{31},f_{32},\cdots),\cdots)$$
for some linear functions $f_{ij}\in F_0$. If we can find some universal bound $k$ on the nesting depth of $\max$, i.e. if $\max\in F_k(\mathbb R^n)$ for all $n$, then the same bound applies to $\min$, and any function has a nesting depth at most $2k$.