Prove that `sqrt(2)` is irrational.
Prove that `sqrt(2)` is irrational:
Assume that `sqrt(2)` is rational; then `sqrt(2)=p/q` for some `p,q in NN` . Without loss of generality, we can assume that gcd(p,q)=1 (They have no common divisor -- if there is a common divisor, divide both p and q by that divisor to reduce to simplest form)
This means that `p` is a multiple of 2 (p is even). So let `p=2k` .
Thus q is even. But this contradicts our asssumption that p and q had no common divisor.
Therefore `sqrt(2)` is irrational.