Lemma tensor_of_comonoids_laws_assoc (mx my : comonoid M) : comonoid_laws_assoc M (tensor_of_comonoids_data mx my). Proof. unfold comonoid_laws_assoc. cbn. rewrite ! assoc'. rewrite (bifunctor_rightcomp M). etrans. { apply maponpaths. apply pathsinv0. rewrite ! assoc. do 2 apply maponpaths_2. apply pathsinv0. apply precompose_inner_swap_with_diag_on_left. } rewrite (bifunctor_leftcomp M). etrans. 2: { apply maponpaths. rewrite assoc. apply maponpaths_2. apply pathsinv0. apply precompose_inner_swap_with_diag_on_right. } rewrite ! assoc. rewrite <- ! tensor_comp_mor. etrans. 2: { do 3 apply maponpaths_2. apply comonoid_to_law_assoc. } etrans. 2: { do 2 apply maponpaths_2. apply maponpaths. apply comonoid_to_law_assoc. } rewrite ! tensor_comp_mor. rewrite ! assoc'. do 2 apply maponpaths. apply inner_swap_hexagon. 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.