Documentation

Mathlib.CategoryTheory.Monoidal.Mon_

The category of monoids in a monoidal category. #

We define monoids in a monoidal category C and show that the category of monoids is equivalent to the category of lax monoidal functors from the unit monoidal category to C. We also show that if C is braided, then the category of monoids is naturally monoidal. We use the to_additive attribute in order to generate a parallel API for additive monoids.

Simp set for monoid object tautologies #

In this file, we also provide a simp set called mon_tauto whose goal is to prove all tautologies about morphisms from some (tensor) power of M to M, where M is a (commutative) monoid object in a (braided) monoidal category.

Please read the documentation in Mathlib/Tactic/Attr/Register.lean for full details.

TODO #

A monoid object internal to a monoidal category.

When the monoidal category is preadditive, this is also sometimes called an "algebra object".

Instances
    def CategoryTheory.AddMonObj.termσ :
    Lean.ParserDescr

    The additiion morphism of an additive monoid object.

    Instances For

      The additiion morphism of an additive monoid object.

      Instances For
        def CategoryTheory.AddMonObj.termζ :
        Lean.ParserDescr

        The zero morphism of an additive monoid object.

        Instances For

          The zero morphism of an additive monoid object.

          Instances For
            def CategoryTheory.MonObj.termμ :
            Lean.ParserDescr

            The multiplication morphism of a monoid object.

            Instances For

              The multiplication morphism of a monoid object.

              Instances For
                def CategoryTheory.MonObj.termη :
                Lean.ParserDescr

                The unit morphism of a monoid object.

                Instances For

                  The unit morphism of a monoid object.

                  Instances For
                    @[implicit_reducible]
                    def CategoryTheory.MonObj.ofIso {C : Type u₁} [Category.{v₁, u₁} C] [MonoidalCategory C] {M X : C} [MonObj M] (e : M X) :

                    Transfer MonObj along an isomorphism.

                    Instances For
                      @[implicit_reducible]

                      Transfer AddMonObj along an isomorphism.

                      Instances For
                        theorem CategoryTheory.MonObj.ext {C : Type u₁} [Category.{v₁, u₁} C] [MonoidalCategory C] {X : C} (h₁ h₂ : MonObj X) (H : mul = mul) :
                        h₁ = h₂
                        theorem CategoryTheory.AddMonObj.ext {C : Type u₁} [Category.{v₁, u₁} C] [MonoidalCategory C] {X : C} (h₁ h₂ : AddMonObj X) (H : add = add) :
                        h₁ = h₂
                        theorem CategoryTheory.MonObj.ext_iff {C : Type u₁} [Category.{v₁, u₁} C] [MonoidalCategory C] {X : C} {h₁ h₂ : MonObj X} :
                        h₁ = h₂ mul = mul
                        theorem CategoryTheory.AddMonObj.ext_iff {C : Type u₁} [Category.{v₁, u₁} C] [MonoidalCategory C] {X : C} {h₁ h₂ : AddMonObj X} :
                        h₁ = h₂ add = add
                        class CategoryTheory.IsAddMonHom {C : Type u₁} [Category.{v₁, u₁} C] [MonoidalCategory C] {M' N' : C} [AddMonObj M'] [AddMonObj N'] (f : M' N') :

                        The property that a morphism between additive monoid objects is an additive monoid morphism.

                        Instances
                          class CategoryTheory.IsMonHom {C : Type u₁} [Category.{v₁, u₁} C] [MonoidalCategory C] {M N : C} [MonObj M] [MonObj N] (f : M N) :

                          The property that a morphism between monoid objects is a monoid morphism.

                          Instances
                            @[simp]
                            theorem CategoryTheory.IsAddMonHom.add_hom_assoc {C : Type u₁} {inst✝ : Category.{v₁, u₁} C} {inst✝¹ : MonoidalCategory C} {M' N' : C} {inst✝² : AddMonObj M'} {inst✝³ : AddMonObj N'} (f : M' N') [self : IsAddMonHom f] {Z : C} (h : N' Z) :
                            @[simp]
                            theorem CategoryTheory.IsMonHom.mul_hom_assoc {C : Type u₁} {inst✝ : Category.{v₁, u₁} C} {inst✝¹ : MonoidalCategory C} {M N : C} {inst✝² : MonObj M} {inst✝³ : MonObj N} (f : M N) [self : IsMonHom f] {Z : C} (h : N Z) :
                            @[simp]
                            theorem CategoryTheory.IsMonHom.one_hom_assoc {C : Type u₁} {inst✝ : Category.{v₁, u₁} C} {inst✝¹ : MonoidalCategory C} {M N : C} {inst✝² : MonObj M} {inst✝³ : MonObj N} (f : M N) [self : IsMonHom f] {Z : C} (h : N Z) :
                            @[simp]
                            theorem CategoryTheory.IsAddMonHom.zero_hom_assoc {C : Type u₁} {inst✝ : Category.{v₁, u₁} C} {inst✝¹ : MonoidalCategory C} {M' N' : C} {inst✝² : AddMonObj M'} {inst✝³ : AddMonObj N'} (f : M' N') [self : IsAddMonHom f] {Z : C} (h : N' Z) :
                            structure CategoryTheory.AddMon (C : Type u₁) [Category.{v₁, u₁} C] [MonoidalCategory C] :
                            Type (max u₁ v₁)

                            An additive monoid object internal to a monoidal category.

                            • X : C

                              The underlying object in the ambient monoidal category

                            • addMon : AddMonObj self.X
                            Instances For
                              structure CategoryTheory.Mon (C : Type u₁) [Category.{v₁, u₁} C] [MonoidalCategory C] :
                              Type (max u₁ v₁)

                              A monoid object internal to a monoidal category.

                              When the monoidal category is preadditive, this is also sometimes called an "algebra object".

                              • X : C

                                The underlying object in the ambient monoidal category

                              • mon : MonObj self.X
                              Instances For

                                The trivial monoid object. We later show this is initial in Mon C.

                                Instances For

                                  The trivial additive monoid object. We later show this is initial in AddMon C

                                  Instances For
                                    @[implicit_reducible]
                                    @[implicit_reducible]

                                    In this section, we prove that the category of monoids in a braided monoidal category is monoidal.

                                    Given two monoids M and N in a braided monoidal category C, the multiplication on the tensor product M.X ⊗ N.X is defined in the obvious way: it is the tensor product of the multiplications on M and N, except that the tensor factors in the source come in the wrong order, which we fix by pre-composing with a permutation isomorphism constructed from the braiding.

                                    (There is a subtlety here: in fact there are two ways to do these, using either the positive or negative crossing.)

                                    A more conceptual way of understanding this definition is the following: The braiding on C gives rise to a monoidal structure on the tensor product functor from C × C to C. A pair of monoids in C gives rise to a monoid in C × C, which the tensor product functor by being monoidal takes to a monoid in C. The permutation isomorphism appearing in the definition of the multiplication on the tensor product of two monoids is an instance of a more general family of isomorphisms which together form a strength that equips the tensor product functor with a monoidal structure, and the monoid axioms for the tensor product follow from the monoid axioms for the tensor factors plus the properties of the strength (i.e., monoidal functor axioms). The strength tensorμ of the tensor product functor has been defined in Mathlib/CategoryTheory/Monoidal/Braided/Basic.lean. Its properties, stated as independent lemmas in that module, are used extensively in the proofs below. Notice that we could have followed the above plan not only conceptually but also as a possible implementation and could have constructed the tensor product of monoids via mapMon, but we chose to give a more explicit definition directly in terms of tensorμ.

                                    To complete the definition of the monoidal category structure on the category of monoids, we need to provide definitions of associator and unitors. The obvious candidates are the associator and unitors from C, but we need to prove that they are monoid morphisms, i.e., compatible with unit and multiplication. These properties translate to the monoidality of the associator and unitors (with respect to the monoidal structures on the functors they relate), which have also been proved in Mathlib/CategoryTheory/Monoidal/Braided/Basic.lean.

                                    A morphism of additive monoid objects.

                                    Instances For
                                      theorem CategoryTheory.AddMon.Hom.ext_iff {C : Type u₁} {inst✝ : Category.{v₁, u₁} C} {inst✝¹ : MonoidalCategory C} {M N : AddMon C} {x y : M.Hom N} :
                                      x = y x.hom = y.hom
                                      theorem CategoryTheory.AddMon.Hom.ext {C : Type u₁} {inst✝ : Category.{v₁, u₁} C} {inst✝¹ : MonoidalCategory C} {M N : AddMon C} {x y : M.Hom N} (hom : x.hom = y.hom) :
                                      x = y
                                      structure CategoryTheory.Mon.Hom {C : Type u₁} [Category.{v₁, u₁} C] [MonoidalCategory C] (M N : Mon C) :
                                      Type v₁

                                      A morphism of monoid objects.

                                      Instances For
                                        theorem CategoryTheory.Mon.Hom.ext {C : Type u₁} {inst✝ : Category.{v₁, u₁} C} {inst✝¹ : MonoidalCategory C} {M N : Mon C} {x y : M.Hom N} (hom : x.hom = y.hom) :
                                        x = y
                                        theorem CategoryTheory.Mon.Hom.ext_iff {C : Type u₁} {inst✝ : Category.{v₁, u₁} C} {inst✝¹ : MonoidalCategory C} {M N : Mon C} {x y : M.Hom N} :
                                        x = y x.hom = y.hom
                                        @[reducible, inline]

                                        Construct a morphism M ⟶ N of Mon C from a map f : M ⟶ N and compatibilities with the unit and the multiplication.

                                        Instances For
                                          @[reducible, inline]

                                          Construct a morphism M ⟶ N of AddMon C from a map f : M ⟶ N and compatibilities with the zero and the addition.

                                          Instances For

                                            The identity morphism on a monoid object.

                                            Instances For

                                              The identity morphism on an additive monoid object.

                                              Instances For
                                                @[implicit_reducible]
                                                instance CategoryTheory.Mon.homInhabited {C : Type u₁} [Category.{v₁, u₁} C] [MonoidalCategory C] (M : Mon C) :
                                                Inhabited (M.Hom M)
                                                @[implicit_reducible]
                                                instance CategoryTheory.AddMon.homInhabited {C : Type u₁} [Category.{v₁, u₁} C] [MonoidalCategory C] (M : AddMon C) :
                                                Inhabited (M.Hom M)
                                                def CategoryTheory.Mon.comp {C : Type u₁} [Category.{v₁, u₁} C] [MonoidalCategory C] {M N O : Mon C} (f : M.Hom N) (g : N.Hom O) :
                                                M.Hom O

                                                Composition of morphisms of monoid objects.

                                                Instances For
                                                  def CategoryTheory.AddMon.comp {C : Type u₁} [Category.{v₁, u₁} C] [MonoidalCategory C] {M N O : AddMon C} (f : M.Hom N) (g : N.Hom O) :
                                                  M.Hom O

                                                  Composition of morphisms of additive monoid objects.

                                                  Instances For
                                                    @[simp]
                                                    theorem CategoryTheory.Mon.comp_hom {C : Type u₁} [Category.{v₁, u₁} C] [MonoidalCategory C] {M N O : Mon C} (f : M.Hom N) (g : N.Hom O) :
                                                    @[simp]
                                                    theorem CategoryTheory.AddMon.comp_hom {C : Type u₁} [Category.{v₁, u₁} C] [MonoidalCategory C] {M N O : AddMon C} (f : M.Hom N) (g : N.Hom O) :
                                                    theorem CategoryTheory.Mon.Hom.ext' {C : Type u₁} [Category.{v₁, u₁} C] [MonoidalCategory C] {M N : Mon C} {f g : M N} (w : f.hom = g.hom) :
                                                    f = g
                                                    theorem CategoryTheory.AddMon.Hom.ext' {C : Type u₁} [Category.{v₁, u₁} C] [MonoidalCategory C] {M N : AddMon C} {f g : M N} (w : f.hom = g.hom) :
                                                    f = g
                                                    theorem CategoryTheory.Mon.Hom.ext'_iff {C : Type u₁} [Category.{v₁, u₁} C] [MonoidalCategory C] {M N : Mon C} {f g : M N} :
                                                    f = g f.hom = g.hom
                                                    theorem CategoryTheory.AddMon.Hom.ext'_iff {C : Type u₁} [Category.{v₁, u₁} C] [MonoidalCategory C] {M N : AddMon C} {f g : M N} :
                                                    f = g f.hom = g.hom

                                                    The forgetful functor from monoid objects to the ambient category.

                                                    Instances For

                                                      The forgetful functor from additive monoid objects to the ambient category.

                                                      Instances For
                                                        @[simp]
                                                        theorem CategoryTheory.AddMon.forget_map (C : Type u₁) [Category.{v₁, u₁} C] [MonoidalCategory C] {X✝ Y✝ : AddMon C} (f : X✝ Y✝) :
                                                        (forget C).map f = f.hom
                                                        @[simp]
                                                        theorem CategoryTheory.Mon.forget_map (C : Type u₁) [Category.{v₁, u₁} C] [MonoidalCategory C] {X✝ Y✝ : Mon C} (f : X✝ Y✝) :
                                                        (forget C).map f = f.hom

                                                        The forgetful functor from monoid objects to the ambient category reflects isomorphisms.

                                                        def CategoryTheory.Mon.mkIso' {C : Type u₁} [Category.{v₁, u₁} C] [MonoidalCategory C] {M N : C} [MonObj M] [MonObj N] (e : M N) [IsMonHom e.hom] :
                                                        { X := M, mon := inst✝ } { X := N, mon := inst✝¹ }

                                                        Construct an isomorphism of monoid objects by giving a monoid isomorphism between the underlying objects.

                                                        Instances For
                                                          def CategoryTheory.AddMon.mkIso' {C : Type u₁} [Category.{v₁, u₁} C] [MonoidalCategory C] {M N : C} [AddMonObj M] [AddMonObj N] (e : M N) [IsAddMonHom e.hom] :
                                                          { X := M, addMon := inst✝ } { X := N, addMon := inst✝¹ }

                                                          Construct an isomorphism of additive monoid objects by giving a additive monoid isomorphism between the underlying objects.

                                                          Instances For
                                                            @[simp]
                                                            theorem CategoryTheory.Mon.mkIso'_inv_hom {C : Type u₁} [Category.{v₁, u₁} C] [MonoidalCategory C] {M N : C} [MonObj M] [MonObj N] (e : M N) [IsMonHom e.hom] :
                                                            (mkIso' e).inv.hom = e.inv
                                                            @[simp]
                                                            theorem CategoryTheory.Mon.mkIso'_hom_hom {C : Type u₁} [Category.{v₁, u₁} C] [MonoidalCategory C] {M N : C} [MonObj M] [MonObj N] (e : M N) [IsMonHom e.hom] :
                                                            (mkIso' e).hom.hom = e.hom
                                                            @[reducible, inline]

                                                            Construct an isomorphism of monoid objects by giving an isomorphism between the underlying objects and checking compatibility with unit and multiplication only in the forward direction.

                                                            Instances For
                                                              @[reducible, inline]

                                                              Construct an isomorphism of additive monoid objects by giving an isomorphism between the underlying objects and checking compatibility with zero and addition only in the forward direction.

                                                              Instances For
                                                                @[simp]
                                                                theorem CategoryTheory.AddMon.monMonoidalStruct_tensorHom_hom {C : Type u₁} [Category.{v₁, u₁} C] [MonoidalCategory C] [BraidedCategory C] {X₁✝ Y₁✝ X₂✝ Y₂✝ : AddMon C} (f : X₁✝ Y₁✝) (g : X₂✝ Y₂✝) :
                                                                @[simp]
                                                                theorem CategoryTheory.Mon.monMonoidalStruct_tensorHom_hom {C : Type u₁} [Category.{v₁, u₁} C] [MonoidalCategory C] [BraidedCategory C] {X₁✝ Y₁✝ X₂✝ Y₂✝ : Mon C} (f : X₁✝ Y₁✝) (g : X₂✝ Y₂✝) :
                                                                @[implicit_reducible]

                                                                The forgetful functor from Mon C to C is monoidal when C is monoidal.

                                                                We next show that if C is symmetric, then Mon C is braided, and indeed symmetric.

                                                                Note that Mon C is not braided in general when C is only braided.

                                                                The more interesting construction is the 2-category of monoids in C, bimodules between the monoids, and intertwiners between the bimodules.

                                                                When C is braided, that is a monoidal 2-category.

                                                                @[reducible, inline]

                                                                The image of a monoid object under a lax monoidal functor is a monoid object.

                                                                Instances For
                                                                  @[reducible, inline]

                                                                  The image of an additive monoid object under a lax monoidal functor is an additive monoid object.

                                                                  Instances For

                                                                    A lax monoidal functor takes monoid objects to monoid objects.

                                                                    That is, a lax monoidal functor F : C ⥤ D induces a functor Mon C ⥤ Mon D.

                                                                    Instances For

                                                                      A lax monoidal functor takes additive monoid objects to additive monoid objects.

                                                                      That is, a lax monoidal functor F : C ⥤ D induces a functor AddMon C ⥤ AddMon D.

                                                                      Instances For
                                                                        @[simp]
                                                                        theorem CategoryTheory.Functor.mapAddMon_map_hom {C : Type u₁} [Category.{v₁, u₁} C] [MonoidalCategory C] {D : Type u₂} [Category.{v₂, u₂} D] [MonoidalCategory D] (F : Functor C D) [F.LaxMonoidal] {X✝ Y✝ : AddMon C} (f : X✝ Y✝) :
                                                                        (F.mapAddMon.map f).hom = F.map f.hom
                                                                        @[simp]
                                                                        theorem CategoryTheory.Functor.mapMon_map_hom {C : Type u₁} [Category.{v₁, u₁} C] [MonoidalCategory C] {D : Type u₂} [Category.{v₂, u₂} D] [MonoidalCategory D] (F : Functor C D) [F.LaxMonoidal] {X✝ Y✝ : Mon C} (f : X✝ Y✝) :
                                                                        (F.mapMon.map f).hom = F.map f.hom

                                                                        The identity functor is also the identity on monoid objects.

                                                                        Instances For

                                                                          The identity functor is also the identity on additive monoid objects.

                                                                          Instances For

                                                                            The composition functor is also the composition on monoid objects.

                                                                            Instances For

                                                                              The composition functor is also the composition on additive monoid objects.

                                                                              Instances For

                                                                                Natural transformations between functors lift to monoid objects.

                                                                                Instances For

                                                                                  Natural transformations between functors lift to additive monoid objects.

                                                                                  Instances For

                                                                                    Natural isomorphisms between functors lift to monoid objects.

                                                                                    Instances For

                                                                                      Natural isomorphisms between functors lift to additive monoid objects.

                                                                                      Instances For
                                                                                        @[reducible, inline]

                                                                                        Pullback a monoid object along a fully faithful oplax monoidal functor.

                                                                                        Instances For
                                                                                          @[reducible, inline]

                                                                                          Pullback an additive monoid object along a fully faithful oplax monoidal functor.

                                                                                          Instances For

                                                                                            If F : C ⥤ D is a fully faithful monoidal functor, then F.mapMon : Mon C ⥤ Mon D is fully faithful too.

                                                                                            Instances For

                                                                                              If F : C ⥤ D is a fully faithful monoidal functor, then F.mapAddMon : AddMon C ⥤ AddMon D is fully faithful too.

                                                                                              Instances For
                                                                                                @[simp]

                                                                                                The essential image of a fully faithful functor between cartesian-monoidal categories is the same on monoid objects as on objects.

                                                                                                @[simp]

                                                                                                The essential image of a fully faithful functor between cartesian-monoidal categories is the same on additive monoid objects as on objects.

                                                                                                mapMon is functorial in the lax monoidal functor.

                                                                                                Instances For
                                                                                                  @[simp]
                                                                                                  theorem CategoryTheory.Functor.mapMonFunctor_map_app_hom (C : Type u₁) [Category.{v₁, u₁} C] [MonoidalCategory C] (D : Type u₂) [Category.{v₂, u₂} D] [MonoidalCategory D] {X✝ Y✝ : LaxMonoidalFunctor C D} (α : X✝ Y✝) (A : Mon C) :
                                                                                                  (((mapMonFunctor C D).map α).app A).hom = α.hom.app A.X

                                                                                                  An adjunction of monoidal functors lifts to an adjunction of their lifts to monoid objects.

                                                                                                  Instances For

                                                                                                    An adjunction of monoidal functors lifts to an adjunction of their lifts to additive monoid objects.

                                                                                                    Instances For

                                                                                                      An equivalence of categories lifts to an equivalence of their monoid objects.

                                                                                                      Instances For

                                                                                                        An equivalence of categories lifts to an equivalence of their additive monoid objects.

                                                                                                        Instances For
                                                                                                          @[simp]
                                                                                                          theorem CategoryTheory.Mon.EquivLaxMonoidalFunctorPUnit.laxMonoidalToMon_map (C : Type u₁) [Category.{v₁, u₁} C] [MonoidalCategory C] {X✝ Y✝ : LaxMonoidalFunctor (Discrete PUnit.{w + 1}) C} (α : X✝ Y✝) :
                                                                                                          (laxMonoidalToMon C).map α = ((Functor.mapMonFunctor (Discrete PUnit.{w + 1}) C).map α).app (trivial (Discrete PUnit.{w + 1}))
                                                                                                          @[simp]
                                                                                                          theorem CategoryTheory.Mon.EquivLaxMonoidalFunctorPUnit.monToLaxMonoidal_map_hom_app (C : Type u₁) [Category.{v₁, u₁} C] [MonoidalCategory C] {X✝ Y✝ : Mon C} (f : X✝ Y✝) (x✝ : Discrete PUnit.{w + 1}) :
                                                                                                          ((monToLaxMonoidal C).map f).hom.app x✝ = f.hom

                                                                                                          Monoid objects in C are "just" lax monoidal functors from the trivial monoidal category to C.

                                                                                                          Instances For

                                                                                                            Additive monoid objects in C are "just" lax monoidal functors from the trivial monoidal category to C.

                                                                                                            Instances For

                                                                                                              Predicate for an additive monoid object to be commutative.

                                                                                                              Instances

                                                                                                                Predicate for a monoid object to be commutative.

                                                                                                                Instances
                                                                                                                  @[simp]
                                                                                                                  theorem CategoryTheory.IsCommMonObj.mul_comm_assoc {C : Type u₁} {inst✝ : Category.{v₁, u₁} C} {inst✝¹ : MonoidalCategory C} {inst✝² : BraidedCategory C} (X : C) {inst✝³ : MonObj X} [self : IsCommMonObj X] {Z : C} (h : X Z) :