Let $\mathcal{I}$ and $\mathcal{J}$ be intervals. Prove that if $\mathcal{I} \cap \mathcal{J} \neq \varnothing$ then $\mathcal{I} \cup \mathcal{J}$ is an interval.
I could prove it by cases but the proof is extremly extense and i want to know how to prove it in a shorter or more simple way.
Asserting that $I\cup J$ is an interval means that if $a,b\in I\cup J$ and $c\in\mathbb R$ are such that $a<c<b$, then $c\in I\cup J$. Of course, if $a,b\in I$ or $a,b\in J$, this is trivial. We can assum WLOG that $a\in I$ and $b\in J$. Take $d\in I\cap J$.