Proposition lassociator_enriched_profunctor_laws : enriched_profunctor_transformation_laws lassociator_enriched_profunctor_data. Proof. split. - intros z₁ z₂ w ; cbn. use is_inj_internal_transpose. use from_comp_enriched_profunctor_eq. intros x. use internal_funext. intros v h. rewrite !tensor_comp_r_id_r. rewrite !(tensor_split (comp_enriched_profunctor_in _ _ _ _ _) h). rewrite !assoc'. apply maponpaths. clear v h. unfold internal_transpose. rewrite !internal_beta. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. etrans. { rewrite !assoc. rewrite <- !tensor_comp_id_l. rewrite lassociator_enriched_profunctor_data_comm. rewrite tensor_sym_mon_braiding. apply idpath. } refine (!_). etrans. { rewrite !assoc. rewrite <- tensor_comp_id_l. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. rewrite !assoc. apply maponpaths_2. apply comp_enriched_profunctor_lmap_comm. } rewrite !assoc'. apply maponpaths. use is_inj_internal_lam. use is_inj_internal_transpose. use from_comp_enriched_profunctor_eq. intros y. use internal_funext. intros v h. rewrite !tensor_comp_r_id_r. rewrite !(tensor_split (comp_enriched_profunctor_in _ _ _ _ _) h). rewrite !assoc'. apply maponpaths. clear v h. unfold internal_transpose. rewrite !internal_beta. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. use internal_funext. intros v h. rewrite !tensor_comp_r_id_r. etrans. { do 2 apply maponpaths_2. apply tensor_split. } refine (!_). etrans. { do 2 apply maponpaths_2. apply tensor_split. } refine (!_). rewrite !assoc'. apply maponpaths. clear v h. rewrite !internal_beta. rewrite !assoc. rewrite !tensor_sym_mon_braiding. etrans. { unfold comp_enriched_profunctor_lmap_mor. rewrite !assoc'. rewrite lassociator_enriched_profunctor_data_comm. 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'. apply maponpaths. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. rewrite tensor_comp_id_r. rewrite !assoc'. apply maponpaths. rewrite !assoc. cbn. rewrite !assoc. rewrite <- tensor_comp_id_l. rewrite tensor_sym_mon_braiding. rewrite !assoc'. rewrite tensor_comp_id_r. rewrite !assoc'. apply maponpaths. rewrite !assoc. etrans. { do 3 apply maponpaths_2. apply comp_enriched_profunctor_lmap_comm. } rewrite <- tensor_comp_id_r. rewrite !assoc'. rewrite tensor_comp_id_r. rewrite !assoc'. apply maponpaths. unfold comp_enriched_profunctor_lmap_mor. do 2 rewrite tensor_comp_id_r. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite <- tensor_comp_id_r. apply lassociator_enriched_profunctor_mor_comm. } etrans. { rewrite !assoc. rewrite sym_mon_braiding_inv. rewrite id_left. rewrite !assoc'. do 2 apply maponpaths. rewrite !assoc. rewrite <- tensor_comp_id_r. rewrite sym_mon_braiding_inv. rewrite tensor_id_id. rewrite id_left. rewrite <- tensor_comp_id_r. rewrite !assoc. rewrite sym_mon_braiding_inv. rewrite id_left. apply idpath. } etrans. { unfold lassociator_enriched_profunctor_mor_ob. apply maponpaths. rewrite !assoc. do 3 apply maponpaths_2. rewrite <- tensor_sym_mon_braiding. rewrite !assoc'. rewrite sym_mon_braiding_inv. apply id_right. } etrans. { rewrite !tensor_comp_id_l. rewrite !assoc'. do 3 apply maponpaths. rewrite !assoc. rewrite tensor_rassociator. apply idpath. } rewrite !assoc. refine (!_). etrans. { rewrite <- tensor_comp_id_r. rewrite tensor_sym_mon_braiding. rewrite tensor_comp_id_r. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite <- !tensor_comp_id_r. rewrite lassociator_enriched_profunctor_mor_comm. unfold lassociator_enriched_profunctor_mor_ob. rewrite !assoc'. do 2 rewrite tensor_comp_id_r. rewrite !assoc'. do 2 apply maponpaths. rewrite tensor_comp_id_r. rewrite !assoc'. apply maponpaths. apply (comp_enriched_profunctor_lmap_comm (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. apply idpath. } etrans. { rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. unfold comp_enriched_profunctor_lmap_mor. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite tensor_lassociator. rewrite !assoc'. apply maponpaths. rewrite tensor_id_id. rewrite !assoc. rewrite <- tensor_split'. rewrite tensor_split. rewrite !assoc'. rewrite tensor_comp_id_l. apply idpath. } rewrite !assoc. rewrite tensor_id_id. do 3 apply maponpaths_2. rewrite !assoc'. rewrite tensor_rassociator. rewrite tensor_id_id. rewrite !assoc. apply maponpaths_2. etrans. { apply maponpaths_2. rewrite !assoc'. rewrite sym_mon_braiding_inv. apply id_right. } refine (_ @ id_left _). rewrite <- tensor_id_id. rewrite <- mon_rassociator_lassociator. rewrite tensor_comp_id_r. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite <- mon_lassociator_lassociator. rewrite !assoc'. rewrite mon_lassociator_rassociator. rewrite id_right. apply idpath. - intros z₁ z₂ w ; cbn. use is_inj_internal_transpose. use from_comp_enriched_profunctor_eq. intros x. use internal_funext. intros v h. rewrite !tensor_comp_r_id_r. rewrite !(tensor_split (comp_enriched_profunctor_in _ _ _ _ _) h). rewrite !assoc'. apply maponpaths. clear v h. unfold internal_transpose. rewrite !internal_beta. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. etrans. { rewrite !assoc. rewrite <- !tensor_comp_id_l. rewrite lassociator_enriched_profunctor_data_comm. rewrite tensor_sym_mon_braiding. apply idpath. } refine (!_). etrans. { rewrite !assoc. rewrite <- tensor_comp_id_l. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. rewrite !assoc. apply maponpaths_2. apply comp_enriched_profunctor_rmap_comm. } rewrite !assoc'. apply maponpaths. use is_inj_internal_lam. use is_inj_internal_transpose. use from_comp_enriched_profunctor_eq. intros y. use internal_funext. intros v h. rewrite !tensor_comp_r_id_r. rewrite !(tensor_split (comp_enriched_profunctor_in _ _ _ _ _) h). rewrite !assoc'. apply maponpaths. clear v h. unfold internal_transpose. rewrite !internal_beta. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. use internal_funext. intros v h. rewrite !tensor_comp_r_id_r. etrans. { do 2 apply maponpaths_2. apply tensor_split. } refine (!_). etrans. { do 2 apply maponpaths_2. apply tensor_split. } refine (!_). rewrite !assoc'. apply maponpaths. clear v h. rewrite !internal_beta. rewrite !assoc. rewrite !tensor_sym_mon_braiding. etrans. { unfold comp_enriched_profunctor_rmap_mor. rewrite !assoc'. rewrite lassociator_enriched_profunctor_data_comm. apply maponpaths. rewrite !assoc. rewrite tensor_rassociator. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite tensor_id_id. 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. } unfold lassociator_enriched_profunctor_mor_ob. etrans. { do 3 apply maponpaths. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite <- tensor_id_id. rewrite tensor_rassociator. apply idpath. } rewrite !assoc. refine (!_). etrans. { rewrite <- tensor_comp_id_r. rewrite tensor_sym_mon_braiding. rewrite tensor_comp_id_r. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite <- !tensor_comp_id_r. rewrite lassociator_enriched_profunctor_mor_comm. unfold lassociator_enriched_profunctor_mor_ob. rewrite !assoc'. do 2 rewrite tensor_comp_id_r. rewrite !assoc'. do 2 apply maponpaths. rewrite tensor_comp_id_r. rewrite !assoc'. apply maponpaths. apply (comp_enriched_profunctor_rmap_comm (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. apply idpath. } etrans. { rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. unfold comp_enriched_profunctor_rmap_mor. rewrite !assoc. rewrite tensor_rassociator. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite <- tensor_comp_id_r. cbn. rewrite !assoc. rewrite <- tensor_comp_id_l. rewrite tensor_sym_mon_braiding. rewrite !assoc'. rewrite tensor_comp_id_r. rewrite !assoc'. apply maponpaths. do 2 apply maponpaths_2. apply comp_enriched_profunctor_rmap_comm. } etrans. { unfold comp_enriched_profunctor_rmap_mor. rewrite !tensor_comp_id_r. rewrite !assoc. apply idpath. } do 3 apply maponpaths_2. etrans. { apply maponpaths_2. rewrite !assoc'. rewrite <- tensor_comp_id_r. rewrite sym_mon_braiding_inv. rewrite tensor_id_id. rewrite id_right. apply idpath. } rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite <- mon_rassociator_rassociator. apply maponpaths_2. rewrite !assoc'. rewrite sym_mon_braiding_inv. 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.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.