Rational/irrational connectedness in $\mathbb{R^2}$ Suppose I have a line $y=1$. All points with rational coordinate x that are on this line are in set $X$. If $x$ is irrational, then only open interval from $(x,0)$ up to $(x,1)$ is in set $X$.
Question: is set $X$ connected?
It's clear to me that between any two intervals there is a rational number $y$ which "disconnects" them.
What happens if we zoom in on $1$ though? Suppose I have two rational points on the line. Is there a way to connect them?
Let's assume there is no and split the distance between them in two open sets. Considering it in one dimension (on the $y=1$ line) I would split it such that I exclude some irrational point on the line. BUT I could also go a little bit sideways?
Let's look at $\varepsilon$-neighborhood of $(1,x \in \mathbb{Q}$). In any such neighborhood it's possible to find irrational points. But how does it help?
This is where my brain starts to hurt. There is no such thing as "next" irrational number, right?
Please avoid any argument about inherited sub-topologies, if possible, because we didn't discuss it yet in class. (But feel free to add it.)
 A: The description of your subset $X$ of $\Bbb{R}^2$ is not very clear. I think you mean the following:
$$
X = \{ (x, y) \in \Bbb{R}^2 \mid (x \in \Bbb{Q} \land y = 1) \lor (x \not\in \Bbb{Q} \land 0 < y < 1)\}
$$
I.e., $X$ comprises the points $p_x = (x, 1)$ on the line $y = 1$ where  $x$ is rational, together with each open line segment $L_x$ with endpoints $(x, 0)$ and $(x, 1)$ where $x$ is irrational.
Here is a hint how to see that $X$ is connected: assume that $X \subseteq A \cup B$ where $A$ and $B$ are disjoint open subsets of $\Bbb{R}^2$. We need to show that one of $A$ or $B$ is empty. For every irrational $x$, as $L_x$ is connected, either $L_x \subseteq A$ or $L_x \subseteq B$. Now consider the following subsets of $\Bbb{R}$:
\begin{align}
A_0 &= \{x \in \Bbb{Q} \mid p_x \in A\} \\
A_1 &= \{ x \not\in \Bbb{Q} \mid L_x \subseteq\ A\} \\
B_0 &= \{x \in \Bbb{Q} \mid p_x \in B\} \\
B_1 &= \{ x \not\in \Bbb{Q} \mid L_x \subseteq\ B\}
\end{align}
Now show that $C = A_0 \cup A_1$ and $D = B_0 \cup B_1$ are disjoint open subsets of $\Bbb{R}$ such that $\Bbb{R} = C \cup D$ and conclude that one of $C$ or $D$ is empty, implying that one of $A$ or $B$ is empty. (The tricky bit is showing that $C$ and $D$ are open, please post a comment if you need more help with that.)
A: Abuse of notation: Interval from $(x,0)$ to $(x,1)$ where $x\in\mathbb{Q}$ is identified as $(0,x)$. Point $(1,y)$ where $y\in\mathbb{R}\setminus\mathbb{Q}$ is identified as $(y)$.
Assume $X$ isn't connected. Then it can be represented as disjoint union of two open sets
$$X=U\sqcup V$$
Fix $y\in\mathbb{R}\setminus\mathbb{Q}$. Then assume $(y)\in U$ wlog. Since $U$ is open, there exist countably many intervals $(0,x)$ that intersect a small neigborhood around $(y)$. Now define a projection
$$P:=\begin{cases} (1,y), &  (y) \\ (1,x), &  (0,x) \end{cases}$$
We can show that if $U$ is an open set then so is $P(U)$. Combine with $P(X)=P(U)\sqcup P(V)=(\mathbb{R},1)$ and we get a contradiction, since $(\mathbb{R},1)$ is definitely connected.
