<s>[INST] Proving $\sqrt 3$ is irrational. There is a very simple proof by means of divisibility that $\sqrt 2$ is irrational. I have to prove that $\sqrt 3$ is irrational too, as a homework. I have done it as follows, ad absurdum:
Suppose
$$\sqrt 3= \frac p q$$
with $p/q$ irreducible, then
$$\begin{align}
& 3q^2=p^2 \\
& 2q^2=p^2-q^2 \\
&2q^2=(p+q)(p-q) \\
\end{align}$$
Now I exploit the fact that $p$ and $q$ can't be both even, so it is the case that they are either both odd, or have different parity. Suppose then that $p=2n+1$ and $q=2m+1$
Then it is the case that
$$\begin{align}
&p-q=2(n-m) \\
&p+q=2(m+n+1) \\
\end{align}$$
Which means that
$$\begin{align}
&2q^2=4(m-n)(m+n+1) \\
&q^2=2(m-n)(m+n+1) \\
\end{align}$$
Then $q^2$ is even, and so is then $q$, which is absurd. Similarly, suppose
$q=2n$ and $p=2m+1$.
Then $p+q=2(m+n)+1$ and $p-q=2(m-n)+1$. So it is the case that
$$\begin{align}
&2q^2=(2(m-n)+1)(2(m+n)+1)\\
&2q^2=4(m^2+m-n^2)+1 \\
\end{align}$$
So $2q^2$ is odd, which is then absurd.

Is this valid?
 [/INST] A proof of R. Dedekind, from 1901.
(He proves that if $n\in\mathbb{N}$ is not a square number, then $\sqrt{n}$ is irrational.)
$\sqrt{3}$ is irrational.
Proof: Suppose that $\sqrt{3}=\frac{x}{y}$, $x$ and $y$ are integers, when $x$ is the smallest integer which satisfies that equation. (If there exist $x$ and $y$ such that $\sqrt{3}=\frac{x}{y}$ then exist that minimal $x$, $\mathbb{N}$ is well-ordered set and $x$ is there). $\frac{x}{y}$ is not an integer ($3$ is not a perfect square), hence exist $k\in\mathbb{N}$, such that:
$$k-1<\frac{x}{y}<k$$
Now, let us look at
$$x'=(k-\frac{x}{y})x=kx-3y \ \ \ \ ; \ \ \ \ y'=(k-\frac{x}{y})y=ky-x $$
Furthermore, $x$ and $y$ are integers, and:
$$\frac{x'}{y'}=\frac{x}{y}=\sqrt{3}$$
But, $k-\frac{x}{y}<1$, therefor $x'<x$, and that is a contradiction to the fact that out $x$ chosen to be the minimal which satisfies $\sqrt{3}=\frac{x}{y}$.
$\blacksquare$
</s>