I was doing a problem where I had to prove that $\sqrt5$ was irrational, and I went through with the usual method. Then, I was curious what would've happened if I tried to do this with a value whose square root was rational, such as $\sqrt4$.
Let's assume that we do not know that $\sqrt4$ is rational or not.
Let's assume $\sqrt4$ is rational.
$\sqrt4 = p/q$
$4 = p^2/q^2$
$4q^2 = p^2$
This means that 4 is a factor of p.
Let's assume p = 4x
This means that:
$4q^2 = 16x^2$
$q^2 = 4x^2$
This means q is also a factor of 4. But, here we are making the assumption that p and q are co-prime, so this contradiction occurs when we assume that $\sqrt4$ is rational, and hence $\sqrt4$ is irrational.
The contradiction method seems to suggest that $\sqrt4$ is irrational, even though we know that it equals 2 which is rational. Did I make a mistake somewhere? Or is the perhaps a problem in the contradiction method?