Previous: [[Not really an intro to categorical language]] I delayed posting this because I was trying to improve my exposition on category theory, but that's not happening. This post is pretty sloppy with the category theory. If you don't already know what a category-theoretic diagram and its limit is, I'd recommend reading Riehl's *Category Theory in context* section 1.6, which defines a diagram as a functor from an index category, and then read the [Wikipedia entry on them](https://en.wikipedia.org/wiki/Limit_(category_theory). This is really more of a recap. While I'm linking to other stuff because I really wanna get to the topology and not get bogged down in the category theory, [this](https://www.youtube.com/watch?v=4uJLvby7K9Y&t=1858s) is an amazing video that you should watch if you're unfamiliar with category theory. A really important and useful concept from category theory is that of limits. I won't be super formal about them, but I will give some examples that will be really important later. For this we will stick to the category $\mathbf{Set}$ of sets and set functions between them, before we more interesting concepts. $\mathbf{Set}$ will prove to be the testing ground for many category-theoretic construction because it's very easy to work with. Consider the product $A \times B$ of sets. We can think of it via the normal definition of pairs of elements $A \times B = \{(a, b) | a \in A, b \in B\}$ but category theory does not allow us to have elements in objects!^[well, technically there are ways around this, but it's not pedagogically useful right now to think about those] We can start thinking in terms of arrows. Every product has two obvious projections $\pi_A: A \times B \to A\;\;\;(a, b) \mapsto a$ and similarly for $B$. How might we characterize these arrow? Well, if we have any other set $X$ that has maps $\phi_A$ into $A$ and $\phi_B$ into $B$, then we can send, any $x \in X$ to $(\phi_A(x), \phi_B(x))$ and get a nice map for free into $A \times B$. This inspires the following universal property: <iframe class="quiver-embed" src="https://q.uiver.app/#q=WzAsNCxbMSwxLCJBXFx0aW1lcyBCIixbMCwwLDEwMCwxXV0sWzIsMiwiQiIsWzAsMCwxMDAsMV1dLFswLDIsIkEiLFswLDAsMTAwLDFdXSxbMSwwLCJYIixbMCwwLDEwMCwxXV0sWzMsMiwiXFxwaGlfQSIsMSx7ImN1cnZlIjoxLCJjb2xvdXIiOlswLDAsMTAwXX0sWzAsMCwxMDAsMV1dLFszLDEsIlxccGhpX0IiLDEseyJjdXJ2ZSI6LTEsImNvbG91ciI6WzAsMCwxMDBdfSxbMCwwLDEwMCwxXV0sWzMsMCwiXFxleGlzdHMgISIsMCx7ImNvbG91ciI6WzAsMCwxMDBdLCJzdHlsZSI6eyJib2R5Ijp7Im5hbWUiOiJkYXNoZWQifX19LFswLDAsMTAwLDFdXSxbMCwyLCJcXHBpX0EiLDEseyJjdXJ2ZSI6LTEsImNvbG91ciI6WzAsMCwxMDBdfSxbMCwwLDEwMCwxXV0sWzAsMSwiXFxwaV9CIiwxLHsiY3VydmUiOjEsImNvbG91ciI6WzAsMCwxMDBdfSxbMCwwLDEwMCwxXV1d&embed" width="456" height="432" style="border-radius: 8px; border: none;"></iframe> For any maps into $A$ and $B$ from $X$ there is a unique map from $X$ to $A\times B$ that commutes with the projections. If we flip all the arrows, we get the coproduct: something that both $A$ and $B$ inject into such that any map from $A$ and $B$ into $X$ induce a unique map from the coproduct to $X$. What could this be? <iframe class="quiver-embed" src="https://q.uiver.app/#q=WzAsNCxbMSwxLCJBPyBCIixbMCwwLDEwMCwxXV0sWzIsMiwiQiIsWzAsMCwxMDAsMV1dLFswLDIsIkEiLFswLDAsMTAwLDFdXSxbMSwwLCJYIixbMCwwLDEwMCwxXV0sWzIsMywiXFxwaGlfQSIsMSx7ImN1cnZlIjotMSwiY29sb3VyIjpbMCwwLDEwMF19LFswLDAsMTAwLDFdXSxbMSwzLCJcXHBoaV9CIiwxLHsiY3VydmUiOjEsImNvbG91ciI6WzAsMCwxMDBdfSxbMCwwLDEwMCwxXV0sWzAsMywiXFxleGlzdHMgISIsMix7ImNvbG91ciI6WzAsMCwxMDBdLCJzdHlsZSI6eyJib2R5Ijp7Im5hbWUiOiJkYXNoZWQifX19LFswLDAsMTAwLDFdXSxbMiwwLCJcXGlvdGFfQSIsMSx7ImN1cnZlIjoxLCJjb2xvdXIiOlswLDAsMTAwXX0sWzAsMCwxMDAsMV1dLFsxLDAsIlxcaW90YV9CIiwxLHsiY3VydmUiOi0xLCJjb2xvdXIiOlswLDAsMTAwXX0sWzAsMCwxMDAsMV1dXQ==&embed" width="432" height="432" style="border-radius: 8px; border: none;"></iframe> The coproduct in the category of sets is in fact the disjoint union $A \sqcup B$! Each element of $A \sqcup B$ is either in $A$ or $B$, so we can send it to the target based on whatever it was in.^[if you know any programming languages with "sum types" and "product types," this is exactly what's going on! A member of $A\times B$ is a member of $A$ *and* a member of $B$, while a member of $A \sqcup B$ is a member of $A$ *or* a member of $B$] Both these constructions are examples of limits (or colimits). An object is called a limit of a diagram if it has (commuting) arrows to everything in the diagram and is the *universal* object with arrows to everything in that diagram i.e. anything else with arrows to every object in that diagram factors through the limit. More formally, for any index category $\mathcal I$ and a functor from $\mathcal I \to \mathcal C$, the limit of that functor is the universal object such that <iframe class="quiver-embed" src="https://q.uiver.app/#q=WzAsMyxbMCwxLCJGKEEpIixbMCwwLDEwMCwxXV0sWzIsMSwiRihCKSIsWzAsMCwxMDAsMV1dLFsxLDAsIlxcbGltIEYiLFswLDAsMTAwLDFdXSxbMCwxLCJGKGYpIiwxLHsiY29sb3VyIjpbMCwwLDEwMF19LFswLDAsMTAwLDFdXSxbMiwwLCIiLDEseyJjb2xvdXIiOlswLDAsMTAwXX1dLFsyLDEsIiIsMSx7ImNvbG91ciI6WzAsMCwxMDBdfV1d&embed" width="462" height="304" style="border-radius: 8px; border: none;"></iframe> For colimits, switch all the arrow directions. Then we can phrase the product as a limit of the diagram with two vertices and no edges! We can also define other interesting objects with limits, but next I'm going to talk about a special kind of limit called a *fiber (co)product*. Next: [[Fiber (co)products in the category of sets]]