Written by dustbringer on 18 March 2023 (Edited 17 January 2024). View source.

Category theory: Universal property

Notes in my attempt to consolidate two definitions of 'universal property'.

Mac Lane Definition

Definition. [Maclane1, page 55] Let C\mathcal{C} and D\mathcal{D} be categories. For a functor S:DCS: \mathcal{D} \to \mathcal{C} and an object cCc \in \mathcal{C}, a universal morphism from cc to SS is a pair (a,u)(a,u), where aDa \in \mathcal{D} and u:cSau: c \to Sa in C\mathcal{C}, such that for any pair (dD,f:cSd)(d \in \mathcal{D}, f:c \to Sd) there exists a unique morphism f:adf': a \to d in D\mathcal{D} such that Sfu=fSf' \circ u = f. In other words, every morphism f:cSdf: c \to Sd factors uniquely through the universal morphism uu. In, again, other words, the following diagram commutes.

The dual is the same with the arrows and composition reversed.

Alternate (Riehl) Definition

Definition. [Reihl2, Definition 2.3.3 (page 62)] Let C\mathcal{C} be a category. A universal property of an object cCc \in \mathcal{C} is expressed by a representable functor F:CSetF: \mathcal{C} \to \cat{Set} and an element xFcx \in Fc that defines a natural isomorphism C(c,)F\mathcal{C}(c,-) \cong F by the Yoneda Lemma. The dual has the natural isomorphism C(,c)F\mathcal{C}(-,c) \cong F.

We call cc the universal object, xx the universal element and say that (x,c)(x,c) has the universal property expressed by FF. 3

Note. This is directly transcribed from the book, and the names do not line up. The correspondence appears in "Terminology and notation" below.

Thoughts

Universal Morphism to Representation

These two definitions are equivalent by [Maclane1, page 59 (Proposition 1)]. Roughly it says

  • for a functor S:DCS: \mathcal{D} \to \mathcal{C} and object cCc \in \mathcal{C}, (aD,u:cSa)(a \in \mathcal{D}, u: c \to Sa) is a universal morphism from cc to SS if and only if the collection of functions
    τd:(f:ad)(Sfu:cSd)\tau_d: (f': a \to d) \mapsto (Sf' \circ u: c \to Sd)
    gives a natural isomorphism
    D(a,)C(c,S).\mathcal{D}(a,-) \cong \mathcal{C}(c,S-).
  • (Conversely) for aDa \in \mathcal{D} and cCc \in \mathcal{C}, any natural isomorphism D(a,)C(c,S)\mathcal{D}(a,-) \cong \mathcal{C}(c,S-) uniquely determines u:cSau: c \to Sa such that (a,u)(a,u) is universal from cc to SS.

Note. The second half just says that the translation between the two definitions works in the other way. The reverse construction is not as intuitive (see the proof of [Maclane1, page 59 (Proposition 1)]). We just look at the first part.

The proposition says that saying (a,u)(a,u) is universal morphism is equivalent to saying that the functor C(c,S):DSet\mathcal{C}(c,S-): \mathcal{D} \to \cat{Set} is representable with representing object aDa \in \mathcal{D}. The natural isomorphism D(a,)C(c,S)\mathcal{D}(a,-) \cong \mathcal{C}(c,S-) is exactly the information:

  • an element uC(c,Sa)u \in \mathcal{C}(c,S\red{a}), corresponding to the natural isomorphism (via Yoneda lemma), and
  • for any dDd \in \mathcal{D} and morphism f:cSdf:c \to Sd in C(c,Sd)\mathcal{C}(c,Sd)
  • there is a unique morphism f:adf':a \to d in D(a,d)\mathcal{D}(a,d) such that f=Sfuf = Sf' \circ u.
    • the commuting property is a consequence of naturality (see Product example)

We can interpret any representable functor in a similar way, regardless of if they are of the form C(c,S)\mathcal{C}(c,S-).

Representation to Universal Morphism

Mac Lane also provides a way to translate from a universal property on a functor F:DSetF: \mathcal{D} \to \cat{Set} (given by a representing object aa and what he calls a universal element uu in F(a)F(a)) to a universal morphism to FF (see [Maclane1, page 57-58]). This can be used to construct a universal morphism from a universal property from Riehl's definition & Yoneda's Lemma.

