Documentation

Mathlib.CategoryTheory.Monad.Monadicity

Monadicity theorems #

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

G is a monadic right adjoint if it has a left adjoint, and:

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

Tags #

Beck, monadicity, descent

instance CategoryTheory.Monad.MonadicityInternal.main_pair_reflexive {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₁, u₂} D] {G : Functor D C} {F : Functor C D} (adj : F G) (A : adj.toMonad.Algebra) :
IsReflexivePair (F.map A.a) (adj.counit.app (F.obj A.A))

The "main pair" for an algebra (A, α) is the pair of morphisms (F α, ε_FA). It is always a reflexive pair, and will be used to construct the left adjoint to the comparison functor and show it is an equivalence.

instance CategoryTheory.Monad.MonadicityInternal.main_pair_G_split {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₁, u₂} D] {G : Functor D C} {F : Functor C D} (adj : F G) (A : adj.toMonad.Algebra) :
G.IsSplitPair (F.map A.a) (adj.counit.app (F.obj A.A))

The "main pair" for an algebra (A, α) is the pair of morphisms (F α, ε_FA). It is always a G-split pair, and will be used to construct the left adjoint to the comparison functor and show it is an equivalence.

noncomputable def CategoryTheory.Monad.MonadicityInternal.comparisonLeftAdjointObj {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₁, u₂} D] {G : Functor D C} {F : Functor C D} (adj : F G) (A : adj.toMonad.Algebra) [Limits.HasCoequalizer (F.map A.a) (adj.counit.app (F.obj A.A))] :
D

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

Equations
Instances For
    noncomputable def CategoryTheory.Monad.MonadicityInternal.comparisonLeftAdjointHomEquiv {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₁, u₂} D] {G : Functor D C} {F : Functor C D} (adj : F G) (A : adj.toMonad.Algebra) (B : D) [Limits.HasCoequalizer (F.map A.a) (adj.counit.app (F.obj A.A))] :

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

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      noncomputable def CategoryTheory.Monad.MonadicityInternal.leftAdjointComparison {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₁, u₂} D] {G : Functor D C} {F : Functor C D} (adj : F G) [∀ (A : adj.toMonad.Algebra), Limits.HasCoequalizer (F.map A.a) (adj.counit.app (F.obj A.A))] :

      Construct the adjunction to the comparison functor.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        noncomputable def CategoryTheory.Monad.MonadicityInternal.comparisonAdjunction {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₁, u₂} D] {G : Functor D C} {F : Functor C D} (adj : F G) [∀ (A : adj.toMonad.Algebra), Limits.HasCoequalizer (F.map A.a) (adj.counit.app (F.obj A.A))] :

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

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          @[simp]
          theorem CategoryTheory.Monad.MonadicityInternal.comparisonAdjunction_counit {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₁, u₂} D] {G : Functor D C} {F : Functor C D} (adj : F G) [∀ (A : adj.toMonad.Algebra), Limits.HasCoequalizer (F.map A.a) (adj.counit.app (F.obj A.A))] :
          (comparisonAdjunction adj).counit = { app := fun (Y : D) => (Limits.Cofork.IsColimit.homIso (Limits.colimit.isColimit (Limits.parallelPair (F.map (G.map (adj.counit.app Y))) (adj.counit.app (F.obj (G.obj Y))))) Y).symm (adj.homEquiv (G.obj Y) Y).symm (CategoryStruct.id (G.obj Y)), , naturality := }
          noncomputable def CategoryTheory.Monad.MonadicityInternal.unitCofork {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₁, u₂} D] {G : Functor D C} {F : Functor C D} {adj : F G} (A : adj.toMonad.Algebra) [Limits.HasCoequalizer (F.map A.a) (adj.counit.app (F.obj A.A))] :
          Limits.Cofork (G.map (F.map A.a)) (G.map (adj.counit.app (F.obj A.A)))

          This is a cofork which is helpful for establishing monadicity: the morphism from the Beck coequalizer to this cofork is the unit for the adjunction on the comparison functor.

          Equations
          Instances For
            @[simp]
            theorem CategoryTheory.Monad.MonadicityInternal.unitCofork_pt {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₁, u₂} D] {G : Functor D C} {F : Functor C D} {adj : F G} (A : adj.toMonad.Algebra) [Limits.HasCoequalizer (F.map A.a) (adj.counit.app (F.obj A.A))] :
            (unitCofork A).pt = G.obj (Limits.coequalizer (F.map A.a) (adj.counit.app (F.obj A.A)))
            @[simp]
            theorem CategoryTheory.Monad.MonadicityInternal.unitCofork_π {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₁, u₂} D] {G : Functor D C} {F : Functor C D} {adj : F G} (A : adj.toMonad.Algebra) [Limits.HasCoequalizer (F.map A.a) (adj.counit.app (F.obj A.A))] :
            (unitCofork A).π = G.map (Limits.coequalizer.π (F.map A.a) (adj.counit.app (F.obj A.A)))
            def CategoryTheory.Monad.MonadicityInternal.counitCofork {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₁, u₂} D] {G : Functor D C} {F : Functor C D} (adj : F G) (B : D) :
            Limits.Cofork (F.map (G.map (adj.counit.app B))) (adj.counit.app (F.obj (G.obj B)))

            The cofork which describes the counit of the adjunction: the morphism from the coequalizer of this pair to this morphism is the counit.

            Equations
            Instances For
              @[simp]
              theorem CategoryTheory.Monad.MonadicityInternal.counitCofork_pt {C : Type u₁} {D : Type u₂} [Category.{v₁, u₁} C] [Category.{v₁, u₂} D] {G : Functor D C} {F : Functor C D} (adj : F G) (B : D) :
              (counitCofork adj B).pt = B

              The counit cofork is a colimit provided G reflects it.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                If G is monadic, it creates colimits of G-split pairs. This is the "boring" direction of Beck's monadicity theorem, the converse is given in monadicOfCreatesGSplitCoequalizers.

                Equations
                Instances For

                  Typeclass expressing that for all G-split pairs f,g, f and g have a coequalizer.

                  Instances

                    Typeclass expressing that for all G-split pairs f,g, G preserves colimits of parallelPair f g.

                    Instances

                      Typeclass expressing that for all G-split pairs f,g, G reflects colimits for parallelPair f g.

                      Instances

                        To show G is a monadic right adjoint, we can show it preserves and reflects G-split coequalizers, and D has them.

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

                          Typeclass expressing that for all G-split pairs f,g, G creates colimits of parallelPair f g.

                          Instances
                            @[implicit_reducible]
                            Equations
                            • One or more equations did not get rendered due to their size.

                            Beck's monadicity theorem: if G has a left adjoint and creates coequalizers of G-split pairs, then it is monadic. This is the converse of createsGSplitCoequalizersOfMonadic.

                            Equations
                            Instances For

                              An alternate version of Beck's monadicity theorem: if G reflects isomorphisms, preserves coequalizers of G-split pairs and C has coequalizers of G-split pairs, then it is monadic.

                              Equations
                              Instances For

                                Typeclass expressing that for all reflexive pairs f,g, G preserves colimits of parallelPair f g.

                                Instances

                                  Reflexive (crude) monadicity theorem. If G has a right adjoint, D has and G preserves reflexive coequalizers and G reflects isomorphisms, then G is monadic.

                                  Equations
                                  Instances For