Module 4: The Yoneda Lemma
The Yoneda Lemma is one of the most fundamental results in category theory. It states that an object is completely determined by how other objects map into it — a mathematical formalization of the principle that something is defined entirely by its relationships, not its internal constitution. This module proves the lemma in full, explores its consequences for the Yoneda embedding, and connects the result to the engineering practice of interface-based specification: if two objects have the same interface (same hom-sets), they are the same object.
Learning Objectives
- Define representable functors and the hom-functor hom(c, −) for a fixed object c.
- State and prove the Yoneda Lemma: Nat(hom(c, −), F) ≅ F(c).
- Explain the Yoneda embedding as a fully faithful functor C → [C^op, Set].
- Apply Yoneda to conclude that two objects with isomorphic hom-sets are themselves isomorphic.
- Connect the Yoneda principle to interface-based specification in software engineering.
- Recognize the Yoneda Lemma as a categorical generalization of Cayley's theorem for groups.
Materials
Key Concepts
- Representable Functor: A functor F: C → Set that is naturally isomorphic to hom(c, −) for some object c ∈ C; the functor "represented" by c.
- Hom-Functor: hom(c, −): C → Set maps each object d to the set of morphisms from c to d, and each morphism f: d → e to post-composition with f.
- Yoneda Lemma: For any functor F: C → Set and object c ∈ C, there is a natural bijection Nat(hom(c, −), F) ≅ F(c); natural transformations from the hom-functor are in bijection with elements of F(c).
- Yoneda Embedding: The fully faithful functor y: C → [C^op, Set] sending each object c to its representable functor hom(−, c); embeds C into its presheaf category without loss of information.
- Fully Faithful Functor: A functor that induces bijections on all hom-sets; preserves and reflects all structure; an embedding in the categorical sense.
- Specification by Interface: An object is completely determined by the morphisms into and out of it; implementing any interface uniquely specifies the object up to isomorphism.
Central Concepts from Prerequisites
- Modules 2–3: categories, functors, natural transformations
- Abstract algebra: Cayley's theorem — every group embeds into a permutation group
- Software engineering: interface specifications, abstract data types