Tag 6002
Appears as Definition 61.1 (Category) in Section 61, Categories.
A category \(\mathcal{C}\) consists of a collection of objects, a collection of morphisms, each with a specified domain and codomain (one writes \(f\colon X\to Y\) for a morphism with domain \(X\) and codomain \(Y\)), an identity morphism \(1_X\colon X\to X\) for each object \(X\), and for each pair of morphisms \(f\colon X\to Y\) and \(g\colon Y\to Z\) a composite \(gf=g\circ f\colon X\to Z\), such that \(1_Yf=f=f1_X\) for every \(f\colon X\to Y\) and \(h(gf)=(hg)f\) whenever the composites are defined [ 229 , Definition 1.1.1 ] . The collection of morphisms from \(X\) to \(Y\) is written \(\mathcal{C}(X,Y)\) or \(\mathrm{Hom}(X,Y)\) [ 229 , (1.1.8) ] . A category is small if its morphisms form a set, and locally small if each \(\mathcal{C}(X,Y)\) is a set [ 229 , Definitions 1.1.6 and 1.1.7 ] . A subcategory \(\mathcal{D}\) of \(\mathcal{C}\) is given by a subcollection of the objects and of the morphisms that contains the domain, the codomain and the identities of its objects and morphisms and is closed under composition; it is full if \(\mathcal{D}(X,Y)=\mathcal{C}(X,Y)\) for all objects \(X,Y\) of \(\mathcal{D}\) [ 229 , p. 8 and Remark 1.5.8 ] .
Source: latex/entries/18-category-theory/01-categories.tex (history, edit), line 11.
Uses
Nothing yet.
Used by
- Tag 6003: Example 61.2
- Tag 6004: Remark 61.3 (Size)
- Tag 6005: Definition 61.4 (Opposite category and duality)
- Tag 6006: Definition 61.5 (Isomorphisms, monomorphisms and epimorphisms)
- Tag 6009: Definition 61.8 (Initial, terminal and zero objects)
- Tag 600C: Definition 62.1 (Functor)
- Tag 600N: Remark 63.5 (Origins)
Formalisation
Defined in Mathlib, the community library of formalised mathematics for the Lean theorem prover. Mathlib's categories have a type of objects and, for any two objects, a type of morphisms in a fixed universe, so they are locally small relative to that universe; composition is written in diagrammatic order, f ≫ g for g ∘ f.
CategoryTheory.Category · documentation · source (Mathlib/CategoryTheory/Category/Basic.lean, line 232) · Stacks Project 0014 · Wikidata Q719395
/-- The typeclass `Category C` describes morphisms associated to objects of type `C`.
The universe levels of the objects and morphisms are unconstrained, and will often need to be
specified explicitly, as `Category.{v} C`. (See also `LargeCategory` and `SmallCategory`.) -/
class Category (obj : Type u) : Type max u (v + 1) extends CategoryStruct.{v} obj
-- Full signature:
CategoryTheory.Category.{v, u} (obj : Type u) : Type (max u (v + 1))Lean checks this class; the axioms it rests on: none.
Reproduced from Mathlib, Mathlib/CategoryTheory/Category/Basic.lean at commit 02a839b (Copyright (c) 2017 Kim Morrison; authors: Stephen Morgan, Kim Morrison, Johannes Hölzl, Reid Barton), under the Apache License 2.0.
Link checked on 2026-11-29 against Mathlib at commit 02a839b. About the formalisations.
How to cite
ModernMath, Tag 6002 (Definition 61.1 (Category)).