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.