It works as follows. Let * be the set with one point, and let Ens\cat{Ens} be an appropriate full small subcategory of the metacategory of sets. Given a representing object aa and universal element uF(a)u \in F(a), consider uu as a morphism F(a)* \to F(a) in Ens\cat{Ens}. Then (a,u)(a,u) is exactly the universal morphism from * to FF. Note that doing this changes the universal morphism/object/element, because the functor is different so is represented differently.

Terminology and notation (and translation)

Mac Lane's definition, let S:DCS: \mathcal{D} \to \mathcal{C}, cCc \in \mathcal{C}, aDa \in \mathcal{D}, u:cSau: c \to Sa in C\mathcal{C}.

  • universal morphism is (a,u)(a,u)
    • Corresponding representation is D(a,)C(c,S)\mathcal{D}(a,-) \cong \mathcal{C}(c,S-)
    • (a,u)(a,u) has the universal property given by the commutative diagram
  • universal object is aa
    • This is the representing object for C(c,S)\mathcal{C}(c,S-)
  • universal element is uC(c,Sa)u \in \mathcal{C}(c, Sa)
    • The element in Yoneda Lemma Hom(D(a,),C(c,S))C(c,S)(a)=C(c,Sa)\Hom(\mathcal{D}(a,-), \mathcal{C}(c,S-)) \cong \mathcal{C}(c,S-)(a) = \mathcal{C}(c, Sa).

Riehl's definition, let F:DSetF: \mathcal{D} \to \cat{Set} be represented by aDa \in \mathcal{D} with corresponding element uF(a)u \in F(a) from Yoneda Lemma.

  • (a,u)(a,u) has the universal property that it represents the functor FF
  • universal object is the representing object aa
  • universal element is the element from the Yoneda Lemma uu (corresponding to the natural isomorphism D(a,)F\mathcal{D}(a,-) \cong F)

Similarly named things here are the same, by [Maclane1, page 59 (Proposition 1)].

Note. The dual universal property has the hom-functors reversed, eg. the Yoneda lemma statement will have Hom(D(,a),C(S,c))C(Sa,c)\Hom(\mathcal{D}(-,a), \mathcal{C}(S-,c)) \cong \mathcal{C}(Sa,c).

Example: Free abelian group

The free abelian group construction (from StackExchange3).

Let SS be a set and U:AbSetU: \cat{Ab} \to \cat{Set} be the forgetful functor from the category of abelian groups. Write Z{S}\Z\{S\} for the free abelian group on the set SS, that is formal Z\Z-linear combinations of elements in SS, and write [s]Z{S}[s] \in \Z\{S\} for the basis element corresponding to sSs \in S.

The universal property of Z{S}\Z\{S\} (more technically of (Z{S},η:SUZ{S})(\Z\{S\}, \eta: S \to U\Z\{S\})) is that for any abelian group AAbA \in \cat{Ab} and map ϕ:SUA\phi: S \to UA, there is a unique morphism ϕ~:Z{S}S\tilde{\phi}: \Z\{S\} \to S such that the following diagram commutes.

In Riehl's definition, we have the functor Set(S,U)\cat{Set}(S, U-) represented by Z{S}\Z\{S\}, i.e.

Ab(Z{S},)Set(S,U).\cat{Ab}(\Z\{S\}, -) \cong \cat{Set}(S, U-).

This natural isomorphism is given by the morphism (via Yoneda Lemma) η:SUZ{S}\eta: S \to U\Z\{S\} in Set(S,UZ{S})\cat{Set}(S, U\Z\{S\}), such that

τA:(ϕ~:Z{S}A)(Uϕ~η):SUA,sUϕ~([s])).\tau_A: (\tilde\phi: \Z\{S\} \to A) \mapsto (U\tilde{\phi} \circ \eta): S \to UA, s \mapsto U\tilde{\phi}([s])).

The universal object (representing) is Z{S}Ab\Z\{S\} \in \cat{Ab} and the universal element (Yoneda) is ηSet(S,UZ{S})\eta \in \cat{Set}(S,U\Z\{S\}).

Note that this universal property arises from the forgetful-free adjunction where the universal element η\eta is the unit of adjunction. For the general case see Wikipedia.

Example: Tensor Product (Vector spaces)

The tensor products for vector space construction (from StackExchange3, [Maclane1, page 58], [Reihl2, Example 2.3.7 (page 63)]).

