- $\sqrt{p}$ is rational.
- $\sqrt{p}=\frac{a}{b}$, where $a,b$ are integers with $\gcd(a,b)=1$.
- $a^2=b^2p$.
Since $p$ divides $a^2$, $p$ divides $a$.
- $a=kp$.
- $a^2=k^2p^2=b^2p$
- $p=\frac{b^2}{k^2}\Rightarrow\sqrt{p}=\frac{b}{k}\Rightarrow\frac{a}{b}=\frac{b}{k}$
- $b^2=ak\Rightarrow b=\sqrt{ak}$.
- $\sqrt{p}=\frac{a}{b}=\frac{a}{\sqrt{ak}}=\frac{\sqrt{a}\sqrt{a}}{\sqrt{a}\sqrt{k}}$ which has $\gcd(a,b)=\sqrt{a}\neq 1$ , a contradiction.
($a\neq 1$ because the only number that divides 1 is 1, but 1 is not a prime from $a=kp$)
Hence, $p$ is irrational. Is this legit?