Proposition enriched_pentagon_law {V : benabou_cosmos} {C₁ C₂ C₃ C₄ C₅ : category} {E₁ : enrichment C₁ V} {E₂ : enrichment C₂ V} {E₃ : enrichment C₃ V} {E₄ : enrichment C₄ V} {E₅ : enrichment C₅ V} (P₁ : E₁ ↛e E₂) (P₂ : E₂ ↛e E₃) (P₃ : E₃ ↛e E₄) (P₄ : E₄ ↛e E₅) : enriched_profunctor_comp_transformation (enriched_profunctor_comp_transformation (lwhisker_enriched_profunctor P₁ (lassociator_enriched_profunctor P₂ P₃ P₄)) (lassociator_enriched_profunctor P₁ (comp_enriched_profunctor P₂ P₃) P₄)) (rwhisker_enriched_profunctor (lassociator_enriched_profunctor P₁ P₂ P₃) P₄) = enriched_profunctor_comp_transformation (lassociator_enriched_profunctor P₁ P₂ (comp_enriched_profunctor P₃ P₄)) (lassociator_enriched_profunctor (comp_enriched_profunctor P₁ P₂) P₃ P₄). Proof. use eq_enriched_profunctor_transformation ; intros z v ; cbn. use from_comp_enriched_profunctor_eq. intro w. rewrite !assoc. etrans. { do 2 apply maponpaths_2. apply lwhisker_enriched_profunctor_mor_comm. } etrans. { rewrite !assoc'. apply maponpaths. rewrite !assoc. apply maponpaths_2. apply lassociator_enriched_profunctor_data_comm. } refine (!_). etrans. { apply maponpaths_2. apply lassociator_enriched_profunctor_data_comm. } rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. use is_inj_internal_lam. 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. clear a h. rewrite !internal_beta. rewrite !assoc. rewrite <- tensor_comp_id_r. etrans. { apply maponpaths_2. apply lassociator_enriched_profunctor_mor_comm. } etrans. { unfold lassociator_enriched_profunctor_mor_ob. rewrite !assoc'. do 3 apply maponpaths. apply (lassociator_enriched_profunctor_data_comm (comp_enriched_profunctor P₁ P₂)). } etrans. { rewrite !assoc. do 2 apply maponpaths_2. rewrite !assoc'. rewrite tensor_sym_mon_braiding. rewrite !assoc. apply idpath. } use is_inj_internal_lam. use is_inj_internal_transpose. use from_comp_enriched_profunctor_eq. intros y. use internal_funext. intros a h. rewrite !tensor_comp_r_id_r. rewrite !(tensor_split (comp_enriched_profunctor_in _ _ _ _ _) h). rewrite !assoc'. apply maponpaths. clear a h. unfold internal_transpose. rewrite !internal_beta. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. use internal_funext. intros a h. rewrite !tensor_comp_r_id_r. rewrite !(tensor_split (_ #⊗ _) h). rewrite !assoc'. apply maponpaths. clear a h. rewrite !internal_beta. etrans. { rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite tensor_rassociator. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. rewrite tensor_id_id. rewrite !assoc. rewrite <- tensor_split'. rewrite tensor_split. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite <- tensor_comp_id_r. apply lassociator_enriched_profunctor_mor_comm. } etrans. { unfold lassociator_enriched_profunctor_mor_ob. do 2 apply maponpaths. rewrite !assoc. rewrite <- tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite sym_mon_braiding_inv. rewrite id_left. apply idpath. } etrans. { do 2 apply maponpaths. rewrite !assoc. rewrite <- tensor_id_id. rewrite tensor_rassociator. apply idpath. } refine (!_). etrans. { rewrite !assoc. apply maponpaths_2. rewrite <- !tensor_comp_id_r. etrans. { do 3 apply maponpaths_2. rewrite !assoc'. apply maponpaths. apply lassociator_enriched_profunctor_data_comm. } rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. rewrite tensor_comp_r_id_r. rewrite !assoc'. apply maponpaths. etrans. { do 2 apply maponpaths_2. rewrite !assoc. apply maponpaths_2. rewrite <- tensor_comp_id_r. apply lassociator_enriched_profunctor_mor_comm. } unfold lassociator_enriched_profunctor_mor_ob. rewrite !assoc'. do 3 rewrite tensor_comp_id_r. rewrite !assoc'. do 3 apply maponpaths. apply (lassociator_enriched_profunctor_mor_comm P₁ (comp_enriched_profunctor P₂ P₃) P₄). } etrans. { rewrite !assoc. rewrite <- tensor_comp_id_r. rewrite sym_mon_braiding_inv. rewrite tensor_id_id. rewrite id_left. unfold lassociator_enriched_profunctor_mor_ob. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite tensor_rassociator. rewrite !assoc'. do 3 apply maponpaths. apply (rwhisker_enriched_profunctor_mor_comm (lassociator_enriched_profunctor P₁ P₂ P₃)). } etrans. { do 4 apply maponpaths. rewrite !assoc. rewrite <- tensor_comp_id_r. do 2 apply maponpaths_2. apply lassociator_enriched_profunctor_data_comm. } etrans. { do 3 apply maponpaths. rewrite !assoc. rewrite <- tensor_comp_id_r. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. rewrite tensor_comp_id_r. rewrite !assoc'. apply maponpaths. do 2 apply maponpaths_2. rewrite !assoc. rewrite <- tensor_comp_id_r. apply lassociator_enriched_profunctor_mor_comm. } etrans. { unfold lassociator_enriched_profunctor_mor_ob. do 3 apply maponpaths. rewrite !assoc. rewrite <- tensor_comp_id_r. rewrite !assoc. rewrite sym_mon_braiding_inv. rewrite id_left. rewrite !assoc'. rewrite tensor_comp_id_r. rewrite !assoc'. apply maponpaths. rewrite !tensor_comp_id_r. apply idpath. } rewrite !assoc. do 3 apply maponpaths_2. rewrite !assoc'. rewrite mon_rassociator_rassociator. rewrite !assoc. apply maponpaths_2. rewrite tensor_sym_mon_braiding. apply idpath. Qed.
Require Import UniMath.MoreFoundations.All. Require Import UniMath.CategoryTheory.Core.Prelude. Require Import UniMath.CategoryTheory.EnrichedCats.BenabouCosmos. Require Import UniMath.CategoryTheory.EnrichedCats.Enrichment. Require Import UniMath.CategoryTheory.EnrichedCats.EnrichmentFunctor. Require Import UniMath.CategoryTheory.EnrichedCats.EnrichmentTransformation. 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.Coend. Require Import UniMath.CategoryTheory.EnrichedCats.Profunctors.Composition.CompositionProf. Require Import UniMath.CategoryTheory.EnrichedCats.Profunctors.Composition.Unitors. Require Import UniMath.CategoryTheory.EnrichedCats.Profunctors.Composition.Associators. Require Import UniMath.CategoryTheory.EnrichedCats.Profunctors.Composition.Whiskering. Require Import UniMath.CategoryTheory.Monoidal.Categories. Require Import UniMath.CategoryTheory.Monoidal.Structure.Symmetric. Require Import UniMath.CategoryTheory.Monoidal.Structure.Closed. Import MonoidalNotations.