This universal property is clearer in terms of Riehl's definition, and we deduce something similar to the original from the isomorphism. Let kk be a field, V,WV,W vectors spaces, and consider the functor Bilink(V,W;):VectkSet\op{Bilin}_k(V,W;-): \cat{Vect}_k \to \cat{Set} which takes vector spaces UU to the set of all bilinear maps V×WUV \times W \to U. This is represented by the tensor product VkWV \otimes_k W such that

Vectk(VkW,)Bilink(V,W;)\cat{Vect}_k (V \otimes_k W, -) \cong \op{Bilin}_k (V,W; -)

by the natural isomorphism

τU:(ϕ~:VkWU)(ϕ=ϕ~:V×WVkWU).\tau_U: (\tilde{\phi}: V \otimes_k W \to U) \mapsto (\phi = \tilde{\phi} \circ \otimes: V \times W \to V \otimes_k W \to U).

Here, the universal object (representing) is VkWVectkV \otimes_k W \in \cat{Vect}_k and the universal element (Yoneda) is :V×WVkW\otimes: V \times W \to V \otimes_k W in Bilink(V,W;VkW)\op{Bilin}_k(V,W;V \otimes_k W).

Recall (from Thoughts) that this bijection is exactly the data: for any vector space UVectkU \in \cat{Vect}_k and bilinear map ϕ:V×WU\phi: V \times W \to U in Bilink(V,W;U)\op{Bilin}_k(V,W;U), there is a unique morphism ϕ~:VkWU\tilde{\phi}: V \otimes_k W \to U in Vectk(VkW,U)\cat{Vect}_k(V \otimes_k W,U) such that ϕ=ϕ~\phi = \tilde{\phi} \circ \otimes. We can put this information in a commutative diagram.

Note. As in this example we can deduce a universal property statement involving 'uniqueness' from the represented functor without going through the universal morphism definition.

Remark. If we wanted to view this in terms of universal arrows, we can use the construction from Mac Lane. This produces the universal object * and the universal element :Bilink(V,W;VkW)\otimes: * \to \op{Bilin}_k(V,W;V \otimes_k W) (that picks out Bilink(V,W;VkW)\otimes \in \op{Bilin}_k(V,W;V \otimes_k W)), which gives the universal morphism (,u)(*,u) from * to Bilink(V,W;)\op{Bilin}_k(V,W;-). By definition it says that for any vector space UU and morphism of sets ϕ:Bilink(V,W;)\phi: * \to \op{Bilin}_k(V,W;-), there is a unique morphism ϕ~:VkWU\tilde{\phi}: V \otimes_k W \to U in Vectk(VW,U)\cat{Vect}_k(V \otimes W, U) such that ϕ=ϕ~()\phi = \tilde{\phi}_* (\otimes) where ϕ~\tilde{\phi}_* is post-composition by ϕ~\tilde{\phi}. In other words, the following diagram commutes.

Example: Quotients

Quotients in algebra arise from considering equivalence classes of an equivalence relation. Let C\mathcal{C} be a category, XCX \in \mathcal{C} an object, and \sim an equivalence relation on elements in XX. Then the universal property of the quotient X/X/\sim (the set of equivalence classes of \sim) is that for any YCY \in \mathcal{C} and morphism f:XYf: X \to Y that respects the equivalence relation \sim, there is a unique morphism f~\tilde{f} such that f=f~qf = \tilde{f} \circ q. Where q:XX/q: X \to X/\sim is the canonical quotient map.

In terms of Maclane's definition: Fix C\mathcal{C},XX and \sim as above. Define a functor F:CSetF: \mathcal{C} \to \cat{Set} that maps objects to the set of morphisms from XX that preserve the equivalence Y{fC(X,Y):ab    f(a)=f(b)}Y \mapsto \{f \in \mathcal{C}(X,Y) : a \sim b \implies f(a) = f(b)\}. On morphisms we map (YgZ)(FYgFZ)(Y \xto{g} Z) \mapsto (FY \xto{g_*} FZ) where gg_* is the postcomposition map with gg, i.e. g(f)=gfg_*(f) = g \circ f. This clearly preserves identity morphism, as postcomposition with identity is the identity map on morphisms. This also preserves composition because (hg)(f)=(hg)f=h(gf)=hg(f)(h \circ g)_*(f) = (h \circ g) \circ f = h \circ (g \circ f) = h_* \circ g_* (f) by associativity of composition. Thus FF is a functor. The construction from Mac Lane implies that the universal property is can be equivalently stated in terms of the following commutative diagram, where * (the one element set) is the universal object and q:XX/q: X \to X/\sim is the universal element.

