I am trying to prove, by contradiction, that an open interval in $\mathbb{R}$ is path-connected if it is connected. Is the following correct?
Consider an arbitrary open and connected interval $\mathbb (a,b)\subset \mathbb{R} $. Suppose, for a contradiction, that $(a,b)$ is not path-connected. Consider an arbitrary pair of points which cannot be connected by any path, $x, y$ (where, wlog, $y>x$). Note that $(a,b)$ can be written as $(a,x) \cup [x,y]\cup (y,b)$. Also, note that $[x,y] \not\subset (a,b)$ (as otherwise there would exist a path connecting $x$ and $y$: namely, $f(t)=ty+(1-t)x$).
Thus, there must exist a subset of $[a,b]$, $\Pi$, such that $(a,b)=(a,x) \cup \Pi\cup (y,b)$. Note that $\Pi$ cannot be formed by removing either of $x$ or $y$ from $[x,y]$, as, by assumption, both points belong to $(a,b)$. Thus, $\Pi$ must be of the form $[a,z_1]\cup[z_2, b]$, for some $z_1, z_2 \in (a,b)$, $z_2 >z_1$. So then $(a,b)=(a,x) \cup [x,z_1] \cup [z_2, y] \cup (y, b)=(a,z_1] \cup [z_2, b)$.
Finally, realise that the sets in $(a,z_1] \cup [z_2, b)$ are each (1) disjoint from the other; and (2) open in $(a,b)$. Thus, $(a,b)$ can be written as the union of two disjoint sets that are each open in $(a,b)$. This contradicts the assumption that $(a,b)$ is connected.
Thank you.
Looking at your previous post, I believe you want to prove the following statement for a connected set $S\subseteq\mathbb{R}$ by contradiction:
$$\forall a,b\in S,\forall c\in\mathbb{R}, a<c<b\Rightarrow c\in S.$$
Which can be shown by assuming there are some $a,b\in S$ and $c\in\mathbb{R}\setminus S$ with $a<c<b$ and concluding that then $\Big((-\infty,c)\cup(c,\infty)\Big)\cap S=S$ is not connected.
Once you have shown this, the rest can be done directly:
Given a connected set $S$ and two points $a,b\in S$ with $a\le b$ we can take the path $\gamma\colon[0,1]\to S$ by $\gamma(t)=(1-t)a+tb$. Because $a\le\gamma(t)\le b$ we know that $\gamma(t)\in S$ by the previous.