Square root of prime is irrational. Is this a valid proof? I know similar questions exist, but I want to know, if this is a valid proof.
A prime number has 1 and it self as divisors. So the subset of a prime number is $ D(p) = \{1, p\}$
Now I want to prove $\sqrt{p} = \frac{a}{b}$  , to get the opposite.
Also $gcd(a,b)=1$.
Let's square it.
$p = \frac{a^2}{b^2}$
And divide by $b^2$
$\frac{p}{b^2} = \frac{a^2}{b^4}$
In this case ${b^2}$ is also a divisor of  $p$, which doesn't fit the definition of prime numbers. So the square root of a prime number must be irrational.

We have that $\sqrt{p}=\dfrac{a}{b}$ with $a$ and $b$ being relatively prime integers. Thus, $p=\dfrac{a^2}{b^2}$ and so $a^2=p\cdot b^2$.
$a^2$ must be divisible by $p$ because $p, a^2,$ and $b^2$ are all integers and so $a$ must be divisible by $p$ as well. If we define $a=pc$ where $c$ is also an integer, then $p=\dfrac{p^2\cdot c^2}{b^2} \rightarrow 1 = \dfrac{p\cdot c^2}{b^2} \rightarrow b^2 = p \cdot c^2$.
$b^2$ must also be divisible by $p$ because $p, b^2,$ and $c^2$ are all integers and so $b$ must be divisible by $p$ as well. However, $a$ and $b$ were defined to be relatively prime and yet they have a common factor of $p$, which means that they are not relatively prime.
Thus, the claim that $\sqrt{p}$ can be written as the division of two relatively prime integers $a$ and $b$ is contradicted as $a$ and $b$ cannot be relatively prime.
