Exercise 5, Section 13 of Munkres’ Topology
Solution 1:
We want
$$\mathcal{T}_{\mathcal{A}} = \bigcap\{\mathcal{T}\mid \mathcal{T} \text{ a topology on } X \text{ and } \mathcal{A} \subseteq \mathcal{T}\}\tag{1}$$
As by definition $\mathcal{T}_{\mathcal{A}}$ is a topology that contains $\mathcal{A}$ we have immediately that the right hand intersection is a subset of $\mathcal{T}_{\mathcal{A}}$ in both the base and the subbase case. So $\supseteq$ is trivial (any intersection is a subset of all its constituent sets).
The other inclusion follows from how we construct $\mathcal{T}_{\mathcal{A}}$. If $\mathcal{A}$ is a base, then any $O \in \mathcal{T}_{\mathcal{A}}$ is by definition a union $O = \bigcup \mathcal{A}'$ for some $\mathcal{A}' \subseteq \mathcal{A}$. If $\mathcal{T}$ is any topology containing $\mathcal{A}$ it must contain $O$ by the union axiom. So $O \in \mathcal{T}$ and as $\mathcal{T}$ was arbitrary, $O$ is in the right hand intersection. Hence $\subseteq$ for the base case.
The subbase case is similar: we first construct the base $\mathcal{B}_{\mathcal{A}}$ from the subbase (the finite intersections) and any topology $\mathcal{T}$ containing $\mathcal{A}$ contains this base by the intersection axiom. Then we apply the union axiom again to conclude that any $O \in \mathcal{T}_{\mathcal{A}}$ also is in such a $\mathcal{T}$ etc. So $\subseteq $ holds once more.
Looking at it from a higher standpoint: the intersection in $(1)$ is by definition the topology generated by a subfamily $\mathcal{A}$; it's always well-defined because the set of topologies always includes the discrete topology (the power set) and any intersection of topologies on a set is a topology on that set (topologies form a complete lattice). The point of the Munkres exercise is to show that the internal way to generate a topology from a base or a subbase actually coincides with the aforementioned abstract view in both cases.