User blog:Vel!/Piecewise Puzzle

Call \(f:\mathbb{R} \mapsto \mathbb{R}\) a CAMFE function (Constant, Addition, Multiplication, Floor, Exponentiation) iff it is of one of the following forms:


 * \(f(x) = c\) for some rational constant \(c\).
 * \(f(x) = g(x) + h(x)\) where \(g\) and \(h\) are good functions.
 * \(f(x) = g(x) \cdot h(x)\) where \(g\) and \(h\) are good functions.
 * \(f(x) = \lfloor g(x) \rfloor\) where \(g\) is a good function, and \(\lfloor x \rfloor\) denotes the greatest integer less than \(x\).
 * \(f(x) = e^{g(x)}\) where \(g\) is a good function.

Call \(f:\mathbb{R} \mapsto \mathbb{R}\) finite integral piecewise constant iff all the following are true:


 * \(f\) is piecewise linear with has finitely many pieces.
 * \(f\) is not constant (to weed out trivial cases).
 * Each piece is a constant function, and the constants are all integers.
 * The boundaries of each piece are at integers.
 * The domain of each piece is closed, half-open, or open.
 * The domains are disjoint and completely cover \(\mathbb{R}\).
 * The domains have nonzero measure.

Find a CAMFE function that is finite integral piecewise constant.

CAMFS
What if you replace \(e^{g(x)}\) with \(\sin(g(x))\)?

CAMF
What if you completely remove \(f(x) = e^{g(x)}\)?

I presented these problems to Wojowu and he has solved the first two. We're still puzzling over the third, however.