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.

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

    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
            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