From University Physics with Modern Physics by Young and Freedman, they say:
We want to find the work done by the weight when the object moves downwards from a height $y_1$ above the origin to a lower height $y_2$. The weight and displacement are in the same direction, so the work $W_{\text{grav}}$ done on the object by its weight is positive: $$ W_{\text{grav}} = Fs = w(y_1 - y_2) = mgy_1 - mgy_2 $$
This expression also gives the correct work when the object moves upward and $y_2$ is greater than $y_1$. In that case the quantity $ (y_1 - y_2)$ is negative, and $W_{\text{grav}}$ is negative because the weight and displacement are opposite in direction.
I am confused about this because they have taken displacement, $s$, as $y_1 - y_2$. I've always learnt that displacement $s = y_2 - y_1$ i.e. Final minus initial, not initial minus final.
Is this because they have taken downwards direction as positive? And because down is positive, $w$ is positive, and to make $s$ positive you do $y_1 - y_2$ not $y_2 - y_1$? Am I correct? I've been thinking about this, and this interpretation seems to make sense, but what they've done $s = y_1 - y_2$ is bothering me because for a very long time I've learnt that displacement is final minus initial never the other way around.
Could you also do this?
For the same scenario, take up as positive, then $F = -w = -mg$ and $ W = Fs = -mg(y_2-y_1)$?