You are what you relate to: representable functors and presheaves
"You are what you relate to." The Yoneda Lemma says that an object is completely determined by the collection of all morphisms into (or out of) it. It is the single most important result in category theory, and once you understand it, you see it everywhere.
Can you identify a mystery object just by knowing how it maps to other objects? Click each object below to reveal the hom-set Hom(?, X). Once all hom-sets are revealed, the mystery object's identity is uniquely determined — this is the essence of the Yoneda philosophy.
Key insight: An object is completely determined by its hom-sets — that is, by how it relates to every other object. Two objects with identical "relationship fingerprints" must be isomorphic. This is the philosophical core of the Yoneda Lemma.
The Yoneda embedding y : C → [Cᵒᵖ, Set] sends each object A to its representable presheaf Hom(A, −). This embedding is full and faithful, meaning it perfectly preserves all morphism information.
Key insight: The Yoneda embedding is full (every natural transformation between representable presheaves comes from a morphism) and faithful (different morphisms give different natural transformations). This means every category embeds into a functor category.
The Yoneda Lemma states: Nat(Hom(A,−), F) ≅ F(A), naturally in both A and F. Walk through the proof in both directions using the concrete example below.
We have a functor F and the representable presheaf Hom(A, -). We want to show that natural transformations Nat(Hom(A,-), F) correspond bijectively to elements of F(A).
Key insight: A natural transformation out of a representable functor is completely determined by a single value — its action on the identity morphism. Naturality forces all other components. The element alpha_A(id_A) ∈ F(A) is the "DNA" that uniquely encodes the entire natural transformation.
A presheaf on a category C is a functor P : Cᵒᵖ → Set. It assigns a set (a "fiber") to each object, and a restriction map to each morphism — going in the opposite direction. Think of it as a "fiber bundle" over the category.
Key insight: A presheaf is a "generalized object" that records a family of sets indexed by the category, with restriction maps going backwards (contravariant). The representable presheaves Hom(−, A) are the "basic building blocks" from which all presheaves are built.