The most common way to prove the irrationality of a number is to do it by contradiction.
However, in this proof the contradiction arises from having two numbers, say p\q that are assumed to not have any common factors but are later proved to share the number under the radical as a factor. But for instance if the question so arises:
Is √4 rational or not? Answer with a proof.
At first glance, it is obviously rational, but assuming I do not know that √4 can be simplified to 2, what would stop me from arriving at irrationality as my conclusion?
This question seems quite trivial and probably stupid. Is this meant to be by definition or am I missing something fundamental to the aforementioned fallacy?
The step $a | p^2 \implies a | p$ is only valid when $a$ is prime or prime factorisation of $a$ do not have repeated primes.
Now proving square root of composite non perfect squares, irrational is a little different.For e.g.
Let $$\sqrt{18} = \frac{p}{q}$$ $$18q^2 = p^2 \implies 2 | p^2 \text{and}\; 3 | p^2$$ $$\implies 2|p \;\text{and}\; 3|p \implies 6|p$$ $$\text{Let}\; p = 6m$$ then $$18q^2 = 36m^2 \implies q^2 = 2m^2 \implies 2 | q$$ Hence, contradiction.
$\sqrt{18}$ is not rational.