I'm new to proofs and I'd like to check if this proof is valid and if there is anything I'm overlooking.
We have to prove that $\sqrt 3$ is an irrational number.
We can suppose the opposite; suppose $\sqrt 3$ is a rational number. Then there exist integers p and $q \neq 0$ such that $\sqrt 3$ = $\frac{p}{q}$. Without loss of generality, we can assume p and q are coprime numbers.
$\sqrt 3$ = $\frac{p}{q}$ $\implies$ $3q^{2} = p^{2}$ $\implies$ 3 | $p^{2}$ $\implies$ $\exists k \in \Bbb{Z}$ such that $p^{2} = 3k$
When we plug that into $3q^{2} = p^{2}$ we get:
$3q^{2} = (3k)^{2}$ $\implies$ $q^{2} = 3k^{2}$ $\implies$ 3 | $q^{2}$
We assumed that p and q are coprime numbers, meaning they have no common factors other than 1. However, we got that 3 is a factor of both $q^{2}$ and $p^{2}$. This implies that it must hold that q = p = 3. This leads to a contradiction where $\frac{p}{q}$ = 1 = $\sqrt 3$.
As our assumption led to a contradiction, $\sqrt 3$ must be an irrational number.