Borel algebra is generated by the collection of all half-open intervals This question is based on the following from Elements of Integration and Lebesgue Measure by Bartle. We are given the following example and exercise:

Let X be the set ${\mathbf R}$ of real numbers. The Borel algebra is the $\sigma$-algebra generated by all open intervals $(a,b)$ in ${\mathbf R}$. Observe that the Borel algebra ${\mathbf B}$ is also the $\sigma$-algebra generated by all closed intervals $[a,b]$ in ${\mathbf R}$
Exercise 2.B. Show that the Borel algebra ${\mathbf B}$ is also generated by the collection of all half-open intervals $(a,b]=\{x\in {\mathbf R}: a<x\leqslant b\}$

The definition of sigma algebras we are given is that they are unions and complements of a family of sets on a universal set $X$.
My thought on the way to solve this was to use something like
$$
(a,b)=\cup_{n=1}^\infty[a+1/n,b-1/n]
$$
and similarly
$$
(a,b)=\cup_{n=1}^\infty(a,b-1/n]
$$
to show that we can construct $(a,b)$ as a union of either the closed or the half-open intervals.
What I'm wondering about is, first I would like to check that the above is a correct answer of course, and also I wonder whether I've missed some other trick which doesn't involve these constructions.
 A: You showed that the $\sigma$-algebra generated by the closed (resp. half-open) intervals is a superset of the Borel algebra. The other inclusion is still missing: Obtain $[a,b]$ using nothing but countable unions and complements of open intervals. A straight-forward possiblity is
$$[a,b]=\mathbb R\setminus\left(\bigcup_{n=1}^\infty\left(\mathbb R\setminus(a-1/n,b+1/n)\right)\right)\text.$$
Reusing this representation, we obtain
$$(a,b]=(a,(a+b)/2)\cup[(a+b)/2,b]$$
for half-open intervals.
A: Yes, you have the right idea. But the solution you gave is not complete.
Let $\mathfrak{B}$ be the Borel set generated by intervals of the form $[a,b]$ and  $\mathfrak{B}^*$ be the Borel set generated by elements of the form $(a,b)$
By the relation you gave,
$$(a,b)=\bigcup_{n=1}^\infty [a+1/n,b-1/n]$$
You showed that any open interval $(a,b)$ can be written as a countable union of closed sets.
Hence, $(a,b)\in \mathfrak{B}$
Now since each element of $\mathfrak{B}^*$ is a countable union, intersection and complement of open intervals. Thus you have
$$\mathfrak{B}^*\subseteq\mathfrak{B}$$
Now, you also need to show $\mathfrak{B}\subseteq\mathfrak{B}^*$.
I'm sure, since you have the right idea, that you'll be able to show that too.
