The exercise I'm trying to solve is:
Show that there is no rational $r$ satisfying $2^r = 3$.
My attempt at a proof, which I am not satisfied with, is:
Suppose for the sake of contradiction that there exists such an $r$, and write $r = \frac{p}{q}$ where $p,q \in \mathbb{Z}$ and $q \neq 0$. Then $2^{\frac{p}{q}} = 3$. Raising both sides to the power of $q$ then gives $2^p = 3^q$. Then $2 \mid 2^p$, hence it divides $3^q$. As $2$ is prime, by Euclid's lemma, it must divide $3$, which is a contradiction.
I don't think my proof works. The first problem is, I don't know the signs of $p$ or $q$. I can only talk about the parity of $2^p$ if it is itself an integer. If $p > 0$, $2^p$ is even. If $p = 0$, $2^p$ is odd. If $p < 0$, $2^p$ isn't an integer, so I can't talk about its parity at all. I can try to require $p \geq 0$ for this reason (and then just rule out $p = 0$ directly because $2^0 = 1 \neq 3$), but then I don't know if $3^q$ is an integer; if $q < 0$, $3^q$ is not an integer, so I can't invoke Euclid's lemma or talk about $2$ dividing it.
Is my proof salvageable, or should I try a different approach?
You can assume that $r$ is positive, and therefore it can be written as $p/q$ for positive $p,q$, since if it was non-positive then $2^r$ would be $\le 1$.