My goal is to prove the following statement $\left(P\implies Q\right)$ in order to use it as a lemma in another proof.
Given, $$P = \left(z\in\Bbb Q \implies \exists \,p,q\in\Bbb Z:z\,=\,\frac pq\wedge q \ne 0 \right)$$ consider the following $$1+2z=x^2+y^2$$ $$y\;=\;\sqrt {\frac {q+2p}{q}-x^2}$$ on which we impose $$x\in(0,1)$$ $$ y\in\Bbb [-1,1]$$ as the domain and range.
We claim $$Q\;=\;\left(x^2+y^2=\frac {q+2p}{q}\in\Bbb Q\implies x,y\in\Bbb Q:x\in(0,1)\wedge y\in\Bbb [-1,1]\right)$$ so we need to show that $$P\implies Q$$ is true.
So, since $P$ is true it is left to be shown that $Q$ is also true.
The converse of $Q$ is $$\left(Q \; converse \right)\,=\, \left(x,y\in\Bbb Q:x\in(0,1)\wedge y\in\Bbb [-1,1] \implies x^2+y^2=\frac {q+2p}{q}\in\Bbb Q\right)$$ thus, using a result from a previous question (proof about rational numbers),
$$\left(x,y\in\Bbb Q:x\in(0,1)\wedge y\in\Bbb [-1,1]\right) \implies \left(\exists\,p,q,r,s\in\Bbb Z: x=\frac pq \wedge y= \frac rs \wedge q,s \ne 0 \right)$$ $$\left(\exists p,q,r,s\in\Bbb Z: x=\frac pq \wedge y= \frac rs \wedge q,s \ne 0 \right)\implies\left( x^2+y^2=\frac {q+2p}{q}\in\Bbb Q\right)$$ $$\therefore \;\left(x,y\in\Bbb Q:x\in(0,1)\wedge y\in\Bbb [-1,1] \implies x^2+y^2=\frac {q+2p}{q}\in\Bbb Q\right)$$ Hence, $\left(Q \;converse\right)$ is true, by contrapositive and so, $Q$ is also true. $$\therefore\; P\implies Q $$
Is this correct?