Documentation

Mathlib.CategoryTheory.Monad.Adjunction

Adjunctions and (co)monads #

We develop the basic relationship between adjunctions and (co)monads.

Given an adjunction h : LR, we have h.toMonad : Monad C and h.toComonad : Comonad D. We then have Monad.comparison (h : L ⊣ R) : D ⥤ h.toMonad.algebra sending Y : D to the Eilenberg-Moore algebra for LR with underlying object R.obj X, and dually Comonad.comparison.

We say R : D ⥤ C is MonadicRightAdjoint, if it is a right adjoint and its Monad.comparison is an equivalence of categories. (Similarly for ComonadicLeftAdjoint.)

Finally we prove that reflective functors are MonadicRightAdjoint and coreflective functors are ComonadicLeftAdjoint.

def CategoryTheory.Adjunction.toMonad {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {L : Functor C D} {R : Functor D C} (h : L R) :

For a pair of functors L : C ⥤ D, R : D ⥤ C, an adjunction h : LR induces a monad on the category C.

Equations
    Instances For
      @[simp]
      theorem CategoryTheory.Adjunction.toMonad_coe {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {L : Functor C D} {R : Functor D C} (h : L R) :
      @[simp]
      theorem CategoryTheory.Adjunction.toMonad_η {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {L : Functor C D} {R : Functor D C} (h : L R) :
      def CategoryTheory.Adjunction.toComonad {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {L : Functor C D} {R : Functor D C} (h : L R) :

      For a pair of functors L : C ⥤ D, R : D ⥤ C, an adjunction h : LR induces a comonad on the category D.

      Equations
        Instances For
          @[simp]
          theorem CategoryTheory.Adjunction.toComonad_ε {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {L : Functor C D} {R : Functor D C} (h : L R) :
          @[simp]
          theorem CategoryTheory.Adjunction.toComonad_coe {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {L : Functor C D} {R : Functor D C} (h : L R) :

          The monad induced by the Eilenberg-Moore adjunction is the original monad.

          Equations
            Instances For

              The comonad induced by the Eilenberg-Moore adjunction is the original comonad.

              Equations
                Instances For
                  def CategoryTheory.Adjunction.unitAsIsoOfIso {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {L : Functor C D} {R : Functor D C} (adj : L R) (i : L.comp R Functor.id C) :

                  Given an adjunction LR, if LR is abstractly isomorphic to the identity functor, then the unit is an isomorphism.

                  Equations
                    Instances For
                      theorem CategoryTheory.Adjunction.isIso_unit_of_iso {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {L : Functor C D} {R : Functor D C} (adj : L R) (i : L.comp R Functor.id C) :
                      noncomputable def CategoryTheory.Adjunction.fullyFaithfulLOfCompIsoId {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {L : Functor C D} {R : Functor D C} (adj : L R) (i : L.comp R Functor.id C) :

                      Given an adjunction LR, if LR is isomorphic to the identity functor, then L is fully faithful.

                      Equations
                        Instances For
                          def CategoryTheory.Adjunction.counitAsIsoOfIso {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {L : Functor C D} {R : Functor D C} (adj : L R) (j : R.comp L Functor.id D) :

                          Given an adjunction LR, if RL is abstractly isomorphic to the identity functor, then the counit is an isomorphism.

                          Equations
                            Instances For
                              theorem CategoryTheory.Adjunction.isIso_counit_of_iso {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {L : Functor C D} {R : Functor D C} (adj : L R) (j : R.comp L Functor.id D) :
                              noncomputable def CategoryTheory.Adjunction.fullyFaithfulROfCompIsoId {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {L : Functor C D} {R : Functor D C} (adj : L R) (j : R.comp L Functor.id D) :

                              Given an adjunction LR, if RL is isomorphic to the identity functor, then R is fully faithful.

                              Equations
                                Instances For

                                  Given any adjunction LR, there is a comparison functor CategoryTheory.Monad.comparison R sending objects Y : D to Eilenberg-Moore algebras for LR with underlying object R.obj X.

                                  We later show that this is full when R is full, faithful when R is faithful, and essentially surjective when R is reflective.

                                  Equations
                                    Instances For
                                      @[simp]
                                      theorem CategoryTheory.Monad.comparison_obj_A {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {L : Functor C D} {R : Functor D C} (h : L R) (X : D) :
                                      ((comparison h).obj X).A = R.obj X
                                      @[simp]
                                      theorem CategoryTheory.Monad.comparison_obj_a {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {L : Functor C D} {R : Functor D C} (h : L R) (X : D) :
                                      ((comparison h).obj X).a = R.map (h.counit.app X)
                                      @[simp]
                                      theorem CategoryTheory.Monad.comparison_map_f {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {L : Functor C D} {R : Functor D C} (h : L R) {X✝ Y✝ : D} (f : X✝ Y✝) :
                                      ((comparison h).map f).f = R.map f

                                      The underlying object of (Monad.comparison R).obj X is just R.obj X.

                                      Equations
                                        Instances For
                                          @[simp]
                                          theorem CategoryTheory.Monad.comparisonForget_inv_app {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {L : Functor C D} {R : Functor D C} (h : L R) (x✝ : D) :
                                          @[simp]

                                          Given any adjunction LR, there is a comparison functor CategoryTheory.Comonad.comparison L sending objects X : C to Eilenberg-Moore coalgebras for LR with underlying object L.obj X.

                                          Equations
                                            Instances For
                                              @[simp]
                                              theorem CategoryTheory.Comonad.comparison_obj_a {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {L : Functor C D} {R : Functor D C} (h : L R) (X : C) :
                                              ((comparison h).obj X).a = L.map (h.unit.app X)
                                              @[simp]
                                              theorem CategoryTheory.Comonad.comparison_obj_A {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {L : Functor C D} {R : Functor D C} (h : L R) (X : C) :
                                              ((comparison h).obj X).A = L.obj X
                                              @[simp]
                                              theorem CategoryTheory.Comonad.comparison_map_f {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {L : Functor C D} {R : Functor D C} (h : L R) {X✝ Y✝ : C} (f : X✝ Y✝) :
                                              ((comparison h).map f).f = L.map f

                                              The underlying object of (Comonad.comparison L).obj X is just L.obj X.

                                              Equations
                                                Instances For
                                                  @[simp]
                                                  theorem CategoryTheory.Comonad.comparisonForget_inv_app {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {L : Functor C D} {R : Functor D C} (h : L R) (x✝ : C) :
                                                  @[simp]
                                                  class CategoryTheory.MonadicRightAdjoint {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] (R : Functor D C) :
                                                  Type (max (max (max u₁ u₂) v₁) v₂)

                                                  A right adjoint functor R : D ⥤ C is monadic if the comparison functor Monad.comparison R from D to the category of Eilenberg-Moore algebras for the adjunction is an equivalence.

                                                  Instances

                                                    The left adjoint functor to R given by [MonadicRightAdjoint R].

                                                    Equations
                                                      Instances For

                                                        The adjunction monadicLeftAdjoint RR given by [MonadicRightAdjoint R].

                                                        Equations
                                                          Instances For
                                                            class CategoryTheory.ComonadicLeftAdjoint {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] (L : Functor C D) :
                                                            Type (max (max (max u₁ u₂) v₁) v₂)

                                                            A left adjoint functor L : C ⥤ D is comonadic if the comparison functor Comonad.comparison L from C to the category of Eilenberg-Moore algebras for the adjunction is an equivalence.

                                                            Instances

                                                              The right adjoint functor to L given by [ComonadicLeftAdjoint L].

                                                              Equations
                                                                Instances For

                                                                  The adjunction LcomonadicRightAdjoint L given by [ComonadicLeftAdjoint L].

                                                                  Equations
                                                                    Instances For
                                                                      @[instance 100]

                                                                      Any reflective inclusion has a monadic right adjoint. cf Prop 5.3.3 of [Riehl][riehl2017]

                                                                      Equations
                                                                        @[instance 100]

                                                                        Any coreflective inclusion has a comonadic left adjoint. cf Dual statement of Prop 5.3.3 of [Riehl][riehl2017]

                                                                        Equations