Proposition comp_enriched_profunctor_comm_arr {y₁ y₂ : C₂} (g : y₁ --> y₂) : identity (P y₂ x) #⊗ rmap_e_arr Q g z · comp_enriched_profunctor_in y₂ = lmap_e_arr P x g #⊗ identity (Q z y₁) · comp_enriched_profunctor_in y₁. Proof. pose (enriched_profunctor_coend_comm_arr comp_enriched_profunctor_coend g) as p. unfold lmap_e_arr, rmap_e_arr in p. cbn in p. refine (_ @ !p @ _). - unfold rmap_e_arr. etrans. { rewrite !tensor_comp_id_l. rewrite !assoc'. apply idpath. } refine (!_). etrans. { rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite <- tensor_id_id. rewrite tensor_lassociator. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite <- tensor_comp_id_l. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. rewrite !tensor_comp_id_l. apply idpath. } rewrite !assoc. do 3 apply maponpaths_2. rewrite <- mon_linvunitor_triangle. rewrite !assoc'. etrans. { apply maponpaths. rewrite !assoc. rewrite sym_mon_hexagon_lassociator. rewrite !assoc'. rewrite <- tensor_comp_id_l. rewrite sym_mon_braiding_inv. rewrite tensor_id_id. rewrite id_right. apply idpath. } rewrite !assoc. rewrite <- tensor_comp_id_r. rewrite sym_mon_braiding_linvunitor. rewrite mon_inv_triangle. apply idpath. - unfold lmap_e_arr. etrans. { rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite <- tensor_id_id. rewrite tensor_rassociator. rewrite !assoc'. apply maponpaths. apply idpath. } rewrite !assoc. rewrite !tensor_comp_id_r. do 3 apply maponpaths_2. rewrite <- mon_linvunitor_triangle. rewrite !assoc'. rewrite mon_lassociator_rassociator. apply id_right. Qed.
Require Import UniMath.Foundations.All. Require Import UniMath.MoreFoundations.All. Require Import UniMath.CategoryTheory.Core.Prelude. Require Import UniMath.CategoryTheory.Limits.Coends. Require Import UniMath.CategoryTheory.OppositeCategory.Core. Require Import UniMath.CategoryTheory.PrecategoryBinProduct. Require Import UniMath.CategoryTheory.EnrichedCats.BenabouCosmos. Require Import UniMath.CategoryTheory.EnrichedCats.Enrichment. Require Import UniMath.CategoryTheory.EnrichedCats.EnrichmentFunctor. Require Import UniMath.CategoryTheory.EnrichedCats.Profunctors.Profunctor. Require Import UniMath.CategoryTheory.EnrichedCats.Profunctors.Coend. Require Import UniMath.CategoryTheory.Monoidal.Categories. Require Import UniMath.CategoryTheory.Monoidal.Structure.Symmetric. Require Import UniMath.CategoryTheory.Monoidal.Structure.Closed. Import MonoidalNotations.