You are what you relate to: representable functors and presheaves
"You are what you relate to." The Yoneda Lemma says an object is completely pinned down by its arrows to and from everything else.
Click each object to reveal how the mystery object maps to it. Once every hom-set is showing, there is only one thing it can be.
"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.
Press Run Embedding to send each object to its presheaf, then click a presheaf to inspect it. No arrow information gets lost.
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.
Step forward and back through the proof. Watch one value, the image of the identity, determine everything else.
We have a functor F and the representable functor Hom(A, -). We want to show that natural transformations Nat(Hom(A,-), F) correspond bijectively to elements of F(A).
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.
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.
Click an object to see its set, then show the restriction maps and notice they run backwards along the arrows.
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.
Spot a mistake or have an idea?