Categories [tt-0005]
Categories [tt-0005]
definition 1. category [kostecki2011introduction, 1.1] [tt-0002]
definition 1. category [kostecki2011introduction, 1.1] [tt-0002]
A category \({\cal C}\) consists of:
- objects \(\operatorname {Ob}({\cal C})\): \(O, X, Y, \dots \)
- arrows \(\operatorname {Arr}({\cal C})\): \(f, g, h, \dots \), where for each arrow \(f\),
- a pair of operations \(\operatorname {dom}\) and \(\operatorname {cod}\) assign a domain object \(X=\operatorname {dom}(f)\) and a codomain object \(Y=\operatorname {cod}(f)\) to \(f\),
- thus f can be denoted by \[f : X \to Y\] or \[X \xrightarrow {f} Y\]
- compositions: a composite arrow of any pair of arrows \(f\) and \(g\), denoted \(g \circ f\) or \( f \mathbin {\bullet } g \), makes the diagram
commute (we say that \(f \mathbin {\bullet } g\) factors through \(Y\)),
- a identity arrow for each object \(O\), denoted \(\mathit {1}_O : O \to O\)
- associativity of composition: the diagram
commutes,
- identity law: the diagram
commutes.
convention 2. composition [kostecki2011introduction, 1.1] [tt-003X]
convention 2. composition [kostecki2011introduction, 1.1] [tt-003X]
In literatures, composition of arrows in a category is most frequently denoted \(\circ \) or just by juxtaposition, i.e. for the diagram
\(g \circ f\) or just \(gf\) mean \(g\) applies to the result of \(f\).
But this is the opposite of the order of arrows in the diagram, so arguably a more natural way could be to denote the above as \(f ; g\) [kostecki2011introduction, 1.1], or as \(f \mathbin {⨟} g\) [fong2018seven, 3.6], or as \(f \mathbin {\bullet } g\) [nakahira2023diagrammatic, sec. 1.1].
We use \(f \mathbin {\bullet } g\) throughout this note, so it can always be understood as \(\xrightarrow {f}\xrightarrow {g}\). This way saves mental energy when reading commuting diagrams, pasting diagrams and string diagrams which we employ heavily.
definition 3. (locally) small, hom-set [kostecki2011introduction, 1.3] [tt-000A]
definition 3. (locally) small, hom-set [kostecki2011introduction, 1.3] [tt-000A]
A category C is called locally small iff for any of its objects \(X, Y\) , the collection of arrows from \(X\) to \(Y\) is a set, called a hom-set, denoted \[\operatorname {Hom}_{{\cal C}}(X, Y)\]
A category is called small iff the collection of all its arrows is a set.
notation 4. hom-set, hom-class [zhang2021type, 1.2] [tt-0003]
notation 4. hom-set, hom-class [zhang2021type, 1.2] [tt-0003]
\(\operatorname {Hom}\) in \(\operatorname {Hom}_{{\cal C}}(X, Y)\) is short for homomorphism, since an arrow in category theory is a morphism (i.e. an arrow), a generalization of homomorphism between algebraic structures.
This notation could be unnecessarily verbose, so when there is no confusion, we follow [leinster2016basic] and [zhang2021type] to simply write \(X,Y \in \operatorname {Ob}({\cal C})\) as \[X,Y \in {\cal C}\] and \(f \in \operatorname {Hom}_{{\cal C}}(X, Y)\) as \[f \in {\cal C}(X, Y)\]
In some other scenarios, when the category in question is clear (and it might be to too verbose to write out, e.g. a functor category), we omit the subscript of the category and write just \[\operatorname {Hom}(X, Y)\]
In general, collection \(\operatorname {Ob}({\cal C})\) and \(\operatorname {Arr}({\cal C})\) are not neccessarily sets, but classes. In that case, \(\operatorname {Hom}_{{\cal C}}(X, Y)\) is called a hom-class.
Later, we will also learn that \(\operatorname {Ob}\) and \(\operatorname {Arr}\) are representable functors.
definition 5. finite [kostecki2011introduction, 1.3] [tt-0034]
definition 5. finite [kostecki2011introduction, 1.3] [tt-0034]
A category is called finite iff it is small and it has only a finite number of objects and arrows.
definition 6. commuting diagram [kostecki2011introduction, 1.2] [tt-0007]
definition 6. commuting diagram [kostecki2011introduction, 1.2] [tt-0007]
A diagram in a category \({\cal C}\) is defined as a collection of objects and arrows that belong to the category \({\cal C}\) with specified operations \(\operatorname {dom}\) and \(\operatorname {cod}\).
A commuting diagram is defined as such diagram that any two arrows of this diagram which have the same domain and codomain are equal.
For example, that the diagram
commutes means \(f \mathbin {\bullet } g = h \mathbin {\bullet } k\).
It's also called a arrow diagram [nakahira2023diagrammatic, 1.1] when compared to a string diagram, as it represents arrows with \(\to \).
definition 7. string diagram [nakahira2023diagrammatic, table 1.1] [tt-003V]
definition 7. string diagram [nakahira2023diagrammatic, table 1.1] [tt-003V]
A string diagram represents categories as surfaces (2-dimensional), functors as wires (1-dimensional), natural transformations as blocks or just dots (0-dimensional).
String diagrams has the advantage of being able to represent objects, arrows, functors, and natural transformations from multiple categories, and their vertical and horizontal composition, and has various topologically plausible calculational rules for proofs.
notation 8. string diagrams: category, object and arrow [marsden2014category, sec. 2.1] [tt-0004]
notation 8. string diagrams: category, object and arrow [marsden2014category, sec. 2.1] [tt-0004]
Later, when we have learned about functors and natural transformations, we will see that, in string diagram for 1-category:
-
A category \({\cal C}\) is represented as a colored region:
- Functors of type \(\mathbf {1} \to {\cal C}\) can be identified with objects of the category \({\cal C}\), where \(\mathbf {1}\) is the the terminal category, so an object \(X \in \operatorname {Ob}({\cal C})\) can be represented as:
-
An arrow \(f : X \to Y\) is then a natural transformation between two of these functors, represented as:
convention 9. letters [tt-0010]
convention 9. letters [tt-0010]
The general idea is that we try to use visually distinct letters for different concepts:
- uppercase calligraphic letters \({\cal C}, {\cal D}, {\cal E}, {\cal J}, {\cal S}\) denote categories
- \({\cal C}, {\cal D}, {\cal E}\) are prefered in concepts about one to three categories, since \({\cal C}\) is the first letter of "category"
- \({\cal J}\) is used in concepts like diagram, and assumed to be small
- \({\cal S}\) is used in concepts like subcategory, or sometimes in concepts about a small category
- boldface uppercase Roman letters denote specific categories, e.g. \(\mathbf {Cat}, \mathbf {Set}, \mathbf {Grp}, \mathbf {Top}, \mathbf {1}\)
- uppercase Roman letters \(X, Y, Z, W, O, E, V\) denote objects in categories
- lowercase Roman letters \(f, g, h, i, k, l, r\) and sometimes the lowercase Roman letter of the corresponding codomain or domain object denote arrows
- occationally, when two arrows are closely related, they are denoted by the same letter with different subscripts, e.g. \(g_1, g_2\)
- as special cases, \(\iota , p, i\) denote the inclusion, projection and injection arrows
- uppercase script letters \(\mathscr {F}, \mathscr {G}, \mathscr {H}, \mathscr {I}, \mathscr {K}, \mathscr {L}, \mathscr {R}\) denote functors
- \(\mathscr {D}\) denotes a diagram functor
- \(\mathscr {L}\) and \(\mathscr {R}\) denote the left and right adjoint functors in an adjunction, respectively
- \(\mathscr {H}\) denotes the Yoneda embedding functors
- as a special case, functors with the terminal category (i.e. constant object functors) as the domain are identified with the objects in the codomain category, thus are denoted like an object: \(X : \mathbf {1} \to {\cal C}, \mathrm {*} \mapsto X\)
- \(\mathscr {I}\) is only used in the inclusion functor (note that this is letter "I")
- we do not use \(\mathscr {J}\) and \(\mathscr {S}\) because they are visually ambiguous
- lowercase Greek letters \(\alpha , \beta , \eta , \epsilon , \sigma \) denote natural transformations, their components are denoted by them with subscripts.