Is the constant function $\mathbb{X} \to 0, \forall \mathbb{X}$ a one-way function? It seems:
- computing the output is very easy and is computable in constant time;
- given the output, the input is simply not possible to compute.
For simplicity, we can restrain $\mathbb{X}$ to be natural number, or the sets of strings of binary sequences etc.
No function with a limited number of values can be one-way, as even at best, if you have only $m$ values, the probability of guessing the outcome in case of uniform distribution is not less than $\frac{1}{m}$.
To be all harder would mean it needs a probability getting lower with all larger input.
In your case, guessing has a probability $1$ as you know the outcome.
One-way is not exactly reverting the function back, it is guessing which value will give this particular outcome. So it is not $f^{-1}$ it is $f(x_?)=Y$ where $Y$ is known and we try to guess or calculate $x_?$ not using $f^{-1}$ but in a specific sense any algorithm available, any program, any method, any theory that we know of or anyone will ever be able to know of.
In your case any input will give the same outcome so there is nothing to guess.