In terms of Reihl's definition: Taking the same functor as above, we have a natural isomorphism

C(X/,)F.\mathcal{C}(X/\sim, -) \cong F.

Here the universal object is X/X/\sim and the universal element is the canonical projection q:XX/q: X \to X/\sim in F(X/)F(X/\sim) (Yoneda). This has the same information as the first diagram above: given any object YY and morphism f:XYf: X \to Y in F(Y)F(Y) that respects the equivalence relation, there exists a unique morphism f~C(X/,Y)\tilde{f} \in \mathcal{C}(X/\sim, Y) such that f=f~qf = \tilde{f} \circ q. That is, all such morphisms ff factor through the quotient X/X/\sim.

Example: Products

Let C\mathcal{C} be a category and elements A,BCA,B \in \mathcal{C}. The product of AA and BB, we write as A×BA \times B, is the element in C\mathcal{C} (along with projection maps π1:A×BA,π2:A×BB\pi_1: A \times B \to A, \pi_2: A \times B \to B) with the following universal property. For any CCC \in \mathcal{C} and maps f1:CA,f2:CBf_1:C \to A, f_2:C \to B, there is a unique morphism f:CA×Bf:C \to A \times B such that f1=π1ff_1 = \pi_1 \circ f and f2=π2ff_2 = \pi_2 \circ f. This is typically depicted by the following commutative diagram.

To write this like the triangle diagrams we have above, we define the diagonal functor Δ:CC×C,A(A,A)\Delta : \mathcal{C} \to \mathcal{C} \times \mathcal{C}, A \mapsto (A,A), from C\mathcal{C} to the product category C×C\mathcal{C} \times \mathcal{C} (excuse the apparent recursion). We can use this to "fold" the sides of the above diagram to the following equivalent commuting diagram.

This depicts a universal morphism from Δ\Delta to (A,B)(A,B) given by the product object A×BCA \times B \in \mathcal{C} with the projection maps (π1,π2)(\pi_1,\pi_2), which is in the form of MacLane's definition.

In terms of Reihl's definition: Note that this is the dual universal property as morphisms are reversed as in the definition, and thus we need to dualise the "translation" we gave above. The representable functor we have is HomC×C(Δ,(A,B)):CopSet\Hom_{\mathcal{C} \times \mathcal{C}}(\Delta -, (A,B)): \mathcal{C}^{op} \to \cat{Set} (using Hom\Hom to make it easier to read), represented by A×BA \times B. The universal element is (π1,π2)HomC×C(Δ(A×B),(A,B))(\pi_1,\pi_2) \in \Hom_{\mathcal{C} \times \mathcal{C}}(\Delta (A \times B), (A,B)). By Yoneda lemma (and (Reihl) definition of universal property), this universal element (π1,π2)(\pi_1,\pi_2) corresponds to the natural isomorphism

HomC(,A×B)HomC×C(Δ,(A,B))\Hom_\mathcal{C}(-,A \times B) \cong \Hom_{\mathcal{C} \times \mathcal{C}}(\Delta -, (A,B))

which is natural in CC (of the above diagram). To reiterate the connection between the definitions, this natural isomorphism (depending on the universal element (π1,π2)(\pi_1,\pi_2)) is a one-to-one correspondence between morphisms (f1,f2):ΔC(A,B)(f_1,f_2): \Delta C \to (A,B) and f:CA×Bf: C \to A \times B (which gives rise to Δf:ΔCΔ(A×B)\Delta f: \Delta C \to \Delta(A \times B) in the diagram). In other words, given any CCC \in \mathcal{C} and (f1,f2)C×C(f_1,f_2) \in \mathcal{C} \times \mathcal{C}, there exists f:CA×Bf: C \to A \times B in C\mathcal{C} such that the construction is natural in CC (the naturality gives rise to the commuting diagram).

By the proof of the Yoneda lemma, the natural isomorphism associated with (π1,π2)(\pi_1,\pi_2) is

αC:HomC(C,A×B)HomC×C(ΔC,(A,B))\alpha_C: \Hom_\mathcal{C}(C,A \times B) \xto{\sim} \Hom_{\mathcal{C} \times \mathcal{C}}(\Delta C, (A,B))

