On Definition of Random Variables Given a probability space $(\Omega,  \mathcal{F}, P)$, a random variable X is defined to be a function from $\Omega$ to $ \mathbb{R}$ such that for every $a \in \mathbb{R}$, the set
$\{X \leq a\} := \{ω \in \Omega : X(\omega) ≤ a\}$ belongs to $\mathcal{F}$.
From the axiomatic definition of a probability space, for every $a \in \mathbb{R}$, if the set $\{X \leq a\}$ belongs to $\mathcal{F}$, the set $\{X > a\}$ must also belong to $\mathcal{F}$. Consequently, the set $\{a < X \leq b\}$ must also belong to $\mathcal{F}$.
I want to show that the set $\{a \leq X < b\}$ also belongs to  $\mathcal{F}$ as well, so I can generalize it to any other set, but I have not managed to prove it.
Anyone has an idea on how to do it?

You can write the desired set using only negation and countable unions of the foundational sets as:
$$\begin{align}
\{ a \leq X < b  \}
&= \{ a \leq X \leq b  \} - \overline{ \{ X \leq b  \}} \\[6pt]
&= \{ X \leq b  \} - \bigcup_{n=1}^\infty \bigg\{ X \leq a - \frac{1}{n} \bigg\} - \overline{ \{ X \leq b  \}}. \\[6pt]
\end{align}$$
Since the sigma-field $\mathcal{F}$ is closed under negation, countable unions and set difference (based on the foundation sets) this is sufficient to prove that $\{ a \leq X < b  \} \in \mathcal{F}$.
