Definition. Category

2026-06-13 Β· Steven Schaefer Β· nLab Β· category-theory

A category π’žοΈ€ consists of

  1. A type of objects π’žοΈ€0
  2. For each pair of objects π‘₯,𝑦:π’žοΈ€0 a set of morphisms π’žοΈ€(π‘₯,𝑦). We may simply write a morphism with an arrow, denote 𝑓:π’žοΈ€(π‘₯,𝑦) as 𝑓:π‘₯→𝑦 or π‘₯→𝑓𝑦 or similar
  3. A composition operation on morphisms. For 𝑓:π‘₯→𝑦 and 𝑔:𝑦→𝑧, there is a morphism 𝑓⋆𝑔:π‘₯→𝑧
  4. For each π‘₯:π’žοΈ€0, an identity morphism 𝗂𝖽π‘₯:π‘₯β†’π‘₯
  5. Left-unitality of composition: for all 𝑓:π‘₯→𝑦, an equality

    𝗂𝖽𝖫𝑓:𝗂𝖽π‘₯⋆𝑓=𝑓
  6. Right-unitality of composition: for all 𝑓:π‘₯→𝑦, an equality

    𝗂𝖽𝖱𝑓:𝑓⋆𝗂𝖽𝑦=𝑓
  7. Associativity of composition: for all 𝑓:π‘₯→𝑦, 𝑔:𝑦→𝑧, β„Ž:𝑧→𝑀, an equality

    π–Ίπ—Œπ—Œπ—ˆπ–Όπ‘“,𝑔,β„Ž:(𝑓⋆𝑔)β‹†β„Ž=𝑓⋆(π‘”β‹†β„Ž)

Concretely, the definition above is meant to model the one used in the Cubical standard library [1].

However, the notion of category is flexible. Depending on the context, we may be talking of small, locally small, wild, or any other kind of category that may augment which things we require to be (homotopy) sets, which things we require to be small types, etc. For the most part, the same idea of a category will apply across all of these settings.

References

The Cubical Agda Library β†—
category definition entries/category/category.hel