Documentation

Mathlib.CategoryTheory.Monad.Comonadicity

Comonadicity theorems #

We prove comonadicity theorems which can establish a given functor is comonadic. In particular, we show three versions of Beck's comonadicity theorem, and the coreflexive (crude) comonadicity theorem:

F is a comonadic left adjoint if it has a right adjoint, and:

This file has been adapted from Mathlib/CategoryTheory/Monad/Monadicity.lean. Please try to keep them in sync.

Tags #

Beck, comonadicity, descent

The "main pair" for a coalgebra (A, α) is the pair of morphisms (G α, η_GA). It is always a coreflexive pair, and will be used to construct the left adjoint to the comparison functor and show it is an equivalence.

instance CategoryTheory.Comonad.ComonadicityInternal.main_pair_F_cosplit {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₁, u₂} D] {F : Functor C D} {G : Functor D C} (adj : F G) (A : adj.toComonad.Coalgebra) :
F.IsCosplitPair (G.map A.a) (adj.unit.app (G.obj A.A))

The "main pair" for a coalgebra (A, α) is the pair of morphisms (G α, η_GA). It is always a G-cosplit pair, and will be used to construct the right adjoint to the comparison functor and show it is an equivalence.

noncomputable def CategoryTheory.Comonad.ComonadicityInternal.comparisonRightAdjointObj {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₁, u₂} D] {F : Functor C D} {G : Functor D C} (adj : F G) (A : adj.toComonad.Coalgebra) [Limits.HasEqualizer (G.map A.a) (adj.unit.app (G.1 A.A))] :
C

The object function for the right adjoint to the comparison functor.

Instances For
    noncomputable def CategoryTheory.Comonad.ComonadicityInternal.comparisonRightAdjointHomEquiv {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₁, u₂} D] {F : Functor C D} {G : Functor D C} (adj : F G) (A : adj.toComonad.Coalgebra) (B : C) [Limits.HasEqualizer (G.map A.a) (adj.unit.app (G.obj A.A))] :

    We have a bijection of homsets which will be used to construct the right adjoint to the comparison functor.

    Instances For
      noncomputable def CategoryTheory.Comonad.ComonadicityInternal.rightAdjointComparison {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₁, u₂} D] {F : Functor C D} {G : Functor D C} (adj : F G) [∀ (A : adj.toComonad.Coalgebra), Limits.HasEqualizer (G.map A.a) (adj.unit.app (G.obj A.A))] :

      Construct the adjunction to the comparison functor.

      Instances For

        Provided we have the appropriate equalizers, we have an adjunction to the comparison functor.

        Instances For
          noncomputable def CategoryTheory.Comonad.ComonadicityInternal.counitFork {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₁, u₂} D] {F : Functor C D} {G : Functor D C} {adj : F G} (A : adj.toComonad.Coalgebra) [Limits.HasEqualizer (G.map A.a) (adj.unit.app (G.obj A.A))] :
          Limits.Fork (F.map (G.map A.a)) (F.map (adj.unit.app (G.obj A.A)))

          This is a fork which is helpful for establishing comonadicity: the morphism from this fork to the Beck equalizer is the counit for the adjunction on the comparison functor.

          Instances For
            @[simp]
            theorem CategoryTheory.Comonad.ComonadicityInternal.counitFork_pt {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₁, u₂} D] {F : Functor C D} {G : Functor D C} {adj : F G} (A : adj.toComonad.Coalgebra) [Limits.HasEqualizer (G.map A.a) (adj.unit.app (G.obj A.A))] :
            (counitFork A).pt = F.obj (Limits.equalizer (G.map A.a) (adj.unit.app (G.obj A.A)))
            @[simp]
            theorem CategoryTheory.Comonad.ComonadicityInternal.unitFork_ι {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₁, u₂} D] {F : Functor C D} {G : Functor D C} {adj : F G} (A : adj.toComonad.Coalgebra) [Limits.HasEqualizer (G.map A.a) (adj.unit.app (G.obj A.A))] :
            (counitFork A).ι = F.map (Limits.equalizer.ι (G.map A.a) (adj.unit.app (G.obj A.A)))
            def CategoryTheory.Comonad.ComonadicityInternal.unitFork {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₁, u₂} D] {F : Functor C D} {G : Functor D C} (adj : F G) (B : C) :
            Limits.Fork (G.map (F.map (adj.unit.app B))) (adj.unit.app (G.obj (F.obj B)))

            The fork which describes the unit of the adjunction: the morphism from this fork to the equalizer of this pair is the unit.

            Instances For
              @[simp]
              theorem CategoryTheory.Comonad.ComonadicityInternal.unitFork_pt {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₁, u₂} D] {F : Functor C D} {G : Functor D C} (adj : F G) (B : C) :
              (unitFork adj B).pt = B
              @[simp]
              theorem CategoryTheory.Comonad.ComonadicityInternal.unitFork_π_app {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₁, u₂} D] {F : Functor C D} {G : Functor D C} (adj : F G) (B : C) (X : Limits.WalkingParallelPair) :
              (unitFork adj B).π.app X = Limits.WalkingParallelPair.rec (motive := fun (t : Limits.WalkingParallelPair) => X = t → (B (Limits.parallelPair (G.map (F.map (adj.unit.app B))) (adj.unit.app (G.obj (F.obj B)))).obj X)) (fun (h : X = Limits.WalkingParallelPair.zero) => adj.unit.app B) (fun (h : X = Limits.WalkingParallelPair.one) => CategoryStruct.comp (adj.unit.app B) (G.map (F.map (adj.unit.app B)))) X

              The counit fork is a limit provided F preserves it.

              Instances For

                The unit fork is a limit provided F coreflects it.

                Instances For
                  @[implicit_reducible]

                  If F is comonadic, it creates limits of F-cosplit pairs. This is the "boring" direction of Beck's comonadicity theorem, the converse is given in comonadicOfCreatesFSplitEqualizers.

                  Instances For

                    Dual to Monad.HasCoequalizerOfIsSplitPair.

                    Instances

                      Dual to Monad.PreservesColimitOfIsSplitPair.

                      Instances

                        Dual to Monad.ReflectsColimitOfIsSplitPair.

                        Instances
                          @[implicit_reducible]

                          To show F is a comonadic left adjoint, we can show it preserves and reflects F-split equalizers, and C has them.

                          Instances For
                            class CategoryTheory.Comonad.CreatesLimitOfIsCosplitPair {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₁, u₂} D] (F : Functor C D) :
                            Type (max (max u₁ u₂) v₁)

                            Dual to Monad.CreatesColimitOfIsSplitPair.

                            Instances
                              @[implicit_reducible]

                              Beck's comonadicity theorem. If F has a right adjoint and creates equalizers of F-cosplit pairs, then it is comonadic. This is the converse of createsFSplitEqualizersOfComonadic.

                              Instances For
                                @[implicit_reducible]

                                An alternate version of Beck's comonadicity theorem. If F reflects isomorphisms, preserves equalizers of F-cosplit pairs and C has equalizers of F-cosplit pairs, then it is comonadic.

                                Instances For

                                  Dual to Monad.PreservesColimitOfIsReflexivePair.

                                  Instances
                                    @[implicit_reducible]

                                    Coreflexive (crude) comonadicity theorem. If F has a right adjoint, C has and F preserves coreflexive equalizers and F reflects isomorphisms, then F is comonadic.

                                    Instances For