Universal property of initial topology

(This is an expanded version of this).

First of all, the given collection of spaces $\{ Y_j \}_{j \in J}$ can be viewed as a functor $Y: \mathbf{J} \to \mathbf{Top}$, where $\mathbf{J}$ is simply the indexing set $J$ viewed as a discrete category (i.e. one whose objects are $J$ and containing only identity morphisms). In other words, we have $Y(j) = Y_j$ and $Y(\operatorname{id}_j) = \operatorname{id}_{Y(j)}$, which is trivially a functor. The other part of the description of the initial topology is the collection of maps $f_j: X \to Y_j$ where $X$ is a set. More formally, if $U: \mathbf{Top} \to \mathbf{Set}$ is the forgetful functor, then we can also write $f_j: X \to U(Y_j)$ (this takes place in the category $\mathbf{Set}$). As the article mentions, the collection $\{f_j\}$ can be viewed as a cone from $X$ to $UY$. Here comes the definition:

Given categories $\mathbf{C},\mathbf{D}$, and a functor $F: \mathbf{D} \to \mathbf{C}$, a cone from an object $X$ in $\mathbf{C}$ is a natural transformation $\eta: \Delta(X) \Rightarrow F$, where $\Delta: \mathbf{C} \to \mathbf{C^D}$ is the functor mapping each object $Z$ in $\mathbf{C}$ to the constant functor $\Delta(X): \mathbf{D} \to \mathbf{C}$ (which takes each object in $\mathbf{D}$ to $Z$ and each morphism in $\mathbf{D}$ to the identity on $Z$). If $f: V \to W$ in $\mathbf{C}$, then $\Delta(f)$ is the natural transformation $\Delta(f): \Delta(V) \Rightarrow \Delta(W)$ whose component at each object is $f$. For each functor $F$, we define the category of cones $\mathbf{Cone}(F)$ as the comma category $(\Delta \downarrow F)$.

Now, it is easy to see that the collection $f_j: X \to UY(j)$ can be viewed as a cone from $X$ to $UY$, i.e an object in $\mathbf{Cone}(UY)$. In other words, it defines a natural transformation $f: \Delta(X) \Rightarrow UY$ (here $\Delta(X)$ is a functor on the category $\mathbf{J}$, described previously). Similarly, a collection of continuous maps $g_j: Z \to Y_j$ defines an object $\mathbf{Cone}(Y)$. Applying the forgetful functor $U: \mathbf{Top} \to \mathbf{Set}$, we get a forgetful functor $U': \mathbf{Cone}(Y) \to \mathbf{Cone}(UY)$.

Now we are in a position to describe the universal property of the initial topology: as mentioned, we start with an object $f_j: X \to UY$ in $\mathbf{Cone}(UY)$. We will write this as $(X,f)$, where $$f = \{f_j: X \to Y_j\}.$$ Now, a morphism of cones $\tau: (Z,g) \Rightarrow (X,f)$ is simply a morphism $\tau: Z \to X$ such that $f_j \circ \tau = g_j$. Imposing the initial topology (coming from the maps $f_j$) on $X$, we get an object $I(X,f)$ in $\mathbf{Cone}(Y)$. Moreover, the identity map defines a morphism $\varepsilon: U'(I(X,f)) \Rightarrow (X,f)$ (in $\mathbf{Cone}(UY)$), which is universal in the following sense: whenever $\eta: U'(Z,g) \Rightarrow (X,f)$ is another morphism in $\mathbf{Cone}(UY)$, there exists a unique morphism $\xi: (Z,g) \Rightarrow (X,f)$ such that $\eta = \varepsilon \circ \xi$. In other words, if we are given

a topological space $Z$, a collection of continuous maps $g_j: Z \to Y_j$, and a map (a morphism in $\mathbf{Set}$) $\eta: Z \to X$ such that $f_j \circ \eta = g_j$,

then

there exists a (unique) continuous map $\xi: Z \to X$, satisfying $f_j \circ \xi = g_j$ for all $j \in J$, such that $\varepsilon \circ \xi = \eta$.

Of course, since $\varepsilon$ is secretly the identity map on $X$, this implies that $\xi = \eta$ (as set functions, or more accurately, $U(\xi) = \eta$), so all this is saying is that $\xi$ is continuous if $f_j \circ \eta = f_j \circ \xi$ is continuous for all $j \in J$ ($f_j \circ \xi = g_j$, which is the original collection of continuous maps specified above). The converse is of course immediate, since a composite of continuous maps is again continuous. So this highly elaborate categorical language is only saying that

a map $\eta: Z \to X$ is continuous if and only if $f_j \circ \eta$ is continuous for all $j \in J$.

This also implies that imposing the initial topology defines a functor $I: \mathbf{Cone}(UY) \to \mathbf{Cone}(Y)$, and this is right adjoint to the functor $U'$ (and, in fact any right adjoint functor can be described by a similar universal property), but that is another story.