Lemma comonoid_disp_associator (xx yy zz : comonoid M) : comonoid_mor_struct M (tensor_of_comonoids (tensor_of_comonoids xx yy) zz) (tensor_of_comonoids xx (tensor_of_comonoids yy zz)) (mon_lassociator xx yy zz). Proof. apply make_is_comonoid_mor. - cbn. etrans. 2: { rewrite assoc. apply maponpaths_2. apply maponpaths. apply maponpaths_2. apply id_right. } rewrite tensor_comp_mor. rewrite ! assoc. etrans. 2: { do 2 apply maponpaths_2. apply pathsinv0, associator_nat2. } rewrite ! assoc'. etrans. { apply maponpaths_2. apply maponpaths. apply pathsinv0, id_right. } rewrite tensor_comp_mor. rewrite ! assoc'. apply maponpaths. rewrite ! assoc. apply inner_swap_hexagon'. - cbn. apply pathsinv0. etrans. { apply maponpaths. apply maponpaths_2. apply tensor_comp_l_id_l. } unfold monoidal_cat_tensor_mor. cbn. rewrite ! assoc. etrans. { do 2 apply maponpaths_2. apply pathsinv0, tensor_lassociator. } unfold monoidal_cat_tensor_mor. cbn. rewrite id_right. apply maponpaths_2. etrans. { apply maponpaths_2. apply tensor_lassociator. } unfold monoidal_cat_tensor_mor. cbn. rewrite assoc'. etrans. { apply maponpaths. apply pathsinv0. apply tensor_comp_mor. } rewrite id_left. etrans. { apply maponpaths. apply maponpaths_2. apply pathsinv0, id_right. } etrans. { apply maponpaths. apply tensor_comp_mor. } rewrite assoc. etrans. { apply maponpaths_2. apply associator_nat2. } etrans. 2: { apply maponpaths. apply id_right. } etrans. 2: { apply pathsinv0, tensor_comp_mor. } rewrite assoc'. apply maponpaths. etrans. { apply pathsinv0, mon_triangle. } apply maponpaths_2. apply mon_runitor_I_mon_lunitor_I. Qed.
Require Import UniMath.Foundations.All. Require Import UniMath.MoreFoundations.All. Require Import UniMath.CategoryTheory.Core.Categories. Require Import UniMath.CategoryTheory.Core.Functors. Require Import UniMath.CategoryTheory.Core.NaturalTransformations. Require Import UniMath.CategoryTheory.Core.Isos. Require Import UniMath.CategoryTheory.Limits.BinProducts. Require Import UniMath.CategoryTheory.DisplayedCats.Core. Require Import UniMath.CategoryTheory.DisplayedCats.Total. Require Import UniMath.CategoryTheory.DisplayedCats.Constructions. Require Import UniMath.CategoryTheory.PrecategoryBinProduct. Require Import UniMath.CategoryTheory.Monoidal.WhiskeredBifunctors. Require Import UniMath.CategoryTheory.Monoidal.Categories. Import BifunctorNotations. Require Import UniMath.CategoryTheory.Monoidal.Functors. Require Import UniMath.CategoryTheory.Monoidal.Displayed.WhiskeredDisplayedBifunctors. Require Import UniMath.CategoryTheory.Monoidal.Displayed.Monoidal. Require Import UniMath.CategoryTheory.Monoidal.Displayed.TotalMonoidal. Require Import UniMath.CategoryTheory.Monoidal.Examples.Fullsub. Require Import UniMath.CategoryTheory.Monoidal.Examples.Sigma. Require Import UniMath.CategoryTheory.Monoidal.Structure.Cartesian. Require Import UniMath.CategoryTheory.Monoidal.Structure.Symmetric. Require Import UniMath.CategoryTheory.Monoidal.Structure.SymmetricDiagonal. Require Import UniMath.CategoryTheory.Monoidal.Displayed.Symmetric. Require Import UniMath.CategoryTheory.Monoidal.Comonoids.Category. Import MonoidalNotations. Import ComonoidNotations.