which takes f:CA×Bf: C \to A \times B to HomC×C(Δf,(A,B))(π1,π2)=(π1f,π2f):ΔC(A,B)\Hom_{\mathcal{C} \times \mathcal{C}}(\Delta f, (A,B)) (\pi_1,\pi_2) = (\pi_1 \circ f, \pi_2 \circ f) : \Delta C \to (A,B). We write the inverse as mapping (f1,f2)f1,f2(f_1,f_2) \mapsto \angl{f_1,f_2} 4, which, in Set\cat{Set}, is the function f1,f2:CA×B,c(f1(c),f2(c))\angl{f_1,f_2}: C \to A \times B, c \mapsto (f_1(c),f_2(c)).

Naturality. We use this chance to also explore the "natural" part of this natural isomorphism arising from the Yoneda lemma. Let

η:HomC×C(Δ,(A,B))HomC(,A×B)\red{\eta}: \Hom_{\mathcal{C} \times \mathcal{C}}(\Delta -, (A,B)) \xto{\sim} \Hom_\mathcal{C}(-,A \times B)

be the above natural isomorphism. Then naturality implies that the following diagram commutes (isomorphism implies that the inverse natural transformation gives a similar commuting diagram).

Note that this is a natural transformation between two contravariant functors, so the vertical arrows are reversed. The left arrow takes a morphism ΔD=(D,D)(A,B)\Delta D = (D,D) \to (A,B) and precomposes with Δh=(h,h):(C,C)(D,D)\Delta h = (h,h): (C,C) \to (D,D), and the right arrow takes a morphism DA×BD \to A \times B and precomposes with h:CDh: C \to D.

Chasing the diagram gives some intuition into what is happening. Take some arbitrary (f1,f2)HomC×C(ΔD,(A,B))(f_1,f_2) \in \Hom_{\mathcal{C}\times\mathcal{C}}(\Delta D, (A,B)), the top arrow gives f1,f2:DA×B\angl{f_1,f_2}: D \to A \times B and the right arrow gives a map f1,f2h\angl{f_1,f_2} \circ h. Along the other branch, the left arrow produces (f1h,f2h)(f_1 \circ h, f_2 \circ h) and the bottom gives f1h,f2h\angl{f_1 \circ h, f_2 \circ h}. Commutativity is just the equality f1,f2h=f1h,f2h\angl{f_1,f_2} \circ h = \angl{f_1 \circ h, f_2 \circ h}, which should be clear on the level of sets.

Taking CC arbitrary, D=A×BD = A \times B, h=ηC(f1,f2):CA×Bh = \eta_C(f_1,f_2): C \to A \times B we can recover the commuting property. Let's chase (π1,π2)HomC×C(Δ(A×B),(A,B))(\pi_1,\pi_2) \in \Hom_{\mathcal{C}\times\mathcal{C}}(\Delta (A \times B), (A,B)) through the diagram. The top branch sends this to the identity A×BA×BA\times B \to A \times B (of course the universal morphism factors through itself via the identity), then the right branch precomposes this with hh, resulting in h=ηC(f1,f2)h = \eta_C(f_1,f_2). Since η\eta is a natural isomorphism, we can invert along the bottom arrow to give (f1,f2)(f_1,f_2) in the bottom left set. Now the left branch precomposes (π1,π2)(\pi_1,\pi_2) with Δh\Delta h, which results in (π1h,π2h)(\pi_1 \circ h, \pi_2 \circ h). Since the diagram commutes, we have that (f1,f2)=(π1h,π2h)(f_1,f_2) = (\pi_1 \circ h, \pi_2 \circ h) which is the commutativity of the original diagram.

Uniqueness of representing objects

It can be shown that if a functor FF can be represented by two different universal objects a,aa, a', then aa and aa' are isomorphic (see [Reihl2, Proposition 2.3.1 (page 62)] or StackExchange3)


Footnotes

  1. 1. ^

    Mac Lane, Categories for the working mathematician.



  2. 2. ^

    Reihl, Category Theory in Context.



  3. 3. ^

    Math StackExchange, Understanding Universal Property and Universal Element (from Category Theory in Context, Riehl), https://math.stackexchange.com/questions/3688510/understanding-universal-property-and-universal-element-from-category-theory-in



  4. 4. ^

    Notation from Wikipedia

Copyright © 2024 dustbringer