ModernMath

LogicArtificialis

Tag 600X

Appears as Theorem 65.3 (Yoneda lemma) in Section 65, Representable functors and the Yoneda lemma.

CertifiedThis result is certified by a proof assistant: a formal library proves it, as stated or in greater generality, and its proofs are checked by machine. See Formalisation below. How results are flagged.

Theorem 65.3 Yoneda lemma Certified

Let \(\mathcal{C}\) be a locally small category, \(F\colon \mathcal{C}\to \mathbf{Set}\) a functor and \(c\) an object of \(\mathcal{C}\). The map

\[ \mathrm{Nat}(\mathcal{C}(c,-),F)\to Fc,\qquad \alpha \mapsto \alpha _c(1_c), \]

is a bijection, natural in \(c\) and in \(F\); its inverse sends \(x\in Fc\) to the natural transformation whose component at \(d\) is \(f\mapsto Ff(x)\) [ 229 , Theorem 2.2.4 ] . Dually, natural transformations \(\mathcal{C}(-,c)\Rightarrow F\) to a functor \(F\colon \mathcal{C}^{\mathrm{op}} \to \mathbf{Set}\) correspond to the elements of \(Fc\) [ 229 , Exercise 2.2.i ] . Riehl notes that the lemma first appeared in print in a paper of Grothendieck [ 229 , p. 57, footnote 7 ] .

Uses

  • Tag 600V: Definition 65.1 (Representable functor)
  • Tag 600M: Definition 63.4 (Functor categories)

Used by

Formalisation

Formalised in Mathlib, the community library of formalised mathematics for the Lean theorem prover. coyonedaEquiv is the bijection for functors C → Type, yonedaEquiv the dual one for presheaves; yonedaLemma states its naturality, as an isomorphism of functors on Cᵒᵖ × (Cᵒᵖ ⥤ Type).

CategoryTheory.coyonedaEquiv · documentation · source (Mathlib/CategoryTheory/Yoneda.lean, line 991)

/-- We have a type-level equivalence between natural transformations from the coyoneda embedding
and elements of `F.obj X.unop`, without any universe switching. -/
def coyonedaEquiv {X : C} {F : C ⥤ Type v₁} : (coyoneda.obj (op X) ⟶ F) ≃ F.obj X

-- Full signature:
CategoryTheory.coyonedaEquiv.{v₁, u₁} {C : Type u₁} [CategoryTheory.Category.{v₁, u₁} C] {X : C}
  {F : CategoryTheory.Functor C (Type v₁)} : (CategoryTheory.coyoneda.obj (Opposite.op X) ⟶ F) ≃ F.obj X

Lean checks this def; the axioms it rests on: propext, Classical.choice, Quot.sound.

Reproduced from Mathlib, Mathlib/CategoryTheory/Yoneda.lean at commit 02a839b (Copyright (c) 2017 Kim Morrison; authors: Kim Morrison), under the Apache License 2.0.

CategoryTheory.yonedaEquiv · documentation · source (Mathlib/CategoryTheory/Yoneda.lean, line 717)

/-- We have a type-level equivalence between natural transformations from the yoneda embedding
and elements of `F.obj X`, without any universe switching. -/
def yonedaEquiv {X : C} {F : Cᵒᵖ ⥤ Type v₁} : (yoneda.obj X ⟶ F) ≃ F.obj (op X)

-- Full signature:
CategoryTheory.yonedaEquiv.{v₁, u₁} {C : Type u₁} [CategoryTheory.Category.{v₁, u₁} C] {X : C}
  {F : CategoryTheory.Functor Cᵒᵖ (Type v₁)} : (CategoryTheory.yoneda.obj X ⟶ F) ≃ F.obj (Opposite.op X)

Lean checks this def; the axioms it rests on: propext, Classical.choice, Quot.sound.

Reproduced from Mathlib, Mathlib/CategoryTheory/Yoneda.lean at commit 02a839b (Copyright (c) 2017 Kim Morrison; authors: Kim Morrison), under the Apache License 2.0.

CategoryTheory.yonedaLemma · documentation · source (Mathlib/CategoryTheory/Yoneda.lean, line 831) · Stacks Project 001P

/-- The Yoneda lemma asserts that the Yoneda pairing
`(X : Cᵒᵖ, F : Cᵒᵖ ⥤ Type) ↦ (yoneda.obj (unop X) ⟶ F)`
is naturally isomorphic to the evaluation `(X, F) ↦ F.obj X`. -/
def yonedaLemma : yonedaPairing C ≅ yonedaEvaluation C

-- Full signature:
CategoryTheory.yonedaLemma.{v₁, u₁} (C : Type u₁) [CategoryTheory.Category.{v₁, u₁} C] :
  CategoryTheory.yonedaPairing C ≅ CategoryTheory.yonedaEvaluation C

Lean checks this def; the axioms it rests on: propext, Classical.choice, Quot.sound.

Reproduced from Mathlib, Mathlib/CategoryTheory/Yoneda.lean at commit 02a839b (Copyright (c) 2017 Kim Morrison; authors: Kim Morrison), under the Apache License 2.0.

In Lean, its proof rests on the formalisations of Definition 61.1 (Category), Definition 62.1 (Functor), Definition 63.1 (Natural transformation).

Link checked on 2026-11-29 against Mathlib at commit 02a839b. About the formalisations.

Proof tree

Everything this statement rests on, directly or through other statements, as declared in its source and in the sources of its proof. An arrow means that the second item uses the first; implied arrows are left out. Dashed boxes are results of other works that these statements and proofs cite. Click a node to open its tag, or open this tree in the interactive proof tree.

DefinitionTheoremPropositionCorollaryConjectureCited resultThis statementCertified by a proof assistantPublished in the literatureOnly in preprintsDefinition formalised in Lean

G thm:yoneda Thm. 65.3 Yoneda lemma def:category Def. 61.1 Category def:opposite-category Def. 61.4 Opposite category and duality def:category->def:opposite-category def:functor Def. 62.1 Functor def:opposite-category->def:functor def:hom-functors Def. 62.3 Hom functors and products of categories def:functor->def:hom-functors def:natural-transformation Def. 63.1 Natural transformation def:functor->def:natural-transformation def:representable-functor Def. 65.1 Representable functor def:hom-functors->def:representable-functor def:functor-category Def. 63.4 Functor categories def:natural-transformation->def:functor-category def:natural-transformation->def:representable-functor def:functor-category->thm:yoneda def:representable-functor->thm:yoneda cite:Riehl2016:Theorem 2.2.4 [229, Theorem 2.2.4] cite:Riehl2016:Theorem 2.2.4->thm:yoneda cite:Riehl2016:proof of Theorem 2.2.4 [229, proof of Theorem 2.2.4] cite:Riehl2016:proof of Theorem 2.2.4->thm:yoneda cite:Riehl2016:Lemma 1.7.1 and Corollary 1.7.2 [229, Lemma 1.7.1 and Corollary 1.7.2] cite:Riehl2016:Lemma 1.7.1 and Corollary 1.7.2->def:functor-category

How to cite

ModernMath, Tag 600X (Theorem 65.3 (Yoneda lemma)).