8. Let $G$ be a non-empty open subset of $\mathbb R$. Let $x_0\in G$ and put $F=[x_0,\infty) \cap G^c$. Here $[x_0,\infty) = \{x\in \mathbb R : x\ge x_0 \}$.
(a) Prove that $F$ is a non-empty set.
(b) Prove that $F$ is a closed set.
I already solved all parts except for part b). Can please someone help me proving part b?
This is how I solved it:
Set F is the intersection of two closed sets: $[x_0,∞)$ and $G^c$ so it is closed. However if $[x_0,∞)⊂G$ then $F=∅$ so it cannot be shown that F is non-empty. Let us say that $[x_0,∞)⊂G$ is not true. Then some $y$ exists with $y≥x_0$ and $y ∈ G^c$. Then $y∈F$ so $F$ is not empty. In that case we have: for every $x∈F$ it is true that $x≥x_0$. some $ε>0$ exists such that $(x_0−ε,x_0+ε)⊂G$ (because $G$ is open and $x_0∈G$). This implies that $F⊂[x_0+ε,∞)$ so $inf F≥x_0+ε>x_0$. let us denote $inf F$ by $b$. If $b∈G$ then $(b−ε,b+ε)⊂G$ for some $ε>0$. Then $(b−ε,b+ε)∩F=∅$ contradicting that $b=inf F$. Let $y∈[x_0,b)$. If $y∉G$ then $y∈F$. But $y<b$ so this contradicts that $b=inf F$.
$F$ is indeed the intersection of two closed sets: $G^c$ is closed as $G$ is open. Also, $[x_0,\infty)$ is closed because it is the complement of $(-\infty,x_0)$, which is open.
$\therefore F$ is closed.