# When does a subbase of a base generate the same topology?

Suppose that $\mathcal{B}$ is a base for a topology on a space $X$. Is there a nice way of thinking about how we can modify $\mathcal{B}$ (for instance, to simplify computations) without changing the topology it generates? It seems non-trivial to compute the topology generated by a base, but maybe some "small enough" changes to the base should be safe. The situation is delicate:

If I have a fixed open set $U$, consider the family of sets $\mathcal{B'} = \{ B \in \mathcal{B} | B \subset U \text{ or } B \subset (X \setminus U) \}$

This does not generate the same topology as $\mathcal{B}$, since $\mathcal{B'}$ won't, in general, be a base. For instance, if $X = \mathbb{R}$, and $U = (0,1)$, then $1$ is not contained in any element of $\mathcal{B'}$.

Cover $X$ by open sets $U_i$, and set $\mathcal{B'} = \{ B \in \mathcal{B} | B \subset U_i \text{ for some } i \}$

This, on the other hand, does sometimes work. For instance, consider $X = \text{Spec} A$ with the Zariski topology, and suppose that $X$ is covered by $U_i = \text{Spec} A_i$. A base for the Zariski topology on $X$ is given by sets of the form $D(f) = \{ \mathfrak{p} \subseteq A | f \not \in \mathfrak{p} \}$. We can restrict this base to only include those $D(f)$ that lie in some $U_i$, and we obtain the same topology.

I suppose my question is the following:

If $\mathcal{B}$ is a base for a topology $\mathcal{T}$, are there some nice types of subbases of $\mathcal{B}$ (along the lines of the second example above) of $\mathcal{B}$ that will always generate $\mathcal{T}$?

I think this sort of thing comes up when checking that various properties of scheme morphisms are affine local, so I've also tagged this with [algebraic-geometry].

-