Question
Can the piecewise function
$$f(x) = \begin{cases} 0 & \text{if $x > 0$} \\ 1 & \text{if $x = 0$} \\ 0 & \text{if $x < 0$} \\ \end{cases}$$
be defined using only the operations $+ , -, *, /, |\cdots|, \max$, and $\min$?
What I have tried
I can define the first and last pieces: $0$ if $x > 0$ or $x < 0$ with
$$1 - \frac{x}{x}$$
But this will fail with a division by $0$ in the case where $x = 0$
$$1 - \frac{0}{0}$$
I can fix the division error by forcing a 1 on the bottom.
$$a(x) = 1 - \frac{x}{\max(1, x) \min(-1, x)}$$
This works for most negatives and $0$ and fails when $-1 < x < 0$ and $x > 0$. When $x > 0$, $a(x) = 2$. Fixing this requires another max to check a number is positive. Defining $b(x)$ to be $2$ when $x > 0$ and $0$ when $x = 0$ or $x <= -1$
$$b(x) = 2\frac{\max(0, x)}{\max(1, x) \min(-1, x)}$$
Combining them to get
$$c(x) = a(x) - b(x) = 1 - \frac{x - 2\max(0, x)}{\max(1, x) \min(-1, x)}$$
This mess is what I want except when $-1 < x < 0$ and $0 < x < 1$. This is as far as I have gotten.