category-master
Expert-level category theory knowledge for rigorous mathematical reasoning. Use when working with categorical structures, functors, natural transformations, adjunctions, limits, toposes, monoidal categories, enriched categories, higher categories, operads, or any formal categorical construction. Ideal for proofs, diagram chases, universal properties, coherence conditions, and foundational mathematical abstractions.
- Category: discovered
- Tags: github, community
- Version: 1.0.0
- Author: walid
- Downloads: 0
- Updated: 2025-11-22
Download the latest version (v1.0.0) from this page.
SKILL.md
---
name: category-master
description: Expert-level category theory knowledge for rigorous mathematical reasoning. Use when working with categorical structures, functors, natural transformations, adjunctions, limits, toposes, monoidal categories, enriched categories, higher categories, operads, or any formal categorical construction. Ideal for proofs, diagram chases, universal properties, coherence conditions, and foundational mathematical abstractions.
---
# Category Master
Expert guidance for rigorous categorical reasoning, proofs, and constructions in pure mathematics.
## Core Principles
### Set-Theoretic Foundations
**Size distinctions** (essential for avoiding paradoxes):
- **Small set**: Element of a fixed Grothendieck universe 𝒰
- **Small category**: Ob(𝒞) and all Hom-sets are small (elements of 𝒰)
- **Locally small category**: Each Hom(A,B) is small, but Ob(𝒞) may be a proper class
- **Large category**: Even some Hom-sets may be proper classes
**Grothendieck universes**: Sets closed under standard operations (pairing, power set, unions), satisfying axioms that enable treating "all small sets" as a category without Russell-type paradoxes.
**Practical implications**:
- The category **Set** of all sets is not small; working in **Set** requires 𝒰
- Yoneda embedding 𝒞 → [𝒞^op, Set] requires 𝒞 locally small
- Functor categories [𝒞, 𝒟]: if 𝒞 small and 𝒟 locally small, then [𝒞, 𝒟] is locally small
- Adjunctions F ⊣ G: natural bijection Hom(F(A), B) ≅ Hom(A, G(B)) requires local smallness
**Universe hierarchy** (for categories of categories):
- When working with Cat, need 𝒰 ∈ 𝒰' ∈ 𝒰'' ...
- Cat(𝒰) = category of 𝒰-small categories (lives in 𝒰')
- Enables discussing functors between Cat and other 2-categories
**Foundation conventions**: Unless stated otherwise, assume locally small categories and work within a fixed universe 𝒰 for small sets.
### Precision and Rigor
- Always state precise mathematical definitions using proper notation
- Verify universal properties and coherence conditions explicitly
- Check commutative diagrams for all naturality and functoriality requirements
- Cite theorem names and formalize all proof steps
- Be explicit about componentwise vs functor-level operations
### Categorical Thinking
- Identify universal constructions (limits, colimits, adjunctions) as primary tools
- Reason arrow-theoretically: prioritize morphisms over internal structure
- Seek canonical isomorphisms and natural transformations
- Apply duality systematically (op-categories, contravariant functors)
### Abstraction Levels
**Level 0** (Sets): Objects as sets, morphisms as functions
**Level 1** (Categories): Objects in categories, morphisms between them, functors between categories
**Level 2** (2-Categories): Natural transformations as 2-cells, 2-functors
**Level n** (Higher): n-cells and coherence at all dimensions
## Foundational Structures
### 1. Categories and Functors
**Category Definition**: A category 𝒞 consists of:
- Class of objects Ob(𝒞)
- For each A,B ∈ Ob(𝒞), a set of morphisms Hom(A,B)
- Composition: ∘ : Hom(B,C) × Hom(A,B) → Hom(A,C) satisfying associativity
- Identity morphisms id_A ∈ Hom(A,A) satisfying left/right identity laws
**Size distinctions**:
- **Small category**: Both Ob(𝒞) and all Hom-sets are small (sets, not proper classes)
- **Locally small category**: Hom(A,B) is a set for all A,B (even if Ob(𝒞) is a proper class)
- Most categories in practice are locally small (e.g., Set, Grp, Top)
- Size matters for avoiding set-theoretic paradoxes and for functor categories
**Functor Definition**: F: 𝒞 → 𝒟 maps objects to objects, morphisms to morphisms, preserving:
- Identities: F(id_A) = id_{F(A)}
- Composition: F(g ∘ f) = F(g) ∘ F(f)
**Size note**: For small 𝒞 and locally small 𝒟, the functor category [𝒞, 𝒟] is well-defined and locally small.
**Verification Template**:
```
To prove F is a functor:
1. Define F on objects: F(A) = ...
2. Define F on morphisms: F(f: A → B) = ...
3. Check identity: F(id_A) = ... = id_{F(A)} ✓
4. Check composition: F(g ∘ f) = ... = F(g) ∘ F(f) ✓
```
### 2. Natural Transformations
**Definition**: α: F ⇒ G between functors F,G: 𝒞 → 𝒟 assigns to each A ∈ 𝒞 a morphism α_A: F(A) → G(A) such that for all f: A → B:
```
F(A) --α_A--> G(A)
| |
F(f) G(f)
| |
v v
F(B) --α_B--> G(B)
```
This diagram commutes: G(f) ∘ α_A = α_B ∘ F(f) (naturality square)
**Verification Template**:
```
To prove α is natural:
1. Define components: α_A: F(A) → G(A) for each A
2. For each morphism f: A → B, verify:
G(f) ∘ α_A = α_B ∘ F(f)
3. Compute both paths and confirm equality
```
### 3. Adjunctions
**Definition**: F: 𝒞 ⇄ 𝒟 : G form an adjunction F ⊣ G if there exist natural transformations:
- η: id_𝒞 ⇒ GF (unit)
- ε: FG ⇒ id_𝒟 (counit)
**Triangle Identities** (⚠️ COMPONENTWISE - Critical Notation):
For each object A ∈ 𝒞:
```
ε_{F(A)} ∘ F(η_A) = id_{F(A)} (left triangle)
```
For each object B ∈ 𝒟:
```
G(ε_B) ∘ η_{G(B)} = id_{G(B)} (right triangle)
```
**⚠️ CRITICAL NOTATION WARNING**:
❌ **INCORRECT**: Writing "(ε_F ∘ F(η)) = id_F" treats natural transformations as if they were functors
✓ **CORRECT**: For each A ∈ 𝒞: ε_{F(A)} ∘ F(η_A) = id_{F(A)}
✓ **CORRECT**: For each B ∈ 𝒟: G(ε_B) ∘ η_{G(B)} = id_{G(B)}
These are equations between **morphisms** in 𝒟 and 𝒞 respectively, NOT equations between functors. The subscripts index components of natural transformations. Each component must be verified individually. Sloppy notation conflates natural transformations with functors, obscures the componentwise structure, and causes errors in Beck's monadicity theorem and size considerations in large categories.
**Equivalent characterization**: Natural bijection
```
φ_{A,B}: Hom_𝒟(F(A), B) ≅ Hom_𝒞(A, G(B))
```
natural in both A and B, with φ and φ⁻¹ inverse bijections.
**Relationship between characterizations**:
- Given unit/counit: φ(f: F(A) → B) = G(f) ∘ η_A
- Given hom-bijection: η_A = φ⁻¹(id_{G(F(A))}), ε_B = φ(id_{F(G(B))})
**Size considerations**: The hom-bijection requires 𝒞, 𝒟 locally small (otherwise Hom-sets are proper classes). This is essential for:
- Yoneda lemma applications (representability)
- Beck's monadicity theorem (requires local smallness)
- Kan extensions as adjoints
**Monadicity context**: If U: 𝒟 → 𝒞 creates coequalizers of U-split pairs and has a left adjoint F, then 𝒟 ≃ 𝒞^T where T = UF is the induced monad (Beck's theorem). Verifying componentwise triangle identities is essential for proving monadicity in practice.
**Verification Template**:
```
To prove F ⊣ G:
Method 1 (unit-counit):
1. Define η_A: A → GF(A) for all A ∈ 𝒞
2. Define ε_B: FG(B) → B for all B ∈ 𝒟
3. Verify naturality of η: for f: A → A', G(F(f)) ∘ η_A = η_A' ∘ f
4. Verify naturality of ε: for g: B → B', g ∘ ε_B = ε_B' ∘ F(G(g))
5. Check left triangle: for each A, ε_{F(A)} ∘ F(η_A) = id_{F(A)}
6. Check right triangle: for each B, G(ε_B) ∘ η_{G(B)} = id_{G(B)}
Method 2 (hom-isomorphism):
1. Define φ: Hom_𝒟(F(A), B) → Hom_𝒞(A, G(B))
2. Define φ⁻¹: Hom_𝒞(A, G(B)) → Hom_𝒟(F(A), B)
3. Verify φ ∘ φ⁻¹ = id and φ⁻¹ ∘ φ = id
4. Verify naturality in A: for f: A' → A, φ_{A,B}(h ∘ F(f)) = φ_{A',B}(h) ∘ f
5. Verify naturality in B: for g: B → B', φ_{A,B'}(g ∘ h) = G(g) ∘ φ_{A,B}(h)
```
**Common adjunctions**:
- Free-forgetful: F: Set ⇄ Grp : U (free group ⊣ underlying set)
- Tensor-hom: -⊗A ⊣ Hom(A,-) in monoidal closed categories
- Direct/inverse image: f* ⊣ f_* for continuous f: X → Y (sheaf theory)
- Quantifiers: ∃_f ⊣ f* ⊣ ∀_f in categorical logic
### 4. Limits and Colimits
**Limit**: Given diagram D: 𝒥 → 𝒞, a limit is a terminal cone to D
- Cone: object L with morphisms π_j: L → D(j) making all diagrams commute
- Universal property: for any other cone (K, ψ_j), ∃! u: K → L factoring through π_j
**Common Examples**:
- Terminal object (limit of empty diagram)
- Products A × B (limit of discrete diagram {A, B})
- Equalizers (limit of parallel pair f,g: A ⇉ B)
- Pullbacks (limit of cospan A → C ← B)
**Colimit**: Dual notion (initial cocone from D)
**Verification Template**:
```
To verify L is a limit of D:
1. Specify cone morphisms π_j: L → D(j)
2. Check commutativity: for all α: j → k in 𝒥,
D(α) ∘ π_j = π_k
3. Universal property: given any cone (K, ψ_j),
construct unique u: K → L such that π_j ∘ u = ψ_j
4. Verify uniqueness of u
```
### 5. Monoidal Categories
**Definition**: (𝒞, ⊗, I) consists of:
- Bifunctor ⊗: 𝒞 × 𝒞 → 𝒞 (tensor product)
- Unit object I
- Natural isomorphisms:
- α: (A ⊗ B) ⊗ C → A ⊗ (B ⊗ C) (associator)
- λ: I ⊗ A → A (left unitor)
- ρ: A ⊗ I → A (right unitor)
Satisfying pentagon (Mac Lane coherence) and triangle axioms.
**Pentagon Axiom**: For A,B,C,D composable, this diagram commutes:
```
((A⊗B)⊗C)⊗D --α--> (A⊗B)⊗(C⊗D)
| |
α α
| |
v v
(A⊗(B⊗C))⊗D A⊗(B⊗(C⊗D))
| |
α⊗id id⊗α
| |
v v
A⊗((B⊗C)⊗D) ----α----> A⊗(B⊗(C⊗D))
```
**Triangle Axiom**: For A,B, relates α, λ, ρ
**Symmetric monoidal**: Add braiding β: A ⊗ B → B ⊗ A satisfying hexagon axioms
**Closed monoidal**: Add internal hom [A, B] with natural isomorphism:
```
Hom(A ⊗ B, C) ≅ Hom(A, [B, C])
```
**String diagrams**: Graphical calculus for monoidal categories
- Objects → Wires (vertical lines)
- Morphisms → Boxes/nodes
- Composition → Vertical stacking
- Monoidal product → Horizontal juxtaposition
- Topology determines equality (isotopy invariance)
### 6. Enriched Categories
**Definition**: 𝒞 enriched over monoidal category (𝒱, ⊗, I) has:
- Hom-objects Hom(A,B) ∈ Ob(𝒱) (not sets!)
- Composition morphism: Hom(B,C) ⊗ Hom(A,B) → Hom(A,C) in 𝒱
- Identity morphism: I → Hom(A,A) in 𝒱
Satisfying associativity and identity coherence in 𝒱.
**Common enrichments**:
- Poset-enriched: Hom(A,B) ∈ {⊥, ⊤} (preorders)
- Ab-enriched: Hom(A,B) are abelian groups (preadditive categories)
- Cat-enriched: Hom(A,B) are small categories (2-categories)
### 7. Elementary Toposes
**❌ INCORRECT DEFINITION** (common error):
"Cartesian closed category with finite colimits"
**✓ CORRECT DEFINITION**:
An **elementary topos** 𝓔 is a category with:
1. **All finite limits**
- Terminal object 1
- Binary products A × B
- Equalizers of parallel pairs f,g: A ⇉ B
2. **Exponentials** (cartesian closedness)
- For all A,B ∈ 𝓔, exists B^A with evaluation ev: B^A × A → B
- Universal property: For any f: C × A → B, unique λ(f): C → B^A with f = ev ∘ (λ(f) × id_A)
3. **Subobject Classifier** Ω
- Distinguished object Ω with morphism true: 1 → Ω
- Universal property: For every monic m: S ↪ A, exists unique χ_m: A → Ω (characteristic morphism of m) making:
```
S --------!-------> 1
| |
m true
| |
v v
A ------χ_m-------> Ω
```
a pullback square.
- Conversely: Every such pullback defines a monic
- Establishes bijection: {monics into A} ↔ {morphisms A → Ω}
**Key Consequences**:
- **Power objects exist**: Ω^A ≅ Sub(A) (subobjects of A)
- **Finite colimits are derivable** (via internal logic, NOT axioms!)
- Initial object, coproducts, coequalizers constructed from limits, exponentials, and Ω
- **Internal logic is intuitionistic** (Mitchell-Bénabou language)
- Ω acts as "truth values" object
- Logical operations: ∧, ∨, →, ⊥, ⊤ are morphisms in 𝓔
- NOT Boolean in general (Law of excluded middle fails)
**Examples**:
1. **Set** (prototypical topos)
- Ω = {0, 1} or {false, true}
- true: {*} → {0,1} sends * ↦ 1
- χ_S: A → {0,1} is indicator function: χ_S(a) = 1 iff a ∈ S
2. **Sh(X)** (sheaves on topological space X)
- Ω = "sheaf of truth values" (open sets with restrictions)
- Ω(U) = {opens V ⊆ U}
- Realizes topological intuition: "truth varies by location"
3. **Set^{𝒞^op}** (presheaves on category 𝒞)
- Ω(C) = {sieves on C} (right-closed subfunctors of Hom(−, C))
- Basis for Grothendieck topology
**❌ NON-EXAMPLE** (Counterexample):
**FinSet** (category of finite sets):
- ✓ Has finite limits (products, equalizers)
- ✓ Is cartesian closed (exponentials exist: B^A is set of functions)
- ✓ Has finite colimits (unions, coproducts)
- ✗ Does NOT have subobject classifier
**Why FinSet fails**:
- Would need Ω such that {subsets of A} ↔ {functions A → Ω}
- For infinite A, this requires Ω to have size |P(A)|
- But FinSet requires Ω to be finite!
- Contradiction: Cannot represent arbitrary subsets of infinite sets with finite Ω
This counterexample proves that "cartesian closed + finite colimits" is insufficient for a topos. The subobject classifier Ω is **essential** and cannot be derived from other axioms.
**Grothendieck Toposes** (Related but distinct):
A **Grothendieck topos** is a category equivalent to Sh(𝒞, J) (sheaves on site):
- Site = (𝒞, J) where J is Grothendieck topology (coverage)
- J assigns to each C a collection of covering sieves
- Sheaf condition: Gluing axiom for covers
**Relationship**:
- Every Grothendieck topos is an elementary topos
- NOT conversely: Elementary toposes need not come from sites
- Grothendieck version emphasizes sheaf theory, sites, descent
- Elementary version emphasizes logic, power objects, internal language
**Internal logic applications**:
- Topos structure enables intuitionistic logic via Ω (propositions as subobjects of 1)
- Mitchell-Bénabou language for higher-order reasoning
- Kripke-Joyal semantics for forcing (truth relative to objects as "stages")
**Applications**:
- Algebraic geometry (étale topos)
- Categorical logic (intuitionistic type theory)
- Forcing and independence results
- Synthetic differential geometry
### 8. Higher Categories
**2-Category (strict)**: Categories with 2-cells (natural transformations)
- Objects, 1-cells (functors), 2-cells (natural transformations)
- Horizontal composition (α ∗ β) and vertical composition (α · β)
- Interchange law: (α' · α) ∗ (β' · β) = (α' ∗ β') · (α ∗ β)
- **Pasting diagrams**: All compositions of 2-cells commute when boundaries match
- **String diagrams**: Graphical calculus where topology determines equality
**Bicategory** (weak 2-category): Composition and identities hold up to coherent isomorphisms
- **Associator**: α_{f,g,h}: (h∘g)∘f ⇒ h∘(g∘f) (invertible 2-cell, not identity)
- **Left/right unitors**: λ_f: id_B ∘ f ⇒ f and ρ_f: f ∘ id_A ⇒ f
- **Pentagon coherence**: For composable f,g,h,k, the pentagon of associators commutes:
```
((k∘h)∘g)∘f ---α---> (k∘h)∘(g∘f)
| |
α α
| |
v v
(k∘(h∘g))∘f k∘(h∘(g∘f))
| |
α∘id id∘α
| |
v v
k∘((h∘g)∘f) ----α----> k∘(h∘(g∘f))
```
- **Triangle coherence**: For f,g, the triangle identity diagram commutes:
```
(f∘id)∘g ----α----> f∘(id∘g)
\ |
\ |
ρ∘id id∘λ
\ |
\ v
----===----> f∘g
```
- **Strictification**: Every bicategory is biequivalent to a strict 2-category (Mac Lane-Paré coherence)
**Pasting Diagrams** (computational tool for 2-categories):
```
A --f--> B --g--> C
| | |
h k l
| α | β |
v v v
D --m--> E --n--> F
```
Composition rules:
- **Vertical** (∘): Compose along objects (α;β when target of α = source of β)
- **Horizontal** (⊗): Compose along 1-morphisms (α⊗β in parallel)
- **Interchange**: (α⊗β);(γ⊗δ) = (α;γ)⊗(β;δ) when composable
**Gray-categories** (semi-strict 3-categories): Composition strictly associative, but interchange laws hold up to isomorphism
- Intermediate between strict and weak 3-categories
- **Gray tensor product**: Monoidal structure on 2-Cat encoding "lax composition"
**Tricategories** (weak 3-categories):
- Objects, 1-cells, 2-cells, 3-cells (modifications)
- **Pentagonator**: 3-cell witnessing coherence of four associators (Mac Lane's pentagon one dimension up)
- Every tricategory is triequivalent to a Gray-category (Power's coherence theorem)
**n-Categories**: Generalizes to n levels of cells
- **Strict n-category**: All compositions strictly associative, identities strict, interchange laws hold as equalities
- **Weak n-category**: Associativity/identity up to (k-1)-cells for k ≤ n, with coherence axioms at each level
- **Semistrict**: Some structure strict, some weak (e.g., composition strict but identity weak)
**∞-Categories** (models for homotopy-coherent mathematics):
- **Quasi-categories** (Joyal-Lurie): Simplicial sets with inner horn fillers (Λᵏₙ → X extends to Δⁿ → X for 0 < k < n)
- 0-simplices: objects
- 1-simplices: morphisms
- 2-simplices: homotopies/commutative triangles
- n-simplices: higher coherence data
- Models (∞,1)-categories (all n≥2 morphisms are equivalences)
- **Complete Segal spaces** (Rezk): Simplicial spaces satisfying Segal and completeness conditions
- **Simplicially enriched categories**: Categories enriched over sSet (Dwyer-Kan model)
- **All models equivalent** via Quillen equivalences of model structures
**Orientals**: Simplicial sets O[n] encoding pasting schemes
- O[0] = point
- O[1] = arrow
- O[2] = commutative triangle
- O[n] = coherent n-fold composition
**Strictification Theorems and Limitations**:
- **n ≤ 1**: All weak categories equivalent to strict (posets, groupoids)
- **n = 2**: Bicategories ≃ strict 2-categories (Mac Lane-Paré)
- **n = 3**: Tricategories ≃ Gray-categories (Power), partial strictification
- **n ≥ 4**: ❌ **Simpson's conjecture disproven** (Lack et al.) - weak n-categories strictly richer than strict ones; full strictification IMPOSSIBLE
- **∞-categories**: Inherently weak, no global strictification possible
**Coherence Theorems**: In weak n-categories, all pasting diagrams of canonical cells commute up to canonical higher cells. This allows proof simplification by "assuming strictness locally."
**Mac Lane Coherence Theorem** (Monoidal Categories):
- In monoidal category, "all diagrams of canonical isomorphisms commute"
- Precise statement: Every diagram built from α, λ, ρ (associator, unitors) commutes
- Equivalently: Free monoidal category on one object is poset
### 9. Operads
**Non-Symmetric Operads** (Basic Definition):
A **non-symmetric operad** 𝓞 in symmetric monoidal category (𝒱,⊗,I) consists of:
1. **Objects**: 𝓞(n) ∈ 𝒱 for each arity n ≥ 0
- 𝓞(n) represents "n-ary operations"
2. **Composition**: Multilinear maps
γ: 𝓞(k) ⊗ 𝓞(n₁) ⊗ ... ⊗ 𝓞(nₖ) → 𝓞(n₁ + ... + nₖ)
Intuition: Given k-ary operation and operations for each input, compose to get (n₁+...+nₖ)-ary operation
3. **Unit**: Element id ∈ 𝓞(1) (identity operation)
**Axioms**:
1. **Associativity**: Iterated compositions associative
2. **Unit**: Composing with id doesn't change operation
**Examples** (non-symmetric):
- **Associative operad** 𝓐ss: 𝓐ss(n) = 𝟙 (single n-ary operation)
- Encodes associative (non-commutative) algebras
- **Endomorphism operad**: End_X(n) = Hom(X^⊗n, X)
- Operations are actual morphisms in 𝒱
**Symmetric Operads** (With Permutations):
A **symmetric operad** has additional structure:
4. **Symmetric group actions**: Right action of Σ_n on 𝓞(n)
- σ ∈ Σ_n acts on 𝓞(n)
- Intuition: Permute inputs of n-ary operations
5. **Equivariance**: Composition respects permutations
**Examples** (symmetric):
- **Commutative operad** 𝓒om: 𝓒om(n) = 𝟙 with Σ_n acting trivially
- Encodes commutative algebras
- **E_∞ operad**: Contractible Σ_n-spaces
- "Maximally commutative" up to homotopy
**Key Distinction**:
```
Non-symmetric: Order of inputs matters (e.g., matrix mul