Union of union of elements of a basis $B $ of a topology $\tau$ I'm trying to show that in a topological space $(X, \tau)$ then a set $B$ is a basis iff $B$ has the following properties:

*

*X = $\cup^{}_{A \in B}A$


*for any ${A_1}, {A_2} \in B, {A_1} \cap{A_2}$ is a union of elements in $B$.
I proved the left to right implication and now I'm trying to work out the other one.
Let $\tau=${ union of elements of $B$}, we need to see that $\tau$ is indeed a topology.
I already showed that $X$ and $ \emptyset $ are in $\tau$. My problem is when I need to show that if ${A_1} $and ${A_2} \in \tau$ then so is ${A_1}\cap{A_2}$. Here's where I am at:
If ${A_1} $and ${A_2} \in \tau$ then they are union of elements of $B$. Write them as:

*

*${A_1}= \cup^{}_{i \in I}U_i$ for I an index set.


*${A_2}= \cup^{}_{j \in J}U_j$ for J an index set.
Then ${A_1}\cap{A_2} = (\cup^{}_{i \in I}U_i) \cap (\cup^{}_{j \in J}U_j) = \cup^{}_{i \in I, j \in J}U_i \cap U_j$ . By hypothesis, $U_i \cap U_j$ is a union of members of $B$.
Why can we say that the union of the $U_i \cap U_j$ is a union of members of $B$? A union of elements of a set is not the same as a union of a union of members of said set.
Sorry if it's not very well written or explained.
 A: When you speak about unions of elements in $B$ you mean that you have a family of elements $U_r$, where $r$ belongs to a set of indices $R$, and take $\bigcup _{r \in R} U_r$. You should be aware that your indexed family of sets $U_r$ formally is a function $\iota : R \to B, \iota(r) = U_r$. Note that this allows $U_r = U_{r'}$ for $r \ne r'$, i.e. your indexed family of sets $U_r$ may have multiple occurences of the same set in $B$.
We could also confine ourselves to taking only subsets $S \subset B$ als index sets in which case $\bigcup_{U \in S} U$ is the union of all members of $S$. Doing so, we avoid multiple occurences of the same set. The first approach is more flexible, but in some sense it is a matter of taste.
Concerning condition 2. let me remark that we must allow the empty set as an index set when $A_1 \cap A_2 = \emptyset$. No member of  $B$ is indexed by an element of $\emptyset$, but it is standard to define the union of this "empty family of sets" to be $\emptyset$.
We have $U_i \cap U_j = \bigcup_{k \in K(i,j)} U^{ij}_k$ with a suitable index set $K(i,j)$. Therefore
$$\bigcup_{i \in I, j \in J} U_i \cap U_j = \bigcup_{(i,j)\in I\times J} U_i \cap U_j =  \bigcup_{(i,j)\in I\times J}\bigcup_{k \in K(i,j)} U^{ij}_k = \bigcup_{(i,j,k) \in M} U^{ij}_k$$
with
$$ M = \{(i,j,k)  \mid i \in I, j \in J,  k \in K(i,j)\} .$$
Let me close with a remark concerning a general misunderstanding on your part:

In a topological space $(X, \tau)$ a set $B$ is a basis iff $B$ has the following properties:



*

*X = $\cup^{}_{A \in B}A$




*for any ${A_1}, {A_2} \in B, {A_1} \cap{A_2}$ is a union of elements in $B$.


Properties 1. and 2. guarantee that $B$ is the basis for some topology on $X$, but this topology may differ from $\tau$. It thus would be better to say that $B$ is the basis for a topology on the set $X$. To assure that $B$ is a basis for $\tau$ you must add that $B \subset \tau$. In that case it would be easier to replace 1. and 2. by


*Each $U \in\tau$ is a union of elements in $B$.

