Documentation

Mathlib.CategoryTheory.Monoidal.Cartesian.Basic

Categories with chosen finite products #

We introduce a class, CartesianMonoidalCategory, which bundles explicit choices for a terminal object and binary products in a category C. This is primarily useful for categories which have finite products with good definitional properties, such as the category of types.

For better defeqs, we also extend MonoidalCategory.

Implementation notes #

For Cartesian monoidal categories, the oplax-monoidal/monoidal/braided structure of a functor F preserving finite products is uniquely determined. See the ofChosenFiniteProducts declarations.

We however develop the theory for any F.OplaxMonoidal/F.Monoidal/F.Braided instance instead of requiring it to be the ofChosenFiniteProducts one. This is to avoid diamonds: Consider e.g. 𝟭 C and F ⋙ G.

In applications requiring a finite-product-preserving functor to be oplax-monoidal/monoidal/braided, avoid attribute [local instance] ofChosenFiniteProducts but instead turn on the corresponding ofChosenFiniteProducts declaration for that functor only.

Projects #

A monoidal category is semicartesian if the unit for the tensor product is a terminal object.

Instances

    The unique map to the terminal object.

    Equations
      Instances For

        This lemma follows from the preexisting Unique instance, but it is often convenient to use it directly as apply toUnit_unique forcing lean to do the necessary elaboration.

        An instance of CartesianMonoidalCategory C bundles an explicit choice of a binary product of two objects of C, and a terminal object in C.

        Users should use the monoidal notation: X ⊗ Y for the product and 𝟙_ C for the terminal object.

        Instances
          @[reducible, inline]

          Implementation of the tensor product for CartesianMonoidalCategory.ofChosenFiniteProducts.

          Equations
            Instances For
              @[reducible, inline]
              abbrev CategoryTheory.CartesianMonoidalCategory.ofChosenFiniteProducts.tensorHom {C : Type u} [Category.{v, u} C] ( : (X Y : C) → Limits.LimitCone (Limits.pair X Y)) {X₁ X₂ Y₁ Y₂ : C} (f : X₁ Y₁) (g : X₂ Y₂) :
              tensorObj X₁ X₂ tensorObj Y₁ Y₂

              Implementation of the tensor product of morphisms for CartesianMonoidalCategory.ofChosenFiniteProducts.

              Equations
                Instances For
                  theorem CategoryTheory.CartesianMonoidalCategory.ofChosenFiniteProducts.tensorHom_comp_tensorHom {C : Type u} [Category.{v, u} C] ( : (X Y : C) → Limits.LimitCone (Limits.pair X Y)) {X₁ X₂ Y₁ Y₂ Z₁ Z₂ : C} (f₁ : X₁ Y₁) (f₂ : X₂ Y₂) (g₁ : Y₁ Z₁) (g₂ : Y₂ Z₂) :
                  CategoryStruct.comp (tensorHom f₁ f₂) (tensorHom g₁ g₂) = tensorHom (CategoryStruct.comp f₁ g₁) (CategoryStruct.comp f₂ g₂)
                  theorem CategoryTheory.CartesianMonoidalCategory.ofChosenFiniteProducts.associator_naturality {C : Type u} [Category.{v, u} C] ( : (X Y : C) → Limits.LimitCone (Limits.pair X Y)) {X₁ X₂ X₃ Y₁ Y₂ Y₃ : C} (f₁ : X₁ Y₁) (f₂ : X₂ Y₂) (f₃ : X₃ Y₃) :
                  CategoryStruct.comp (tensorHom (tensorHom f₁ f₂) f₃) (Limits.BinaryFan.associatorOfLimitCone Y₁ Y₂ Y₃).hom = CategoryStruct.comp (Limits.BinaryFan.associatorOfLimitCone X₁ X₂ X₃).hom (tensorHom f₁ (tensorHom f₂ f₃))
                  @[reducible, inline]

                  Construct an instance of CartesianMonoidalCategory C given a terminal object and limit cones over arbitrary pairs of objects.

                  Equations
                    Instances For
                      @[reducible, inline]

                      Constructs an instance of CartesianMonoidalCategory C given the existence of finite products in C.

                      Equations
                        Instances For

                          Constructs a morphism to the product given its two components.

                          Equations
                            Instances For
                              @[simp]
                              @[simp]
                              @[simp]
                              theorem CategoryTheory.CartesianMonoidalCategory.tensorHom_fst {C : Type u} [Category.{v, u} C] [CartesianMonoidalCategory C] {X₁ X₂ Y₁ Y₂ : C} (f : X₁ X₂) (g : Y₁ Y₂) :
                              @[simp]
                              theorem CategoryTheory.CartesianMonoidalCategory.tensorHom_fst_assoc {C : Type u} [Category.{v, u} C] [CartesianMonoidalCategory C] {X₁ X₂ Y₁ Y₂ : C} (f : X₁ X₂) (g : Y₁ Y₂) {Z : C} (h : X₂ Z) :
                              @[simp]
                              theorem CategoryTheory.CartesianMonoidalCategory.tensorHom_snd {C : Type u} [Category.{v, u} C] [CartesianMonoidalCategory C] {X₁ X₂ Y₁ Y₂ : C} (f : X₁ X₂) (g : Y₁ Y₂) :
                              @[simp]
                              theorem CategoryTheory.CartesianMonoidalCategory.tensorHom_snd_assoc {C : Type u} [Category.{v, u} C] [CartesianMonoidalCategory C] {X₁ X₂ Y₁ Y₂ : C} (f : X₁ X₂) (g : Y₁ Y₂) {Z : C} (h : Y₂ Z) :

                              Universal property of the Cartesian product: Maps to X ⊗ Y correspond to pairs of maps to X and to Y.

                              Equations
                                Instances For

                                  CartesianMonoidalCategory implies BraidedCategory. This is not an instance to prevent diamonds.

                                  Equations
                                    Instances For
                                      @[reducible, inline]

                                      When C and D have chosen finite products and F : C ⥤ D is any functor, terminalComparison F is the unique map F (𝟙_ C) ⟶ 𝟙_ D.

                                      Equations
                                        Instances For

                                          When C and D have chosen finite products and F : C ⥤ D is any functor, prodComparison F A B is the canonical comparison morphism from F (A ⊗ B) to F(A) ⊗ F(B).

                                          Equations
                                            Instances For

                                              If the product comparison morphism is an iso, its inverse is natural in both argument.

                                              If the product comparison morphism is an iso, its inverse is natural in both argument.

                                              If the product comparison morphism is an iso, its inverse is natural in the right argument.

                                              If the product comparison morphism is an iso, its inverse is natural in the left argument.

                                              The product comparison morphism from F(A ⊗ -) to FA ⊗ F-, whose components are given by prodComparison.

                                              Equations
                                                Instances For

                                                  The product comparison morphism from F(- ⊗ -) to F- ⊗ F-, whose components are given by prodComparison.

                                                  Equations
                                                    Instances For

                                                      If F preserves the limit of the pair (A, B), then the binary fan given by (F.map fst A B, F.map (snd A B)) is a limit cone.

                                                      Equations
                                                        Instances For

                                                          If F preserves the limit of the pair (A, B), then prodComparison F A B is an isomorphism.

                                                          Equations
                                                            Instances For

                                                              The natural isomorphism F(A ⊗ -) ≅ FA ⊗ F-, provided each prodComparison F A B is an isomorphism (as B changes).

                                                              Equations
                                                                Instances For

                                                                  The natural isomorphism of bifunctors F(- ⊗ -) ≅ F- ⊗ F-, provided each prodComparison F A B is an isomorphism.

                                                                  Equations
                                                                    Instances For

                                                                      In a cartesian monoidal category, tensorLeft X is naturally isomorphic prod.functor.obj X.

                                                                      Equations
                                                                        Instances For

                                                                          The restriction of a Cartesian-monoidal category along an object property that's closed under finite products is Cartesian-monoidal.

                                                                          Equations

                                                                            Any functor between Cartesian-monoidal categories is oplax monoidal.

                                                                            This is not made an instance because it would create a diamond for the oplax monoidal structure on the identity and composition of functors.

                                                                            Equations
                                                                              Instances For

                                                                                Any functor between Cartesian-monoidal categories is oplax monoidal in a unique way.

                                                                                A finite-product-preserving functor between Cartesian monoidal categories is monoidal.

                                                                                This is not made an instance because it would create a diamond for the monoidal structure on the identity and composition of functors.

                                                                                Equations
                                                                                  Instances For

                                                                                    A functor between Cartesian monoidal categories is monoidal iff it preserves finite products.

                                                                                    A finite-product-preserving functor between Cartesian monoidal categories is braided.

                                                                                    This is not made an instance because it would create a diamond for the monoidal structure on the identity and composition of functors.

                                                                                    Equations
                                                                                      Instances For