Let X be a subspace of $\mathbb R^2$ consisting of points such that at least one of coordinates x and y is rational. Prove that X is path-connected.
A sketch is as follows. Is it right? Also How to catch case(3)?
Denote $r_i$'s are rational and $q_i$'s are irrational and divide three cases.
case(1) $(r_1, r_2), (r_3, r_4)$. Define $\gamma:[0,1]\to X$ by $$ \gamma(t)=\begin{cases}(r_1, r_2(1-2t)+r_42t), & 0\leq t \leq 1/2 \\ (r_1(2-2t)+r_3(2t-1), r_4) & 1/2\leq t \leq 1 \end{cases}$$ Then $\gamma$ is a path from $(r_1,r_2)\to(r_3, r_4)$.
case(2) $(r_1, q_1), (q_2, r_2)$. Define $\gamma:[0,1]\to X$ by $$ \gamma(t)=\begin{cases}(r_1, q_1(1-2t)+r_22t), & 0\leq t \leq 1/2 \\ (r_1(2-2t)+q_2(2t-1), r_2) & 1/2\leq t \leq 1 \end{cases}$$ Then $\gamma$ is a path from $(r_1,q_1)\to(q_2, r_2)$.
case(3) $(r_1,q_1),(r_2,q_2)$.