Proposition lassociator_enriched_profunctor_data_eq (z : C₄) (x₁ x₂ : C₂) (w : C₁) : lmap_e P₁ x₂ x₁ w #⊗ identity _ · (sym_mon_braiding V _ _ · lassociator_enriched_profunctor_mor z x₁ w #⊗ identity _ · internal_eval _ _) = sym_mon_braiding _ _ _ #⊗ identity _ · mon_lassociator _ _ _ · identity _ #⊗ (identity _ #⊗ comp_enriched_profunctor_rmap P₂ P₃ z x₁ x₂ · sym_mon_braiding _ _ _ · internal_eval _ _) · (sym_mon_braiding _ _ _ · lassociator_enriched_profunctor_mor z x₂ w #⊗ identity _ · internal_eval _ _). Proof. use is_inj_internal_transpose. use from_comp_enriched_profunctor_eq. intros x'. use internal_funext. intros a h. rewrite !tensor_comp_r_id_r. rewrite !(tensor_split (comp_enriched_profunctor_in _ _ _ _ _) h). rewrite !assoc'. apply maponpaths. unfold internal_transpose. rewrite !internal_beta. rewrite !assoc. rewrite !tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. etrans. { rewrite !assoc. rewrite <- tensor_split. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. rewrite tensor_split. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite <- tensor_comp_id_r. apply lassociator_enriched_profunctor_mor_comm. } refine (!_). etrans. { rewrite !assoc. rewrite <- tensor_split. rewrite tensor_split'. 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'. apply maponpaths. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. rewrite tensor_comp_id_r. rewrite !assoc'. apply maponpaths. rewrite !assoc. etrans. { do 2 apply maponpaths_2. rewrite <- !tensor_comp_id_r. rewrite comp_enriched_profunctor_rmap_comm. apply idpath. } unfold comp_enriched_profunctor_rmap_mor. rewrite !assoc. rewrite !tensor_comp_id_r. rewrite !assoc'. do 3 apply maponpaths. rewrite !assoc. rewrite <- tensor_comp_id_r. rewrite lassociator_enriched_profunctor_mor_comm. apply idpath. } unfold lassociator_enriched_profunctor_mor_ob. rewrite !assoc. apply maponpaths_2. etrans. { rewrite !assoc'. do 3 apply maponpaths. rewrite !assoc. rewrite <- tensor_comp_id_r. rewrite sym_mon_braiding_inv. rewrite tensor_id_id. rewrite id_left. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite tensor_rassociator. rewrite !assoc'. apply maponpaths. rewrite <- tensor_comp_id_r. rewrite comp_enriched_profunctor_comm'. rewrite !tensor_comp_id_r. apply idpath. } rewrite !assoc. apply maponpaths_2. refine (!_). etrans. { rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. rewrite <- tensor_id_id. rewrite tensor_rassociator. apply idpath. } rewrite !assoc. apply maponpaths_2. clear a h. generalize (E₂ ⦃ x₁ , x₂ ⦄) (P₁ x₂ w) (P₂ x' x₁) (P₃ z x'). intros v₁ v₂ v₃ v₄. rewrite sym_mon_braiding_inv. rewrite id_left. refine (!_). etrans. { rewrite !assoc'. rewrite <- !tensor_comp_id_r. rewrite !assoc. apply maponpaths_2. rewrite !assoc'. do 3 apply maponpaths. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. pose (maponpaths (λ z, z · mon_lassociator _ _ _ #⊗ identity _) (@mon_rassociator_rassociator V v₂ v₁ v₃ v₄)) as p. cbn in p. rewrite !assoc' in p. rewrite <- tensor_comp_id_r in p. rewrite mon_rassociator_lassociator in p. rewrite tensor_id_id in p. rewrite id_right in p. exact (!p). } rewrite !assoc'. rewrite <- tensor_comp_id_r. etrans. { do 2 apply maponpaths. rewrite !assoc. rewrite sym_mon_braiding_inv. rewrite id_left. apply idpath. } etrans. { apply maponpaths. rewrite !assoc. rewrite mon_lassociator_rassociator. rewrite id_left. apply idpath. } rewrite <- tensor_id_id. rewrite !assoc. rewrite tensor_rassociator. refine (_ @ id_right _). rewrite !assoc'. apply maponpaths. rewrite <- tensor_comp_id_r. rewrite <- tensor_id_id. apply maponpaths_2. clear v₄. etrans. { do 3 apply maponpaths. rewrite !assoc. rewrite sym_mon_hexagon_rassociator. apply idpath. } etrans. { do 2 apply maponpaths. rewrite !assoc. rewrite <- tensor_comp_id_l. rewrite sym_mon_braiding_inv. rewrite tensor_id_id. rewrite id_left. apply idpath. } etrans. { apply maponpaths. rewrite !assoc. rewrite mon_lassociator_rassociator. apply id_left. } rewrite <- tensor_comp_id_r. rewrite sym_mon_braiding_inv. apply tensor_id_id. 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.StandardProfunctors. Require Import UniMath.CategoryTheory.EnrichedCats.Profunctors.ProfunctorTransformations. Require Import UniMath.CategoryTheory.EnrichedCats.Profunctors.Invertible. Require Import UniMath.CategoryTheory.EnrichedCats.Profunctors.ProfunctorSquares. Require Import UniMath.CategoryTheory.EnrichedCats.Profunctors.Composition.CompositionProf. Require Import UniMath.CategoryTheory.Monoidal.Categories. Require Import UniMath.CategoryTheory.Monoidal.Structure.Symmetric. Require Import UniMath.CategoryTheory.Monoidal.Structure.Closed. Import MonoidalNotations.