Documentation

Mathlib.CategoryTheory.Closed.Monoidal

Closed monoidal categories #

Define (right) closed objects and (right) closed monoidal categories.

TODO #

Some of the theorems proved about cartesian closed categories should be generalised and moved to this file.

class CategoryTheory.Closed {C : Type u} [Category.{v, u} C] [MonoidalCategory C] (X : C) :
Type (max u v)

An object X is (right) closed if (X ⊗ -) is a left adjoint.

Instances

    A monoidal category C is (right) monoidal closed if every object is (right) closed.

    Instances

      If X and Y are closed then X ⊗ Y is. This isn't an instance because it's not usually how we want to construct internal homs, we'll usually prove all objects are closed uniformly.

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

        The unit object is always closed. This isn't an instance because most of the time we'll prove closedness for all objects at once, rather than just for this one.

        Equations
        Instances For

          This is the internal hom A ⟶[C] -.

          Equations
          Instances For

            The adjunction between A ⊗ - and A ⟹ -.

            Equations
            Instances For

              The evaluation natural transformation.

              Equations
              Instances For

                The coevaluation natural transformation.

                Equations
                Instances For
                  @[simp]
                  theorem CategoryTheory.ihom.ev_naturality {C : Type u} [Category.{v, u} C] [MonoidalCategory C] (A : C) [Closed A] {X Y : C} (f : X Y) :
                  @[simp]
                  theorem CategoryTheory.ihom.ev_naturality_assoc {C : Type u} [Category.{v, u} C] [MonoidalCategory C] (A : C) [Closed A] {X Y : C} (f : X Y) {Z : C} (h : Y Z) :
                  @[simp]
                  theorem CategoryTheory.ihom.coev_naturality {C : Type u} [Category.{v, u} C] [MonoidalCategory C] (A : C) [Closed A] {X Y : C} (f : X Y) :
                  @[simp]

                  A ⟶[C] B denotes the internal hom from A to B

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    @[simp]
                    theorem CategoryTheory.ihom.coev_ev {C : Type u} [Category.{v, u} C] [MonoidalCategory C] (A B : C) [Closed A] :
                    CategoryStruct.comp ((coev A).app ((ihom A).obj B)) ((ihom A).map ((ev A).app B)) = CategoryStruct.id ((ihom A).obj B)
                    @[simp]
                    theorem CategoryTheory.ihom.coev_ev_assoc {C : Type u} [Category.{v, u} C] [MonoidalCategory C] (A B : C) [Closed A] {Z : C} (h : (ihom A).obj B Z) :
                    CategoryStruct.comp ((coev A).app ((ihom A).obj B)) (CategoryStruct.comp ((ihom A).map ((ev A).app B)) h) = h

                    Currying in a monoidal closed category.

                    Equations
                    Instances For

                      Uncurrying in a monoidal closed category.

                      Equations
                      Instances For
                        @[simp]
                        theorem CategoryTheory.MonoidalClosed.homEquiv_symm_apply_eq {C : Type u} [Category.{v, u} C] [MonoidalCategory C] {A X Y : C} [Closed A] (f : Y (ihom A).obj X) :
                        ((ihom.adjunction A).homEquiv Y X).symm f = uncurry f
                        @[simp]
                        theorem CategoryTheory.MonoidalClosed.curry_uncurry {C : Type u} [Category.{v, u} C] [MonoidalCategory C] {A X Y : C} [Closed A] (f : X (ihom A).obj Y) :

                        The internal hom out of the unit is naturally isomorphic to the identity functor.

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

                          Pre-compose an internal hom with an external hom.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            @[simp]
                            theorem CategoryTheory.MonoidalClosed.uncurry_pre {C : Type u} [Category.{v, u} C] [MonoidalCategory C] {A B : C} [Closed A] [Closed B] (f : B A) (X : C) :
                            @[simp]
                            theorem CategoryTheory.MonoidalClosed.pre_map {C : Type u} [Category.{v, u} C] [MonoidalCategory C] {A₁ A₂ A₃ : C} [Closed A₁] [Closed A₂] [Closed A₃] (f : A₁ A₂) (g : A₂ A₃) :
                            theorem CategoryTheory.MonoidalClosed.pre_comm_ihom_map {C : Type u} [Category.{v, u} C] [MonoidalCategory C] {W X Y Z : C} [Closed W] [Closed X] (f : W X) (g : Y Z) :
                            CategoryStruct.comp ((pre f).app Y) ((ihom W).map g) = CategoryStruct.comp ((ihom X).map g) ((pre f).app Z)

                            The internal hom functor given by the monoidal closed structure.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              @[simp]
                              theorem CategoryTheory.MonoidalClosed.internalHom_map {C : Type u} [Category.{v, u} C] [MonoidalCategory C] [MonoidalClosed C] {X✝ Y✝ : Cᵒᵖ} (f : X✝ Y✝) :
                              internalHom.map f = pre f.unop
                              noncomputable def CategoryTheory.MonoidalClosed.ofEquiv {C : Type u} [Category.{v, u} C] [MonoidalCategory C] {D : Type u₂} [Category.{v₂, u₂} D] [MonoidalCategory D] (F : Functor C D) {G : Functor D C} (adj : F G) [F.Monoidal] [F.IsEquivalence] [MonoidalClosed D] :

                              Transport the property of being monoidal closed across a monoidal equivalence of categories

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                theorem CategoryTheory.MonoidalClosed.ofEquiv_curry_def {C : Type u} [Category.{v, u} C] [MonoidalCategory C] {D : Type u₂} [Category.{v₂, u₂} D] [MonoidalCategory D] (F : Functor C D) {G : Functor D C} (adj : F G) [F.Monoidal] [F.IsEquivalence] [MonoidalClosed D] {X Y Z : C} (f : MonoidalCategoryStruct.tensorObj X Y Z) :
                                curry f = (adj.homEquiv Y ((ihom (F.obj X)).obj (F.obj Z))) (curry ((adj.toEquivalence.symm.toAdjunction.homEquiv (MonoidalCategoryStruct.tensorObj (F.obj X) (F.obj Y)) Z) (CategoryStruct.comp ((Functor.Monoidal.commTensorLeft F X).compInverseIso.hom.app Y) f)))

                                Suppose we have a monoidal equivalence F : C ≌ D, with D monoidal closed. We can pull the monoidal closed instance back along the equivalence. For X, Y, Z : C, this lemma describes the resulting currying map Hom(X ⊗ Y, Z) → Hom(Y, (X ⟶[C] Z)). (X ⟶[C] Z is defined to be F⁻¹(F(X) ⟶[D] F(Z)), so currying in C is given by essentially conjugating currying in D by F.)

                                theorem CategoryTheory.MonoidalClosed.ofEquiv_uncurry_def {C : Type u} [Category.{v, u} C] [MonoidalCategory C] {D : Type u₂} [Category.{v₂, u₂} D] [MonoidalCategory D] (F : Functor C D) {G : Functor D C} (adj : F G) [F.Monoidal] [F.IsEquivalence] [MonoidalClosed D] {X Y Z : C} (f : Y (ihom X).obj Z) :
                                uncurry f = CategoryStruct.comp ((Functor.Monoidal.commTensorLeft F X).compInverseIso.inv.app Y) ((adj.toEquivalence.symm.toAdjunction.homEquiv ((F.comp (MonoidalCategory.tensorLeft (F.obj X))).obj Y) Z).symm (uncurry ((adj.homEquiv Y ((ihom (F.obj X)).obj (adj.toEquivalence.symm.inverse.obj Z))).symm f)))

                                Suppose we have a monoidal equivalence F : C ≌ D, with D monoidal closed. We can pull the monoidal closed instance back along the equivalence. For X, Y, Z : C, this lemma describes the resulting uncurrying map Hom(Y, (X ⟶[C] Z)) → Hom(X ⊗ Y ⟶ Z). (X ⟶[C] Z is defined to be F⁻¹(F(X) ⟶[D] F(Z)), so uncurrying in C is given by essentially conjugating uncurrying in D by F.)

                                def CategoryTheory.MonoidalClosed.id {C : Type u} [Category.{v, u} C] [MonoidalCategory C] (x : C) [Closed x] :
                                𝟙_ C (ihom x).obj x

                                The C-identity morphism 𝟙_ C ⟶ hom(x, x) used to equip C with the structure of a C-category

                                Equations
                                Instances For

                                  The uncurried composition morphism x ⊗ (hom(x, y) ⊗ hom(y, z)) ⟶ (x ⊗ hom(x, y)) ⊗ hom(y, z) ⟶ y ⊗ hom(y, z) ⟶ z. The C-composition morphism will be defined as the adjoint transpose of this map.

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

                                    The C-composition morphism hom(x, y) ⊗ hom(y, z) ⟶ hom(x, z) used to equip C with the structure of a C-category

                                    Equations
                                    Instances For

                                      Unfold the definition of id. This exists to streamline the proofs of MonoidalClosed.id_comp and MonoidalClosed.comp_id

                                      Unfold the definition of compTranspose. This exists to streamline the proof of MonoidalClosed.assoc

                                      Unfold the definition of comp. This exists to streamline the proof of MonoidalClosed.assoc

                                      The proofs of associativity and unitality use the following outline:

                                      1. Take adjoint transpose on each side of the equality (uncurry_injective)
                                      2. Do whatever rewrites/simps are necessary to apply uncurry_curry
                                      3. Conclude with simp
                                      @[simp]

                                      Left unitality of the enriched structure

                                      @[simp]

                                      Right unitality of the enriched structure

                                      Associativity of the enriched structure