**Context:** In formulating problems for secondary school mathematics teachers (and students) about **absolute value functions**, which we define as functions $\mathbb{R} \rightarrow \mathbb{R}$ that send $x \mapsto a|x-h|+k$ for fixed parameters $a, h, k \in \mathbb{R}$, I was able to rewrite the **nested** absolute value function

$$f(x) = \Big||x|-1\Big|$$

as a linear combination of absolute value functions,

$$g(x) = |x+1| + |x-1| - (|x|+1)$$

(You can view the graphs of $f$ and $g$ **here**; although not delved into in this post, my colleagues enjoyed finding similar relationships even when there is a quadratic $x$ term, for example, in the graphs/functions depicted **here**.)

My **question** is twofold (although the follow-up question depends on the first answer):

1.Is it true that every nested absolute value function (NAVF) or linear combination of NAVFs can be written as a linear combination of AVFs?

2a.If not, what is a counterexample, and what criteria must be satisfied for de-nesting to be possible?

2b.If so, is there an algorithm for de-nesting, i.e., rewriting an arbitrary NAVF as a linear combination of AVFs?

Pointers to related literature/references would be welcome, even if they do not explicitly answer the questions above. Please edit the questions, title, or tags if you believe it will improve clarity.