Documentation

Mathlib.CategoryTheory.Profunctor.Basic

Profunctors #

A profunctor from a category C to a category D is a functor from C to a category of presheaves of sets on D. We define this as Profunctor.{w} C D := C ⥤ Dᵒᵖ ⥤ Type w.

This file provides convenient constructors ProfunctorCore and ProfunctorCore.Hom for profunctors and natural transformations between them. We also define the identity profunctor Profunctor.id as the Yoneda bifunctor, the opposite of a profunctor, the ulift of a profunctor, whiskering of a profunctor with functors, and the profunctors in both directions corresponding to a functor C ⥤ D (see Functor.toProfunctor and Functor.toProfunctorFlip).

Future work #

structure CategoryTheory.ProfunctorCore (C : Type u₁) (D : Type u₂) [Category.{v₁, u₁} C] [Category.{v₂, u₂} D] :
Type (max (max (max (max u₁ u₂) v₁) v₂) (w + 1))

Custom structure to construct profunctors, i.e. bifunctors C ⥤ Dᵒᵖ ⥤ Type w.

Instances For
    @[reducible, inline]
    abbrev CategoryTheory.Profunctor (C : Type u₁) (D : Type u₂) [Category.{v₁, u₁} C] [Category.{v₂, u₂} D] :
    Type (max v₁ (max u₂ w) u₁ (max (max (w + 1) u₂) w) v₂)

    A profunctor from C to D (Profunctor.{w} C D) is a bifunctor C ⥤ Dᵒᵖ ⥤ Type w.

    Equations
    Instances For
      @[reducible, inline]

      Typecheck a bifunctor C ⥤ Dᵒᵖ ⥤ Type w as a profunctor.

      Equations
      Instances For

        Custom structure to construct natural transformations between profunctors, see CategoryTheory.Profunctor.ofHom.

        Instances For
          @[simp]
          theorem CategoryTheory.ProfunctorCore.Hom.naturality_assoc {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₂, u₂} D] {P Q : ProfunctorCore.{w, v₁, v₂, u₁, u₂} C D} (self : P.Hom Q) X X' : C Y Y' : D (f : X X') (g : Y Y') {Z : Type w} (h : Q.obj X' Y Z) :

          Construct a profunctor from a ProfunctorCore.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            @[simp]
            @[simp]
            theorem CategoryTheory.Profunctor.ofCore_obj_map {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₂, u₂} D] (P : ProfunctorCore.{w, v₁, v₂, u₁, u₂} C D) (X : C) {X✝ Y✝ : Dᵒᵖ} (f : X✝ Y✝) :

            Construct a natural transformation between profunctors from a ProfunctorCore.Hom.

            Equations
            Instances For

              The identity profunctor from C to C. This is defined as the Yoneda bifunctor.

              Equations
              Instances For
                @[simp]
                theorem CategoryTheory.Profunctor.id_obj_map {C : Type u₁} [Category.{v₁, u₁} C] (X : C) {X✝ Y✝ : Cᵒᵖ} (f : X✝ Y✝) :
                @[simp]
                theorem CategoryTheory.Profunctor.id_map_app {C : Type u₁} [Category.{v₁, u₁} C] {X✝ Y✝ : C} (f : X✝ Y✝) (x✝ : Cᵒᵖ) :

                The opposite of a profunctor.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  @[simp]
                  @[simp]
                  theorem CategoryTheory.Profunctor.op_obj_map {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₂, u₂} D] (P : Profunctor.{w, v₁, v₂, u₁, u₂} C D) (X : Dᵒᵖ) {X✝ Y✝ : Cᵒᵖᵒᵖ} (f : X✝ Y✝) :
                  (P.op.obj X).map f = (P.map f.unop.unop).app X

                  Whisker a profunctor from C to D with functors into C and D.

                  Equations
                  Instances For
                    @[simp]
                    theorem CategoryTheory.Profunctor.whiskerLeft₂_map_app {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₂, u₂} D] {A : Type u_1} {B : Type u_2} [Category.{v_1, u_1} A] [Category.{v_2, u_2} B] (P : Profunctor.{w, v₁, v₂, u₁, u₂} C D) (F : Functor A C) (G : Functor B D) {X✝ Y✝ : A} (f : X✝ Y✝) (X : Bᵒᵖ) :
                    ((P.whiskerLeft₂ F G).map f).app X = (P.map (F.map f)).app (Opposite.op (G.obj (Opposite.unop X)))
                    @[simp]
                    theorem CategoryTheory.Profunctor.whiskerLeft₂_obj_obj {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₂, u₂} D] {A : Type u_1} {B : Type u_2} [Category.{v_1, u_1} A] [Category.{v_2, u_2} B] (P : Profunctor.{w, v₁, v₂, u₁, u₂} C D) (F : Functor A C) (G : Functor B D) (X : A) (X✝ : Bᵒᵖ) :
                    ((P.whiskerLeft₂ F G).obj X).obj X✝ = (P.obj (F.obj X)).obj (Opposite.op (G.obj (Opposite.unop X✝)))
                    @[simp]
                    theorem CategoryTheory.Profunctor.whiskerLeft₂_obj_map {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₂, u₂} D] {A : Type u_1} {B : Type u_2} [Category.{v_1, u_1} A] [Category.{v_2, u_2} B] (P : Profunctor.{w, v₁, v₂, u₁, u₂} C D) (F : Functor A C) (G : Functor B D) (X : A) {X✝ Y✝ : Bᵒᵖ} (f : X✝ Y✝) :
                    ((P.whiskerLeft₂ F G).obj X).map f = (P.obj (F.obj X)).map (G.map f.unop).op
                    @[simp]
                    theorem CategoryTheory.Profunctor.ulift_map_app {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₂, u₂} D] (P : Profunctor.{w, v₁, v₂, u₁, u₂} C D) {X✝ Y✝ : C} (f : X✝ Y✝) (X : Dᵒᵖ) :
                    @[simp]
                    theorem CategoryTheory.Profunctor.ulift_obj_map {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₂, u₂} D] (P : Profunctor.{w, v₁, v₂, u₁, u₂} C D) (X : C) {X✝ Y✝ : Dᵒᵖ} (f : X✝ Y✝) :
                    @[reducible, inline]

                    Increase the universe level of a profunctor by one. This enables dot notation P.ulift1, which is not possible with Profunctor.ulift.

                    Equations
                    Instances For

                      Given a functor from C to D, this is the corresponding profunctor from C to D.

                      Equations
                      Instances For
                        @[simp]
                        theorem CategoryTheory.Functor.toProfunctor_obj_map {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₂, u₂} D] (F : Functor C D) (X : C) {X✝ Y✝ : Dᵒᵖ} (f : X✝ Y✝) :
                        @[simp]
                        theorem CategoryTheory.Functor.toProfunctor_map_app {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₂, u₂} D] (F : Functor C D) {X✝ Y✝ : C} (f : X✝ Y✝) (X : Dᵒᵖ) :
                        @[simp]
                        theorem CategoryTheory.Functor.toProfunctor_obj_obj {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₂, u₂} D] (F : Functor C D) (X : C) (X✝ : Dᵒᵖ) :
                        (F.toProfunctor.obj X).obj X✝ = (Opposite.unop X✝ F.obj X)

                        Given a functor from C to D, this is the corresponding profunctor from D to C.

                        Equations
                        Instances For
                          @[simp]
                          theorem CategoryTheory.Functor.toProfunctorRev_obj_map {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₂, u₂} D] (F : Functor C D) (X : D) {X✝ Y✝ : Cᵒᵖ} (f : X✝ Y✝) :
                          @[simp]
                          theorem CategoryTheory.Functor.toProfunctorRev_map_app {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₂, u₂} D] (F : Functor C D) {X✝ Y✝ : D} (f : X✝ Y✝) (X : Cᵒᵖ) :
                          @[simp]
                          theorem CategoryTheory.Functor.toProfunctorRev_obj_obj {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₂, u₂} D] (F : Functor C D) (X : D) (X✝ : Cᵒᵖ) :
                          (F.toProfunctorRev.obj X).obj X✝ = (F.obj (Opposite.unop X✝) X)