I've seen a famous "one-line" proof of irrationality of the square root of two that I don't understand at all.
It says that if $\sqrt{2}=\frac{m}n$ in lowest terms, $\sqrt{2}=\frac{2n-m}{m-n}$ in lower terms.
I have a few questions about this - most fundamentally, how does one get from that first expression to the other? It doesn't seem to be a trivial algebraic manipulation, at least not that I see. Secondly, how do we know that $m-n$ is smaller than $n$?



$$\sqrt{2} = \frac{m}{n} = \frac{m(\sqrt{2} - 1)}{n(\sqrt{2} - 1)} = \frac{n\sqrt{2}(\sqrt{2} - 1)}{n(\sqrt{2} - 1)} = \frac{2n - n\sqrt{2}}{n\sqrt{2} - n}= \frac{2n-m}{m-n}$$
For the second question:
$m-n$ is smaller than $n$, because we know that $\sqrt{2}$ is somewhere between $1$ and $2$, and therefore $1 < m < 2n$, meaning that $0 < m-n < n$, so $m-n$ is smaller than $n$ (but still positive).
By the way, do you understand that the proof as a whole is a proof by infinite descent?