Artificial intelligent assistant

Is this a valid proof that $\sqrt 3$ is irrational? I saw that questions about this have been posted before, but I don't want to spoil things for myself by prematurely looking up an answer. I just want to know if this proof I came up with is valid: "Suppose $\sqrt 3$ is rational. Then $\sqrt 3 = \frac p q$, where $p,q$ are integers and $q \ne 0$. But then that means $q\sqrt 3 = p$, and we know that no integers satisfy this, so $\sqrt 3$ must be irrational." Is this good? If not, why not?

It would be very instructive to compare the classic proof that $\sqrt{2}$ is irrational, which starts off very similar to what you have. But there is the crucial additional requirement that $\gcd(p, q) = 1$, that is, they have no prime factors in common. If they do have prime factors in common, divide them out so the fraction is in lowest terms.

Then you square both sides to obtain $$2 = \frac{p^2}{q^2}.$$ Moving stuff around, we get $p^2 = 2q^2$, which means that $p^2$ is even. From this we derive a contradiction of $\gcd(p, q) = 1$.

I think that if you fully understand this proof, you should be able to carry the same concepts over to proving $\sqrt{3}$ is also irrational.

* * *

A little housekeeping note: $\sqrt{3} q$ could cause confusion with $\sqrt{3q}$. It would be clearer to write $q\sqrt{3}$.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 01c1ddf4c744d346a13082851b9edacf