Sign the absolute value of | X-1 | - | Y-X | x

Sign the absolute value of | X-1 | - | Y-X | x

X0, then Y-X must be positive, so
|x-1|-|y-x|=-(x-1)-(y-x)=1-y