Largest Component Interval Proof I want to check whether the proof for the following is correct:

Every point in an open set $S\subset \mathbb{R}$ belongs to one and only one component interval of $S$, where an open interval $I$ is a component interval of $S$ if and only if $I\subset S$ and there exists no open interval $J$ such that $I\subset J\subset S$.

Here's my attempt:

Claim: The interval $I_{x}=(f(x),g(x))$, where $f(x)=\inf\left\{a:(a,x)\subset S\right\}$ and $g(x)=\sup\left\{b:(x,b)\subset S\right\}$, is the desired component interval (and the largest).
Proof: By the definition of $I_{x}$, there exists no open interval $J$ such that $I_{x}\subset J\subset S$. Then $I_{x}$ is the largest component interval of $S$.
If $J_{x}$ is another component interval of $S$, since $I_{x}$ is the largest, $J_{x}\subset I_{x}\subset S$. This forms a contradiction from the definition of component intervals, and so $I_{x}=J_{x}$.

Is the last paragraph logically sound? In Apostal, he uses unions but I don't quite understand why $J_{x}\cup I_{x}=J_{x}$. Is it because of the above arguments I was using?
 A: I like your approach!
First, a minor remark: It may be worth emphasising that $\inf \{ a : (a, x) \subset S \}$ and $\sup \{ b : (x, b) \subset S \}$ exist. This follows from the fact that $S$ is open.
To prove that the component interval of $S$ containing $x$ is unique, suppose that $I_x$ and $I'_x$ are two component intervals of $S$ containing $x$. Consider $J := I_x \cup I'_x$. Then $J$ is an open interval (since $I_x$ and $I'_x$ share a point in common, namely $x$). Furthermore, $I_x \subseteq J \subseteq S$ and $I'_x \subseteq J \subseteq S$. Since $I_x$ and $I'_x$ are components intervals of $S$, we must have $I_x = J$ and $I'_x = J$. Hence $I_x = I'_x$. This shows that the component interval of $S$ containing $x$ is unique.
In your last paragraph, the statement $J_x \subseteq I_x \subseteq S$ doesn't immediately follow what we know at that point in the argument. At that point in the argument, we know that $I_x$ is maximal amongst intervals of $S$ (in the sense that there is no interval of $S$ strictly bigger than $I_x$). But we haven't yet established that all intervals of $S$ containing $x$ are contained in $I_x$, which is a different statement. I think you conflated the two statements by using the word "largest" to mean one thing in your second paragraph and another thing in your third paragraph.
