Is a topology freely generated by a subbasis? There's a notion of a topology on $X$ generated by a subbasis $B \subseteq P(X)$, which consists of all sets that can be expressed as a union of finite intersections of sets in $B$.
Is that topology "freely generated" by the subbasis in a formal sense? For example, maybe there's a category of possible topologies for a given space, and a category of all possible subsets, and the obvious forgetful functor has a left adjoint (these categories are probably just posets).
If something like that works, what other properties (or names) does this category have? Are topologies also free over a basis? If it doesn't work, is there some other universal property that does?
 A: Here's one way to formulate such a universal property.  Say that a "subbasis space" is a set $X$ together with a collection $B$ of subsets of $X$.  A morphism between subbasis spaces $(X,B)$ and $(Y,C)$ is a map $f:X\to Y$ such that $f^{-1}(U)\in B$ for all $U\in C$.
Topological spaces are a full subcategory of subbasis spaces in an obvious way (take $B$ to be the open sets).  The topology generated by a subbasis is then just the coreflection from the category of subbasis spaces to the subcategory of topological spaces.  That is, it is right adjoint to the inclusion functor from topological spaces to subbasis spaces.  Concretely, this says that if $(X,B)$ is a subbasis space and $T$ is the topology generated by $B$, then if $(Y,S)$ is a topological space, continuous maps $(Y,S)\to (X,T)$ are in natural bijection with morphisms $(Y,S)\to (X,B)$.  Even more concretely, this boils down to a familiar fact: a map $f:Y\to X$ is continuous iff the inverse image of any subbasis set is open.
(You can of course also do the same thing with bases instead of subbases.)
