I want to define the piecewise function
$$f(x)=\begin{cases}-1,&x\ge1\\\frac1n,&\frac1{n+1}\le x<\frac1n,\; n\in\Bbb N_{>0}\\0,&x\le 0\end{cases}$$
in this form, but I don't know if this is possible (I know that we can define this function using a ceil function, but I'm trying to see if it is possible to write the function in the above form).
The problem is that I don't know if it is possible to define the condition
$$\frac1{n+1}\le x<\frac1n,\; n\in\Bbb N_{>0}$$
Thank you in advance