Understanding proposition related to algebras of subsets of the reals A proposition in a lecture script on measure and integration theory reads:

Proposition 1.1.4 Let $$\mathcal{I} = \{ (a,b]: -\infty \leq a < b < \infty \}\cup\{ (b,\infty) : -\infty < b < \infty \}\cup\{ \emptyset \}\cup\mathbb{R}.$$ Then $$ 
\epsilon = \left\{ \bigcup_{i=1}^N I_i : N \in \mathbb{N} \text{ and } I_i \in \mathcal{I} \text{ for } i = 1, 2, \dots, N \right\}
$$ is an algebra of subsets of $\mathbb{R}$.

I don't really understand the point here. It would seem that all the elements of the union defining $\mathcal{I}$ are subsets of $\mathbb{R}$, and they exhaust the reals because one element of the union is $\mathbb{R}$, so $\mathcal{I} = \mathbb{R}$. Where is my thinking going wrong? Also, I don't understand the big union defining $\epsilon$. No expression in the equation defining $\mathcal{I}$ is indexed by $i$, so $I_i = I_j ~{\forall} i, j \in \mathbb{N}$. Could the index belong to $a$ and $b$ and just be missing?
I appreciate any help in resolving my confusion.
EDIT: I understand that the last element of the union defining $\mathcal{I}$ should be $\{\mathbb{R}\}$ instead of $\mathbb{R}$, so that it should read $$\mathcal{I} = \{ (a,b]: -\infty \leq a < b < \infty \}\cup\{ (b,\infty) : -\infty < b < \infty \}\cup\{ \emptyset \}\cup\{\mathbb{R}\}.$$
but as I am quoting original material I don't think it should be corrected in the quote.
 A: You're misinterpreting what $\mathcal{I}$ is. $\mathcal{I}$ is a collection (set) of subsets (more specifically, certain types of intervals) of $\mathbb{R}$. In other words, $\mathcal{I}$ is a subset of $\operatorname{Pow}(\mathbb{R})$, but NOT a subset of $\mathbb{R}$. That's why $\mathcal{I}$ can't possibly be equal to $\mathbb{R}$.
For example, to make it simple, let's consider just the last two parts of this definition of $\mathcal{I}$. Let $\mathcal{J}=\{\varnothing\}\cup\{\mathbb{R}\}$. Then $\mathcal{J}$ is just a two element set $\mathcal{J}=\{\varnothing,\mathbb{R}\}$, which is VERY DIFFERENT from $\varnothing\cup\mathbb{R}=\mathbb{R}$.
The union that defines $\mathcal{I}$ describes the fact that the elements of $\mathcal{I}$ are the empty set $\varnothing$, the entire set of real numbers $\mathbb{R}$ (as a single element!), and two types of intervals of the form $(a,b]$ and $(b,+\infty)$, respectively. For example, this definition says that the following are elements of $\mathcal{I}$:
$$(2,15]\in\mathcal{I}, \quad (\pi,+\infty)\in\mathcal{I}, \quad \varnothing\in\mathcal{I}, \quad \text{and} \quad \mathbb{R}\in\mathcal{I}.$$
But they are NOT subsets of $\mathcal{I}$ (except for the empty set, which is always a subset of anything):
$$(2,15]\not\subseteq\mathcal{I}, \quad (\pi,+\infty)\not\subseteq\mathcal{I}, \quad \text{and} \quad \mathbb{R}\not\subseteq\mathcal{I}.$$
UPDATE.  Here's what the definition of $\epsilon$ says. Imagine that $\mathcal{I}$ is a bin containing a lot of elements in it — each one being an interval in $\mathbb{R}$ (of certain types), including the empty one and the whole real number line. To create any one element of $\epsilon$, we reach into that bin and pick out any finite number of any elements from it. And then, just for convenience of referencing, we're going to label them — we'll say that $N$ is the number of the elements we picked out, and we'll label them (randomly) as $I_1$ (element $\#1$), $I_2$ (element $\#2$), …, $I_N$ (element $\#N$). In fact, all we want to do is set up the union of the elements that we picked out; but in order to say that with a formula without words, we label them as above, and now we can say that we've constructed a specific element of $\epsilon$ as $\bigcup\limits_{i=1}^N I_i$. Then we can reach into the bin again, pick another bunch of elements, and set up their union — referencing that new bunch will have its own $N$ and its own labels $I_1$, $I_2$, etc.
The four elements that I used above can be an example of one instance of this procedure, although it's not a very interesting one. In this case, $N=4$, and we can label $I_1=(2,15]$, $I_2=(\pi,+\infty)$, $I_3=\varnothing$, and $I_4=\mathbb{R}$. Then the element of $\epsilon$ constructed using this selection will be
$$\bigcup\limits_{i=1}^4 I_i=(2,15]\cup(\pi,+\infty)\cup\varnothing\cup\mathbb{R}=\mathbb{R}\in\epsilon.$$
You can see a better example of an element of $\epsilon$ in the other answer by @Cameron Buie.
A: What it means is that the elements of $\epsilon$ are precisely the finite unions of elements of $\mathcal I.$ For example, $(0,1]\cup(2,\infty)$ would be an element of $\epsilon.$
Put another way, given an arbitrary natural number $N,$ and arbitrary sets $I_1,...,I_N\in\mathcal I,$ we have that $\bigcup_{i=1}^NI_i$ is an element of $\epsilon.$ Moreover, all elements of $\epsilon$ are constructed in such a way.
