TITLE: A topology generated by sets
QUESTION [6 upvotes]: Let $F$ be a family of sets. It is possible to define a topology $T$ generated by $F$ by letting it the intersection of all topologies containing $F$. If $F$ is known it is also possible to construct $T$ as follows:
(1) add $F$, $\varnothing$ and whole space to $T$
(2) add all finite intersections of sets in (1)
(3) add all unions of sets in (2)
Steps (2) and (3) can't be interchanged: adding unions first and taking intersections afterwards does not yield the topology $T$. I have been trying to prove this by providing a counter example. But I am unsuccessful so far. Here is my work:
Let the whole space $X=\mathbb R$ and assume we want $T$ to be the standard topology. I defined $F$ to be the collection of all intervals $(-\infty,a)$ and $(b,\infty)$ with $a,b \in \mathbb R$. I verified that if the steps are executed in order the result is the standard topology. Now I am stuck in the other case: After adding unions and then taking intersections. For a counter example, a set that is open but not in this collection I considered $(1,2) \cup (3,4)$. I tried to write it as (finite) intersection of unions of $(-\infty,a)$ and $(b,\infty)$ but failed. Now it seems this could be the example I am looking for but:
How can I prove that it is not possible to write $(1,2) \cup (3,4)$ as (finite) intersection of unions of $(-\infty,a)$ and $(b,\infty)$?

REPLY [6 votes]: The unions of sets of the form $(-\infty,a)$ and $(b,+\infty)$ are sets of the forms

$(-\infty, a)$, where $a \in (-\infty,+\infty]$,
$(b,+\infty)$, where $b \in [-\infty,+\infty)$, and
$(-\infty,c) \cup (d,+\infty)$, where $-\infty < c \leqslant d < +\infty$.

Thus $(1,2)\cup (3,4)$ is a finite intersection of such sets:
$$(1,2)\cup (3,4) = (1,4) \cap \bigl((-\infty,2)\cup(3,+\infty)\bigr).$$
You need an open set with infinitely many components to get something you can't write as a finite intersection of unions.
$$A = \bigcup_{k=1}^\infty (2k-1,2k)$$
is not an intersection of finitely many such sets, you need infinitely many. Since $A$ contains arbitrarily large real numbers, all unions of elements of $F$ containing $A$ must have a nonempty part of the form $(d_m,+\infty)$. With $d = \max \{d_m : 1 \leqslant m \leqslant M\}$, the intersection of $M$ such unions always contains a nonempty part of the form $(d,+\infty)$.