PiecewiseExpand¶
Expands functions to explicit Piecewise form.
A Piecewise nested inside another collapses into a single one,
with the merged conditions reduced:
$ wo 'PiecewiseExpand[Piecewise[{{Piecewise[{{1, x < 1}}, 2], x > 0}}, 3]]'
Piecewise[{{1, Inequality[0, Less, x, Less, 1]}, {2, x >= 1}}, 3]
Abs and Sign split only once a second argument puts them over the reals:
An assumption that decides the branch collapses the result: