<s>[INST] Regarding irrationality of $\sqrt{5}$ In the proof of irrationality of $\sqrt{5}$, Hardy and Wright define $x=\frac{\sqrt{5}-1}{2}$. From that I know $1-x=x^2$. But then the authors say that when $1$ is divided by $x$ the remainder is $1-x=x^2$. But I am unable to follow how ?
 [/INST] When $1$ is divided by $x$, you get $$\frac1x = \frac{x+1-x}{x} = \
\frac xx + \frac{1-x}{x} = 1 + \frac{1-x}{x}$$
The quotient of the division is $1$ and the remainder is the numerator $1-x$  of the "fractional part". Note that $0\leq \frac{1-x}{x} < 1$ here, so this makes sense.
This is analogous to $$5\div 3 = \frac{3+2}3 = \frac33 +\frac23=1 +\frac23$$
so the quotient is $1$ and the remainder is $2$ (the numerator of the "fractional part") since $0\leq\frac23<1$.
</s>