How is this a proof of the irrationality of $\sqrt2$ Proof. Suppose for the sake of contradiction that $\sqrt2$ is rational, and choose the least integer, $q \gt 0$, such that $(\sqrt2 − 1)q$ is a non negative integer. Let $q':=(\sqrt2 − 1)q$. Clearly $0 \lt q' \lt q$. But an easy computation shows that $(\sqrt2 − 1)q'$ is a nonnega­tive integer, contradicting the minimality of $q$.
Now here's my question. If $(\sqrt2-1)q$ is a non-negative integer, and $q$ is an integer, then $(\sqrt2-1)$ must be an integer. So the contradiction about the minimality of $q$ only proves that $(\sqrt2-1)$ cannot be an integer. How does it prove the irrationality of $\sqrt2$?

By the way of Contradiction, assume that $\sqrt{2}$ = $\frac{p}{q}$ where p and q are integers with no common factor ( fraction reduced to lowest terms).
Then $\frac{p^2}{q^2}$ = 2
Since $p$ and $q$ are integers so $p$$^2$ = 2 $q$$^2$ $\implies$ $p$$^2$ is even $\implies$ $p$ is even.
So $p$ can be expressed as; $p$ = $2$$k$ for some integer $k$.
Then from $\frac{p^2}{q^2}$ = 2 $\implies$ $\frac{(2k)^2}{q^2}$ = 2 $\implies$ $4k^2$ = 2 $q$$^2$ $\implies$ $q$$^2$ = 2 $k$$^2$ $\implies$ $q^2$ is even $\implies$ $q$ is even.
Which contradicts the fact that $p$ and $q$ do not have common factor (contrdicts that fraction $\frac{p}{q}$ is in lowest  terms).
So we can not express $\sqrt{2}$ in the form of fraction, $i.$$e.$ $\sqrt{2}$ is an irrational number.
