Representable Functor

lean4-proofcategory-theoryvisualization
FHom(X,)F \cong \mathrm{Hom}(X, -)

Statement

A functor F:CSetF : \mathcal{C} \to \mathbf{Set} is representable if there exists an object XCX \in \mathcal{C} and a natural isomorphism:

F    Hom(X,)F \;\cong\; \mathrm{Hom}(X, -)

The object XX is called the representing object. By the Yoneda Lemma, such an isomorphism corresponds to a distinguished element uF(X)u \in F(X) (the universal element): every element of F(A)F(A) arises uniquely as F(f)(u)F(f)(u) for some f:XAf : X \to A.

Dually, F:CopSetF : \mathcal{C}^{\mathrm{op}} \to \mathbf{Set} is representable if FHom(,X)F \cong \mathrm{Hom}(-, X).

Visualization

Hom(Z,)\mathrm{Hom}(\mathbb{Z}, -) represents the underlying-set functor on Ab\mathbf{Ab}:

  In category Ab (abelian groups):

  Hom(ℤ, A) ≅ |A|  (underlying set of A)

  The bijection sends f : ℤ → A to f(1) ∈ A.
  Inverse: given a ∈ A, define f_a(n) = n·a.

  Example with A = ℤ/6ℤ:
  ┌────────────────────────────────────────────┐
  │  Hom(ℤ, ℤ/6ℤ)  ←→  {0,1,2,3,4,5}         │
  │  f₀ : n ↦ 0·n          ←→  0              │
  │  f₁ : n ↦ n mod 6      ←→  1              │
  │  f₂ : n ↦ 2n mod 6     ←→  2              │
  │  f₃ : n ↦ 3n mod 6     ←→  3              │
  │  f₄ : n ↦ 4n mod 6     ←→  4              │
  │  f₅ : n ↦ 5n mod 6     ←→  5              │
  └────────────────────────────────────────────┘

  Universal element: u = 1 ∈ ℤ  (the identity map id_ℤ corresponds to 1)

  Naturality: for φ : ℤ/6ℤ → ℤ/6ℤ, g ↦ φ(g(1)) = (φ∘g)(1)  ✓

Proof Sketch

  1. Yoneda gives the bijection: By the Yoneda Lemma, Nat(Hom(X,),F)F(X)\mathrm{Nat}(\mathrm{Hom}(X,-), F) \cong F(X). A representing object is one for which this set of natural isomorphisms is non-empty and the iso picks out the tautological one.

  2. The universal element characterises XX: The element u=αX(idX)F(X)u = \alpha_X(\mathrm{id}_X) \in F(X) for the natural isomorphism α\alpha is universal: for any AA and any aF(A)a \in F(A), there is a unique f:XAf : X \to A with F(f)(u)=aF(f)(u) = a.

  3. Representing objects are unique up to isomorphism: If (X,u)(X, u) and (X,u)(X', u') both represent FF, the universal property gives morphisms XXX \to X' and XXX' \to X that compose to identities.

  4. The yoneda embedding is fully faithful: This means Hom(X,Y)Nat(Hom(,X),Hom(,Y))\mathrm{Hom}(X, Y) \cong \mathrm{Nat}(\mathrm{Hom}(-,X), \mathrm{Hom}(-,Y)), so representable functors determine and are determined by their objects.

Connections

Representability is the conceptual core of the Yoneda LemmaYoneda LemmaNat(Hom(X,),F)F(X)\mathrm{Nat}(\mathrm{Hom}(X,-),\, F) \cong F(X)Natural transformations from a representable functor y_X to F biject with elements of F(X)Read more →. The universal property of free objects in Adjoint FunctorsAdjoint FunctorsHom(LX,Y)Hom(X,RY)\mathrm{Hom}(LX, Y) \cong \mathrm{Hom}(X, RY)A pair of functors L ⊣ R with a natural bijection Hom(LX, Y) ≅ Hom(X, RY)Read more → (free monoid, free group, etc.) can be phrased as: the underlying-set functor is representable, with the free object as representing object. Limits are also representable: Hom(X,limD)LimjHom(X,D(j))\mathrm{Hom}(X, \varprojlim D) \cong \mathrm{Lim}_j \mathrm{Hom}(X, D(j)) — see Limits and ColimitsLimits and ColimitslimDΔlimD\varprojlim D \dashv \Delta \dashv \varinjlim DUniversal cones over diagrams: limits generalize products and equalizers; colimits generalize coproducts and coequalizersRead more →.

Lean4 Proof

import Mathlib.CategoryTheory.Yoneda

open CategoryTheory

/-- The presheaf yoneda.obj X is representable (by X itself).
    Mathlib: the instance `IsRepresentable (yoneda.obj X)`. -/
theorem yoneda_obj_is_representable {C : Type*} [Category C] (X : C) :
    (yoneda.obj X).IsRepresentable :=
  inferInstance

/-- Any presheaf isomorphic to a representable is representable.
    Use `IsRepresentable.mk'` which takes a natural isomorphism witness. -/
theorem representable_of_iso {C : Type*} [Category C]
    {F : CᵒᵖType*} {X : C} (e : yoneda.obj XF) :
    F.IsRepresentable :=
  Functor.IsRepresentable.mk' e