Showing that a collection of intervals (see problem) generates the Borel sigma algebra on $(0,1]$ 
I would be very appreciative if someone could show me how to do this problem so that I can try to get a better understanding of what a Borel sigma algebra is. Examples are how I learn best so seeing this one should help me out a lot.
 A: Let $A$ be the $\sigma$-algebra generated by the intervals $(a,b]$ for $a,b \in (0,1]$ with $a < b$, and let $B$ be the Borel $\sigma$-algebra.
To show $A \subseteq B$, it is enough to show that each interval $(a,b]$ as above is a Borel set. If $b=1$, this is clear, because $(a,1]$ is open. If $b < 1$, then $(a,b]$ is the intersection of the countable collection of open sets $(a,b + 1/n) \cap (0,1]$, hence is a Borel set.
Conversely, to show that $B \subseteq A$, we must show that $A$ contains all open sets. But an open subset of $(0,1]$ can always be written as a countable union of intervals $(a,b)$ (for $0 \leq a < b \leq 1$) or intervals $(a,1]$ (for $a \geq 0$), so it is enough to show that sets of these kinds belong to $A$. There are four cases:


*

*$(a,1]$ with $a > 0$. These sets belong to $A$ by definition.

*$(0,1]$. This set is the whole sapce, so it belongs to $A$ by definition.

*$(a,b)$, with $0<a<b<1$. This set is the countable union of all sets $(a,b-1/n]$ such that $1/n < b-a$, hence it belongs to $A$.

*$(0,b)$, for $b > 0$. This is the union of all sets $(1/n,b)$ with $1/n < b$, which is a countable union of elements of $A$ by point 3.
