Defining a partial ordered set with a function

30 Views Asked by At

Is it possible to define a bivariate function $f$ which is merely a calculation (without trigo), and which enables to decide an order between the inputs? The inputs are in $\mathbb{N}$.

For instance, I would like to have

1) $f(a,b)<0$ if $a<b$,

2) $f(a,b)>0$ if $b<a$,

3) and $f(a,b)=0$ if $a=b$.

Thank you.

1

There are 1 best solutions below

0
On

What about $f(a,b) = a-b$ ? $\ $