Relation between open bounded intervals and max, min of two real numbers. In a textbook on real analysis, they define max and min of any two real numbers $a,b$ as follows:-
$\max\{a,b\}= \dfrac{1}{2}(a+b+|a-b|)$
$\min\{a,b\}= \dfrac{1}{2}(a+b-|a-b|)$
Consider two open bounded intervals, $(a_1, a_2)$ and $(a_2, b_2)$. Now let $c\in \mathbb{R}$ and $c\in (a_1, b_1)$ and also $c\in (a_2, b_2)$.
Let
$a_3= \min\{a_1, a_2)$ and $b_3= \max\{b_1, b_2\}$.
Now they say $(a_3, b_3)= (a_1, b_1)\cup (a_2, b_2)$ and also $c\in (a_3, b_3)$.
(i) What is the proof for $(a_3, b_3)= (a_1, b_1)\cup (a_2, b_2)$ given the above conditions.
 A: First note that $\exists x|x\in(a_1,b_1)\text{ and }x\in(a_2,b_2)\rightarrow b_2>a_1\text{ and }b_1>a_2$ which is due to the fact that $a_1,a_2<x<b_1,b_2$.
$(a_1,b_1)^c=\{x\in\Bbb R:x\le a_1\text{ or }x\ge b_1\}$ and similarly $(a_2,b_2)^c$.
$$\begin{align*}&x\in(a_1,b_1)^c\cap(a_2,b_2)^c\\
&\leftrightarrow(x\le a_1\text{ or }x\ge b_1)\text{ and }(x\le a_2\text{ or }x\ge b_2)\\
&\leftrightarrow (x\le a_1\text{ and }x\le a_2)\text{or}\color{red}{(x\le a_1\text{ and }x\ge b_2)}\text{or}\color{red}{(x\ge b_1\text{ and }x\le a_2)}\text{or}(x\ge b_1\text{ and }x\ge b_2)
\end{align*}$$
You can verify that
$$(x\le a_1\text{ and }x\le a_2)\leftrightarrow x\le\min\{a_1,a_2\}\\
(x\ge b_1\text{ and }x\ge b_2)\leftrightarrow x\ge\max\{b_1,b_2\}$$and the two red cases are empty sets as $b_2>a_1$ and $b_1>a_2$. So
$$x\in(a_1,b_1)^c\cap(a_2,b_2)^c\leftrightarrow x\le\min\{a_1,a_2\}\text{ or } x\ge\max\{b_1,b_2\}$$and by De Morgan's Law$$x\in[(a_1,b_1)^c\cap(a_2,b_2)^c]^c=(a_1,b_1)\cup(a_2,b_2)\leftrightarrow x>\min\{a_1,a_2\}\text{ and }x<\max\{b_1,b_2\}$$
which is equivalent to $x\in(a_3,b_3).~\blacksquare$
A: We know that $(a,b) \cap (c,d) = (\max(a,c) , \min(b,d))$ so
$$ ((a_1,b_1) \cup (a_2,b_2))^c = (a_1,b_1)^c \cap (a_2,b_2)^c = [(-\infty,a_1) \cup (b_1,+\infty)]\cap [(-\infty,a_2,) \cup (b_2,+\infty)]   $$
$$ = (-\infty,\min(a_1,a_2)) \cup (\max(b_1,b_2),+\infty)$$
where I used the fact that
$$ \emptyset \ne (a_1,b_1) \cap (a_2,b_2) = (\max(a_1,a_2),\min(b_1,b_2)) $$
yields $\max(a_1,a_2) < \min(b_1,b_2)$. Now
$$ (a_1,b_1) \cup (a_2,b_2) =  [(-\infty,\min(a_1,a_2)) \cup (\max(b_1,b_2),+\infty)]^c = (a_3,b_3).$$
