Proposition comp_enriched_profunctor_lmap_eq (y₁ y₂ : C₂) : lmap_e P y₂ y₁ x #⊗ identity _ · internal_transpose (comp_enriched_profunctor_lmap_mor y₁) = sym_mon_braiding V _ _ #⊗ identity _ · mon_lassociator _ _ _ · identity _ #⊗ rmap_e Q z₁ y₁ y₂ · internal_transpose (comp_enriched_profunctor_lmap_mor y₂). Proof. unfold comp_enriched_profunctor_lmap_mor, internal_transpose. use internal_funext. intros a h. rewrite !tensor_comp_r_id_r. rewrite !assoc'. rewrite !internal_beta. etrans. { apply maponpaths. rewrite !assoc. rewrite sym_mon_braiding_inv. rewrite id_left. apply idpath. } etrans. { apply maponpaths_2. apply tensor_split. } etrans. { rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite tensor_lassociator. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite tensor_id_id. rewrite <- tensor_split'. rewrite tensor_split. rewrite tensor_comp_id_l. rewrite !assoc'. apply maponpaths. rewrite comp_enriched_profunctor_comm. rewrite !assoc. rewrite <- tensor_id_id. rewrite tensor_lassociator. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite tensor_lassociator. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite <- tensor_comp_id_l. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. rewrite lmap_e_rmap_e'. rewrite !tensor_comp_id_l. apply idpath. } rewrite !assoc. apply maponpaths_2. rewrite !assoc'. refine (!_). etrans. { apply maponpaths_2. apply tensor_split. } rewrite !assoc'. apply maponpaths. etrans. { do 3 apply maponpaths. rewrite !assoc. rewrite sym_mon_braiding_inv. rewrite id_left. apply idpath. } etrans. { do 2 apply maponpaths. rewrite !assoc. rewrite tensor_lassociator. rewrite !assoc'. apply maponpaths. rewrite <- tensor_comp_id_l. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !tensor_comp_id_l. apply idpath. } rewrite !assoc. do 2 apply maponpaths_2. generalize (E₂ ⦃ y₁ , y₂ ⦄). generalize (P y₂ x). generalize (Q z₁ y₁). generalize (E₃ ⦃ z₂ , z₁ ⦄). intros v₁ v₂ v₃ v₄. etrans. { apply maponpaths_2. rewrite !assoc'. apply maponpaths. pose (maponpaths (λ z, z · identity _ #⊗ mon_rassociator _ _ _) (@mon_lassociator_lassociator V v₃ v₄ v₂ v₁)) as p. cbn in p. rewrite !assoc' in p. rewrite <- tensor_comp_id_l in p. rewrite mon_lassociator_rassociator in p. rewrite tensor_id_id in p. rewrite id_right in p. exact (!p). } rewrite !assoc. rewrite tensor_lassociator. rewrite !assoc'. apply maponpaths. refine (!_). etrans. { apply maponpaths. rewrite !assoc. do 4 apply maponpaths_2. apply sym_mon_hexagon_lassociator. } etrans. { rewrite !assoc. rewrite <- tensor_split. rewrite tensor_split'. rewrite !assoc'. apply idpath. } rewrite tensor_id_id. apply maponpaths. rewrite <- tensor_id_id. rewrite !assoc. rewrite tensor_lassociator. rewrite !assoc'. apply maponpaths. rewrite <- !tensor_comp_id_l. apply maponpaths. clear v₃. etrans. { apply maponpaths. rewrite !assoc. rewrite sym_mon_braiding_inv. rewrite id_left. apply idpath. } rewrite !assoc. rewrite <- sym_mon_hexagon_rassociator. rewrite !assoc'. rewrite mon_rassociator_lassociator. rewrite id_right. apply idpath. 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.