mathlib documentation

category_theory.​yoneda

category_theory.​yoneda

The Yoneda embedding

The Yoneda embedding as a functor yoneda : C ⥤ (Cᵒᵖ ⥤ Type v₁), along with an instance that it is fully_faithful.

Also the Yoneda lemma, yoneda_lemma : (yoneda_pairing C) ≅ (yoneda_evaluation C).

@[simp]
theorem category_theory.​yoneda_obj_map {C : Type u₁} [category_theory.category C] (X : C) (Y Y' : Cᵒᵖ) (f : Y ⟶ Y') (g : opposite.unop Y ⟶ X) :

def category_theory.​yoneda {C : Type u₁} [category_theory.category C] :
C ⥤ Cᵒᵖ ⥤ Type v₁

Equations
@[simp]
theorem category_theory.​yoneda_map_app {C : Type u₁} [category_theory.category C] (X X' : C) (f : X ⟶ X') (Y : Cᵒᵖ) (g : {obj := λ (Y : Cᵒᵖ), opposite.unop Y ⟶ X, map := λ (Y Y' : Cᵒᵖ) (f : Y ⟶ Y') (g : opposite.unop Y ⟶ X), f.unop ≫ g, map_id' := _, map_comp' := _}.obj Y) :

@[simp]

@[simp]
theorem category_theory.​coyoneda_obj_map {C : Type u₁} [category_theory.category C] (X : Cᵒᵖ) (Y Y' : C) (f : Y ⟶ Y') (g : opposite.unop X ⟶ Y) :

def category_theory.​coyoneda {C : Type u₁} [category_theory.category C] :
Cᵒᵖ ⥤ C ⥤ Type v₁

Equations
@[simp]
theorem category_theory.​coyoneda_map_app {C : Type u₁} [category_theory.category C] (X X' : Cᵒᵖ) (f : X ⟶ X') (Y : C) (g : {obj := λ (Y : C), opposite.unop X ⟶ Y, map := λ (Y Y' : C) (f : Y ⟶ Y') (g : opposite.unop X ⟶ Y), g ≫ f, map_id' := _, map_comp' := _}.obj Y) :

@[simp]
theorem category_theory.​yoneda.​naturality {C : Type u₁} [category_theory.category C] {X Y : C} (α : category_theory.yoneda.obj X ⟶ category_theory.yoneda.obj Y) {Z Z' : C} (f : Z ⟶ Z') (h : Z' ⟶ X) :
f ≫ α.app (opposite.op Z') h = α.app (opposite.op Z) (f ≫ h)

def category_theory.​yoneda.​ext {C : Type u₁} [category_theory.category C] (X Y : C) (p : Π {Z : C}, (Z ⟶ X) → (Z ⟶ Y)) (q : Π {Z : C}, (Z ⟶ Y) → (Z ⟶ X)) :
(∀ {Z : C} (f : Z ⟶ X), q (p f) = f) → (∀ {Z : C} (f : Z ⟶ Y), p (q f) = f) → (∀ {Z Z' : C} (f : Z' ⟶ Z) (g : Z ⟶ X), p (f ≫ g) = f ≫ p g) → (X ≅ Y)

Extensionality via Yoneda. The typical usage would be

-- Goal is `X ≅ Y`
apply yoneda.ext,
-- Goals are now functions `(Z ⟶ X) → (Z ⟶ Y)`, `(Z ⟶ Y) → (Z ⟶ X)`, and the fact that these
functions are inverses and natural in `Z`.
Equations
@[simp]
theorem category_theory.​coyoneda.​naturality {C : Type u₁} [category_theory.category C] {X Y : Cᵒᵖ} (α : category_theory.coyoneda.obj X ⟶ category_theory.coyoneda.obj Y) {Z Z' : C} (f : Z' ⟶ Z) (h : opposite.unop X ⟶ Z') :
α.app Z' h ≫ f = α.app Z (h ≫ f)

@[class]
structure category_theory.​representable {C : Type u₁} [category_theory.category C] :
Cᵒᵖ ⥤ Type v₁ → Type (max u₁ v₁)

@[simp]