4.3. The operation ≤ on the rationals
We say that an integer is non-negative if it is in the image of the map i:\N\to\Z.
We say that a rational number is non-negative if it can be written as a/b with a and b integers both of which are non-negative (and of course with b\not=0).
If x and y are rational numbers then we say x\leq y if y-x is non-negative.
It is now a very long but straightforward exercise to prove that \leq is a total order on \mathbb{Q}.
And it is another fairly long and straightforward exercise to show that if a and b are integers, then a\leq b\iff q(a)\leq q(b) (remember that q is the function from the integers to the rationals), that if x\leq y then x+n\leq y+n, and if 0\leq x and 0\leq y then 0\leq xy.
I think I will spare you these exercises, and instead just say that from now on you can just assume all the standard facts about +,-,\times,/ and \leq which you know about rational numbers.
It's quite satisfying to do these exercises in Lean, for just the same reason that it's annoying to do them on paper: there are lots of them, and all the proofs are short.