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?

As @whoknowsnot has shown, for every $a \in \mathbb R$, the event $\{X< a\}\in \mathcal F$, and since  $\{X\leq a\}\in \mathcal F$ by definition, the difference of these two events,  namely $\{X = a\}$, is also in $\mathcal F$. Hence, from the result that you have already proven, namely that $\{a < X \leq  b\} \in \mathcal F$, it is easy to deduce that
\begin{align}
\{a < X <  b\} &\in \mathcal F,\\
\{a \leq X <  b\} &\in \mathcal F,\\
\{a \leq X \leq  b\} &\in \mathcal F,
\end{align}
just by adding in or taking away the singleton events $\{X = a\}$ and $\{X = b\}$.
